Update python/ql/src/Security/CWE-327/examples/secure_protocol.py

Co-authored-by: Rasmus Wriedt Larsen <rasmuswriedtlarsen@gmail.com>
This commit is contained in:
yoff
2021-03-25 23:09:11 +01:00
committed by GitHub
parent 164b383fda
commit 62a0775cf6

View File

@@ -4,7 +4,7 @@ import ssl
hostname = 'www.python.org'
context = ssl.SSLContext(ssl.PROTOCOL_TLS)
context.options |= ssl.OP_NO_TLSv1
context.options |= ssl.OP_NO_TLSv1_1 # This added by me
context.options |= ssl.OP_NO_TLSv1_1
with socket.create_connection((hostname, 443)) as sock:
with context.wrap_socket(sock, server_hostname=hostname) as ssock: