§
    sŠtj|  ã                   ó>   — d Z ddlmZ ddlmZ  G d„ de¦  «        ZdS )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é   )Úpoolmanagerc                   ó@   ‡ — e Zd ZdZej        dgz   Zˆ fd„Zdd„Zˆ xZS )Ú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.
    Úfingerprintc                 óV   •— || _          t          t          | ¦  «        j        di |¤Ž d S )N© )r   Úsuperr   Ú__init__)Úselfr   ÚkwargsÚ	__class__s      €úd/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/requests_toolbelt/adapters/fingerprint.pyr   zFingerprintAdapter.__init__&   s5   ø€ Ø&ˆÔà0�Õ  $Ñ'Ô'Ô0Ð:Ð:°6Ð:Ð:Ð:Ð:Ð:ó    Fc                 óJ   — t          j        |||| j        ¬¦  «        | _         d S )N)Ú	num_poolsÚmaxsizeÚblockÚassert_fingerprint)r   ÚPoolManagerr   )r   Úconnectionsr   r   s       r   Úinit_poolmanagerz#FingerprintAdapter.init_poolmanager+   s1   € Ý&Ô2Ø!ØØØ#Ô/ð	1ñ 1ô 1ˆÔÐÐr   )F)	Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú	__attrs__r   r   Ú__classcell__)r   s   @r   r   r      sg   ø€ € € € € ðð ð. Ô%¨¨Ñ7€Ið;ð ;ð ;ð ;ð ;ð
1ð 1ð 1ð 1ð 1ð 1ð 1ð 1r   r   N)r   Úrequests.adaptersr   Ú_compatr   r   r
   r   r   ú<module>r"      si   ððð ð
 *Ð )Ð )Ð )Ð )Ð )à !Ð !Ð !Ð !Ð !Ð !ð$1ð $1ð $1ð $1ð $1˜ñ $1ô $1ð $1ð $1ð $1r   