Programster's Blog

Tutorials focusing on Linux, programming, and open-source

Convert PFX Key To Certificates

Steps

PFX_FILEPATH=input.pfx

openssl pkcs12 -in $PFX_FILEPATH -nocerts -out encrypted.private.key.crt
openssl pkcs12 -in $PFX_FILEPATH -cacerts -nokeys -chain -out ca.crt
openssl pkcs12 -in $PFX_FILEPATH -clcerts -nokeys -out site.crt
openssl rsa -in encrypted.private.key.crt -out decrypted.private.key.crt

References

Last updated: 13th February 2021
First published: 1st February 2021

This blog is created by Stuart Page

I'm a freelance web developer and technology consultant based in Surrey, UK, with over 10 years experience in web development, DevOps, Linux Administration, and IT solutions.

Need support with your infrastructure or web services?

Get in touch