Open
Description
Description:
I am encountering an issue when attempting to implement session resumption in TLS 1.3 using PyOpenSSL. I have already tried the implementation suggested in #1291.
Scenario:
Client
self.context = SSL.Context(config.secure_version)
self.context.set_session_cache_mode(SSL.SESS_CACHE_CLIENT)
if session is not None:
self.conn.set_session(session)
try:
self.conn.set_connect_state()
self.conn.do_handshake()
while self._running:
data = self.conn.recv(1)
if data:
self.session = self.conn.get_session()
break
Server
self.context = SSL.Context(config.secure_version)
self.context.set_session_cache_mode(SSL.SESS_CACHE_SERVER)
self.context.set_session_id(b'12345678123456781234567812345678')
Observations:
The session resumption works correctly with TLS 1.2:
However, the same implementation fails for TLS 1.3. It always creates a new Session Ticket during the second connection attempt:
Questions:
What am I doing wrong in my implementation? Is there anything I might be missing to achieve proper session resumption for TLS 1.3?
Any guidance would be greatly appreciated!
Metadata
Metadata
Assignees
Labels
No labels