Skip to content

Commit e104317

Browse files
authoredApr 24, 2023
Disabled hostname and certificate validation for TLSv1.3 support. (sqlmapproject#5395)
1 parent 12c472c commit e104317

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed
 

‎lib/request/httpshandler.py

+5
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ def create_sock():
6969
sock = create_sock()
7070
if protocol not in _contexts:
7171
_contexts[protocol] = ssl.SSLContext(protocol)
72+
73+
# Disable certificate and hostname validation enabled by default with PROTOCOL_TLS_CLIENT
74+
_contexts[protocol].check_hostname = False
75+
_contexts[protocol].verify_mode = ssl.CERT_NONE
76+
7277
if getattr(self, "cert_file", None) and getattr(self, "key_file", None):
7378
_contexts[protocol].load_cert_chain(certfile=self.cert_file, keyfile=self.key_file)
7479
try:

0 commit comments

Comments
 (0)
Please sign in to comment.