File: //usr/lib/python3.9/site-packages/certbot/_internal/plugins/__pycache__/standalone.cpython-39.pyc
a
}|�gi$ � @ s^ d Z ddlZddlZddlZddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm
Z
dd lmZ dd
lmZ ddlm
Z
ddlmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ e�e �Z!e�r$eej"eej# f Z$G dd� d�Z%G dd� dej&ej'�Z'ej(dd�dd�Z)dS )zStandalone Authenticator.� N)�Any)�Callable)�DefaultDict)�Dict)�Iterable)�List)�Mapping)�Set)�Tuple)�Type)�
TYPE_CHECKING)�crypto)�
challenges)�
standalone)�achallenges)�errors)�
interfaces)�util)�commonc @ s� e Zd ZdZeeeejej f f e
ejj
dd�dd�Zdeeej eejd�dd �Zedd
�dd�Zeeejf d
�dd�ZdS )�
ServerManagera� Standalone servers manager.
Manager for `ACMEServer` and `ACMETLSServer` instances.
`certs` and `http_01_resources` correspond to
`acme.crypto_util.SSLSocket.certs` and
`acme.crypto_util.SSLSocket.http_01_resources` respectively. All
created servers share the same certificates and resources, so if
you're running both TLS and non-TLS instances, HTTP01 handlers
will serve the same URLs!
N)�certs�http_01_resources�returnc C s i | _ || _|| _d S �N)�
_instancesr r )�selfr r � r �H/usr/lib/python3.9/site-packages/certbot/_internal/plugins/standalone.py�__init__1 s zServerManager.__init__� )�port�challenge_type�
listenaddrr c
C s� |t jksJ �|| jv r"| j| S ||f}zt�|| j�}W n0 tyl } zt�||��W Y d}~n
d}~0 0 |� � |�
� d d }|| j|<