The original file probably looks like this:
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: AES-etc etc etc
<encrypted private key>
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
<certificate>
-----END CERTIFICATE-----
If you use the openssl command as specified above, you will get an output that looks like this:
-----BEGIN RSA PRIVATE KEY-----
<unencrypted private key>
-----END RSA PRIVATE KEY-----
What you have to do is edit the original file and replace the 'RSA PRIVATE KEY' section with the output of the openssl command. You will get a file that looks like this:
-----BEGIN RSA PRIVATE KEY-----
<unencrypted private key>
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
<certificate>
-----END CERTIFICATE-----