Skip to content

Commit

Permalink
Remove the SSL hacking solution so it works with urllib3 2.x
Browse files Browse the repository at this point in the history
  • Loading branch information
seisman committed Mar 21, 2024
1 parent d5274f9 commit b9e201e
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions HinetPy/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,17 +26,6 @@
)
from .win32 import merge

# Hacking solution for "ssl.SSLError: [SSL: DH_KEY_TOO_SMALL] dh key too small" error.
# Reference: https://stackoverflow.com/a/41041028
requests.packages.urllib3.disable_warnings()
requests.packages.urllib3.util.ssl_.DEFAULT_CIPHERS += ":HIGH:!DH:!aNULL"
try:
requests.packages.urllib3.contrib.pyopenssl.util.ssl_.DEFAULT_CIPHERS += (
":HIGH:!DH:!aNULL"
)
except AttributeError:
# no pyopenssl support used / needed / available
pass

# Setup the logger
FORMAT = "[%(asctime)s] %(levelname)s: %(message)s"
Expand Down

0 comments on commit b9e201e

Please sign in to comment.