Update server.py
All checks were successful
/ check (push) Successful in 15s

This commit is contained in:
Nova Cat 2025-01-23 17:25:11 -08:00
parent 4861080f6b
commit 5a088bc572

View file

@ -147,24 +147,8 @@ context = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH)
for i in context.get_ciphers():
if not i["protocol"] in foundVersions:
foundVersions.append(i["protocol"])
if not "TLSv1.0" in foundVersions:
print("[WARN] SSL Context doesn't support TLS 1.0!")
context.options |= ssl.OP_NO_TLSv1 # Disable TLS 1.0
if not "TLSv1.1" in foundVersions:
print("[WARN] SSL Context doesn't support TLS 1.1!")
context.options |= ssl.OP_NO_TLSv1_1 # Disable TLS 1.1
if not "TLSv1.2" in foundVersions:
print("[WARN] SSL Context doesn't support TLS 1.1!")
context.options |= ssl.OP_NO_TLSv1_2 # Disable TLS 1.2
if not "TLSv1.3" in foundVersions:
print("[WARN] SSL Context doesn't support TLS 1.1!")
context.options |= ssl.OP_NO_TLSv1_3 # Disable TLS 1.3
if not "SSLv2" in foundVersions:
print("[WARN] SSL Context doesn't support SSL 2!")
context.options |= ssl.OP_NO_SSLv2 # Disable SSL 2
if not "SSLv3" in foundVersions:
print("[WARN] SSL Context doesn't support SSL 3!")
context.options |= ssl.OP_NO_SSLv3 # Disable SSL 3
context.options |= ssl.OP_NO_SSLv2 # Disable SSL 2
context.options |= ssl.OP_NO_SSLv3 # Disable SSL 3
if ssl_option:
print(f"Loading SSL cert {ssl_cert} with key {ssl_pkey}")
context.load_cert_chain(ssl_cert, keyfile=ssl_pkey)