Module ImportFrom alias alias ImportFrom alias alias alias ImportFrom alias alias Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore NameLoad Assign NameStore Dict Num Num Num NameLoad NameLoad NameLoad Import alias Import alias TryExcept body Import alias ImportFrom alias alias alias ImportFrom alias handlers ExceptHandler type NameLoad body Pass TryExcept body ImportFrom alias alias alias handlers ExceptHandler type NameLoad body Assign TupleStore NameStore NameStore TupleLoad Num Num Assign NameStore Num Assign NameStore Str TryExcept body ImportFrom alias handlers ExceptHandler type NameLoad body Import alias ClassDef bases NameLoad body Assign NameStore BoolOpOr CompareLtELt TupleLoad Num Num AttributeLoad NameLoad attr TupleLoad Num CompareLtE TupleLoad Num Num AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Num Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad If CompareIsNot NameLoad NameLoad body Raise Call NameLoad Str decorator_list FunctionDef arguments args NameParam NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr Str NameLoad Assign NameStore Dict Str Str Str Str Str AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr If AttributeLoad NameLoad attr body Return Call NameLoad NameLoad keyword AttributeLoad NameLoad attr NameLoad orelse Return Call NameLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad Call AttributeLoad NameLoad attr Str Str attr Assign NameStore Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad If UnaryOpNot NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad Call NameLoad NameLoad attr If CompareNotEq NameLoad NameLoad body Raise Call NameLoad Call AttributeLoad Str attr NameLoad Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad BinOpAdd Str NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str If CompareIs NameLoad NameLoad body Return NameLoad If Call NameLoad NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad BinOpAdd Str NameLoad Return NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore Call NameLoad BoolOpOr NameLoad AttributeLoad NameLoad attr Assign NameStore IfExp CompareIs NameLoad NameLoad AttributeLoad NameLoad attr NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Num AugAssignBitOr NameStore NameLoad AugAssignBitOr NameStore NameLoad AugAssignBitOr NameStore NameLoad AugAssignBitOr AttributeStore NameLoad attr NameLoad If Call NameLoad NameLoad Str NameLoad body Expr Call AttributeLoad NameLoad attr BoolOpOr NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad If CompareIsNot Call NameLoad NameLoad Str NameLoad NameLoad body Assign AttributeStore NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad body Expr Str Assign NameStore NameLoad If CompareIs NameLoad NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad If BoolOpOr NameLoad NameLoad body TryExcept body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Raise Call NameLoad NameLoad ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad NameLoad Raise If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If NameLoad body Return Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A binascii hexlify unhexlify hashlib md5 sha1 sha256 exceptions SSLError InsecurePlatformWarning N/A SSLContext None N/A HAS_SNI False N/A create_default_context None N/A HASHFUNC_MAP N/A 32 40 64 md5 sha1 sha256 N/A errno N/A warnings N/A N/A N/A ssl ssl wrap_socket CERT_NONE PROTOCOL_SSLv23 ssl HAS_SNI N/A N/A N/A ImportError N/A N/A N/A N/A ssl OP_NO_SSLv2 OP_NO_SSLv3 OP_NO_COMPRESSION N/A N/A N/A ImportError N/A N/A N/A OP_NO_SSLv2 OP_NO_SSLv3 N/A 16777216 33554432 N/A OP_NO_COMPRESSION 131072 N/A DEFAULT_CIPHERS ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+HIGH:DH+HIGH:ECDH+3DES:DH+3DES:RSA+AESGCM:RSA+AES:RSA+HIGH:RSA+3DES:!aNULL:!eNULL:!MD5 N/A N/A ssl SSLContext N/A N/A N/A ImportError N/A N/A sys SSLContext N/A object N/A N/A supports_set_ciphers N/A N/A N/A 2 7 N/A sys version_info N/A 3 N/A N/A 3 2 N/A sys version_info __init__ N/A N/A self protocol_version N/A N/A N/A N/A self protocol protocol_version N/A N/A self check_hostname False N/A N/A self verify_mode N/A ssl CERT_NONE N/A N/A self ca_certs None N/A N/A self options 0 N/A N/A self certfile None N/A N/A self keyfile None N/A N/A self ciphers None N/A load_cert_chain N/A N/A self certfile keyfile N/A N/A N/A N/A self certfile certfile N/A N/A self keyfile keyfile N/A load_verify_locations N/A N/A self cafile capath N/A None None N/A N/A N/A self ca_certs cafile N/A N/A capath None N/A N/A N/A SSLError CA directories not supported in older Pythons N/A set_ciphers N/A N/A self cipher_suite N/A N/A N/A N/A N/A self supports_set_ciphers N/A N/A N/A TypeError Your version of Python does not support setting a custom cipher suite. Please upgrade to Python 2.7, 3.2, or later if you need this functionality. N/A N/A self ciphers cipher_suite N/A wrap_socket N/A N/A self socket server_hostname N/A None N/A N/A N/A N/A warnings warn A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning N/A kwargs N/A keyfile certfile ca_certs cert_reqs ssl_version N/A self keyfile N/A self certfile N/A self ca_certs N/A self verify_mode N/A self protocol N/A N/A self supports_set_ciphers N/A N/A N/A wrap_socket socket ciphers N/A self ciphers kwargs N/A N/A N/A wrap_socket socket kwargs N/A N/A assert_fingerprint N/A N/A cert fingerprint N/A N/A N/A 
    Checks if given fingerprint matches the supplied certificate.

    :param cert:
        Certificate as bytes object.
    :param fingerprint:
        Fingerprint as string of hexdigits, can be interspersed by colons.
     N/A fingerprint N/A N/A N/A N/A fingerprint replace : lower N/A digest_length N/A len fingerprint N/A hashfunc N/A N/A HASHFUNC_MAP get digest_length N/A N/A hashfunc N/A N/A N/A SSLError N/A N/A Fingerprint of invalid length: {0} format fingerprint N/A fingerprint_bytes N/A unhexlify N/A N/A fingerprint encode N/A cert_digest N/A N/A N/A hashfunc cert digest N/A N/A cert_digest fingerprint_bytes N/A N/A N/A SSLError N/A N/A Fingerprints did not match. Expected "{0}", got "{1}". format fingerprint N/A hexlify cert_digest N/A resolve_cert_reqs N/A N/A candidate N/A N/A N/A 
    Resolves the argument to a numeric constant, which can be passed to
    the wrap_socket function/method from the ssl module.
    Defaults to :data:`ssl.CERT_NONE`.
    If given a string it is assumed to be the name of the constant in the
    :mod:`ssl` module or its abbrevation.
    (So you can specify `REQUIRED` instead of `CERT_REQUIRED`.
    If it's neither `None` nor a string we assume it is already the numeric
    constant which can directly be passed to wrap_socket.
     N/A N/A candidate None N/A N/A CERT_NONE N/A N/A isinstance candidate str N/A N/A res N/A getattr ssl candidate None N/A N/A res None N/A N/A res N/A getattr ssl N/A CERT_ candidate N/A res N/A candidate N/A resolve_ssl_version N/A N/A candidate N/A N/A N/A 
    like resolve_cert_reqs
     N/A N/A candidate None N/A N/A PROTOCOL_SSLv23 N/A N/A isinstance candidate str N/A N/A res N/A getattr ssl candidate None N/A N/A res None N/A N/A res N/A getattr ssl N/A PROTOCOL_ candidate N/A res N/A candidate N/A create_urllib3_context N/A N/A ssl_version cert_reqs options ciphers N/A None None None None N/A N/A All arguments have the same meaning as ``ssl_wrap_socket``.

    By default, this function does a lot of the same work that
    ``ssl.create_default_context`` does on Python 3.4+. It:

    - Disables SSLv2, SSLv3, and compression
    - Sets a restricted set of server ciphers

    If you wish to enable SSLv3, you can do::

        from urllib3.util import ssl_
        context = ssl_.create_urllib3_context()
        context.options &= ~ssl_.OP_NO_SSLv3

    You can do the same to enable compression (substituting ``COMPRESSION``
    for ``SSLv3`` in the last line above).

    :param ssl_version:
        The desired protocol version to use. This will default to
        PROTOCOL_SSLv23 which will negotiate the highest protocol that both
        the server and your installation of OpenSSL support.
    :param cert_reqs:
        Whether to require the certificate verification. This defaults to
        ``ssl.CERT_REQUIRED``.
    :param options:
        Specific OpenSSL options. These default to ``ssl.OP_NO_SSLv2``,
        ``ssl.OP_NO_SSLv3``, ``ssl.OP_NO_COMPRESSION``.
    :param ciphers:
        Which cipher suites to allow the server to select.
    :returns:
        Constructed SSLContext object with specified options
    :rtype: SSLContext
     N/A context N/A SSLContext N/A ssl_version N/A ssl PROTOCOL_SSLv23 N/A cert_reqs N/A N/A cert_reqs None N/A ssl CERT_REQUIRED cert_reqs N/A N/A options None N/A N/A options 0 N/A options OP_NO_SSLv2 N/A options OP_NO_SSLv3 N/A options OP_NO_COMPRESSION N/A N/A context options options N/A N/A getattr context supports_set_ciphers True N/A N/A N/A N/A context set_ciphers N/A ciphers DEFAULT_CIPHERS N/A N/A context verify_mode cert_reqs N/A N/A N/A getattr context check_hostname None None N/A N/A N/A context check_hostname False N/A context N/A ssl_wrap_socket N/A N/A sock keyfile certfile cert_reqs ca_certs server_hostname ssl_version ciphers ssl_context ca_cert_dir N/A None None None None None None None None None N/A N/A 
    All arguments except for server_hostname, ssl_context, and ca_cert_dir have
    the same meaning as they do when using :func:`ssl.wrap_socket`.

    :param server_hostname:
        When SNI is supported, the expected hostname of the certificate
    :param ssl_context:
        A pre-made :class:`SSLContext` object. If none is provided, one will
        be created using :func:`create_urllib3_context`.
    :param ciphers:
        A string of ciphers we wish the client to support. This is not
        supported on Python 2.6 as the ssl module does not support it.
    :param ca_cert_dir:
        A directory containing CA certificates in multiple separate files, as
        supported by OpenSSL's -CApath flag or the capath argument to
        SSLContext.load_verify_locations().
     N/A context ssl_context N/A N/A context None N/A N/A context N/A create_urllib3_context ssl_version cert_reqs ciphers ciphers N/A N/A ca_certs ca_cert_dir N/A N/A N/A N/A N/A N/A context load_verify_locations ca_certs ca_cert_dir N/A N/A N/A IOError N/A e N/A N/A N/A SSLError e N/A N/A OSError N/A e N/A N/A N/A N/A e errno N/A errno ENOENT N/A N/A N/A SSLError e N/A N/A certfile N/A N/A N/A N/A context load_cert_chain certfile keyfile N/A HAS_SNI N/A N/A N/A N/A context wrap_socket sock server_hostname server_hostname N/A N/A N/A context wrap_socket sock N/A