Extracting the certificate chain from a PKCS#7 container

After processing the Certificate Signing Request, the certification authority may provide a certificate chain in the PKCS#7 format (file with the P7B extension). The chain includes the website certificate signed at your request as well as certificates of intermediate certificate authorities.

The PKCS#7 certificate file can be provided in two encodings:

To use the certificates, you must extract them from the container to get a PEM-encoded file. You can use the openssl utility to convert the certificate.

To convert the DER encoded PKCS#7 file, use the following command:

openssl pkcs7 -in source.p7b -inform DER -print_certs -out cert.pem

To convert a PEM encoded PKCS#7 file, use the following command:

openssl pkcs7 -in source.p7b -inform PEM -print_certs -out cert.pem

You can use the obtained cert.pem file to replace the web interface certificate.

Page top