Via Cà Matta 2 - Peschiera Borromeo (MI)
+39 02 00704272
info@synaptica.info

SSL Certificate – Extract crt and key from pfx cert file

Digital Innovation Partner

SSL Certificate – Extract crt and key from pfx cert file

How to Convert a PFX Certificate to PEM and Extract the CRT File

In this article, I will show you how to convert a PFX certificate to PEM format and extract the CRT file using OpenSSL. Follow these simple steps to complete the operation.

1. Extract the Private Key from the PFX File

First, we need to extract the private key from the PFX file. Use the following command:

This command will prompt you to enter the password for the PFX file and then set a password to protect the extracted private key.

2. Extract the Certificate (CRT) from the PFX File

Next, we extract the CRT certificate from the PFX file with the following command:

This command will prompt you to enter the password for the PFX file.

3. (Optional) Remove the Password from the Private Key

If you want to remove the password from the private key, you can use the following command:

This command will prompt you to enter the password you set to protect the private key during extraction.

Complete Example

Here is a complete example of all commands with passwords:

By following these steps, you will be able to successfully extract the private key and certificate from the PFX file, even if it is password protected. If you need further details or assistance, feel free to ask in the comments!