Convert SSL certificate .pfx and .crt


From .pfx
-----------------
openssl pkcs12 -in d:\temp\tobasaapp.pfx -clcerts -nokeys -out d:\temp\certificate.crt

openssl pkcs12 -in d:\temp\tobasaapp.pfx -nocerts -nodes -out d:\temp\private.key

openssl pkcs12 -in d:\temp\tobasaapp.pfx -out d:\temp\certificate.pem -nodes
To .pfx
-----------------
openssl pkcs12 -export -out certificate.pfx -inkey PrivateKey.key -in certificate.crt -certfile CACert.crt
Here:

Certificate.crt = Your-domain-Name.crt
CACert.crt = Certificate Authority Bundle
certificate.pfx is the new name of generated file
PrivateKey can be in .key or .txt format

No comments :

Post a Comment