ok
Direktori : /lib/python3.6/site-packages/acme/__pycache__/ |
Current File : //lib/python3.6/site-packages/acme/__pycache__/jws.cpython-36.pyc |
3 گaS � @ sR d Z ddlmZ ddlZG dd� dej�ZG dd� dej�ZG dd � 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 @ sT e Zd ZdZejddejd�Zejddd�Zejddd�Z ej eed�d d ��ZdS )�Headerz?ACME-specific JOSE Header. Implements nonce, kid, and url. �nonceT)� omitempty�encoder�kid)r �url)�value�returnc C sD y t j| �S t jk r> } zt jdj|���W Y d d }~X nX d S )NzInvalid nonce: {0})�joseZdecode_b64joseZDeserializationError�format)r �error� r �/usr/lib/python3.6/jws.pyr s zHeader.nonceN) �__name__� __module__�__qualname__�__doc__r �FieldZencode_b64joser r r �decoder�str�bytesr r r r r s r c @ s2 e Zd ZdZejjZeZ ej dde � e jd�ZdS )� SignaturezGACME-specific Signature. Uses ACME-specific Header for customer fields.�headerT)r �defaultr N) r r r r r r �_orig_slots� __slots__r Z header_clsr Z from_jsonr r r r r r s r c sV e Zd ZdZeZejjZ e deejej ee ee ee ejd�� fdd� �Z� ZS )�JWSzCACME-specific JWS. Includes none, url, and kid in protected header.N)�payload�key�algr r r r c s2 |d k}t � j|||tdddddg�||||d�S )Nr r r Zjwkr )r r Zprotectr r r �include_jwk)�super�sign� frozenset)�clsr r r r r r r! )� __class__r r r# 1 s zJWS.sign)NN)r r r r r Z signature_clsr r r r �classmethodr ZJWKZJWASignaturer r r# � __classcell__r r )r&