Skip to content

Commit

Permalink
ssl: Implement SSLSession support.
Browse files Browse the repository at this point in the history
Signed-off-by: Daniël van de Giessen <[email protected]>
  • Loading branch information
DvdGiessen committed Oct 24, 2024
1 parent 68e3e07 commit dd4fc8a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python-stdlib/ssl/ssl.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,14 @@ def load_verify_locations(self, cafile=None, cadata=None):
self._context.load_verify_locations(cadata)

def wrap_socket(
self, sock, server_side=False, do_handshake_on_connect=True, server_hostname=None
self, sock, server_side=False, do_handshake_on_connect=True, server_hostname=None, session=None,
):
return self._context.wrap_socket(
sock,
server_side=server_side,
do_handshake_on_connect=do_handshake_on_connect,
server_hostname=server_hostname,
session=session,
)


Expand All @@ -50,6 +51,7 @@ def wrap_socket(
cadata=None,
server_hostname=None,
do_handshake=True,
session=None,
):
con = SSLContext(PROTOCOL_TLS_SERVER if server_side else PROTOCOL_TLS_CLIENT)
if cert or key:
Expand All @@ -62,4 +64,5 @@ def wrap_socket(
server_side=server_side,
do_handshake_on_connect=do_handshake,
server_hostname=server_hostname,
session=session,
)

0 comments on commit dd4fc8a

Please sign in to comment.