mirror of
https://github.com/github/codeql.git
synced 2026-05-04 21:25:44 +02:00
Python: Add import test of py/insecure-protocol
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
import ssl
|
||||
|
||||
secure_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
secure_context.options |= ssl.OP_NO_TLSv1 | ssl.OP_NO_TLSv1_1
|
||||
|
||||
# this is just to allow us to see how un-altered exports work
|
||||
completely_insecure_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
|
||||
# and an insecure export that is refined
|
||||
also_insecure_context = ssl.SSLContext(ssl.PROTOCOL_TLS)
|
||||
also_insecure_context.options |= ssl.OP_NO_TLSv1
|
||||
Reference in New Issue
Block a user