From 0e5d97490088d7b9c9acd5c8ae8e8c22a6259239 Mon Sep 17 00:00:00 2001 From: swee Date: Sun, 26 Jan 2025 13:21:02 -0800 Subject: [PATCH] Update server.py --- server.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/server.py b/server.py index ebd2dfd..9c53c26 100644 --- a/server.py +++ b/server.py @@ -172,6 +172,9 @@ for i in mods['command']: commandProviders.append(i.IRCatModule(**requires)) sockets = {} sockets_ssl = {} +context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER) +context.minimum_version = ssl.TLSVersion.TLSv1 +context.set_ciphers('DEFAULT:@SECLEVEL=0') # Open the specified non-SSL sockets. for i in restrict_ip.split(" "): sockets[i] = socket.socket(socket.AF_INET, socket.SOCK_STREAM) @@ -763,7 +766,6 @@ def ssl_session(sock): while True: try: while opened: - context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH) context.load_cert_chain(ssl_cert, keyfile=ssl_pkey) print("Waiting for connection...") connection, client = sock.accept()