
     h                         d Z ddlmZ ddlmZ ddlmZ ddlmZ dZ	dZ
d	Zd
Z	 ddlZn# e$ r  ee	          w xY w	 	 ddZddZdS )zMessage Signing Serializer.    )disable_insecure_serializers)registry)ImproperlyConfigured   )register_authz|You need to install the cryptography library to use the auth serializer.
Please install by:

    $ pip install cryptography
zSorry, but you have to configure the
    * security_key
    * security_certificate, and the
    * security_cert_store
configuration settings to use the auth serializer.

Please see the configuration reference for more information.
a  You have to configure a special task serializer
for signing and verifying tasks:
    * task_serializer = 'auth'

You have to accept only tasks which are serialized with 'auth'.
There is no point in signing messages if they are not verified.
    * accept_content = ['auth']
)setup_securityNjsonc           	      n   |ddl m} |                                }t          |            |j        }|j        dk    s|j        dgk    rt          t                    |p|j	        }|p|j
        }|p|j        }|p|j        }|r|r|st          t                    t          |          5 }	t          |          5 }
t          |	                                |
                                |||           ddd           n# 1 swxY w Y   ddd           n# 1 swxY w Y   t#          j        d           dS )z#See :meth:`@Celery.setup_security`.Nr   )current_appauth)celeryr   _get_current_object_disable_insecure_serializersconftask_serializeraccept_contentr   SETTING_MISSINGsecurity_keysecurity_certificatesecurity_cert_storesecurity_digestSECURITY_SETTING_MISSINGopenr   readr   _set_default_serializer)allowed_serializerskeycertstoredigest
serializerappr   r   kfcfs              T/var/www/html/Sam_Eipo/venv/lib/python3.11/site-packages/celery/security/__init__.pyr   r   -   s    {&&&&&&--//!"5666 8Dv%%)<)H)H"?333

""C,4,D-T-E+t+F =D =U ="#;<<<	c Kb$ZZ 	K2"''))RWWYYvzJJJ	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	K 	KK K K K K K K K K K K K K K K $V,,,,,s6   +D;8C?3D?D	DD	DDDc                 &    t          |            d S )N)allowed)r   )	whitelists    r%   disable_untrusted_serializersr)   I   s    !)444444    )NNNNNr	   N)N)__doc__kombu.serializationr   r   r   celery.exceptionsr   serializationr   CRYPTOGRAPHY_NOT_INSTALLEDr   r   __all__cryptographyImportErrorr   r)    r*   r%   <module>r4      s    ! !B B B B B B ( ( ( ( ( ( 2 2 2 2 2 2 ( ( ( ( ( (   ; ; ; ;

9
:
::; IM7;- - - -85 5 5 5 5 5s   ) :