�
N�gIg � � � d Z ddlmZ ddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm
Z
dd lmZ dd
lmZ ddlm
Z
ddlmZ dd
lmZ ddlmZ ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dZi dd�dd�dd�dd�dd�dd �d!d"�d#d$�d%d&�d'd(�d)d*�d+d,�d-d.�d/d0�d1d2�d3d4�d5d6�d7d8d9d:d;d<d=d>d?d@� �Zi ej9 � D � �ci c] \ } }e| z |��
c}} �ZdAedBefdC�Z G dD� dEejB e� Z" G dF� dGe"� Z# e#d)� Z$ e#dH� Z% G dI� dJejL � Z' G dK� dLejL ejP � Z( G dM� dNe"� Z) e)dO� Z* e)dP� Z+ e)dQ� Z, e)dR� Z- e)dS� Z. e)dT� Z/ e)dU� Z0 e)dV� Z1 G dW� dXejB � Z2 G dY� dZejL � Z3 G d[� d\e3� Z4 G d]� d^ejL � Z5 G d_� d`� Z6 edadb�c� Z7 G dd� dbe5� Z8 G de� dfe8� Z9 G dg� dhe8� Z: G di� dje4� Z; G dk� dle5� Z< G dm� dne3� Z= G do� dpe5� Z> G dq� dre>� Z? G ds� dte>� Z@ G du� dve4� ZA G dw� dxejL � ZB G dy� dze4� ZC G d{� d|ejL � ZD G d}� d~e5� ZE G d� d�e4� ZF G d�� d�eE� ZGyc c}} w )�zACME protocol messages.� )�HashableN)�Any)�Dict)�Iterator)�List)�Mapping)�MutableMapping)�Optional)�Tuple)�Type)�TypeVar)�x509)�
challenges)�errors)�fields)�jws)�utilzurn:ietf:params:acme:error:�accountDoesNotExistz4The request specified an account that does not exist�alreadyRevokedzOThe request specified a certificate to be revoked that has already been revoked�badCSRz2The CSR is unacceptable (e.g., due to a short key)�badNoncez1The client sent an unacceptable anti-replay nonce�badPublicKeyz>The JWS was signed by a public key the server does not support�badRevocationReasonz;The revocation reason provided is not allowed by the server�badSignatureAlgorithmz@The JWS was signed with an algorithm the server does not support�caaz\Certification Authority Authorization (CAA) records forbid the CA from issuing a certificate�compoundzBSpecific error conditions are indicated in the "subproblems" array�
connectionz?The server could not connect to the client to verify the domain�dnszAThere was a problem with a DNS query during identifier validation�dnssecz4The server could not validate a DNSSEC signed domain�incorrectResponsez;Response received didn't match the challenge's requirements�invalidEmailz1The provided email for a registration was invalid�invalidContactz$The provided contact URI was invalid� malformedz!The request message was malformed�rejectedIdentifierz9The server will not issue certificates for the identifierzLThe request attempted to finalize an order that is not ready to be finalizedz,There were too many requests of a given typez(The server experienced an internal errorz=The server experienced a TLS error during domain verificationz)The client lacks sufficient authorizationz@A contact URL for an account used an unsupported protocol schemez*The server could not resolve a domain namez'An identifier is of an unsupported typez,The server requires external account binding) �
orderNotReady�rateLimited�serverInternal�tls�unauthorized�unsupportedContact�unknownHost�unsupportedIdentifier�externalAccountRequired�err�returnc �` � t | t � r| j �t | j v S y)z#Check if argument is an ACME error.F)�
isinstance�Error�typ�ERROR_PREFIX)r. s �}/build/snapcraft-certbot-2c33630aaf29c47357e5a1683f659d3d/parts/certbot/install/lib/python3.12/site-packages/acme/messages.py�
is_acme_errorr6 B s' |