cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Recursive curl download.

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 14 Sep 2011 20:32:54 +0200 (CEST)

On Wed, 14 Sep 2011, Arunkumar Manickam wrote:

> We have an ongoing HTTPs session using libcurl compiled with openssl. In the
> openssl verify call back, we need to download the CRL of the ssl server
> certificate. Can we initialise another curl easy handle and download CRL
> inside verify call back function. We are already inside a call back function
> from a curl download itself.
>
> Is it advisable to do a new curl session from with in one of the callbacks
> of another curl session.

I'm not sure it is advisable, but I can't see any reason why it wouldn't work.

Another option it to simply store the CRL and knowledge about it and abort the
transfer. Then fetch the CRL outside of the callback, and then re-do the first
request (which should be quick with connection re-use and SSL session id
re-use) and in the next invoke of the callback you'll have the CRL already
there...

> is there any call back we can register, to get notified once the connection
> to a secure server is made, for further verifications.

No, there's not. And I'll admit I don't quite see how that would save you from
this problem even if one such existed...

-- 
  / daniel.haxx.se
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette:  http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-14