1

I am trying to export the private key and certificate to p12 file using below command in my mac os X - Mountain Lion:

pkcs12 -export -out privkey.pem -inkey privkey.pem -in rsaCert.crt

but I am getting this error:

-bash: pkcs12: command not found

To verify if it is there or not, I typed below man command:

man pkcs12

which is showing appropriate manual page.

Any ideas?

4

The above line looks like being from openssl.

pkcs12 is a subcommand of openssl. You probably mean:

openssl pkcs12 -export -out privkey.pem -inkey privkey.pem -in rsaCert.crt

Your man page probably also tells you to use openssl pkcs12.

  • This is correct. Also, @Miraaj's command would also be correct if the user was actually in the OpenSSL shell by first executing the openssl command from their Bash prompt. However, the typical thing to do is to just execute it all from Bash by adding openssl before the command itself. – rubynorails Oct 2 '15 at 2:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.