Search code examples
opensslkeystoreasn.1pkcs#12

How to get info/details from p12 type keystore file


I am trying to get p12 type details as below,

openssl pkcs12 -info -in keystore.p12

But, its giving error

2512:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1180:
2512:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:365:Type=PKCS12

Any idea, please suggest


Solution

  • Where did you get your keystore.p12 file? This post seems to indicate that there's an error in the format of the file, and has some suggestions on how to address it.

    Specifically, it indicates to check and make sure there are no [leading or trailing] spaces in the file.

    Are you sure its properly formatted?