U
    Â“«jë  ã                   @  sÒ   d Z ddlmZ ddlmZmZ er0ddlmZ ddlZG dd„ de	ƒZ
ejd	d
�G dd„ dƒƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZG dd„ deƒZejd	d�G dd„ deƒƒZG dd„ deƒZdS )z¡
All exceptions and warnings thrown by ``service-identity``.

Separated into an own package for nicer tracebacks, you should still import
them from __init__.py.
é    )Úannotations)ÚTYPE_CHECKINGÚSequenceé   )Ú	ServiceIDNc                   @  s   e Zd ZdZdS )ÚSubjectAltNameWarninga  
    This warning is not used anymore and will be removed in a future version.

    Formerly:

    Server Certificate does not contain a ``SubjectAltName``.

    Hostname matching is performed on the ``CommonName`` which is deprecated.

    .. deprecated:: 23.1.0
    N©Ú__name__Ú
__module__Ú__qualname__Ú__doc__© r   r   ú?/tmp/pip-unpacked-wheel-zs1a7p88/service_identity/exceptions.pyr      s   r   T)Úslotsc                   @  s   e Zd ZU e ¡ Zded< dS )ÚMismatchr   Úmismatched_idN)r	   r
   r   ÚattrÚibr   Ú__annotations__r   r   r   r   r   !   s   
r   c                   @  s   e Zd ZdZdS )ÚDNSMismatchz0
    No matching DNSPattern could be found.
    Nr   r   r   r   r   r   &   s   r   c                   @  s   e Zd ZdZdS )ÚSRVMismatchz0
    No matching SRVPattern could be found.
    Nr   r   r   r   r   r   ,   s   r   c                   @  s   e Zd ZdZdS )ÚURIMismatchz0
    No matching URIPattern could be found.
    Nr   r   r   r   r   r   2   s   r   c                   @  s   e Zd ZdZdS )ÚIPAddressMismatchz6
    No matching IPAddressPattern could be found.
    Nr   r   r   r   r   r   8   s   r   )Zauto_excc                   @  s0   e Zd ZU dZe ¡ Zded< ddœdd„ZdS )	ÚVerificationErrorz/
    Service identity verification failed.
    zSequence[Mismatch]ÚerrorsÚstr)Úreturnc                 C  s   |   ¡ S )N)Ú__repr__)Úselfr   r   r   Ú__str__F   s    zVerificationError.__str__N)	r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   >   s   
r   c                   @  s   e Zd ZdZdS )ÚCertificateErrorz‘
    Certificate contains invalid or unexpected data.

    This includes the case where s certificate contains no
    ``subjectAltName``\ s.
    Nr   r   r   r   r   r    J   s   r    )r   Ú
__future__r   Útypingr   r   Zhazmatr   r   ÚDeprecationWarningr   Úsr   r   r   r   r   Ú	Exceptionr   r    r   r   r   r   Ú<module>   s   

