Update server.py
This commit is contained in:
parent
b88bae32b3
commit
376a920271
1 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Reference in a new issue