From 376a9202719e858a5942e4abccac51b459857d49 Mon Sep 17 00:00:00 2001 From: swee Date: Tue, 14 Jan 2025 20:59:13 -0800 Subject: [PATCH] Update server.py --- server.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index 17723c6..c0c0be0 100644 --- a/server.py +++ b/server.py @@ -98,10 +98,10 @@ def relay(): try: gsocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) fulladdr = "gemini://" + url + ("?" + queries if queries != None else "") - contx = ssl._create_unverified_context() + contx = ssl.create_default_context() + contx.verify_mode = ssl.CERT_NONE if certfile: contx.load_cert_chain(certfile=homefolder + "/certs/" + certfile + "-chain.pem", keyfile=homefolder + "/certs/" + certfile + "-privkey.pem"); - contx.verify_mode = ssl.CERT_OPTIONAL contx.check_hostname = False; gemsocket = contx.wrap_socket(gsocket) gemsocket.connect((urlparse(fulladdr).hostname, 1965))