mirror of
https://github.com/httpie/cli.git
synced 2024-11-24 08:22:22 +02:00
Fix SSL context
This commit is contained in:
parent
165dc36f8d
commit
a53505f26e
@ -2,7 +2,10 @@ import ssl
|
||||
|
||||
from requests.adapters import HTTPAdapter
|
||||
# noinspection PyPackageRequirements
|
||||
from urllib3.util.ssl_ import DEFAULT_CIPHERS, create_urllib3_context
|
||||
from urllib3.util.ssl_ import (
|
||||
DEFAULT_CIPHERS, create_urllib3_context,
|
||||
resolve_ssl_version,
|
||||
)
|
||||
|
||||
|
||||
DEFAULT_SSL_CIPHERS = DEFAULT_CIPHERS
|
||||
@ -23,9 +26,9 @@ AVAILABLE_SSL_VERSION_ARG_MAPPING = {
|
||||
|
||||
class HTTPieHTTPSAdapter(HTTPAdapter):
|
||||
def __init__(self, ssl_version: str = None, ciphers: str = None, **kwargs):
|
||||
self._ssl_context: ssl.SSLContext = create_urllib3_context(
|
||||
self._ssl_context = create_urllib3_context(
|
||||
ciphers=ciphers,
|
||||
ssl_version=ssl_version
|
||||
ssl_version=resolve_ssl_version(ssl_version),
|
||||
)
|
||||
super().__init__(**kwargs)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user