cURL / Mailing Lists / curl-library / Single Mail


Re: Using Libcurl With Smart Cards / Maintaining TLS Session ID

From: Joel Odom <>
Date: Tue, 28 Jan 2014 11:03:18 -0500

Nick, using a CURLSH works great. Thank you.

On Mon, Jan 27, 2014 at 8:20 PM, Nick Zitzmann <> wrote:
> On Jan 27, 2014, at 5:04 PM, Joel Odom <> wrote:
>> I do come with a question. Every time that I make a new request
>> (using HTTPS), libcurl renegotiates the TLS connection. When client
>> credentials are used, this causes the Windows certificate selection
>> dialog to open every time (thanks to my changes). What is the trick
>> to make libcurl save a session so that it can use the abbreviated TLS
>> handshake?
> Either:
> 1. Use the multi API, or
> 2. Create a share object (CURLSH), set CURLSHOPT_SHARED to CURL_LOCK_DATA_SSL_SESSION, and set the easy handle to use the share object. Don't forget to set the lock/unlock functions for the share object.
> Also, if CURLOPT_SSL_SESSIONID_CACHE is set to 0L in your easy handle, it doesn't matter what you do; sessions will never be re-used. Make sure this is set to 1L unless you have a good reason for not wanting to re-use sessions. I think it's 1L by default.
> Nick Zitzmann
> <>
> -------------------------------------------------------------------
> List admin:
> Etiquette:

List admin:
Received on 2014-01-28