OpenSSL Convert .p7b to .pem to .crt

From UNIX Systems Administration
Revision as of 20:19, 8 January 2016 by Michael Kohler (talk | contribs) (→‎Convert .pem with PEM encoding to .crt)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Convert .p7b with DER encording to .pem with PEM (PKCS7) encoding

  1. Conversion from .p7b with DER encoding to PEM encoding
    1. # openssl pkcs7 -inform der -in <certificate>.p7b -outform pem -out <certificate>.pem
  2. Verify the encoding, the following is viewable in the file -----BEGIN PKCS7----- to -----END PKCS7-----

Convert from PKCS7 PEM-formatted to x509 PEM-formatted

  1. Convert from PKCS7 PEM-formatted to x509 PEM-formatted.
    1. # openssl pkcs7 -print_certs -in <certificate-pem>.p7b -out <certificate-x509>.crt

Further Reading

  1. OpenSSL: unable to load PKCS7 object
  2. SSL Converter