cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: HTTPS-request with custom root-certificate?

From: Ray Satiro <raysatiro_at_yahoo.com>
Date: Wed, 07 May 2014 14:07:58 -0400

On 5/7/2014 2:19 AM, Satz Klauer wrote:
> But I could provide the related root-certificate during the request.
> So: how can this be done using libcurl? How should code for a
> HTTPS-POST-request look like when a custom root-certificate is used?
>
Did you try CURLOPT_CAINFO?
curl_easy_setopt( hnd, CURLOPT_CAINFO, ca_certificate_path.c_str() );
The CA certificate may have to be have to be in a specific format
depending to work properly depending on your ssl. I use OpenSSL and if I
remember right I had to convert some certificates to base64 to use them.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-05-07