curl-users
Re: Curl session ID
Date: Fri, 15 Oct 2004 09:26:37 +0200 (CEST)
On Thu, 14 Oct 2004, Karthik Ramakrishnan wrote:
(You're asking lots of libcurl stuff, I'd recommend you to take this to the
curl-library mailing list in the future instead! CC'ing this reply that way.)
> Hi, I have a question on reuse of SSL session ID's in curl. I am using
> LibCurl V7. I have been running some tests in which I am *NOT* reusing the
> curl handle across multiple fetches. I connect to an HTTPS server once with
> a curl handle and then free the handle and create another one for the second
> fetch. My second fetch happens after the server's TimeToLive window has
> expired.
> Hence I see a message in my logs which says "Connection 0 seems to be dead"
> when I attempt to connect for the second time. So far so good.
No. If it says "Connection 0 seems to be dead" it means that libcurl knows
about an existing connection that it checks and discovers to be dead. It means
that you used this handle before. When you use the handle for the first time,
it does not say anything like that.
> But what is surprising is that I see "SSL re-using session ID" message in my
> logs even after I create a new curl handle. So I assume the session ID cache
> is now global and not tied to a specific curl handle. Can you please verify
> this?
Nope. The SSL session ID cache is kept in the 'UrlData' struct, which in the
external API equals the CURL * handle. If you re-use that handle, you'll get
the benefits of the cache.
I mean to get the SSL session ID cache shareable with the share interface one
day, so that it can be used from multiple CURL handles, but it currently isn't
supported.
-- Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se Dedicated custom curl help for hire: http://haxx.se/curl.htmlReceived on 2004-10-15