From 6ed448400812ccf5ad6f90bc43bf22dfca428308 Mon Sep 17 00:00:00 2001 From: swee Date: Thu, 16 Jan 2025 15:41:18 -0800 Subject: [PATCH] Replace ssl.SSLContext with ssl.create_default_context --- server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server.py b/server.py index 2ae6233..45eca9f 100644 --- a/server.py +++ b/server.py @@ -129,7 +129,7 @@ for i in restrict_ip.split(" "): sockets[i].setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) sockets[i].bind((i,6667)) sockets[i].listen(1) -context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) +context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) if ssl_option: print(f"Loading SSL cert {ssl_cert} with key {ssl_pkey}") context.load_cert_chain(ssl_cert, keyfile=ssl_pkey)