curl-library
RE: How to use Client certificate having .P12 format
Date: Thu, 10 Mar 2005 10:13:17 -0600
Aniruddha spoke:
> I am having client certificate in .p12 format.
Aniruddha,
You never said what version of curl you are using, but in the
latest versions of curl you may use a PCKS12 formatted file directly. I
am the one that added the suport, but I have yet to send any kind of
docs, and for that I am sorry. However to use it is most like using a
PEM file, the cert is your PCKS12 file, the key password is the
password of the key, and the cert type is P12.
So as an example it would be
curl_easy_setopt(curl, CURLOPT_SSLCERT, "cert.p12");
curl_easy_setopt(curl, CURLOPT_SSLCERTTYPE, "P12");
curl_easy_setopt(curl, CURLOPT_SSLKEYPASSWD, "myPassword");
Hope this helps and makes sense. If you run into any problems or
gotchas, either post them here or send me an email.
Sam
Received on 2005-03-10