I wanted to list the certificates stored in a PKCS12 keystore.
The keystore has the extension .pfx
.pfx
If the keystore is PKCS12 type (.pfx) you have to specify it with -storetype PKCS12 (line breaks added for readability):
-storetype PKCS12
keytool -list -v -keystore \ -storepass \ -storetype PKCS12