cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SSL session sharing support added to curl_share_setopt()

From: Alejandro Álvarez Ayllón <alejandro.alvarez.ayllon_at_cern.ch>
Date: Mon, 12 Dec 2011 13:54:54 +0100

Hello again,

I tried to see if there is a way to expose the session age through a
call, but I think it is more effort than needed, and opted for the
debugging print.

So, would this be good enough?

diff --git a/lib/sslgen.c b/lib/sslgen.c
index 9ad4ab1..07be990 100644
--- a/lib/sslgen.c
+++ b/lib/sslgen.c
@@ -265,6 +265,7 @@ int Curl_ssl_getsessionid(struct connectdata *conn,
        /* yes, we have a session ID! */
        (*general_age)++; /* increase general age */
        check->age = *general_age; /* set this as used in this age */
+ DEBUGF(fprintf(stderr, "Session age incremented: %d\n", check->age));
        *ssl_sessionid = check->sessionid;
        if(idsize)
          *idsize = check->idsize;

As I mentioned before, apart of seeing that a hit increments the age by
two, it seems OK to me.

Regards.

On 28/11/11 13:51, Daniel Stenberg wrote:
> On Thu, 24 Nov 2011, Alejandro Álvarez Ayllón wrote:
>
>> 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:
>
> ...
>
>> 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.
>
> Exactly. We could possibly fix this by changing how the API works or
> something, but I don't think the current approach is damaging in any
> way so we can just leave it like this.
>

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