[openssl-users] Session Ticket Support in Openssl TLS 1.2

Matt Caswell matt at openssl.org
Wed Jun 14 10:43:40 UTC 2017

On 14/06/17 01:38, Salz, Rich via openssl-users wrote:
> It’s disabled by default.  Servers that want to use server-side session
> caching have to call an API to turn it on

Err, no, that's not correct. Server side caching is on by default.
Client side caching is off by default.

On 14/06/17 02:03, Neetish Pathak wrote:
> Thanks for your reply Salz. However, I want to know should the session
> caching be enabled on server side for TLS 1.3 for session resumption.

It should just work by default for TLSv1.3. You don't need to enable

> Also, I need a clarification on how does resumption work in case of
> session identifiers if server side caching is not enabled

As noted above server side caching is on by default.

On 14/06/17 02:33, Neetish Pathak wrote:
> I need some suggestions on how I can implement session resumption in TLS
> 1.3. I have implemented the resumption on the client side using a
> callback as recommended on the TLS 1.3
> blog https://www.openssl.org/blog/blog/2017/05/04/tlsv1.3/
> <https://www.openssl.org/blog/blog/2017/05/04/tlsv1.3/> . Still, the
> session resumption is not working. I know this because my new_session_cb
> which I have set using SSL_CTX_sess_set_new_cb is never getting invoked
> and also I don't see any improvement in connection time.
> The same implementation when I change the max TLS version to TLS1.2
> works and session resumption works as desired.
> I am not sure how I can resolve this.
> As mentioned on the blog post
> "In TLSv1.3 sessions are not established until after the main handshake
> has completed. The server sends a separate post-handshake message to the
> client containing the session details. Typically this will happen soon
> after the handshake has completed, but it could be sometime later (or
> not at all)."
> I think the server is not informing the session details to client at all
> in my case and hence the resumption is not working. Can someone please
> suggest how to resolve this

Just to be clear: you are using OpenSSL on both the server and client
sides right? If you are using something other than OpenSSL on the server
then the policy might be different around when the session information
is sent to the client (i.e. it could happen sometime later, or not at
all). If you are using OpenSSL on the server then it sends its session
information immediately after the main handshake has completed, so that
should not be a problem.

So if I understand you correctly the client is successfully creating a
TLSv1.3 connection, but the client side new session callback is never
being invoked? Did you call SSL_CTX_sess_set_new_cb() before or after
the SSL object itself was created? Are you able to share any code for
how you have done this?


More information about the openssl-users mailing list