enable ssl

This commit is contained in:
Jonas Weinz 2021-06-17 16:14:45 +02:00
parent 2fb661750a
commit 3a034329ee

View File

@ -4,13 +4,13 @@ from . import json_websockets
from . import crossword_connection
try:
cert_file = "fullchain.pem"
key_file = "privkey.pem"
cert_file = "./server/fullchain.pem"
key_file = "./server/privkey.pem"
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_SERVER)
ssl_context.load_cert_chain(cert_file, keyfile=key_file)
except Exception as e:
logging.error("no ssl context available")
logging.error("no ssl context available: %s", str(e))
ssl_context = None