Using openssl
, I've created a private key as follows:
openssl genrsa -out myKey.pem
Then, to generate the csr
demanded by the CA, I've executed the following:
openssl req -new -key myKey.pem -out cert.csr
The CA responded with a certificate which I stored in a file named myCert.cer
I'd now like to bundle the necessary components (private key, public key(?) and certificate) into a single .p12
. To do so I've run the following:
openssl pkcs12 -export -out keyStore.p12 -inkey myKey.pem -in myCert.cer
but I'm getting the following error message:
No certificate matches private key
How can I accomplish this?
cert.csr
hisself, then one could useopenssl x509 -req -in cert.csr -signkey key.pem -out cert.crt
and thenopenssl pkcs12 -export -in cert.crt -inkey key.pem -out cert.p12
. No need to use the additional command from the answer. – Trickster