
    Ih;	                         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	 	 ddZddZy# e$ r	  ee	      w xY w)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_securityNc           
         |ddl m} |j                         }t        |        |j                  }	|	j
                  dk7  s|	j                  dgk7  rt        t              |xs |	j                  }|xs |	j                  }|xs |	j                  }|xs |	j                  }|xs |	j                  }|r|r|st        t              t        |      5 }
t        |      5 }t!        |
j#                         ||j#                         |||       ddd       ddd       t%        j&                  d       y# 1 sw Y   'xY w# 1 sw Y   +xY w)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               Q/var/www/html/planif/env/lib/python3.12/site-packages/celery/security/__init__.pyr   r   ,   s+    {&--/!"56 88Dv%)<)<)H"?33

"""C=4#=#=L,4,,D-T--E+t++FDU"#;<<	c Yb$Z 	Y2"'')\2779eVZX	YY $$V,	Y 	YY Ys$   D9-D-D9-D6	2D99Ec                     t        |        y )N)allowed)r   )	whitelists    r&   disable_untrusted_serializersr*   I   s
    !)4    )NNNNNNjsonN)N)__doc__kombu.serializationr   r   r   celery.exceptionsr   serializationr   CRYPTOGRAPHY_NOT_INSTALLEDr   r   __all__cryptographyImportErrorr   r*    r+   r&   <module>r6      sl    ! ] ( 2 (   ;
 \`7;-:5C  ;
9
::;s	   3 A