We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d30c1f8 commit eee7387Copy full SHA for eee7387
src/sasctl/core.py
@@ -327,7 +327,9 @@ def __init__(
327
def is_ipaddress(hst):
328
return re.match(r"^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$", hst)
329
330
- verify_hostname = not is_ipaddress(hostname)
+ # Do not verify hostname if IP address is used. Otherwise, will
331
+ # verify that cert hostname matches the hostname used in the URL.
332
+ verify_hostname = False if is_ipaddress(hostname) else None
333
adapter = SSLContextAdapter(assert_hostname=verify_hostname)
334
335
self.mount("https://", adapter)
0 commit comments