Use openssl to complete the mutual conversion between X509 certificate and PFX certificate

  
 

To complete the mutual conversion of digital certificates in two formats, only a few commands of openssl are needed, which is very convenient.

Convert X509 format digital certificate to Microsoft PFX format openssl pkcs12 -export -inkey server.key -in server.crt -out server.pfx

Convert Microsoft PFX digital certificate X509 format openssl pkcs12 -in server.pfx -nodes -out server.pem # Generate plaintext all content openssl rsa -in server.pem -out server.key # fetch key file openssl x509 -in server.pem -out server.crt #取证书

Copyright © Windows knowledge All Rights Reserved