a ‚oe ã@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@szeZdZUdZejddejd�Zee e d<ejddd�Z ee e d<ejddd�Z ee e d<eje e dœd d „ƒZd S) ÚHeaderz?ACME-specific JOSE Header. Implements nonce, kid, and url. ÚnonceT)Ú omitemptyÚencoderÚkid)rÚurl)ÚvalueÚreturnc CsHz t |¡WStjyB}zt d |¡¡‚WYd}~n d}~00dS)NzInvalid nonce: {0})ÚjoseZdecode_b64joseZDeserializationErrorÚformat)r Úerror©rú)C:\Program Files\Certbot\pkgs\acme\jws.pyrs z Header.nonceN)Ú__name__Ú __module__Ú __qualname__Ú__doc__r ÚfieldZencode_b64joserrÚbytesÚ__annotations__rÚstrrÚdecoderrrrrr s rc@s<eZdZUdZejjZeZ ej dde ƒe j d�Z ee d<dS)Ú SignaturezGACME-specific Signature. Uses ACME-specific Header for customer fields.ÚheaderT)rÚdefaultrN)rrrrr rÚ _orig_slotsÚ __slots__rZ header_clsrZ from_jsonrrrrrrrs þrc sVeZdZdZeZejjZ e de ej ej ee eeeeejdœ‡fdd„ ƒZ‡ZS)ÚJWSzCACME-specific JWS. Includes none, url, and kid in protected header.N)ÚpayloadÚkeyÚalgrrrr c s,|du}tƒj|||tgd¢ƒ||||d�S)N)rrrZjwkr!)r r!ZprotectrrrÚ include_jwk)ÚsuperÚsignÚ frozenset)Úclsrr r!rrrr"©Ú __class__rrr$1s   ýzJWS.sign)NN)rrrrrZ signature_clsr rrrÚ classmethodrZJWKZ JWASignaturerrr$Ú __classcell__rrr'rr,sÿÿr)rÚtypingrZjosepyr rrrrrrrÚs