cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Reuse ssl session accross curl handles

From: Thomas Glanzmann <thomas_at_glanzmann.de>
Date: Fri, 29 Apr 2016 09:56:56 +0200

Hello,

* Thomas Glanzmann <thomas_at_glanzmann.de> [2016-04-29 09:45]:
> now that Ray has fixed session reuse, I wonder if it is possible to
> reuse SSL session across curl handles? If I use the same curl handle it
> works, but if I try to use curl_easy_duphandle[1] it does _not_ work.
> Any tricks to reuse session with multiple curl handles? If it is not
> possible, can I use the same curl handle using curl easy for multiple
> connections in a multi threaded procss?

to answer my own question:

CURLSH *share = curl_share_init();
curl_share_setopt(share, CURLSHOPT_SHARE, CURL_LOCK_DATA_SSL_SESSION);

But when I add the above to my code the sessions are _not_ shared. I can
tell that from looking at the wireshark output as well as on the
debugging output of mbedtls.

Can someone confirm or am I doing something wrong?

I do the following:

curl_easy_init()
curl_easy_duphandle()
curl_easy_perform()

Cheers,
        Thomas
-------------------------------------------------------------------
List admin: https://cool.haxx.se/list/listinfo/curl-library
Etiquette: https://curl.haxx.se/mail/etiquette.html
Received on 2016-04-29