Skip to content

Commit

Permalink
Import features from ssl module with more granularity
Browse files Browse the repository at this point in the history
  • Loading branch information
sethmlarson committed Nov 12, 2020
1 parent 6611153 commit b3be378
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/urllib3/util/ssl_.py
Expand Up @@ -44,13 +44,21 @@ def _const_compare_digest_backport(a, b):

try: # Test for SSL features
import ssl
from ssl import HAS_SNI # Has SNI?
from ssl import CERT_REQUIRED, wrap_socket
except ImportError:
pass

try:
from ssl import HAS_SNI # Has SNI?
except ImportError:
pass

try:
from .ssltransport import SSLTransport
except ImportError:
pass


try: # Platform-specific: Python 3.6
from ssl import PROTOCOL_TLS

Expand Down

0 comments on commit b3be378

Please sign in to comment.