Graybyt3 Was Here
Linux vps-4656817-x.dattaweb.com 5.14.0-570.33.2.el9_6.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Aug 14 07:37:35 EDT 2025 x86_64
Apache
200.58.107.103
/
lib
/
python3.9
/
site-packages
/
certbot
/
_internal
/
__pycache__
[ HOME ]
Exec
Submit
File Name : auth_handler.cpython-39.pyc
a }|�gPR � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm Z dd lmZ ddlZdd l mZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddl m!Z" e�#e$�Z%G dd� d�Z&ej'ej(e)ej*d�dd�Z+eej' eeej, e e-df d�dd�Z.eej' ej/d�d d!�Z0eej* e)d"�d#d$�Z1dS )%zACME AuthHandler.� N)�Dict)�Iterable)�List)�Optional)�Sequence)�Tuple)�Type)�Response)� challenges)�client)�errors)�messages)�achallenges)� configuration)� interfaces)� error_handler)�Account)�util)�commonc @ s* e Zd ZdZejeej ee e e dd�dd�Zd#e jejeeee e j d�d d �Ze jee e f d�dd �Ze e j eeedd�dd�Zee j e ej d�dd�Zee eej d�dd�Z e ej dd�dd�Z!e je"e e ej d�dd�Z#e e j dd�dd�Z$e ej ejed �d!d"�Z%dS )$�AuthHandlera� ACME Authorization Handler for a client. :ivar auth: Authenticator capable of solving :class:`~acme.challenges.Challenge` types :type auth: certbot.interfaces.Authenticator :ivar acme.client.ClientV2 acme_client: ACME client API. :ivar account: Client's Account :type account: :class:`certbot._internal.account.Account` :ivar list pref_challs: sorted user specified preferred challenges type strings with the most preferred challenge listed first N)�auth�acme_client�account�pref_challs�returnc C s || _ || _|| _|| _d S �N)r �acmer r )�selfr r r r � r �B/usr/lib/python3.9/site-packages/certbot/_internal/auth_handler.py�__init__0 s zAuthHandler.__init__F� )�orderr�config�best_effort�max_retries� max_time_minsr c C sf |j dd� }|st�d��| js,t�d��| �|�}|s>|S t�| j|�� �� z0| j � |�}|jr~tj d| �||� dd� W n> tjy� } z$t�d� t�d� | �W Y d} ~ n d} ~ 0 0 t|�t|�ks�J d ��t||�D ]\} }| j�| j|� q�t�d � | �||||� dd� |D �}|�s4t�d ��|W d � S 1 �sN0 Y t�d��dS )a Retrieve all authorizations, perform all challenges required to validate these authorizations, then poll and wait for the authorization to be checked. :param acme.messages.OrderResource orderr: must have authorizations filled in :param certbot.configuration.NamespaceConfig config: current Certbot configuration :param bool best_effort: if True, not all authorizations need to be validated (eg. renew) :param int max_retries: maximum number of retries to poll authorizations :param float max_time_mins: maximum time (in minutes) to poll authorizations :returns: list of all validated authorizations :rtype: List :raises .AuthorizationError: If unable to retrieve all authorizations NzNo authorization to handle.z9No ACME client defined, authorizations cannot be handled.z3Challenges loaded. Press continue to submit to CA. T)�pausez!Failure in setting up challenges.z0Attempting to clean up outstanding challenges...z(Some challenges have not been performed.zWaiting for verification...c S s g | ]}|j jtjkr|�qS r ��body�statusr ZSTATUS_VALID��.0�authzrr r r � <listcomp>o s �z5AuthHandler.handle_authorizations.<locals>.<listcomp>zAll challenges have failed.z?An unexpected error occurred while handling the authorizations.)�authorizationsr �AuthorizationErrorr �Error�_choose_challengesr ZExitHandler�_cleanup_challengesr ZperformZdebug_challenges�display_utilZnotification�_debug_challenges_msg�logger�critical�info�len�zipZanswer_challenge�challb�_poll_authorizations) r r"