public:common_openssl_operations
This is an old revision of the document!
Table of Contents
Common OpenSSL Operations
Extracting a private key in PEM format from a P12 container
openssl pkcs12 -in key.p12 -out key.pem -legacy -nocerts -nodes
Converting a CER certificate to a PEM certificate
openssl x509 -inform der -in certificate.cer -out certificate.pem
Adding intermediate certificates to a P12 file
First, extract the key from the existing P12 container:
openssl pkcs12 -in container.p12 -out key.pem -legacy -nocerts -nodes
Then, concatenate the certificate and the intermediate certificates:
cat certificate.pem intermediate.pem > certs.pem
Finally, merge everything back in a new P12 container:
openssl pkcs12 -export -out all.p12 -inkey key.pem -in certs.pem
public/common_openssl_operations.1732027619.txt.gz · Last modified: by thomas
