JFIF$        dd7 

Viewing File: /usr/lib/python3.9/site-packages/certbot/_internal/cli/__pycache__/__init__.cpython-39.opt-1.pyc

a

}|�gFe�@slUdZddlZddlZddlZddlZddlmZddlmZddlmZddlm	Z	ddl
Z
ddlmZddl
mZdd	lmZdd
lmZddlmZddlmZdd
lmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlmZddlm Z ddlm!Z!ddlm"Z"ddlm#Z#ddlm$Z$ddlm%Z%ddlm&Z&ddlm'Z'dd lm(Z(dd!lm)Z)dd"l*m+Z+dd#l,m-Z-dd$l.m/Z/dd%l0m1Z1dd&l2m3Z3dd'l4m5Z5dd(l4m6Z6dd)l7m8Z9ddl:m;m<m=Z>dd*l?m@Z@e�AeB�ZCdaDee-eEd+<e9jFeeGed,�d-d.�ZHee	d/�d0d1�ZIdS)2z2Certbot command line argument & config processing.�N)�Any)�List)�Optional)�Type)�NamespaceConfig)�	constants)�ARGPARSE_PARAMS_TO_REMOVE)�cli_command)�COMMAND_OVERVIEW)�DEPRECATED_OPTIONS)�EXIT_ACTIONS)�HELP_AND_VERSION_USAGE)�SHORT_USAGE)�
VAR_MODIFIERS)�ZERO_ARG_ACTIONS)�_DeployHookAction)�_DomainsAction)�_EncodeReasonAction)�_PrefChallAction)�_RenewHookAction)�_user_agent_comment_type)�add_domains)�CaseInsensitiveList)�config_help)�CustomHelpFormatter)�flag_default)�HelpfulArgumentGroup)�nonnegative_int)�parse_preferred_challenges)�	read_file)�set_test_server_options)�_add_all_groups)�HelpfulArgumentParser)�
_paths_parser)�_plugins_parsing)�_create_subparsers)�	VERB_HELP)�
VERB_HELP_MAP)�disco)�enhancements�helpful_parser)�plugins�args�returncCsrt||�}t|�|jdddddtd�dd�|jddd	td	�tjd
�|jdddd
dtd
�tjd�|jddttd�dd�|jddddtd�tjd�|jgd�dddddtd�dd�|jgd�tjdtd�dd�|jgd�d d!d"d#d$t	td#�d%d&�	|jgd'�d(d)d*d+d,�|jgd'�d-d.d/d0d,�|jgd1�d2d3d4td3�d5d6�|jgd7�d8dd9td9�d:d;�|jgd<�d=dd>td>�d?d;�|jd@dAgdBdtdC�dDd�|jgdE�dFdGtdH�t
dH�dI�|jgdJ�dKdtdL�dLdMdN�|jgdJ�dOdPtdL�dLdQdN�|jgdR�dSdTdUdVdtdV�dWd�|jdAdXdtdY�dZd�|jdAd[d\d]�tj
�d^d_�|jdAd`gdadbdcdtdc�ddd�|jdAdedfdtdf�dgd�|jdAdhdidtdi�djd�|jdAdkdidPtdi�dld�|jdAdmdndtdn�dod�|jgdp�dqdtdr�dsd�|jdAdtdudtdu�dvd�|jdwdAgdxdytdz�d{d|�|jdAd}d~dtd~�dd�|jgd��d�d�d�dtd��d�d�|jgd��d�d�d�dtd��d�tjd�|jd�d�dtd��d�d�|jgd��d�dtd��d�d�|jd�d�dt
d��td��d��|jgd��d�td�td��t
d��d��|jd�d�gd�d�td��t
d��d
�|jd�d�gd�ttd��t
d��d�|jd�d�dtd��d�d�|jd�d�td�td��t
d��d��|jd�d�d�d�gttd��t
d��d��|jd�d�tgd��d�td��t
d��d��|jd�d�dd�td��t
d��d;�|jd�d�gd�dd�td��d�d;�|jd�d�dPd�td��d�d;�|jd�d�gd�dd�td��d�d;�|jd�d�dPd�td��tjd;�|jd�d�gd�dd�td��d�d;�|jd�d�dPd�td��tjd;�|jd�d�dd�td��d�d;�|jd�d�dPd�td��tjd;�|jd�d�dtdŃd�d�|jgdǢd�d�tdɃt
dɃd
�|jgdʢd�d�ttd̃d�d�|jgd��d�td�tdσt
dσd��|jd`d�gd�d�dӍ|jd`d�gd�d�dӍ|jd`d�gd�ttjd׍|jd`d�dPtdكd�tjdN�|jd`d�gd�td�d׍|jd`d�dPd�td݃d�d;�|jd`d�dPtd�d�d�dN�|jd`d�dtd�d�d�dN�|jd`d�dPtd�d�d�dN�|�d�d�|�d�d�|�d�d�|�d�d�t�|j�t|�t|�t||�|a|��S)�aReturns parsed command line arguments.

    :param .PluginsRegistry plugins: available plugins
    :param list args: command line arguments with the program name removed

    :returns: parsed command line arguments
    :rtype: configuration.NamespaceConfig

    Nz-vz	--verboseZ
verbose_count�countzbThis flag can be used multiple times to incrementally increase the verbosity of output, e.g. -vvv.)�dest�action�default�helpz--verbose-levelZ
verbose_level)r/r1r2z-tz--textZ	text_mode�
store_truez--max-log-backupsZmax_log_backupsz�Specifies the maximum number of backup logs that should be kept by Certbot's built in log rotation. Setting this flag to 0 disables log rotation entirely, causing Certbot to always append to the same log file.)�typer1r2z--preconfigured-renewalZpreconfigured_renewal)N�
automation�run�certonly�enhancez-nz--non-interactivez--noninteractiveZnoninteractive_modez�Run without ever asking for user input. This may require additional command line flags; the client will try to explain which ones are required if it finds one missing)N�registerr6r7r8Zforce_interactivez�Force Certbot to be interactive even if it detects it's not being run in a terminal. This flag cannot be used with the renew subcommand.)r0r1r2)Nr6r7�certificatesr8z-dz	--domainsz--domainZdomainsZDOMAINa�Domain names to include. For multiple domains you can use multiple -d flags or enter a comma separated list of domains as a parameter. All domains will be included as Subject Alternative Names on the certificate. The first domain will be used as the certificate name, unless otherwise specified or if you already have a certificate with the same name. In the case of a name conflict, a number like -0001 will be appended to the certificate name. (default: Ask))r/�metavarr0r1r2)Nr6r7r9z	--eab-kidZeab_kidZEAB_KIDz+Key Identifier for External Account Binding)r/r;r2z--eab-hmac-keyZeab_hmac_keyZEAB_HMAC_KEYz%HMAC key for External Account Binding)	Nr6r7Zmanage�deleter:�renewr8�reconfigurez--cert-nameZcertnameZCERTNAMEa�Certificate name to apply. This name is used by Certbot for housekeeping and in file paths; it doesn't affect the content of the certificate itself. Certificate name cannot contain filepath separators (i.e. '/' or '\', depending on the platform). To see certificate names, run 'certbot certificates'. When creating a new certificate, specifies the new certificate's name. (default: the first provided domain or the name of an existing certificate on your system for the same domains))r/r;r1r2)N�testingr=r7z	--dry-run�dry_runa�Perform a test run against the Let's Encrypt staging server, obtaining test (invalid) certificates but not saving them to disk. This can only be used with the 'certonly' and 'renew' subcommands. It may trigger webserver reloads to  temporarily modify & roll back configuration files. --pre-hook and --post-hook commands run by default. --deploy-hook commands do not run, unless enabled by --run-deploy-hooks. The test server may be overridden with --server.)r0r/r1r2)r?r=r7r>z--run-deploy-hooksZrun_deploy_hooksaWhen performing a test run using `--dry-run` or `reconfigure`, run any applicable deploy hooks. This includes hooks set on the command line, saved in the certificate's renewal configuration file, or present in the renewal-hooks directory. To exclude directory hooks, use --no-directory-hooks. The hook(s) will only be run if the dry run succeeds, and will use the current active certificate, not the temporary test certificate acquired during the dry run. This flag is recommended when modifying the deploy hook using `reconfigure`.r9r5z!--register-unsafely-without-emailZregister_unsafely_without_emaila"Specifying this flag enables registering an account with no email address. This is strongly discouraged, because you will be unable to receive notice about impending expiration or revocation of your certificates or problems with your Certbot installation that will lead to failure to renew.)r9�update_account�
unregisterr5z-mz--emailZemail)r1r2)r9rAr5z--eff-emailZ	eff_emailz"Share your e-mail address with EFF)r0r1r/r2z--no-eff-email�store_falsez(Don't share your e-mail address with EFF)r5r7r6z--keep-until-expiringz--keepz--reinstallZ	reinstallz�If the requested certificate matches an existing certificate, always keep the existing one until it is due for renewal (for the 'run' subcommand this means reinstall the existing certificate). (default: Ask)z--expand�expandz�If an existing certificate is a strict subset of the requested names, always expand and replace it with the additional names. (default: Ask)z	--version�versionz%(prog)s {0}z&show program's version number and exit)r0rEr2r=z--force-renewalz--renew-by-defaultZrenew_by_defaultz�If a certificate already exists for the requested domains, renew it now, regardless of whether it is near expiry. (Often --keep-until-expiring is more appropriate). Also implies --expand.z--renew-with-new-domainsZrenew_with_new_domainsz�If a certificate already exists for the requested certificate name but does not match the requested domains, renew it now, regardless of whether it is near expiry.z--reuse-keyZ	reuse_keyzDWhen renewing, use the same private key as the existing certificate.z--no-reuse-keyz�When renewing, do not use the same private key as the existing certificate. Not reusing private keys is the default behavior of Certbot. This option may be used to unset --reuse-key on an existing certificate.z	--new-keyZnew_keyz�When renewing or replacing a certificate, generate a new private key, even if --reuse-key is set on the existing certificate. Combining --new-key and --reuse-key will result in the private key being replaced and then reused in future renewals.)r5r=r7z--allow-subset-of-namesZallow_subset_of_namesa8When 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. This option cannot be used with --csr.z--agree-tosZtosz5Agree to the ACME Subscriber Agreement (default: Ask)rBz	--accountZ
ACCOUNT_IDZaccountzAccount ID to use)r;r1r2z--duplicateZ	duplicatezdAllow making a certificate lineage that duplicates an existing one (both can be renewed in parallel))r5r=r7r6z-qz--quiet�quietz\Silence all output except errors. Useful for automation via cron. Implies --non-interactive.)r?Zrevoker6z--test-certz	--stagingZstagingzmUse the Let's Encrypt staging server to obtain or revoke test (invalid) certificates; equivalent to --server r?z--debug�debugz!Show tracebacks in case of errors)Nr7r6z--debug-challengesZdebug_challengesz�After setting up challenges, wait for user input before submitting to CA. When used in combination with the `-v` option, the challenge URLs or FQDNs and their expected return values are shown.z--no-verify-sslZ
no_verify_ssl)r0r2r1)r?�
standalone�manualz--http-01-portZhttp01_port)r4r/r1r2rHz--http-01-addressZhttp01_addressZnginxz--https-portZ
https_portz--break-my-certsZbreak_my_certsz]Be willing to replace or renew valid certificates with invalid (testing/staging) certificatesZsecurityz--rsa-key-size�NZrsa_key_size)r4r;r1r2z
--key-typeZrsaZecdsaZkey_type)�choicesr4r1r2z--elliptic-curve)Z	secp256r1Z	secp384r1Z	secp521r1Zelliptic_curve)r4rKr;r1r2z
--must-stapleZmust_stapler8z
--redirectZredirectz�Automatically redirect all HTTP traffic to HTTPS for the newly authenticated vhost. (default: redirect enabled for install and run, disabled for enhance)z
--no-redirectz�Do not automatically redirect all HTTP traffic to HTTPS for the newly authenticated vhost. (default: redirect enabled for install and run, disabled for enhance)z--hstsZhstsz�Add the Strict-Transport-Security header to every HTTP response. Forcing browser to always use SSL for the domain. Defends against SSL Stripping.z	--no-hstsz--uirZuirz�Add the "Content-Security-Policy: upgrade-insecure-requests" header to every HTTP response. Forcing the browser to use https:// for every http:// resource.z--no-uirz
--staple-ocspZstaplezmEnables OCSP Stapling. A valid OCSP response is stapled to the certificate that the server offers during TLS.z--no-staple-ocspz--strict-permissionsZstrict_permissionsz}Require that all configuration files are owned by the current user; only needed if your config is somewhere unsafe like /tmp/)Nr7r=r6z--preferred-chainZpreferred_chain)rIrHr7r=z--preferred-challengesZpref_challsa�A sorted, comma delimited list of the preferred challenge to use during authorization with the most preferred challenge listed first (Eg, "dns" or "http,dns"). Not all plugins support all challenges. See https://certbot.eff.org/docs/using.html#plugins for details. ACME Challenges are versioned, but if you pick "http" rather than "http-01", Certbot will select the latest version automatically.z--issuance-timeoutZissuance_timeoutr>z
--pre-hookuCommand to be run in a shell before obtaining any certificates. Unless --disable-hook-validation is used, the command’s first word must be the absolute pathname of an executable or one found via the PATH environment variable. Intended primarily for renewal, where it can be used to temporarily shut down a webserver that might conflict with the standalone plugin. This will only be called if a certificate is actually to be obtained/renewed. When renewing several certificates that have identical pre-hooks, only the first will be executed.)r2z--post-hooku�Command to be run in a shell after attempting to obtain/renew certificates. Unless --disable-hook-validation is used, the command’s first word must be the absolute pathname of an executable or one found via the PATH environment variable. Can be used to deploy renewed certificates, or to restart any servers that were stopped by --pre-hook. This is only run if an attempt was made to obtain/renew a certificate. If multiple renewed certificates have identical post-hooks, only one will be run.z--renew-hook)r0r2z--no-random-sleep-on-renewZrandom_sleep_on_renewz
--deploy-hookuACommand to be run in a shell once for each successfully issued certificate. Unless --disable-hook-validation is used, the command’s first word must be the absolute pathname of an executable or one found via the PATH environment variable. For this command, the shell variable $RENEWED_LINEAGE will point to the config live subdirectory (for example, "/etc/letsencrypt/live/example.com") containing the new certificates and keys; the shell variable $RENEWED_DOMAINS will contain a space-delimited list of renewed certificate domains (for example, "example.com www.example.com")z--disable-hook-validationZvalidate_hooksa�Ordinarily the commands specified for --pre-hook/--post-hook/--deploy-hook will be checked for validity, to see if the programs being run are in the $PATH, so that mistakes can be caught early, even when the hooks aren't being run just yet. The validation is rather simplistic and fails if you use more advanced shell constructs, so you can use this switch to disable it. (default: False)z--no-directory-hooksZdirectory_hooksz`Disable running executables found in Certbot's hook directories during renewal. (default: False)z--disable-renew-updatesZdisable_renew_updatesaDisable automatic updates to your server configuration that would otherwise be done by the selected installer plugin, and triggered when the user executes "certbot renew", regardless of if the certificate is renewed. This setting does not apply to important TLS configuration updates.z--no-autorenewZ	autorenewz6Disable auto renewal of certificates. (default: False)z--os-packages-onlyrz--no-self-upgradez--no-bootstrapz--no-permissions-check)r"r!�addr�argparse�SUPPRESSrrZFORCE_INTERACTIVE_FLAGrr�format�certbot�__version__ZSTAGING_URI�int�strrrrZadd_deprecated_argumentr)Zpopulate_clir%r#r$r*�
parse_args)r+r,Zhelpful�rU�B/usr/lib/python3.9/site-packages/certbot/_internal/cli/__init__.py�prepare_and_parse_args:s�

�
�

�����������
�
��
�
��
��	���
��	�
���
���
��
��
���������
����
����
�����
�����
rW)�variabler-cCs6tdur2tjD]"}|jdur|j|kr|jSqtS)zFReturn our argparse type function for a config variable (default: str)N)r*�actionsr4r/rS)rXr0rUrUrV�
argparse_type�s

rZ)J�__doc__rMZloggingZlogging.handlers�sys�typingrrrrrPZcertbot.configurationrZcertbot._internalrZ#certbot._internal.cli.cli_constantsrr	r
rrr
rrrZcertbot._internal.cli.cli_utilsrrrrrrrrrrrrrrrr Z!certbot._internal.cli.group_adderr!Zcertbot._internal.cli.helpfulr"Z"certbot._internal.cli.paths_parserr#Z%certbot._internal.cli.plugins_parsingr$Z certbot._internal.cli.subparsersr%Zcertbot._internal.cli.verb_helpr&r'Zcertbot._internal.pluginsr(Z
plugins_discoZ#certbot._internal.plugins.selectionZ	_internalr+Z	selectionZplugin_selectionZcertbot.pluginsr)Z	getLogger�__name__�loggerr*�__annotations__ZPluginsRegistryrSrWrZrUrUrUrV�<module>sn

�)
Back to Directory  nL+D550H?Mx ,D"v]qv;6*Zqn)ZP0!1 A "#a$2Qr D8 a Ri[f\mIykIw0cuFcRı?lO7к_f˓[C$殷W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