Export CRT certificate from PFX file
Issue
You have a PFX file and you need to extract the certificate for another purpose
Requirements
- OpenSSL binaries
- PFX File Password (this password is entered when exporting the certificate from another machine)
On Windows you can directly download binaries from this webpage : https://slproweb.com/products/Win32OpenSSL.html
It also requires Microsoft Visual C++ 2017 Redistributable (The installer checked for it and also offers to download it should it be missing) https://download.visualstudio.microsoft.com/download/pr/3c46b1eb-b8ad-48d6-b22f-6213a3b3be58/31e51c713d0fb3a7686c3449f86ef34c/vc_redist.x64.exe
Solution
On Windows, go to your OpenSSL folder.
cd C:\Program Files\OpenSSL-Win64\bin
Run the following command and enter the export password. (Works the same on GNU\Linux, Mac or Windows)
openssl pkcs12 -in "path\to\cert.pfx" -nokeys -out "whatever\path\you\want\for\cert.crt" -nodes
Source
Was this post helpful?
Let us know if you liked the post. That’s the only way we can improve.