
    `f;	                         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           
         |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        }|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_key_passwordsecurity_certificatesecurity_cert_storesecurity_digestSECURITY_SETTING_MISSINGopenr   readr   _set_default_serializer)allowed_serializerskeykey_passwordcertstoredigest
serializerappr   r   kfcfs               J/var/www/html/env/lib/python3.11/site-packages/celery/security/__init__.pyr   r   ,   s    {&&&&&&--//!"5666 8Dv%%)<)H)H"?333

""C=4#=L,4,D-T-E+t+F =D =U ="#;<<<	c Yb$ZZ 	Y2"''))\27799eVZXXX	Y 	Y 	Y 	Y 	Y 	Y 	Y 	Y 	Y 	Y 	Y 	Y 	Y 	Y 	YY Y Y Y Y Y Y Y Y Y Y Y Y Y Y $V,,,,,s6   4D 9D	=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    )NNNNNNr	   N)N)__doc__kombu.serializationr   r   r   celery.exceptionsr   serializationr   CRYPTOGRAPHY_NOT_INSTALLEDr   r   __all__cryptographyImportErrorr   r+    r,   r'   <module>r6      s    ! ! ] ] ] ] ] ] ( ( ( ( ( ( 2 2 2 2 2 2 ( ( ( ( ( (   ; ; ; ;

9
:
::; \`7;- - - -:5 5 5 5 5 5s   ) :