Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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

The keystore has the extension .pfx

like image 786
David García González Avatar asked Jan 17 '13 08:01

David García González


People also ask

How do I view the contents of a pkcs12 file?

You can view the contents of a p12 key by installing OpenSSL, an open-source cryptography toolkit, and entering the command openssl pkcs12 -info -nodes -in yourfilename. p12 at your PC's command line.


1 Answers

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 
like image 120
David García González Avatar answered Oct 20 '22 12:10

David García González