Replace ssl.SSLContext with ssl.create_default_context

This commit is contained in:
Nova Cat 2025-01-16 15:41:18 -08:00
parent 0ab037c7b9
commit 6ed4484008

View file

@ -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)