Skip to content

Commit

Permalink
fixup: also set verify_mode to CERT_NONE
Browse files Browse the repository at this point in the history
  • Loading branch information
mildsunrise authored and dlenski committed Apr 20, 2024
1 parent 00e458b commit 71bf81d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gp_saml_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,11 +225,16 @@ def init_poolmanager(self, connections, maxsize, block=False):
ssl_context = ssl.SSLContext(ssl.PROTOCOL_TLS_CLIENT)
ssl_context.set_ciphers('DEFAULT:@SECLEVEL=1')
ssl_context.options |= 1<<2 # OP_LEGACY_SERVER_CONNECT
ssl_context.check_hostname = self.verify

if not self.verify:
ssl_context.check_hostname = False
ssl_context.verify_mode = ssl.CERT_NONE

if hasattr(ssl_context, "keylog_filename"):
sslkeylogfile = environ.get("SSLKEYLOGFILE")
if sslkeylogfile:
ssl_context.keylog_filename = sslkeylogfile

self.poolmanager = urllib3.PoolManager(
num_pools=connections,
maxsize=maxsize,
Expand Down

0 comments on commit 71bf81d

Please sign in to comment.