U
    ÝÁ]œv  ã                   @   sà  d Z ddlZddlZddlZddlZddlZddlZddl	m
Z
 ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ dd	lmZmZ ddlZdd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlmZ ddlm Z  ddlm!Z! ddlm"Z" ddl#m$Z$ ddl%m&Z& ddl%m'Z( ddl)m*Z+ e ,e-¡Z.d2dd„Z/dd„ Z0dd„ Z1G dd„ de2ƒZ3d d!„ Z4d3d"d#„Z5d$d%„ Z6G d&d'„ d'e2ƒZ7d4d(d)„Z8d*d+„ Z9d,d-„ Z:d.d/„ Z;d0d1„ Z<dS )5zCertbot client API.é    N)Údefault_backend)Úgenerate_private_key)Úclient)Úcrypto_util)Úerrors)Úmessages)ÚOptionalÚList)Úaccount)Úauth_handler)Úcli)Ú	constants)Úeff)Úerror_handler)Ú
interfaces)Úreverter)Ústorage)Úutil)Úos)Úenhancements)Úops)Ú	selectionc                 C   s*   t j||| j t| ƒd}t  ||| j¡S )z Wrangle ACME client construction)r
   Z
verify_sslÚ
user_agent)Úacme_clientZClientNetworkZno_verify_sslÚdetermine_user_agentZBackwardsCompatibleClientV2Úserver)ÚconfigÚkeyÚregrÚnet© r    ú0/usr/lib/python3/dist-packages/certbot/client.pyÚacme_from_config_key)   s    ÿr"   c                 C   s„   | j dkrzd}tj d¡dkr,d}d}d}ntj}t ¡ }t 	¡ }| 
tj||| j| j| jt| ƒ|| jrrd| j nd	¡	}n| j }|S )
z¿
    Set a user_agent string in the config based on the choice of plugins.
    (this wasn't knowable at construction time)

    :returns: the client's User-Agent string
    :rtype: `str`
    Nz\CertbotACMEClient/{0} ({1}; {2}{8}) Authenticator/{3} Installer/{4} ({5}; flags: {6}) Py/{7}ZCERTBOT_DOCSÚ1zcertbot(-auto)zOS_NAME OS_VERSIONzmajor.minor.patchlevelz; Ú )r   r   ÚenvironÚgetr   Úcli_commandr   Zget_os_info_uaÚplatformÚpython_versionÚformatÚcertbotÚ__version__ÚauthenticatorÚ	installerÚverbÚua_flagsZuser_agent_comment)r   Zuar'   Zos_infor)   r    r    r!   r   1   s&    
   ýr   c                    s„   t ˆ tƒrdS g }ˆ jr"| d¡ ˆ jr2| d¡ ˆ jrB| d¡ ˆ jrR| d¡ d}‡ fdd„|D ƒ}t|ƒrz| d	¡ d
 |¡S )z@Turn some very important CLI flags into clues in the user agent.ÚFLAGSÚdupZfrnZasnÚn)ZpreZpostZrenewZmanual_authZmanual_cleanupc                    s   g | ]}t ˆ |d  ƒ‘qS )Z_hook)Úgetattr)Ú.0Úh©r   r    r!   Ú
<listcomp>^   s     zua_flags.<locals>.<listcomp>Úhookú )	Ú
isinstanceÚDummyConfigZ	duplicateÚappendZrenew_by_defaultÚallow_subset_of_namesÚnoninteractive_modeÚanyÚjoin)r   ÚflagsZ
hook_namesZhooksr    r7   r!   r0   P   s     





r0   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )r<   z'Shim for computing a sample user agent.c                 C   s   d| _ d| _d | _d| _d S )NZXXXZYYYZ
SUBCOMMAND)r-   r.   r   r/   )Úselfr    r    r!   Ú__init__e   s    zDummyConfig.__init__c                 C   s   dS )z-Any config properties we might have are None.Nr    )rC   Únamer    r    r!   Ú__getattr__k   s    zDummyConfig.__getattr__N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__rD   rF   r    r    r    r!   r<   c   s   r<   c                   C   s
   t tƒ ƒS )z<Document what this Certbot's user agent string will be like.)r   r<   r    r    r    r!   Úsample_user_agento   s    rK   c           	      C   sÈ   |  ¡ rt d| j¡ | jdkrN| js>d}t |¡ t |¡‚| j	sNt d¡ | j	rZd| _t
d| jtƒ d}tjt |¡d}t| |ƒ}t|| |ƒ}t ||¡}t | ¡ | ||¡ t | ¡ ||fS )aä  Register new account with an ACME CA.

    This function takes care of generating fresh private key,
    registering the account, optionally accepting CA Terms of Service
    and finally saving the account. It should be called prior to
    initialization of `Client`, unless account has already been created.

    :param .IConfig config: Client configuration.

    :param .AccountStorage account_storage: Account storage where newly
        registered account will be saved to. Save happens only after TOS
        acceptance step, so any account private keys or
        `.RegistrationResource` will not be persisted if `tos_cb`
        returns ``False``.

    :param tos_cb: If ACME CA requires the user to accept a Terms of
        Service before registering account, client action is
        necessary. For example, a CLI tool would prompt the user
        acceptance. `tos_cb` must be a callable that should accept
        `.RegistrationResource` and return a `bool`: ``True`` iff the
        Terms of Service present in the contained
        `.Registration.terms_of_service` is accepted by the client, and
        ``False`` otherwise. ``tos_cb`` will be called only if the
        client action is necessary, i.e. when ``terms_of_service is not
        None``. This argument is optional, if not supplied it will
        default to automatic acceptance!

    :raises certbot.errors.Error: In case of any client problems, in
        particular registration failure, or unaccepted Terms of Service.
    :raises acme.errors.Error: In case of any protocol problems.

    :returns: Newly registered and saved account, as well as protocol
        API handle (should be used in `Client` initialization).
    :rtype: `tuple` of `.Account` and `acme.client.Client`

    z*There are already existing accounts for %sNzLNo email was provided and --register-unsafely-without-email was not present.zRegistering without email!i  )Zpublic_exponentZkey_sizeZbackend)r   )Zfind_allÚloggerÚinfor   ÚemailZregister_unsafely_without_emailÚwarningr   ÚErrorÚdry_runr   Úrsa_key_sizer   ÚjoseZJWKRSAZComparableRSAKeyr"   Úperform_registrationr
   ZAccountZreport_new_accountÚsaver   Zhandle_subscription)	r   Zaccount_storageÚtos_cbÚmsgZrsa_keyr   Úacmer   Zaccr    r    r!   Úregisteru   s0    &



ý


rY   c           	   
   C   sú   |j o
|j}|r<| jjj ¡ }tjj||j |j| jj	d}nd}|  
¡ rZ|sZd}t |¡‚z tjj|j|d}|  ||¡W S  tjk
rô } zZ|jdks¢|jdkrâ|jr¾d|j }t |¡‚qätjdd	|_t| ||ƒ W Y ¢
S n‚ W 5 d}~X Y nX dS )
aj  
    Actually register new account, trying repeatedly if there are email
    problems

    :param acme.client.Client client: ACME client object.
    :param .IConfig config: Client configuration.
    :param Callable tos_cb: a callback to handle Term of Service agreement.

    :returns: Registration Resource.
    :rtype: `acme.messages.RegistrationResource`
    )Úaccount_public_keyZkidZhmac_keyÚ	directoryNzRServer requires external account binding. Please use --eab-kid and --eab-hmac-key.)rN   Zexternal_account_bindingZinvalidEmailZinvalidContactzzThe ACME server believes %s is an invalid email address. Please ensure it is a valid email and attempt registration again.T)Zinvalid)Zeab_kidZeab_hmac_keyr   r   r   Z
public_keyr   ZExternalAccountBindingZ	from_datar[   Zexternal_account_requiredr   rP   ZNewRegistrationrN   Znew_account_and_tosÚcoder?   Údisplay_opsZ	get_emailrT   )	rX   r   rV   Zeab_credentials_suppliedrZ   ZeabrW   ZnewregÚer    r    r!   rT   ½   s8    ý

ÿþrT   c                   @   sz   e Zd ZdZddd„Zddd„Zddd„Zd	d
„ Zdd„ Zdd„ Z	dd„ Z
dd„ Zddd„Zd dd„Zdd„ Zdd„ ZdS )!ÚClientaq  Certbot's client.

    :ivar .IConfig config: Client configuration.
    :ivar .Account account: Account registered with `register`.
    :ivar .AuthHandler auth_handler: Authorizations handler that will
        dispatch DV challenges to appropriate authenticators
        (providing `.IAuthenticator` interface).
    :ivar .IAuthenticator auth: Prepared (`.IAuthenticator.prepare`)
        authenticator that can solve ACME challenges.
    :ivar .IInstaller installer: Installer.
    :ivar acme.client.BackwardsCompatibleClientV2 acme: Optional ACME
        client API handle. You might already have one from `register`.

    Nc                 C   sr   || _ || _|| _|| _|dkr>| jdk	r>t|| jj| jjƒ}|| _|dk	rht 	|| j| j| j j
¡| _nd| _dS )zInitialize a client.N)r   r
   Úauthr.   r"   r   r   rX   r   ZAuthHandlerZpref_challs)rC   r   Zaccount_r`   r.   rX   r    r    r!   rD   ü   s       ÿzClient.__init__c                 C   s    | j dkr"d}t |¡ t |¡‚| jjdkr8t d¡‚t d|¡ |dkr\| j|j	dd}t
j
 ¡ t
jdd }| j ||¡}t |j¡\}}| ¡ | ¡ fS )	aW  Obtain certificate.

        :param .util.CSR csr: PEM-encoded Certificate Signing
            Request. The key used to generate this CSR can be different
            than `authkey`.
        :param acme.messages.OrderResource orderr: contains authzrs

        :returns: certificate and chain as PEM byte strings
        :rtype: tuple

        Nz>Unable to obtain certificate because authenticator is not set.z+Please register with the ACME server first.zCSR: %sF)Úbest_effortéZ   )Zseconds)r   rL   rO   r   rP   r
   r   ÚdebugÚ_get_order_and_authorizationsÚdataÚdatetimeZnowZ	timedeltarX   Zfinalize_orderr   Zcert_and_chain_from_fullchainZfullchain_pemÚencode)rC   ÚcsrÚorderrrW   ZdeadlineÚcertÚchainr    r    r!   Úobtain_certificate_from_csr  s    



z"Client.obtain_certificate_from_csrc              	      sV  |dk	rFt |dƒ}|}| ¡ }W 5 Q R X tj||d}t d|¡ nd}| jjr|pltjdt 	| jj
¡d}tjddt |j|| jj¡d}n*|p¦t | jj
| jj¡}t ||| jj¡}|  |j| jj¡}|j}	tdd„ |	D ƒƒ‰ ‡ fd	d
„|D ƒ}
| jjr6|
|kr6| jjs,t |j¡ t |j¡ |  |
¡S |  ||¡\}}||||fS dS )aˆ  Obtains a certificate from the ACME server.

        `.register` must be called before `.obtain_certificate`

        :param list domains: domains to get a certificate

        :returns: certificate as PEM string, chain as PEM string,
            newly generated private key (`.util.Key`), and DER-encoded
            Certificate Signing Request (`.util.CSR`).
        :rtype: tuple

        NÚrb)ÚfileÚpemz%Reusing existing private key from %s.ro   )rn   Úformre   c                 s   s   | ]}|j jjV  qd S )N)ZbodyZ
identifierÚvalue)r5   Úar    r    r!   Ú	<genexpr>^  s     z,Client.obtain_certificate.<locals>.<genexpr>c                    s   g | ]}|ˆ kr|‘qS r    r    )r5   Úd©Zauth_domainsr    r!   r8   _  s      z-Client.obtain_certificate.<locals>.<listcomp>)ÚopenÚreadr   ZKeyrL   rM   r   rQ   r   Zmake_keyrR   ÚCSRÚacme_crypto_utilZmake_csrro   Zmust_stapleZinit_save_keyZkey_dirZinit_save_csrZcsr_dirrd   re   r>   ÚauthorizationsÚsetr   Úremovern   Úobtain_certificaterl   )rC   ÚdomainsZold_keypathÚfZkeypathZkeypemr   rh   ri   ÚauthzrZsuccessful_domainsrj   rk   r    ru   r!   r}   ,  sB    
ÿ  ÿÿÿ

zClient.obtain_certificatec                 C   s   z| j  |¡}W n  tjk
r0   t d¡‚Y nX |rv| jjrv| j 	|¡\}}|rht
 d¡ | j  |¡}|rvt
 d¡ | j ||¡}|j|dS )a`  Request a new order and complete its authorizations.

        :param str csr_pem: A CSR in PEM format.
        :param bool best_effort: True if failing to complete all
            authorizations should not raise an exception

        :returns: order resource containing its completed authorizations
        :rtype: acme.messages.OrderResource

        zWThe currently selected ACME CA endpoint does not support issuing wildcard certificates.z*Recreating order after authz deactivationszCertbot was unable to obtain fresh authorizations for every domain. The dry run will continue, but results may not be accurate.)rz   )rX   Z	new_orderÚacme_errorsZWildcardUnsupportedErrorr   rP   r   rQ   r   Zdeactivate_valid_authorizationsrL   rc   rO   Zhandle_authorizationsÚupdate)rC   Zcsr_pemra   ri   ZdeactivatedZfailedr€   r    r    r!   rd   p  s    

z$Client._get_order_and_authorizationsc                 C   s|   |   |¡\}}}}| jjtjd ks6| jjtjd kr@t d¡ |  ||¡}| jj	rdt 
d|¡ dS tj |||j|| j¡S )aq  Obtain and enroll certificate.

        Get a new certificate for the specified domains using the specified
        authenticator and installer, and then create a new renewable lineage
        containing it.

        :param domains: domains to request a certificate for
        :type domains: `list` of `str`
        :param certname: requested name of lineage
        :type certname: `str` or `None`

        :returns: A new :class:`certbot.storage.RenewableCert` instance
            referred to the enrolled cert lineage, False if the cert could not
            be obtained, or None if doing a successful dry run.

        Ú
config_dirÚwork_dirzdNon-standard path(s), might not work with crontab installed by your operating system package managerz-Dry run: Skipping creating new lineage for %sN)r}   r   rƒ   r   ZCLI_DEFAULTSr„   rL   rM   Ú_choose_lineagenamerQ   rc   r   ZRenewableCertZnew_lineagero   )rC   r~   Úcertnamerj   rk   r   Ú_Únew_namer    r    r!   Úobtain_and_enroll_certificate  s(    ÿÿÿ  ýz$Client.obtain_and_enroll_certificatec                 C   s.   |r|S t  |d ¡r&|d dd… S |d S )a/  Chooses a name for the new lineage.

        :param domains: domains in certificate request
        :type domains: `list` of `str`
        :param certname: requested name of lineage
        :type certname: `str` or `None`

        :returns: lineage name that should be used
        :rtype: str

        r   é   N)r   Zis_wildcard_domain)rC   r~   r†   r    r    r!   r…   ´  s
    zClient._choose_lineagenamec                 C   sœ   |||fD ]}t  tj |¡d| jj¡ q
td|ƒ\}}z| 	|¡ W 5 | ¡  X t
 d|¡ td|ƒ\}	}
td|ƒ\}}t||	ƒ t|| |ƒ ||
|fS )a   Saves the certificate received from the ACME server.

        :param str cert_pem:
        :param str chain_pem:
        :param str cert_path: Candidate path to a certificate.
        :param str chain_path: Candidate path to a certificate chain.
        :param str fullchain_path: Candidate path to a full cert chain.

        :returns: cert_path, chain_path, and fullchain_path as absolute
            paths to the actual files
        :rtype: `tuple` of `str`

        :raises IOError: If unable to find room to write the cert files

        ií  Ú	cert_pathz4Server issued certificate; certificate written to %sÚ
chain_pathÚfullchain_path)r   Zmake_or_verify_dirr   ÚpathÚdirnamer   Zstrict_permissionsÚ_open_pem_fileÚcloseÚwriterL   rM   Ú_save_chain)rC   Zcert_pemÚ	chain_pemr‹   rŒ   r   rŽ   Z	cert_fileZabs_cert_pathÚ
chain_fileZabs_chain_pathZfullchain_fileZabs_fullchain_pathr    r    r!   Úsave_certificateÇ  s     
ÿÿÿ
zClient.save_certificatec              	   C   sÆ   | j dkrt d¡ t d¡‚|dkr*dn
tj |¡}d}t 	| j
|¡L |D ]4}| j j|tj |¡tj |¡||d | j  ¡  qN| j  d¡ W 5 Q R X d}t 	| j|¡ | j  ¡  W 5 Q R X dS )a  Install certificate

        :param list domains: list of domains to install the certificate
        :param str privkey_path: path to certificate private key
        :param str cert_path: certificate file path (optional)
        :param str chain_path: chain file path

        NzANo installer specified, client is unable to deploythe certificateúNo installer availablez!Unable to install the certificate)Zdomainr‹   Zkey_pathrŒ   r   zDeployed ACME CertificatezuWe were unable to install your certificate, however, we successfully restored your server to its prior configuration.)r.   rL   rO   r   rP   r   rŽ   Úabspathr   ÚErrorHandlerÚ_recovery_routine_with_msgZdeploy_certrU   Ú_rollback_and_restartÚrestart)rC   r~   Zprivkey_pathr‹   rŒ   r   rW   Údomr    r    r!   Údeploy_certificateï  s&    



 

üzClient.deploy_certificateTc              	   C   sæ   | j dkrt d¡ t d¡‚d}dddd|fd	f}| j  ¡ }|D ]r\}}}	t| j|ƒ}
||kr¤|rŒ|d
krŒ|
dkrŒt 	|¡}
|
sŒt d¡ |
r´|  
|||	¡ d}qB|
rBt d|¡ qBd}|rât | j|¡ | j  ¡  W 5 Q R X dS )a  Enhance the configuration.

        :param list domains: list of domains to configure
        :param chain_path: chain file path
        :type chain_path: `str` or `None`

        :raises .errors.Error: if no installer is specified in the
            client.

        NzDNo installer is specified, there isn't any configuration to enhance.r—   F)Zhstsúensure-http-headerzStrict-Transport-Security)Úredirectr    NZstaplezstaple-ocsp)ZuirrŸ   zUpgrade-Insecure-Requestsr    zßFuture versions of Certbot will automatically configure the webserver so that all requests redirect to secure HTTPS access. You can control this behavior and disable this warning with the --redirect and --no-redirect flags.TzKOption %s is not supported by the selected installer. Skipping enhancement.z$We were unable to restart web server)r.   rL   rO   r   rP   Zsupported_enhancementsr4   r   r   ZaskÚapply_enhancementr   r™   r›   rœ   )rC   r~   rŒ   Zask_redirectZenhancedZenhancement_infoZ	supportedZconfig_nameZenhancement_nameZoptionZconfig_valuerW   r    r    r!   Úenhance_config  s<    


ü


þzClient.enhance_configc              
   C   s²   d| }t  | j|¡’ |D ]v}z| j |||¡ W q tjk
rl   |dkr\t d|¡ nt d|¡ Y q tj	k
r   t d||¡ ‚ Y qX q| j 
d| ¡ W 5 Q R X dS )aå  Applies an enhancement on all domains.

        :param list domains: list of ssl_vhosts (as strings)
        :param str enhancement: name of enhancement, e.g. ensure-http-header
        :param str options: options to enhancement, e.g. Strict-Transport-Security

            .. note:: When more `options` are needed, make options a list.

        :raises .errors.PluginError: If Enhancement is not supported, or if
            there is any other problem with the enhancement.


        zmWe were unable to set up enhancement %s for your server, however, we successfully installed your certificate.rŸ   zEnhancement %s was already set.z#Unable to set enhancement %s for %szAdd enhancement %sN)r   r™   rš   r.   Zenhancer   ZPluginEnhancementAlreadyPresentrL   rO   ZPluginErrorrU   )rC   r~   ZenhancementZoptionsrW   r   r    r    r!   r¡   C  s,    þÿÿ ÿ
zClient.apply_enhancementc                 C   s*   | j  ¡  tj tj¡}| ||j¡ dS )zCalls the installer's recovery routine and prints success_msg

        :param str success_msg: message to show on successful recovery

        N)	r.   Úrecovery_routineÚzopeÚ	componentÚ
getUtilityr   Ú	IReporterÚadd_messageÚHIGH_PRIORITY©rC   Zsuccess_msgZreporterr    r    r!   rš   f  s    
z!Client._recovery_routine_with_msgc                 C   s`   t  d¡ tj tj¡}z| j ¡  | j 	¡  W n   | 
d|j¡ ‚ Y nX | 
||j¡ dS )zRollback the most recent checkpoint and restart the webserver

        :param str success_msg: message to show on successful rollback

        z0Rolling back to previous server configuration...zÊAn error occurred and we failed to restore your config and restart your server. Please post to https://community.letsencrypt.org/c/help with details about your configuration and this error you received.N)rL   Zcriticalr¤   r¥   r¦   r   r§   r.   Úrollback_checkpointsrœ   r¨   r©   rª   r    r    r!   r›   p  s    

ûzClient._rollback_and_restart)N)N)N)T)N)rG   rH   rI   rJ   rD   rl   r}   rd   r‰   r…   r–   rž   r¢   r¡   rš   r›   r    r    r    r!   r_   ì   s   


D $($
0
#
r_   c                 C   s¦   | j rt | j ¡st d¡‚|r¢|jdkr`tj tjj	|j
¡}tj tjj|¡}t |j|d¡}|j
r|t |j
¡s|t d¡‚|j
r¢| j r¢t |j
| j ¡s¢t d¡‚dS )aé  Validate Key and CSR files.

    Verifies that the client key and csr arguments are valid and correspond to
    one another. This does not currently check the names in the CSR due to
    the inability to read SANs from CSRs in python crypto libraries.

    If csr is left as None, only the key will be validated.

    :param privkey: Key associated with CSR
    :type privkey: :class:`certbot.util.Key`

    :param .util.CSR csr: CSR

    :raises .errors.Error: when validation fails

    z#The provided key is not a valid keyZderro   z#The provided CSR is not a valid CSRzThe key and CSR do not matchN)ro   r   Zvalid_privkeyr   rP   rp   ÚOpenSSLZcryptoZload_certificate_requestZFILETYPE_ASN1re   Zdump_certificate_requestZFILETYPE_PEMr   rx   rn   Z	valid_csrZcsr_matches_pubkey)Zprivkeyrh   Zcsr_objZcert_bufferr    r    r!   Úvalidate_key_csr†  s*    

 ÿ ÿ
 ÿr­   c                 C   s0   t j|| |dd}|dk	r,| |¡ | ¡  dS )zÖRevert configuration the specified number of checkpoints.

    :param int checkpoints: Number of checkpoints to revert.

    :param config: Configuration.
    :type config: :class:`certbot.interfaces.IConfig`

    z,Which installer should be used for rollback?)ZquestionN)Úplugin_selectionZpick_installerr«   rœ   )Zdefault_installerZcheckpointsr   Zpluginsr.   r    r    r!   Úrollback´  s    
   ÿ
r¯   c                 C   s   t  | ¡}| ¡  | ¡  dS )zãView checkpoints and associated configuration changes.

    .. note:: This assumes that the installation is using a Reverter object.

    :param config: Configuration.
    :type config: :class:`certbot.interfaces.IConfig`

    N)r   ZReverterr£   Úview_config_changes)r   Zrevr    r    r!   r°   Ê  s    	
r°   c                 C   sL   t  | ¡r&tj|dddtj |¡fS t |dd¡}|d tj |d ¡fS )a'  Open a pem file.

    If cli_arg_path was set by the client, open that.
    Otherwise, uniquify the file path.

    :param str cli_arg_path: the cli arg name, e.g. cert_path
    :param str pem_path: the pem file path to open

    :returns: a tuple of file object and its absolute file path

    i¤  Úwb)ÚchmodÚmoder   é   )r   Z
set_by_clir   Z	safe_openr   rŽ   r˜   Zunique_file)Zcli_arg_pathZpem_pathZuniqr    r    r!   r   ×  s    

ÿr   c                 C   s,   z| | ¡ W 5 |  ¡  X t d|j¡ dS )z£Saves chain_pem at a unique path based on chain_path.

    :param str chain_pem: certificate chain in PEM format
    :param str chain_file: chain file object

    zCert chain written to %sN)r‘   r’   rL   rM   rE   )r”   r•   r    r    r!   r“   é  s    
r“   )N)N)N)=rJ   rf   Zloggingr(   r¬   ZjosepyrS   Zzope.componentr¤   Zcryptography.hazmat.backendsr   Z-cryptography.hazmat.primitives.asymmetric.rsar   rX   r   r   r   ry   r   r   r   Zacme.magic_typingr   r	   r+   r
   r   r   r   r   r   r   r   r   r   Zcertbot.compatr   Zcertbot.displayr   r   r]   Zcertbot.pluginsr   r®   Z	getLoggerrG   rL   r"   r   r0   Úobjectr<   rK   rY   rT   r_   r­   r¯   r°   r   r“   r    r    r    r!   Ú<module>   s^   


H/   
.