149

I have a PFX certificate file on my machine and I'd like to view the details before importing it. (The import utility doesn't actually tell you what the certificate is!).

How do I view the details about the PFX certificate file?

1
  • 2
    It is 2019 and we still can't easily view a certificate before installing it. We have to go out on the web to find an answer. Sad state of affairs for Microsoft. – jww Sep 15 '19 at 0:24
204

Some options to view PFX file details:

  • Open a command prompt and type: certutil -dump <path to cert>
  • Install OpenSSL and use the commands to view the details, such as: openssl pkcs12 -info -in <path to cert>
4
  • The first option is good, but is there any way of seeing more details of the certificate such as the SAN, without installing a third party tool? – Meir Aug 17 '16 at 8:41
  • 19
    certutil -v -dump <path to cert> will display a verbose listing including SAN. – C. Cornwell Jan 5 '17 at 22:37
  • 1
    I have an encrypted pfx file. Is there any information I can find out about it without knowing the password? – mwfearnley Apr 21 '17 at 14:22
  • @mwfearnley, except of recovering the password via brute-force method, I am afraid there is no other option left. – U880D Apr 17 '18 at 8:59
10

You can pipe the info to the openssl x509 utility and then export that out to a file like this:

openssl.exe pkcs12 -info -in c:\temp\cert.pfx | openssl.exe x509 -noout -text > c:\temp\cert.pfx.details.txt

You will be prompted for the certificate passwords too of course.

3

The contents of a pfx file can be viewed in the GUI by right-clicking the PFX file and selecting Open (instead of the default action, Install).

Explorer context menu

This will open mmc and show the pfx file as a folder. Open the pfx folder and the Certificates subfolder, and you will see the certificate(s) contained in the pfx. The certificate can be opened to view details.

example UI

Alternatively, the GUI can be opened by running mmc certmgr.msc /CERTMGR:FILENAME="C:\path\to\pfx"

It is also possible to use FileTypesMan to change the default (double-click) action for PFX files from Install to Open.

1

Another possibility: using SigCheck utility, as mentioned in Microsoft's Clickonce docs (the docs mention examining a .manifest file, but it works on a .pfx file as well).

Outputs looks like:

enter image description here

2
  • 1
    As I understand, sigcheck checks the signature of the specified file(s). Since, pfx file is not signed, the output shows as 'unsigned'. So this way doesn't work there. – Jury May 7 '20 at 1:43
  • @Jury: is not the question about being able to view the contents of the certificate ? This way does show. The file being signed or not is not relevant for the problem posed - as far as I understand. – Veverke May 7 '20 at 6:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.