Plesk: How to Extract Private Key and Certificate Files from a .PFX File

How to Extract Private Key and Certificate Files from a .PFX File

Copy your domain.pfx file in the same directory where your openssl ins installed:

Extract Private Key

The following command will extract private key from .pfx file. You can find the private key in file named private_key.pem.

# openssl pkcs12 -in  myfile.pfx -nocerts -out private_key.pem -nodes

Enter Import Password:

MAC verified OK

Extract Certificate

The following command will extract certificate from .pfx file. You can find the certificate in file named certificate_file.crt.

# openssl pkcs12 -in  myfile.pfx -nokeys -out certificate_file.crt

Enter Import Password:

MAC verified OK

Tags:

Comments are closed

Latest Comments

No comments to show.