+
    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oo3311
 	

  II99'BBD %%dkk'&:;B	
 	

 9988-C %%cjj&9:	
 	

 ))77	BBB !$B	
 YY229=E}}-,c9--JJz44S\\^DE;C*3// > J9%  > JA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&     MM#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#   