Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/certbot/_internal/__pycache__/ |
Upload File : |
o 6��aI� � @ s� d Z ddlmZ ddlZddlZddlZddlmZ ddlm Z ddlm Z ddlmZ ddlmZ dd lm Z dd lmZ ddlZddlZddlZddlZddlmZ ddlZddlmZ dd lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ ddlm%Z% ddlm&Z& ddlm'Z' ddlm(Z( ddlm)Z) ddlm*Z* ddl+m,Z- ddl+mZ. ddl/m0Z1 ddl/m2Z3 dd l4m5Z5 dd!l4m6Z6 dd"l4m7Z7 dd#l8m9Z: ddl8mZ; dd$l<m=Z= d%Z>e�?e@�ZAd&d'� ZBd�d(d)�ZCd*ejDd+e)jEd,dfd-d.�ZFd*ejDd/eeG d+e)jEd,e eGee)jE f fd0d1�ZHd*ejDd2e)jEd,e eGee)jE f fd3d4�ZId5d6� ZJd7d8� ZKd*ejDd/eeG d9eGd,e eGee)jE f fd:d;�ZLd<d=� ZMd>d?� ZNd@dA� ZOd�dBdC�ZP Dd�d*ejDdEeejQ d2ee)jE dFeRd,df dGdH�ZS d�d*ejDdIeeG dJeeG dKeeG d,df dLdM�ZTd*ejDd,eRfdNdO�ZUd*ejDdIeeG dPeeG dJeeG fdQdR�ZVdSdT� ZWdUdV� ZXdWdX� ZYdYdZ� ZZd[d\� Z[d]d^� Z\d*ejDd2ee)jE d,eeG fd_d`�Z]d�dadb�Z^dcdd� Z_dedf� Z`dgdh� Zadidj� Zbdkdl� Zcdmdn� Zddodp� Zedqdr� Zfdsdt� Zgdudv� Zhdwe1jid,eeG fdxdy�Zjdzd{� Zkd*ejDd|e!jld,e eeG eeG eeG f fd}d~�Zmdd�� Znd�d�� Zod�d�� Zpd�d�� Zqed*ejDd,eee;jre;jsf ddf fd�d���Ztd�d�d��ZudS )�zCertbot main entry point.� )�contextmanagerN)� Generator)�IO)�Iterable)�List)�Optional)�Tuple)�Union)�errors)� configuration)�crypto_util)� interfaces)�util)�account)�cert_manager)�cli)�client)� constants)�eff)�hooks)�log)�renewal)�reporter)�snap_config)�storage)�updater)�obj)�disco)� selection)� filesystem)�misc)�os)�ops)�enhancementsz?User chose to cancel the operation and may reinvoke the client.c C s4 | j dksJ �| js | jrdS tjtjddd� dS )z�Potentially suggest a donation to support Certbot. :param config: Configuration object :type config: configuration.NamespaceConfig :returns: `None` :rtype: None �renewNz�If you like Certbot, please consider supporting our work by: * Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate * Donating to EFF: https://eff.org/donate-leF��pause)�verb�staging�quietr �atexit_register�display_util�notification��config� r/ �8/usr/lib/python3/dist-packages/certbot/_internal/main.py� _suggest_donation_if_appropriate; s �r1 c C s� t �|� zp|dur)t�dj|jrdndt�|p|�� �d�� t � ||| |� n=|dus/J �t�dj|jr8dndt�|�d�� | �||�}|du rPt� d ��|durnt �||�� |j� W t �|� |S W t �|� |S W t �|� |S t �|� w ) a, Authenticate and enroll certificate. This method finds the relevant lineage, figures out what to do with it, then performs that action. Includes calls to hooks, various reports, checks, and requests for user input. :param config: Configuration object :type config: configuration.NamespaceConfig :param domains: List of domain names to get a certificate. Defaults to `None` :type domains: `list` of `str` :param certname: Name of new certificate. Defaults to `None` :type certname: str :param lineage: Certificate lineage object. Defaults to `None` :type lineage: storage.RenewableCert :returns: the issued certificate or `None` if doing a dry run :rtype: storage.RenewableCert or None :raises errors.Error: if certificate could not be obtained N�{action} for {domains}z-Simulating renewal of an existing certificatez Renewing an existing certificate��action�domains� Simulating a certificate request�Requesting a certificateFz!Certificate could not be obtained)r �pre_hookr+ �notify�format�dry_run�internal_display_util�summarize_domain_list�namesr � renew_cert�obtain_and_enroll_certificater �Error�deploy_hook�live_dir� post_hook)� le_clientr. r5 �certname�lineager/ r/ r0 �_get_and_save_certU sD ��� �� � � �rH r. �cert�returnc C sV t �d�r t �d�s)| j�� }|j�� }||kr'd}|�|j||�}t�|��dS dS )a| This function ensures that the user will not implicitly migrate an existing key from one type to another in the situation where a certificate for that lineage already exist and they have not provided explicitly --key-type and --cert-name. :param config: Current configuration provided by the client :param cert: Matching certificate that could be renewed �key_typerF z�Are you trying to change the key type of the certificate named {0} from {1} to {2}? Please provide both --cert-name and --key-type on the command line to confirm the change you are trying to make.N) r � set_by_clirK �upper�private_key_typer: �lineagenamer rA )r. rI �new_key_type�cur_key_type�msgr/ r/ r0 �%_handle_unexpected_key_type_migration� s ��rS r5 c C s� t | |� d�|�� �}dj|jj|d�|�tjd�}| js+| j s+t j|ddddd�r/d |fS t �d j|t jd�tjdd � �tjd�� t�t��)a Figure out what to do if a previous cert had a subset of the names now requested :param config: Configuration object :type config: configuration.NamespaceConfig :param domains: List of domain names :type domains: `list` of `str` :param cert: Certificate object :type cert: storage.RenewableCert :returns: Tuple of (str action, cert_or_None) as per _find_lineage_for_domains_and_certname action can be: "newcert" | "renew" | "reinstall" :rtype: `tuple` of `str` z, a You have an existing certificate that contains a portion of the domains you requested (ref: {0}){br}{br}It contains these names: {1}{br}{br}You requested these names for the new certificate: {2}.{br}{br}Do you want to expand and replace this existing certificate with the new certificate?��br�Expand�Cancelz--expandT��cli_flag�force_interactiver$ z�To obtain a new certificate that contains these names without replacing your existing certificate for {0}, you must use the --duplicate option.{br}{br}For example:{br}{br}{1} --duplicate {2}� � N)rS �joinr>