How to list the certificates stored in a PKCS12 keystore with keytool?

David García González picture David García González · Jan 17, 2013 · Viewed 186.8k times · Source

I wanted to list the certificates stored in a PKCS12 keystore.

The keystore has the extension .pfx

Answer

David García González picture David García González · Jan 17, 2013

If the keystore is PKCS12 type (.pfx) you have to specify it with -storetype PKCS12 (line breaks added for readability):

keytool -list -v -keystore <path to keystore.pfx> \
    -storepass <password> \
    -storetype PKCS12