I'm trying to read the PKCS#12 file and extract private key programmatically in C. I've found here solution, but this program automatically decrypts my private key and checks only the PKCS#12 file password. Is there any way to also verify the private key passphrase?
Asked
Active
Viewed 180 times
1
-
As far as I know, there's no way to do it completely because the machinery lack a MAC. That is, its trial and error - if you don't get an error when you load the key, then the passphrase was probably OK. If there was a MAC, then you woud no for sure with an acceptable error rate. – jww Nov 08 '15 at 09:05