Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to validate PFX with public-key privacy/integrity mode

Tags:

ssl

pfx

pkcs#12

I have a piece of embedded software generating P12/PFX formatted output data.
The PFX is not password protected, that means instead of using a password-derived encryption/mac key the data is encrypted with a public key and signed with my private key.
In RFC7292 section 3.1 this is called public-key privacy and integrity modes.

My question is, how can I validate the PFX I receive, e.g. using openssl? (I'm not restricted to use openssl, by the way I google'd around but could not find a way...)

I tried

openssl pkcs12 -info -in test.pfx

but openssl requests a password, which is not applicable here. Did I miss any option to not being asked for a password?

like image 616
qdbp Avatar asked Sep 12 '25 07:09

qdbp


1 Answers

openssl pkcs12 -info -in test.pfx -passin pass: -passout pass: 

Alternatively, you can just use

openssl pkcs12 -info -in test.pfx

and when it asks for Import Password or PEM Pass Phrase (and you didn't use any while generating the pfx file), just press Enter.

like image 108
Pravin Singh Avatar answered Sep 13 '25 19:09

Pravin Singh