HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1991111/cwd/lib/python3/dist-packages/certbot/__pycache__/
Upload File :
Current File : //proc/1991111/cwd/lib/python3/dist-packages/certbot/__pycache__/configuration.cpython-311.pyc
�

E��cd-���dZddlZddlZddlmZddlmZddlmZddlmZddl	m
Z
ddl	mZdd	lm
Z
dd
lmZddlmZGd�d
��Zdeddfd�ZdS)z$Certbot user-supplied configuration.�N)�Any)�List)�Optional)�parse)�errors)�util)�	constants)�misc)�osc��eZdZdZdejddfd�Zdedefd�Z	dededdfd	�Z
edefd
���Zej
deddfd���Zedeefd
���Zej
deddfd���Zedefd���Zej
deddfd���Zedefd���Zej
deddfd���Zedefd���Zej
deddfd���Zedefd���Zedefd���Zedefd���Zedefd���Zedefd���Zedefd���Zedefd���Zedefd ���Zedefd!���Zedefd"���Zedefd#���Zedefd$���Z edefd%���Z!ede"efd&���Z#edefd'���Z$edefd(���Z%edefd)���Z&edeefd*���Z'edefd+���Z(d,edefd-�Z)edefd.���Z*edefd/���Z+edefd0���Z,edefd1���Z-edefd2���Z.edefd3���Z/edefd4���Z0edefd5���Z1edefd6���Z2d7eddfd8�Z3dS)9�NamespaceConfiga4Configuration wrapper around :class:`argparse.Namespace`.

    Please note that the following attributes are dynamically resolved using
    :attr:`~certbot.configuration.NamespaceConfig.work_dir` and relative
    paths defined in :py:mod:`certbot._internal.constants`:

      - `accounts_dir`
      - `csr_dir`
      - `in_progress_dir`
      - `key_dir`
      - `temp_checkpoint_dir`

    And the following paths are dynamically resolved using
    :attr:`~certbot.configuration.NamespaceConfig.config_dir` and relative
    paths defined in :py:mod:`certbot._internal.constants`:

      - `default_archive_dir`
      - `live_dir`
      - `renewal_configs_dir`

    :ivar namespace: Namespace typically produced by
        :meth:`argparse.ArgumentParser.parse_args`.
    :type namespace: :class:`argparse.Namespace`

    �	namespace�returnNc��|t�|d|��tj�|jj��|j_tj�|jj��|j_tj�|jj��|j_t|��dS)Nr)
�object�__setattr__r�path�abspathr�
config_dir�work_dir�logs_dir�_check_config_sanity)�selfrs  �7/usr/lib/python3/dist-packages/certbot/configuration.py�__init__zNamespaceConfig.__init__+s����*����4��i�8�8�8�$&�G�O�O�D�N�4M�$N�$N���!�"$�'�/�/�$�.�2I�"J�"J����"$�'�/�/�$�.�2I�"J�"J����	�T�"�"�"�"�"��namec�,�t|j|��S�N)�getattrr)rrs  r�__getattr__zNamespaceConfig.__getattr__9s���t�~�t�,�,�,r�valuec�2�t|j||��dSr)�setattrr)rrr"s   rrzNamespaceConfig.__setattr__<s������e�,�,�,�,�,rc��|jjS)zACME Directory Resource URI.�r�server�rs rr'zNamespaceConfig.server?s���~�$�$r�server_c��||j_dSrr&)rr)s  rr'zNamespaceConfig.serverDs�� '�����rc��|jjS)z�Email used for registration and recovery contact.

        Use comma to register multiple emails,
        ex: u1@example.com,u2@example.com. (default: Ask).
        �r�emailr(s rr-zNamespaceConfig.emailHs���~�#�#r�mailc��||j_dSrr,)rr.s  rr-zNamespaceConfig.emailQs��#�����rc��|jjS)zSize of the RSA key.�r�rsa_key_sizer(s rr2zNamespaceConfig.rsa_key_sizeUs���~�*�*r�ksizec��||j_dS)zSet the rsa_key_size propertyNr1)rr3s  rr2zNamespaceConfig.rsa_key_sizeZs��',���#�#�#rc��|jjS)z`The SECG elliptic curve name to use.

        Please see RFC 8446 for supported values.
        �r�elliptic_curver(s rr7zNamespaceConfig.elliptic_curve_s���~�,�,r�ecurvec��||j_dS)zSet the elliptic_curve propertyNr6)rr8s  rr7zNamespaceConfig.elliptic_curvegs��)/���%�%�%rc��|jjS)zhType of generated private key.

        Only *ONE* per invocation can be provided at this time.
        �r�key_typer(s rr<zNamespaceConfig.key_typels���~�&�&r�ktypec��||j_dS)zSet the key_type propertyNr;)rr=s  rr<zNamespaceConfig.key_typets��#(�����rc��|jjS)z�Adds the OCSP Must-Staple extension to the certificate.

        Autoconfigures OCSP Stapling for supported setups
        (Apache version >= 2.3.3 ).
        )r�must_stapler(s rr@zNamespaceConfig.must_stapley����~�)�)rc��|jjS)zConfiguration directory.)rrr(s rrzNamespaceConfig.config_dir�s���~�(�(rc��|jjS)zWorking directory.)rrr(s rrzNamespaceConfig.work_dir�s���~�&�&rc�6�|�|j��S)z2Directory where all account information is stored.)�accounts_dir_for_server_path�server_pathr(s r�accounts_dirzNamespaceConfig.accounts_dir�s���0�0��1A�B�B�Brc�j�tj�|jjt
j��S)z Configuration backups directory.)rr�joinrrr	�
BACKUP_DIRr(s r�
backup_dirzNamespaceConfig.backup_dir�s"���w�|�|�D�N�3�Y�5I�J�J�Jrc�j�tj�|jjt
j��S)zBDirectory where new Certificate Signing Requests (CSRs) are saved.)rrrIrrr	�CSR_DIRr(s r�csr_dirzNamespaceConfig.csr_dir��"���w�|�|�D�N�5�y�7H�I�I�Irc�j�tj�|jjt
j��S)z:Directory used before a permanent checkpoint is finalized.)rrrIrrr	�IN_PROGRESS_DIRr(s r�in_progress_dirzNamespaceConfig.in_progress_dir�s"���w�|�|�D�N�3�Y�5N�O�O�Orc�j�tj�|jjt
j��S)z
Keys storage.)rrrIrrr	�KEY_DIRr(s r�key_dirzNamespaceConfig.key_dir�rOrc�j�tj�|jjt
j��S)zTemporary checkpoint directory.)rrrIrrr	�TEMP_CHECKPOINT_DIRr(s r�temp_checkpoint_dirz#NamespaceConfig.temp_checkpoint_dir�s,���w�|�|��N�#�Y�%B�D�D�	Drc��|jjS)z�Disable verification of the ACME server's certificate.

        The root certificates trusted by Certbot can be overriden by setting the
        REQUESTS_CA_BUNDLE environment variable.
        )r�
no_verify_sslr(s rrZzNamespaceConfig.no_verify_ssl�s���~�+�+rc��|jjS)z�Port used in the http-01 challenge.

        This only affects the port Certbot listens on.
        A conforming ACME server will still attempt to connect on port 80.
        )r�http01_portr(s rr\zNamespaceConfig.http01_port�rArc��|jjS)z;The address the server listens to during http-01 challenge.)r�http01_addressr(s rr^zNamespaceConfig.http01_address�s���~�,�,rc��|jjS)z�Port used to serve HTTPS.

        This affects which port Nginx will listen on after a LE certificate
        is installed.
        )r�
https_portr(s rr`zNamespaceConfig.https_port�s���~�(�(rc��|jjS)zuList of user specified preferred challenges.

        Sorted with the most preferred challenge listed first.
        )r�pref_challsr(s rrbzNamespaceConfig.pref_challs�s���~�)�)rc��|jjS)a�Allow only a subset of names to be authorized to perform validations.

        When performing domain validation, do not consider it a failure
        if authorizations can not be obtained for a strict subset of
        the requested domains. This may be useful for allowing renewals for
        multiple domains to succeed even if some domains no longer point
        at this system.
        )r�allow_subset_of_namesr(s rrdz%NamespaceConfig.allow_subset_of_names�s���~�3�3rc��|jjS)z�Enable strict permissions checks.

        Require that all configuration files are owned by the current
        user; only needed if your config is somewhere unsafe like /tmp/.
        )r�strict_permissionsr(s rrfz"NamespaceConfig.strict_permissions�s���~�0�0rc��|jjS)z�Disable renewal updates.

        If updates provided by installer enhancements when Certbot is being run
        with "renew" verb should be disabled.
        )r�disable_renew_updatesr(s rrhz%NamespaceConfig.disable_renew_updates�s���~�3�3rc��|jjS)z�Set the preferred certificate chain.

        If the CA offers multiple certificate chains, prefer the chain whose
        topmost certificate was issued from this Subject Common Name.
        If no match, the default offered chain will be used.
        )r�preferred_chainr(s rrjzNamespaceConfig.preferred_chain�s���~�-�-rc��tj|jj��}|j|jz�dtjj��S)zFile path based on ``server``.�/)	r�urlparserr'�netlocr�replacer�sep)r�parseds  rrFzNamespaceConfig.server_path�s;������ 5�6�6���
���+�4�4�S�"�'�+�F�F�FrrFc��tj|��}tj�|jjtj|��S)z/Path to accounts directory based on server_path)	r
�.underscores_for_unsupported_characters_in_pathrrrIrrr	�ACCOUNTS_DIR)rrFs  rrEz,NamespaceConfig.accounts_dir_for_server_paths<���I�+�V�V���w�|�|��N�%�y�'=�{�L�L�	Lrc�j�tj�|jjt
j��Sr)rrrIrrr	�ARCHIVE_DIRr(s r�default_archive_dirz#NamespaceConfig.default_archive_dirs ���w�|�|�D�N�5�y�7L�M�M�Mrc�j�tj�|jjt
j��Sr)rrrIrrr	�LIVE_DIRr(s r�live_dirzNamespaceConfig.live_dirs ���w�|�|�D�N�5�y�7I�J�J�Jrc�j�tj�|jjt
j��Sr)rrrIrrr	�RENEWAL_CONFIGS_DIRr(s r�renewal_configs_dirz#NamespaceConfig.renewal_configs_dirs*���w�|�|��N�%�y�'D�F�F�	Frc�j�tj�|jjt
j��S)z>Path to directory with hooks to run with the renew subcommand.)rrrIrrr	�RENEWAL_HOOKS_DIRr(s r�renewal_hooks_dirz!NamespaceConfig.renewal_hooks_dirs)���w�|�|�D�N�5�%�7�9�9�	9rc�`�tj�|jtj��S)z8Path to the pre-hook directory for the renew subcommand.)rrrIr�r	�RENEWAL_PRE_HOOKS_DIRr(s r�renewal_pre_hooks_dirz%NamespaceConfig.renewal_pre_hooks_dirs'���w�|�|�D�2�%�;�=�=�	=rc�`�tj�|jtj��S)z;Path to the deploy-hook directory for the renew subcommand.)rrrIr�r	�RENEWAL_DEPLOY_HOOKS_DIRr(s r�renewal_deploy_hooks_dirz(NamespaceConfig.renewal_deploy_hooks_dir s*���w�|�|�D�2�%�>�@�@�	@rc�`�tj�|jtj��S)z9Path to the post-hook directory for the renew subcommand.)rrrIr�r	�RENEWAL_POST_HOOKS_DIRr(s r�renewal_post_hooks_dirz&NamespaceConfig.renewal_post_hooks_dir&s'���w�|�|�D�2�%�<�>�>�	>rc��|jjS)zuThis option specifies how long (in seconds) Certbot will wait
        for the server to issue a certificate.
        )r�issuance_timeoutr(s rr�z NamespaceConfig.issuance_timeout,s��
�~�.�.rc��|jjS)z�This option specifies whether Certbot should generate a new private
        key when replacing a certificate, even if reuse_key is set.
        )r�new_keyr(s rr�zNamespaceConfig.new_key3s��
�~�%�%r�_memoc�d�tj|j��}t|��|��Sr)�copy�deepcopyr�type)rr��new_nss   r�__deepcopy__zNamespaceConfig.__deepcopy__<s+����t�~�.�.���t�D�z�z�&�!�!�!r)4�__name__�
__module__�__qualname__�__doc__�argparse�	Namespacer�strrr!r�propertyr'�setterrr-�intr2r7r<�boolr@rrrGrKrNrRrUrXrZr\r^r`rrbrdrfrhrjrFrErwrzr}r�r�r�r�r�r�r��rrr
r
s��������4
#�(�"4�
#��
#�
#�
#�
#�-��-��-�-�-�-�-��-�C�-�D�-�-�-�-��%��%�%�%��X�%��]�(�c�(�d�(�(�(��]�(��$�x��}�$�$�$��X�$��\�$�#�$�$�$�$�$��\�$��+�c�+�+�+��X�+���,�#�,�$�,�,�,���,��-��-�-�-��X�-���/�S�/�T�/�/�/���/��'�#�'�'�'��X�'��_�(�c�(�d�(�(�(��_�(��*�T�*�*�*��X�*��)�C�)�)�)��X�)��'�#�'�'�'��X�'��C�c�C�C�C��X�C��K�C�K�K�K��X�K��J��J�J�J��X�J��P��P�P�P��X�P��J��J�J�J��X�J��D�S�D�D�D��X�D�
�,�t�,�,�,��X�,��*�S�*�*�*��X�*��-��-�-�-��X�-��)�C�)�)�)��X�)��*�T�#�Y�*�*�*��X�*��	4�t�	4�	4�	4��X�	4��1�D�1�1�1��X�1��4�t�4�4�4��X�4��.��#��.�.�.��X�.��G�S�G�G�G��X�G�
L��L��L�L�L�L��N�S�N�N�N��X�N��K�#�K�K�K��X�K��F�S�F�F�F��X�F��9�3�9�9�9��X�9�
�=�s�=�=�=��X�=�
�@�#�@�@�@��X�@�
�>��>�>�>��X�>�
�/�#�/�/�/��X�/��&��&�&�&��X�&�"�#�"�*;�"�"�"�"�"�"rr
�configrc���|j|jkr,tjd�|j�����|jj�#|jjD]}tj|���dSdS)z�Validate command line options and display error message if
    requirements are not met.

    :param config: NamespaceConfig instance holding user configuration
    :type args: :class:`certbot.configuration.NamespaceConfig`

    z;Trying to run http-01 and https-port on the same port ({0})N)	r\r`r�ConfigurationError�formatr�domainsr�enforce_domain_sanity)r��domains  rrrCs�����V�.�.�.��'�
%�%+�V�F�,=�%>�%>�@�@�	@�
���+��&�.�	/�	/�F��&�v�.�.�.�.�,�+�	/�	/r)r�r�r��typingrrr�urllibr�certbotrr�certbot._internalr	�certbot.compatr
rr
rr�rr�<module>r�s��*�*���������������������������������������������'�'�'�'�'�'�������������p"�p"�p"�p"�p"�p"�p"�p"�f	/��/�T�/�/�/�/�/�/r