
    ;)di#                     t    d dl mZ d dlmZmZmZmZmZmZm	Z	m
Z
mZmZ 	 d dlmZ n# e$ r dZY nw xY wddZdS )    )log)
AnotherUserAlreadyLoggedInArgumentsBadDeviceRemovedDomainParamsInvalidFunctionFailedMechanismInvalid	NoSuchKeyNoSuchTokenOperationNotInitializedSessionClosed)AlreadyInitializedN c                 ,   | j         }|t          k    rt          j        d|            d S |t          k    rt          j        d           d S |t
          k    rt          j        d           d S |t          k    rt          j        d           d S |t          k    rt          j        d           d S |t          k    rt          j        d           d S |t          k    rt          j        d           d S |t          k    rt          j        d           d S |t          k    rt          j        d	           d S |t          k    rt          j        d
           d S |t          k    rt          j        d           d S t          j        | j          d|            d S )Nz7The External HSM does not support the given mechanism: zIPlease ensure proper configuration, privileges and environment variables.z3pkcs11 is already initialized with another library.z(Another User has been already logged in.z4Please check the arguments supplied to the function.zGInvalid or unsupported domain parameters were supplied to the function.zNThe token has been removed from its slot during the execution of the function.zNo such token found.zNo such key found.zOperation not initialized.zSession already closed.z: )	__class__r	   r   errorr   r   r   r   r   r   r   r
   r   r   )einfoexception_types      h/var/www/menimich/repos/protonApp/venv/lib/python3.11/site-packages/espsecure/esp_hsm_sign/exceptions.pyhandle_exceptionsr      s   [N)))	RDRRSSSSS	>	)	)	W	
 	
 	
 	
 	
 
-	-	-	GHHHHH	5	5	5	<=====	<	'	'	HIIIII	.	.	.	U	
 	
 	
 	
 	
 
=	(	(	-	
 	
 	
 	
 	
 
;	&	&	()))))	9	$	$	&'''''	2	2	2	./////	=	(	(	+,,,,,	Q[**D**+++++    )r   )esptool.loggerr   pkcs11.exceptionsr   r   r   r   r   r	   r
   r   r   r   r   ImportErrorr    r   r   <module>r      s   
                              5444444    ,  ,  ,  ,  ,  ,s   ' 11