
    Bwgx                     $   d dl mZmZmZmZ d dlZd dlZg dZ G d de      Z	 G d de      Z
 G d d	e      Z G d
 de      Z G d de      Z G d dej                        Z G d de      Z G d de      Z G d de      Z G d de      Zy)    )unicode_literalsdivisionabsolute_importprint_functionN)	AsymmetricKeyErrorCACertsErrorLibraryNotFoundErrorSignatureErrorTLSErrorTLSConnectionErrorTLSDisconnectErrorTLSGracefulDisconnectErrorTLSVerificationErrorc                       e Zd ZdZy)r	   z;
    An exception when trying to find a shared library
    N__name__
__module____qualname____doc__     F/var/www/horilla/myenv/lib/python3.12/site-packages/oscrypto/errors.pyr	   r	           	r   r	   c                       e Zd ZdZy)r
   z2
    An exception when validating a signature
    Nr   r   r   r   r
   r
      r   r   r
   c                       e Zd ZdZy)r   z;
    An exception when a key is invalid or unsupported
    Nr   r   r   r   r   r   '   r   r   r   c                       e Zd ZdZy)IncompleteAsymmetricKeyErrorzB
    An exception when a key is missing necessary information
    Nr   r   r   r   r   r   0   r   r   r   c                       e Zd ZdZy)r   zF
    An exception when exporting CA certs from the OS trust store
    Nr   r   r   r   r   r   9   r   r   r   c                   &    e Zd ZdZdZd Zd Zd Zy)r   z3
    An exception related to TLS functionality
    Nc                 "    |f| _         || _        y N)argsmessage)selfr#   s     r   __init__zTLSError.__init__J   s    J	r   c                 n    | j                         }t        j                  dk  r|j                  d      }|S )N)   zutf-8)__unicode__sysversion_infoencode)r$   outputs     r   __str__zTLSError.__str__N   s1    !!#d"]]7+Fr   c                     | j                   S r!   )r#   )r$   s    r   r(   zTLSError.__unicode__T   s    ||r   )r   r   r   r   r#   r%   r-   r(   r   r   r   r   r   B   s     Gr   r   c                       e Zd Zy)r   Nr   r   r   r   r   r   r   r   X       r   r   c                       e Zd Zy)r   Nr0   r   r   r   r   r   \   r1   r   r   c                       e Zd Zy)r   Nr0   r   r   r   r   r   `   r1   r   r   c                       e Zd ZdZdZd Zy)r   zQ
    A server certificate verification error happened during a TLS handshake
    Nc                 P    t         j                  | |       || _        ||f| _        y r!   )r   r%   certificater"   )r$   r#   r6   s      r   r%   zTLSVerificationError.__init__l   s&    $(&k*	r   )r   r   r   r   r6   r%   r   r   r   r   r   d   s     K+r   r   )
__future__r   r   r   r   r)   socket__all__	Exceptionr	   r
   r   r   r   errorr   r   r   r   r   r   r   r   <module>r<      s    R R 
 
	9 		Y 		 		#5 		9 	v|| ,	 		+ 		!3 	+8 +r   