Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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