Convert certificates formats (PEM/P7B/PFX/DER)

You can change certificate format using OpenSSL commands or SSL Converter tool. The most common are listed below:

I. Convert PEM files
PEM to DER
openssl x509 -outform der -in certificate.pem -out certificate.der
PEM to P7B
openssl crl2pkcs7 -nocrl -certfile certificate.cer -out certificate.p7b -certfile CACert.cer
PEM to PFX
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt -certfile CACert.crt

II. Convert P7B files
P7B to PEM openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer
P7B to PFX
openssl pkcs7 -print_certs -in certificate.p7b -out certificate.cer openssl pkcs12 -export -in certificate.cer -inkey privateKey.key -out certificate.pfx -certfile CACert.cer

III. Convert PFX files
PFX to PEM
openssl pkcs12 -in certificate.pfx -out certificate.cer -nodes konwersja poprze OpenSSL

IV. Convert DER files
DER to PEM
openssl x509 -inform der -in certificate.cer -out certificate.pem

0 (0)
Article Rating (No Votes)
Rate this article
Attachments
There are no attachments for this article.
Comments
There are no comments for this article. Be the first to post a comment.
Full Name
Email Address
Security Code Security Code
Related Articles RSS Feed
The Most Common OpenSSL Commands
Viewed 1333 times since Wed, May 22, 2019
Konwertuj certyfikat
Viewed 1029 times since Wed, May 22, 2019
Check SSL Certificate with OpenSSL
Viewed 1165 times since Fri, Oct 28, 2022
Testing TLS/SSL encryption
Viewed 13008 times since Thu, Jan 16, 2020