OpenSSL Convert .p7b to .pem to .crt: Difference between revisions

From UNIX Systems Administration
Jump to navigation Jump to search
(Created page with "== Convert .p7b to .pem == # Conversion from .p7b with DER encoding to .pem. ## <tt>'''# openssl pkcs7 -inform der -in <certificate>.p7b -out <certificate>.pem'''</tt> == Con...")
 
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Convert .p7b to .pem ==
== Convert .p7b with DER encording to .pem with PEM (PKCS7) encoding ==
# Conversion from .p7b with DER encoding to .pem.
# Conversion from .p7b with DER encoding to PEM encoding
## <tt>'''# openssl pkcs7 -inform der -in <certificate>.p7b -out <certificate>.pem'''</tt>
## <tt>'''# openssl pkcs7 -inform der -in <certificate>.p7b -outform pem -out <certificate>.pem'''</tt>
# Verify the encoding, the following is viewable in the file -----BEGIN PKCS7----- to -----END PKCS7-----


== Convert .pem to .crt ==
== Convert from PKCS7 PEM-formatted to x509 PEM-formatted ==
# Conversion from .pem with no encoding to .crt.
# Convert from PKCS7 PEM-formatted to x509 PEM-formatted.
## <tt>'''#openssl pkcs7 -print_certs -in srvcctrain01.pem -out srvcctrain01.crt'''</tt>
## <tt>'''# openssl pkcs7 -print_certs -in <certificate-pem>.p7b -out <certificate-x509>.crt'''</tt>


== Further Reading ==
== Further Reading ==
# [http://www.experts-exchange.com/Programming/Q_27570065.html]
# [http://www.experts-exchange.com/Programming/Q_27570065.html OpenSSL: unable to load PKCS7 object]
# [https://www.sslshopper.com/ssl-converter.html]
# [https://www.sslshopper.com/ssl-converter.html SSL Converter]


[[Category:Software]]
[[Category:Software]]
[[Category:SSL]]
[[Category:SSL]]

Latest revision as of 20:19, 8 January 2016

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