Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import features from ssl module with more granularity #2052

Merged
merged 1 commit into from Nov 12, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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