mirror of
https://github.com/github/codeql.git
synced 2025-12-20 10:46:30 +01:00
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:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user