File: //usr/lib/python3/dist-packages/certbot/_internal/plugins/__pycache__/standalone.cpython-310.pyc
o
6��ay � @ s d Z ddlZddlZddlZddlZddlmZ ddlmZ ddlmZ ddlm Z ddlm
Z
ddlmZ ddlZdd l
mZ dd
l
mZ ddlmZ ddlmZ dd
lmZ ddlmZ ddlmZ e�e�Zerueeje ej f ZG dd� d�Z G dd� dej!ej"�Z"dd� Z#dS )zStandalone Authenticator.� N)�DefaultDict)�Dict)�List)�Set)�Tuple)�
TYPE_CHECKING)�
challenges)�
standalone)�achallenges)�errors)�
interfaces)�util)�commonc @ s2 e Zd ZdZdd� Zddd�Zdd� Zd d
� 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!
c C s i | _ || _|| _d S �N)�
_instances�certs�http_01_resources)�selfr r � r �F/usr/lib/python3/dist-packages/certbot/_internal/plugins/standalone.py�__init__- s
zServerManager.__init__� c
C s� |t jksJ �|| jv r| j| S ||f}z t�|| j�}W n tjy1 } zt� ||��d}~ww |�
� |�� d d }|| j|<