HEX
Server: LiteSpeed
System: Linux cluster02.load-balancer.x2.network 4.18.0-553.51.1.lve.1.el8.x86_64 #1 SMP Wed May 14 14:34:57 UTC 2025 x86_64
User: kbdhpghp (1098)
PHP: 8.2.29
Disabled: NONE
Upload Files
File: //lib/python3.6/site-packages/requests_toolbelt/adapters/__pycache__/fingerprint.cpython-36.pyc
3

�P\|�@s0dZddlmZddlmZGdd�de�ZdS)z�Submodule containing the implementation for the FingerprintAdapter.

This file contains an implementation of a Transport Adapter that validates
the fingerprints of SSL certificates presented upon connection.
�)�HTTPAdapter�)�poolmanagercs6eZdZdZejdgZ�fdd�Zddd�Z�ZS)	�FingerprintAdaptera>
    A HTTPS Adapter for Python Requests that verifies certificate fingerprints,
    instead of certificate hostnames.

    Example usage:

    .. code-block:: python

        import requests
        import ssl
        from requests_toolbelt.adapters.fingerprint import FingerprintAdapter

        twitter_fingerprint = '...'
        s = requests.Session()
        s.mount(
            'https://twitter.com',
            FingerprintAdapter(twitter_fingerprint)
        )

    The fingerprint should be provided as a hexadecimal string, optionally
    containing colons.
    �fingerprintcs||_tt|�jf|�dS)N)r�superr�__init__)�selfr�kwargs)�	__class__��!/usr/lib/python3.6/fingerprint.pyr&szFingerprintAdapter.__init__FcCstj||||jd�|_dS)N)Z	num_pools�maxsize�blockZassert_fingerprint)rZPoolManagerr)r	Zconnectionsrrrrr
�init_poolmanager+s
z#FingerprintAdapter.init_poolmanager)F)	�__name__�
__module__�__qualname__�__doc__rZ	__attrs__rr�
__classcell__rr)rr
rsrN)rZrequests.adaptersrZ_compatrrrrrr
�<module>s