+
    4ic  ã                  ó  € R t ^ RIHt ^ RIt^ RIt^ RIHt ^RIHt	 ^RI
HtHtHtHt ]P                  ! ]4      ;_uu_ 4        ^ RIHt ^ RIHt RRR4       R.tR	 R
 ltR R ltR R ltR R ltR#   + '       g   i     L-; i)zA
`pyOpenSSL <https://github.com/pyca/pyopenssl>`_-specific code.
)ÚannotationsN)ÚSequence)Úextract_patterns)ÚDNS_IDÚCertificatePatternÚIPAddress_IDÚverify_service_identity)ÚX509)Ú
ConnectionÚverify_hostnamec               ó$   € V ^8„  d   QhRRRRRR/# )é   Ú
connectionr
   ÚhostnameÚstrÚreturnÚNone© )Úformats   "Ú</usr/lib/python3/dist-packages/service_identity/pyopenssl.pyÚ__annotate__r      s!   € ÷ ñ  
ð °cð ¸dñ ó    c                ód   € \        \        V P                  4       4      \        V4      .. R7       R# )a÷  
Verify whether the certificate of *connection* is valid for *hostname*.

Args:
    connection: A pyOpenSSL connection object.

    hostname: The hostname that *connection* should be connected to.

Raises:
    service_identity.VerificationError:
        If *connection* does not provide a certificate that is valid for
        *hostname*.

    service_identity.CertificateError:
        If certificate provided by *connection* contains invalid /
        unexpected data. This includes the case where the certificate
        contains no ``subjectAltName``\ s.

.. versionchanged:: 24.1.0
    :exc:`~service_identity.CertificateError` is raised if the certificate
    contains no ``subjectAltName``\ s instead of
    :exc:`~service_identity.VerificationError`.
©Úcert_patternsÚobligatory_idsÚoptional_idsN)r   r   Úget_peer_certificater   )r   r   s   &&r   r   r      s0   € ô0 Ü&Ø×+Ñ+Ó-ó
ô ˜xÓ(Ð)Ø÷r   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r   r
   Ú
ip_addressr   r   r   r   )r   s   "r   r   r   ?   s!   € ÷ !ñ ! *ð !¸#ð !À$ñ !r   c                ód   € \        \        V P                  4       4      \        V4      .. R7       R# )a  
Verify whether the certificate of *connection* is valid for *ip_address*.

Args:
    connection: A pyOpenSSL connection object.

    ip_address:
        The IP address that *connection* should be connected to. Can be an
        IPv4 or IPv6 address.

Raises:
    service_identity.VerificationError:
        If *connection* does not provide a certificate that is valid for
        *ip_address*.

    service_identity.CertificateError:
        If the certificate chain of *connection* contains a certificate
        that contains invalid/unexpected data.

.. versionadded:: 18.1.0

.. versionchanged:: 24.1.0
    :exc:`~service_identity.CertificateError` is raised if the certificate
    contains no ``subjectAltName``\ s instead of
    :exc:`~service_identity.VerificationError`.
r   N)r   r   r   r   )r   r   s   &&r   Úverify_ip_addressr!   ?   s0   € ô6 Ü&Ø×+Ñ+Ó-ó
ô % ZÓ0Ð1Ø÷r   c               ó    € V ^8„  d   QhRRRR/# ©r   Úcertr	   r   zSequence[CertificatePattern]r   )r   s   "r   r   r   c   s   € ÷ Bñ B˜4ð BÐ$@ñ Br   c                ó4   € \        V P                  4       4      # )zê
Extract all valid ID patterns from a certificate for service verification.

Args:
    cert: The certificate to be dissected.

Returns:
    List of IDs.

.. versionchanged:: 23.1.0
   ``commonName`` is not used as a fallback anymore.
)Ú_cryptography_extract_patternsÚto_cryptography©r$   s   &r   r   r   c   s   € ô *¨$×*>Ñ*>Ó*@ÓAÐAr   c               ó    € V ^8„  d   QhRRRR/# r#   r   )r   s   "r   r   r   s   s   € ÷ "ñ "�dð "Ð;ñ "r   c                óR   € \         P                  ! \        R^R7       \        V 4      # )za
Deprecated and never public API.  Use :func:`extract_patterns` instead.

.. deprecated:: 23.1.0
z?`extract_ids()` is deprecated, please use `extract_patterns()`.)ÚcategoryÚmessageÚ
stacklevel)ÚwarningsÚwarnÚDeprecationWarningr   r(   s   &r   Úextract_idsr1   s   s&   € ô ‡M‚MÜ#ØQØõô
 ˜DÓ!Ð!r   )Ú__doc__Ú
__future__r   Ú
contextlibr.   Útypingr   Úcryptographyr   r&   Úhazmatr   r   r   r   ÚsuppressÚImportErrorÚOpenSSL.cryptor	   ÚOpenSSL.SSLr
   Ú__all__r   r!   r1   r   r   r   Ú<module>r=      sn   ðñõ #ã Û å å L÷ó ð ×Ò˜×%Õ%å#Ý&÷ &ð Ð
€õõB!õHB÷ "÷} &×%ús   ÁA5Á5B	