Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
gnutls backend doesn't reuse sessions #1109
It seems that curl has support for session IDs but not for session tickets. When linked with gnutls client hello indicates support for TLS tickets so the server sends a TLS ticket back and does not send a session id back. But curl doesn't seem to handle the TLS tickets.
In case of OpenSSL it doesn't send a TLS ticket extension in the client hello and so gets a session id back, and then it properly reuses the session.
We'll welcome help and patches to fix this. This seems to be the GnuTLS docs for how it works: https://www.gnutls.org/manual/html_node/Session-resumption.html
Probably TLS session tickets don't work because curl does not use the same SSL context for multiple requests. See TODO: Cache/share OpenSSL contexts
I have tested this: After disabling TLS session tickets, reusing the SSL sessions works properly. TLS session tickets are already disabled for OpenSSL.
For GnuTLS 3.5.6 and newer versions, this can be fixed with this patch:
The same problem also exists for mbed TLS. Patch:
What do you think?