????
Current Path : /proc/self/root/lib/python3.6/site-packages/certbot/_internal/__pycache__/ |
Current File : //proc/self/root/lib/python3.6/site-packages/certbot/_internal/__pycache__/renewal.cpython-36.pyc |
3 گa�\ � @ sv d Z ddlZddlZddlZddlZddlZddlZddlZddlm Z ddlm Z ddlmZ ddlmZ ddlm Z ddlmZ dd lmZ dd lmZ ddlmZ ddlmZ dd lmZ ddlZddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z ddlm!Z! ddlm"Z" ddlm#Z# ddlm$Z$ ddlm%Z% ddl&m'Z( ddl)m*Z+ ddl,m-Z- ddl.mZ/ ej0e1�Z2ddddd d!d"d#d$d%d&d'd(d)d*gZ3d+d,gZ4d-d.d/d0gZ5e6ej7e5e4e3d^��Z8ej9e:ee$j; d2�d3d4�Z<ej9e e:e f dd5�d6d7�Z=ej9e e:e f dd5�d8d9�Z>ej9e e:e f dd5�d:d;�Z?e e:e f e e:e f d<�d=d>�Z@e:eee: e:f ee: d?�d@dA�ZAe:e:eBdB�dCdD�ZCe:e:eDdB�dEdF�ZEe:e:ee: dB�dGdH�ZFej9e$j;eBdI�dJdK�ZGej9e$j;e:ddL�dMdN�ZHej9eee: e!jIe$j;ddO�dPdQ�ZJee: e:e:dR�dSdT�ZKej9ee: ee: ee: ee: ddU�dVdW�ZLej9ddX�dYdZ�ZMe:ej9dd[�d\d]�ZNdS )_zGFunctionality for autorenewal and associated juggling of configurations� N)�Any)�Dict)�Iterable)�List)�Mapping)�Optional)�Union)�default_backend)�ec)�rsa)�load_pem_private_key)� configuration)�crypto_util)�errors)� interfaces)�util)�cli)�client)� constants)�hooks)�storage)�updater)�obj)�disco)�osZ config_dirZlogs_dirZwork_dirZ user_agent�serverZaccount� authenticator� installer� renew_hook�pre_hook� post_hookZhttp01_addressZpreferred_chain�key_type�elliptic_curve�rsa_key_size�http01_portZmust_stapleZallow_subset_of_names� reuse_keyZ autorenew�pref_challs)�config� full_path�returnc , C s\ yt j|| �}W nR tjtfk rb } z0tjd|� tjdt|�� tjdt j � � dS d}~X nX d|jkr~tjd|� dS |jd }d|kr�tjd|� dS t|�}yt | |� t| |� W nJ ttjfk �r } z&tjd |t|�� tjdt j � � dS d}~X nX yd d� |j� D �| _W n2 tjk �rV } ztjd||� dS d}~X nX |S ) a� Try to instantiate a RenewableCert, updating config with relevant items. This is specifically for use in renewal and enforces several checks and policies to ensure that we can try to proceed with the renewal request. The config argument is modified by including relevant options read from the renewal configuration file. :param configuration.NamespaceConfig config: configuration for the current lineage :param str full_path: Absolute path to the configuration file that defines this lineage :returns: the RenewableCert object or None if a fatal error occurred :rtype: `storage.RenewableCert` or NoneType z(Renewal configuration file %s is broken.zThe error was: %s Skipping.zTraceback was: %sN� renewalparamsz<Renewal configuration file %s lacks renewalparams. Skipping.r zJRenewal configuration file %s does not specify an authenticator. Skipping.zHAn error occurred while parsing %s. The error was %s. Skipping the file.c S s g | ]}t j|��qS � )r Zenforce_domain_sanity)�.0�dr+ r+ �/usr/lib/python3.6/renewal.py� <listcomp>j s z!_reconstitute.<locals>.<listcomp>z{Renewal configuration file %s references a certificate that contains an invalid domain name. The problem was: %s. Skipping.)r � RenewableCertr ZCertStorageError�IOError�logger�error�str�debug� traceback� format_excr �"_remove_deprecated_config_elements� restore_required_config_elements�_restore_plugin_configs� ValueError�Error�names�domainsZConfigurationError)r'