I'm trying to use CURL to test simple HTTPS connections to servers that require a client certificate. I've specified the certificate type in my .curlrc file with cert = /path/to/Cert.p12 and told it that yes, it's a PKCS12 cert with cert-type = P12. It kept failing with "could not parse PKCS12 file, check password...... mac verify failure", so out of curiosity I tried hard-coding the password in the config file, and sure enough it pulled the page right up.

I read the man page about a dozen times and I can't see anything from the command line to say "please prompt me for a password", and it says right there "If the optional password isn't specified, it will be queried for on the terminal". Am I missing something obvious?

link|improve this question

feedback

1 Answer

up vote 0 down vote accepted

I can't find a source, but it appears that while CURL sort of speaks PKCS12, it would really rather have a PEM-format cert. Simply converting my PKCS12 cert to PEM, with password, caused CURL to start prompting for passwords as expected.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.