ok

Mini Shell

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

3

گa��@sHdZddlZddlmZddlmZddlmZddlmZddlmZddl	Z	ej
rbddlmZGd	d
�d
e
�ZGdd�de�ZGd
d�dej�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�ZGd!d"�d"e�ZGd#d$�d$e�ZdS)%zACME errors.�N)�Any)�List)�Mapping)�Set)�errors)�messagesc@seZdZdZdS)�ErrorzGeneric ACME error.N)�__name__�
__module__�__qualname__�__doc__�r
r
�/usr/lib/python3.6/errors.pyrsrc@seZdZdZdS)�DependencyErrorzDependency errorN)r	r
rrr
r
r
rrsrc@seZdZdZdS)�SchemaValidationErrorz)JSON schema ACME object validation error.N)r	r
rrr
r
r
rrsrc@seZdZdZdS)�ClientErrorzNetwork error.N)r	r
rrr
r
r
rrsrc@seZdZdZdS)�UnexpectedUpdatezUnexpected update error.N)r	r
rrr
r
r
rr!src@seZdZdZdS)�
NonceErrorzServer response nonce error.N)r	r
rrr
r
r
rr%srcs:eZdZdZeeedd��fdd�Zed�dd�Z�Z	S)	�BadNoncezBad nonce error.N)�nonce�error�args�returncst�j|�||_||_dS)N)�super�__init__rr)�selfrrr)�	__class__r
rr+szBadNonce.__init__)rcCsdj|j|j�S)NzInvalid nonce ({0!r}): {1})�formatrr)rr
r
r�__str__0szBadNonce.__str__)
r	r
rr�str�	Exceptionrrr�
__classcell__r
r
)rrr)srcs:eZdZdZejedd��fdd�Zed�dd�Z	�Z
S)	�MissingNoncez�Missing nonce error.

    According to the specification an "ACME server MUST include an
    Replay-Nonce header field in each successful response to a POST it
    provides to a client (...)".

    :ivar requests.Response ~.response: HTTP Response

    N)�responserrcst�j|�||_dS)N)rrr#)rr#r)rr
rr>szMissingNonce.__init__)rcCsdj|jjj|jj�S)Nz_Server {0} response did not include a replay nonce, headers: {1} (This may be a service outage))rr#Zrequest�methodZheaders)rr
r
rrBszMissingNonce.__str__)r	r
rr�requestsZResponserrrrr!r
r
)rrr"4s	r"csReZdZdZededdd��fdd�Zeed�dd	��Z	e
d�d
d�Z�ZS)
�	PollErrora�Generic error when polling for authorization fails.

    This might be caused by either timeout (`exhausted` will be non-empty)
    or by some authorization being invalid.

    :ivar exhausted: Set of `.AuthorizationResource` that didn't finish
        within max allowed attempts.
    :ivar updated: Mapping from original `.AuthorizationResource`
        to the most recently updated one

    �messages.AuthorizationResourceN)�	exhausted�updatedrcs||_||_t�j�dS)N)r(r)rr)rr(r))rr
rrTszPollError.__init__)rcCs
t|j�S)z Was the error caused by timeout?)�boolr()rr
r
r�timeout\szPollError.timeoutcCsdj|jj|j|j�S)Nz#{0}(exhausted={1!r}, updated={2!r}))rrr	r(r))rr
r
r�__repr__aszPollError.__repr__)r'r')
r	r
rrrrr�propertyr*r+rr,r!r
r
)rrr&Hsr&cs,eZdZdZeddd��fdd�Z�ZS)�ValidationErrorz�Error for authorization failures. Contains a list of authorization
    resources, each of which is invalid and should have an error field.
    zmessages.AuthorizationResourceN)�failed_authzrsrcs||_t�j�dS)N)r/rr)rr/)rr
rrjszValidationError.__init__)r	r
rrrrr!r
r
)rrr.fsr.c@seZdZdZdS)�TimeoutErrorz>Error for when polling an authorization or an order times out.N)r	r
rrr
r
r
rr0osr0cs(eZdZdZddd��fdd�Z�ZS)�
IssuanceErrorzDError sent by the server after requesting issuance of a certificate.zmessages.ErrorN)rrcs||_t�j�dS)z\Initialize.

        :param messages.Error error: The error provided by the server.
        N)rrr)rr)rr
rrvszIssuanceError.__init__)r	r
rrrr!r
r
)rrr1ssr1cs(eZdZdZedd��fdd�Z�ZS)�
ConflictErroraError for when the server returns a 409 (Conflict) HTTP status.

    In the version of ACME implemented by Boulder, this is used to find an
    account if you only have the private key, but don't know the account URL.

    Also used in V2 of the ACME client for the same purpose.
    N)�locationrcs||_t�j�dS)N)r3rr)rr3)rr
rr�szConflictError.__init__)r	r
rrrrr!r
r
)rrr2sr2c@seZdZdZdS)�WildcardUnsupportedErrorzEError for when a wildcard is requested but is unsupported by ACME CA.N)r	r
rrr
r
r
rr4�sr4)rZtypingrrrrZjosepyrZjose_errorsr%Z
TYPE_CHECKINGZacmerr rrZDeserializationErrorrrrrrr"r&r.r0r1r2r4r
r
r
r�<module>s.	

Zerion Mini Shell 1.0