ok

Mini Shell

Direktori : /lib/python3.6/site-packages/acme/__pycache__/
Upload File :
Current File : //lib/python3.6/site-packages/acme/__pycache__/jws.cpython-36.pyc

3

گaS	�@sRdZddlmZddlZGdd�dej�ZGdd�dej�ZGdd	�d	ej�ZdS)
z�ACME-specific JWS.

The JWS implementation in josepy only implements the base JOSE standard. In
order to support the new header fields defined in ACME, this module defines some
ACME-specific classes that layer on top of josepy.
�)�OptionalNc@sTeZdZdZejddejd�Zejddd�Zejddd�Z	ej
eed�d	d
��ZdS)�Headerz?ACME-specific JOSE Header. Implements nonce, kid, and url.
    �nonceT)�	omitempty�encoder�kid)r�url)�value�returncCsDy
tj|�Stjk
r>}ztjdj|���WYdd}~XnXdS)NzInvalid nonce: {0})�joseZdecode_b64joseZDeserializationError�format)r	�error�r�/usr/lib/python3.6/jws.pyrs
zHeader.nonceN)
�__name__�
__module__�__qualname__�__doc__r�FieldZencode_b64joserrr�decoder�str�bytesrrrrrsrc@s2eZdZdZejjZeZ	ej
dde	�e	jd�ZdS)�	SignaturezGACME-specific Signature. Uses ACME-specific Header for customer fields.�headerT)r�defaultrN)
rrrrrr�_orig_slots�	__slots__rZ
header_clsrZ	from_jsonrrrrrrsrc
sVeZdZdZeZejjZ	e
deejej
eeeeeeejd��fdd�
�Z�ZS)�JWSzCACME-specific JWS. Includes none, url, and kid in protected header.N)�payload�key�algrrrr
c
s2|dk}t�j|||tdddddg�||||d�S)NrrrZjwkr )rr Zprotectrrr�include_jwk)�super�sign�	frozenset)�clsrrr rrrr!)�	__class__rrr#1s
zJWS.sign)NN)rrrrrZ
signature_clsrrrr�classmethodrZJWKZJWASignaturerrr#�
__classcell__rr)r&rr,s
r)rZtypingrZjosepyrrrrrrrr�<module>s


Zerion Mini Shell 1.0