cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Using libcurl/SSL with in-core certificate - solved

From: theo borm <theo_curl_at_borm.org>
Date: Fri, 26 Aug 2005 12:49:07 +0200

Daniel Stenberg wrote:

>
> I liked it so much I added it to the docs/examples dir of the release
> archives, and it is now available online here:
>
> http://curl.haxx.se/lxr/source/docs/examples/cacertinmem.c
>
> I hope you don't mind.
>
no problem.

Please keep in mind that if you fetch multiple HTTPS URLS, the
CURLOPT_SSL_CTX_FUNCTION callback function will be
called for every transfer, and (re-) loading the same certificate the
second/third etc. time will (should) fail.

Loading certificate(s) should (in most cases) be a one-time per
program initialization event, which could easily be achieved
by calling (SSL_CTX *)curl_easy_get_SSL_context(void)
(to be written) to get a pointer to the SSL context and doing
the nescessary modifications once.

Would there be objections to extending the API?

Cheers, Theo
Received on 2005-08-26