+
    4i�  ã                  óì   € R t ^ RIHt ^ RIt^ RIHt ^ RIHtHtH	t	H
t
HtHtHt ^ RIHt ^ RIHt ^ RIHt ^RIHt ^R	IHtHtHtHtHtHtHtHt R
.tR R lt R R lt!]! R4      t"R R lt#R R lt$R# )zL
`cryptography.x509 <https://github.com/pyca/cryptography>`_-specific code.
)ÚannotationsN)ÚSequence)ÚCertificateÚDNSNameÚExtensionOIDÚ	IPAddressÚObjectIdentifierÚ	OtherNameÚUniformResourceIdentifier)ÚExtensionNotFound)Údecode)Ú	IA5String)ÚCertificateError)ÚDNS_IDÚCertificatePatternÚ
DNSPatternÚIPAddress_IDÚIPAddressPatternÚ
SRVPatternÚ
URIPatternÚverify_service_identityÚverify_certificate_hostnamec               ó$   € V ^8„  d   QhRRRRRR/# )é   Úcertificater   ÚhostnameÚstrÚreturnÚNone© )Úformats   "Ú?/usr/lib/python3/dist-packages/service_identity/cryptography.pyÚ__annotate__r"   (   s$   € ÷ !ñ !Øð!Ø(+ð!à	ñ!ó    c                óH   € \        \        V 4      \        V4      .. R7       R# )aX  
Verify whether *certificate* is valid for *hostname*.

.. note::
    Nothing is verified about the *authority* of the certificate;
    the caller must verify that the certificate chains to an appropriate
    trust root themselves.

Args:
    certificate: A *cryptography* X509 certificate object.

    hostname: The hostname that *certificate* should be valid for.

Raises:
    service_identity.VerificationError:
        If *certificate* is not valid for *hostname*.

    service_identity.CertificateError:
        If *certificate* 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   Úextract_patternsr   )r   r   s   &&r!   r   r   (   s"   € ô: Ü& {Ó3Ü˜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"   L   s$   € ÷ %ñ %Øð%Ø*-ð%à	ñ%r#   c                óH   € \        \        V 4      \        V4      .. R7       R# )a¬  
Verify whether *certificate* is valid for *ip_address*.

.. note::
    Nothing is verified about the *authority* of the certificate;
    the caller must verify that the certificate chains to an appropriate
    trust root themselves.

Args:
    certificate: A *cryptography* X509 certificate object.

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

Raises:
    service_identity.VerificationError:
        If *certificate* is not valid for *ip_address*.

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

.. 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+   s   &&r!   Úverify_certificate_ip_addressr-   L   s#   € ôB Ü& {Ó3Ü$ ZÓ0Ð1Ø÷r#   z1.3.6.1.5.5.7.8.7c               ó    € V ^8„  d   QhRRRR/# ©r   Úcertr   r   zSequence[CertificatePattern]r   )r    s   "r!   r"   r"   w   s   € ÷ 2ñ 2˜;ð 2Ð+Gñ 2r#   c           
     ó  € . p V P                   P                  \        P                  4      pTP	                  VP
                  P                  \        4       Uu. uF(  p\        P                  ! VP                  R4      4      NK*  	  up4       TP	                  VP
                  P                  \        4       Uu. uF(  p\        P                  ! VP                  R4      4      NK*  	  up4       TP	                  VP
                  P                  \        4       Uu. uF  p\        V4      NK  	  up4       VP
                  P                  \        4       F‡  pVP                   \"        8X  g   K  \%        VP
                  4      w  rx\'        V\(        4      '       d6   VP+                  \,        P                  ! VP/                  4       4      4       K|  Rp	\1        V	4      h	  V# u upi u upi u upi   \2         d     T# i ; i)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.
zutf-8zUnexpected certificate content.)Ú
extensionsÚget_extension_for_oidr   ÚSUBJECT_ALTERNATIVE_NAMEÚextendÚvalueÚget_values_for_typer   r   Ú
from_bytesÚencoder
   r   r   r   r	   Útype_idÚID_ON_DNS_SRVr   Ú
isinstancer   Úappendr   ÚasOctetsr   r   )
r0   ÚidsÚextÚnameÚuriÚipÚotherÚsrvÚ_Úmsgs
   &         r!   r)   r)   w   s°  € ð %'€Cð"0Ø�o‰o×3Ñ3Ü×1Ñ1ó
ˆð 	�
‰
ð  ŸI™I×9Ñ9¼'ÔBóáB�Dô ×%Ò% d§k¡k°'Ó&:Ö;ÙBñô	
ð 	�
‰
ð Ÿ9™9×8Ñ8Ü-ôóñ�Cô ×%Ò% c§j¡j°Ó&9Ö:ññô	
ð 	�
‰
ð Ÿ)™)×7Ñ7¼	ÔBóáB�Bô ! Ö$ÙBñô	
ð —Y‘Y×2Ñ2´9Ö=ˆEØ�}‰}¤Ö-Ü §¡Ó,‘�Ü˜c¤9×-Ò-Ø—J‘Jœz×4Ò4°S·\±\³^ÓDÖEà;�CÜ*¨3Ó/Ð/ñ >ð €Jùò9ùòùòøô% ô Øð> €JðAús#   „)G1 Á.G"Â:.G'ÄG,Ç1H Ç?H c               ó    € V ^8„  d   QhRRRR/# r/   r   )r    s   "r!   r"   r"   ¬   s   € ÷ "ñ "�kð "Ð&Bñ "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)   )r0   s   &r!   Úextract_idsrP   ¬   s&   € ô ‡M‚MÜ#ØQØõô
 ˜DÓ!Ð!r#   )%Ú__doc__Ú
__future__r   rM   Útypingr   Úcryptography.x509r   r   r   r   r   r	   r
   Úcryptography.x509.extensionsr   Úpyasn1.codec.der.decoderr   Úpyasn1.type.charr   Ú
exceptionsr   Úhazmatr   r   r   r   r   r   r   r   Ú__all__r   r-   r;   r)   rP   r   r#   r!   Ú<module>r[      so   ðñõ #ã å ÷÷ ñ õ ;Ý +Ý &å (÷	÷ 	ó 	ð )Ð
)€õ!õH%ñP !Ð!4Ó5€õ2÷j"r#   