curl-library
Re: SSL session sharing support added to curl_share_setopt()
Date: Thu, 24 Nov 2011 13:37:41 +0100
On 18/11/11 10:00, Alejandro Álvarez Ayllón wrote:
> On 17/11/11 23:59, Daniel Stenberg wrote:
>> On Thu, 17 Nov 2011, Daniel Stenberg wrote:
>>
>>> That's indeed a good start. Unfortunately we don't test SSL session
>>> sharing so it doesn't tell us a very great deal... But reading the
>>> code it looks good.
>>
>> I take that back! ;-/
>>
>> The age increment was done wrong, the function returned while holding
>> the lock and it did a shared lock while still writing to the shared
>> data.
>>
>> I've done to follow-up commits I believe makes the function work more
>> as intended now. I guess it shows we really need tests...
>>
> Sorry, I missed that. And I think I did in the first patch, actually.
> Should be more careful with the returns.
>
> I have added a ticket to our Trac to try and see how to better debug
> this. I can not compromise to have it quick, but at least it is noted :)
>
> Regards, and thanks.
Hi again,
I have come to realise that Curl_ssl_getsessionid is called twice per
connection, once in ossl_connect_step1 and another in
ossl_connect_step3. After instrumenting the code for debug builds:
* About to connect() to www.google.es port 443 (#0)
* Trying 209.85.148.103... * connected
* Connected to www.google.es (209.85.148.103) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: /etc/ssl/certs/ca-certificates.crt
CApath: none
lock: ssl_session [Pigs in space]: 12
* Session age: 1
unlock: ssl_session [Pigs in space]: 13
* SSL re-using session ID
* SSL connection using RC4-SHA
lock: ssl_session [Pigs in space]: 14
* Session age: 2
unlock: ssl_session [Pigs in space]: 15
It seems to me that this happens with and without sharing. So the age
always increment by two in every hit. I suppose this is not a big
problem, though.
Cheers.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-11-24