3 گa@sTdZddlZddlZddlZddlZddlZddlZddlmZddlm Z ddlm Z ddlm Z ddlm Z ddlm Z dd lmZddlZdd lmZdd lmZdd lmZddlZddlZddlZddlZdd lmZddlmZddlmZddlmZddlmZddlmZddl m!Z!ddl m"Z"ddl m#Z#ddl$m%Z&ddl'm(Z(ddl'm)Z)ddl*m+Z,ej-e.Z/dWZ0dZ1ej2ej3Z4dZ5ej6e e7d d!d"Z8ej6e7e7d#d$d%Z9ej6e7e7d&d'd(Z:dXe ej6ej;d d)d*Ze7e7e7e e7e7fe e7efej;d.d/d0Z?e7e7ej6dd1d2d3Z@e7e7e e7e7fej6ej;d4d5d6ZAe7e7d7d8d9ZBdYe7eCdd;dd?d@ZEe e7efe e7efdAdBdCZFe7e7dDdEdFZGej6e7e7dGdHdIZHe7e7e7dJdKdLZIej;ej6e7e7dMdNdOZJej6e7e7dPdQdRZKej6e7dd#dSdTZLGdUdVdVejMZMdS)ZzRenewable certificates storage.N)Any)Dict)Iterable)List)Mapping)Optional)Tuple)default_backend) RSAPrivateKey)load_pem_private_key) configuration) crypto_util)errors) interfaces)ocsp)util)cli) constants) error_handler)disco) filesystem)os)commoncertprivkeychain fullchainREADMEi)configreturncCs"tjtjj|jd}|j|S)zBuild a list of all renewal configuration files. :param configuration.NamespaceConfig config: Configuration object :returns: list of renewal configuration files :rtype: `list` of `str` z*.conf)globrpathjoinrenewal_configs_dirsort)rresultr&/usr/lib/python3.6/storage.pyrenewal_conf_files/s r()rcertnamercCs8tjj|jdj|}tjj|s4tjdj|||S)z;Return /path/to/certname.conf in the renewal conf directoryz{0}.confz2No certificate found with name {0} (expected {1}).)rr!r"r#formatexistsrCertStorageError)rr)r!r&r&r'renewal_file_for_certname=s   r-)r cert_namercCst||}tj|ddddS)z If `--cert-name` was specified, but you need a value for `--cert-path`. :param configuration.NamespaceConfig config: parsed command line arguments :param str cert_name: cert name. zutf-8)encodingdefault_encodingr)r- configobj ConfigObj)rr.Zcert_name_implied_confr&r&r'cert_path_for_cert_nameFs r3cCs6tjtjddd}|j|dk r"|n tjddd|S)z?Merge supplied config, if provided, on top of builtin defaults.zutf-8)r/r0N)r1r2rRENEWER_DEFAULTSmerge)rZ defaults_copyr&r&r'config_with_defaultsRs  r6) base_timeinterval textparserrcCs4|jjr|d7}|jptj}|j|||ddS)aParse the time specified time interval, and add it to the base_time The interval can be in the English-language format understood by parsedatetime, e.g., '10 days', '3 weeks', '6 months', '9 hours', or a sequence of such intervals like '6 months 1 week' or '3 days 12 hours'. If an integer is found with no associated unit, it is interpreted by default as a number of days. :param datetime.datetime base_time: The time to be added with the interval. :param str interval: The time interval to parse. :returns: The base_time plus the interpretation of the time interval. :rtype: :class:`datetime.datetime`z days)tzinfor)stripisdigitr:pytzUTCZparseDT)r7r8r9r:r&r&r'add_time_interval\s  r?) o_filename n_filename archive_dirtarget relevant_datarc Cstj|ddd}tj|d<||d<xtD]}||||<q(Wd|krZi|d<ddg|jd<|dj|x"|dD]}||krr|d|=qrWd|krtjd}d |g|_ t j d |t |d Wd QRXt jj|rtjt j|j} tj|| t |d } |j| dWd QRX|S)aWrites a renewal config file with the specified name and values. :param str o_filename: Absolute path to the previous version of config file :param str n_filename: Absolute path to the new destination of config file :param str archive_dir: Absolute path to the archive directory :param dict target: Maps ALL_FOUR to their symlink paths :param dict relevant_data: Renewal configuration options to save :returns: Configuration object for the new config file :rtype: configobj.ConfigObj zutf-8)r/r0versionrB renewalparamsz#Options used in the renewal processrenew_before_expiryzrenew_before_expiry = zWriting new config %s.aNwb)Zoutfile)r1r2certbot __version__ALL_FOURZcommentsupdaterr4Zinitial_commentloggerdebugopenrr!r+statS_IMODElstatst_moderchmodwrite) r@rArBrCrDrkindkdefault_intervalZcurrent_permissionsfr&r&r'write_renewal_configvs2           r\) prev_namenew_name cli_configrc Cs^t||}t||}tjj|r*tjdytj||Wntk rXtjdYnXdS)zRenames cli_config.certname's config to cli_config.new_certname. :param .NamespaceConfig cli_config: parsed command line arguments z+The new certificate name is already in use.z=Please specify a valid filename for the new certificate name.N) renewal_filename_for_lineagenamerr!r+rZConfigurationErrorrreplaceOSError)r]r^r_Z prev_filenameZ new_filenamer&r&r'rename_renewal_configs    rc) lineagenamerBrCr_rcCsbt||}|d}tjj|r(tj|tt|j}t|||||t j ||t j |dddS)aModifies lineagename's config to contain the specified values. :param str lineagename: Name of the lineage being modified :param str archive_dir: Absolute path to the archive directory :param dict target: Maps ALL_FOUR to their symlink paths :param .NamespaceConfig cli_config: parsed command line arguments :returns: Configuration object for the updated config file :rtype: configobj.ConfigObj z.newzutf-8)r/r0) r`rr!r+unlinkrelevant_valuesvars namespacer\rrar1r2)rdrBrCr_config_filenameZ temp_filenamevaluesr&r&r'update_configurations    rk)linkrc Csbytj|}Wn$tk r2tjdj|YnXtjj|sVtjj tjj ||}tjj |S)zGet an absolute path to the target of link. :param str link: Path to a symbolic link :returns: Absolute path to the target of link :rtype: str :raises .CertStorageError: If link does not exists. zExpected {0} to be a symlink) rreadlinkrbrr,r*rr!isabsr"dirnameabspath)rlrCr&r&r'get_link_targets  rqF) readme_path is_base_dirrc CsDd}|r d}t|d$}tjd||jdj|dWdQRXdS)NrGz [cert name]/wzWriting README to %s.aThis directory contains your keys and certificates. `{prefix}privkey.pem` : the private key for your certificate. `{prefix}fullchain.pem`: the certificate file used in most server software. `{prefix}chain.pem` : used for OCSP stapling in Nginx >=1.3.7. `{prefix}cert.pem` : will break many server configurations, and should not be used without reading further documentation (see link below). WARNING: DO NOT MOVE OR RENAME THESE FILES! Certbot expects these files to remain in this location in order to function properly! We recommend not moving these files. For more information, see the Certbot User Guide at https://certbot.eff.org/docs/using.html#where-are-my-certificates. )prefix)rQrOrPrWr*)rrrsrur[r&r&r'_write_live_readme_tos   rv) namespacesoptionrcs,ddlm}|jkp*tfdd|DS)z Is this option one that could be restored for future renewal purposes? :param namespaces: plugin namespaces for configuration options :type namespaces: `list` of `str` :param str option: the name of the option :rtype: bool r)renewalc3s|]}j|VqdS)N) startswith).0rh)rxr&r' sz_relevant..)certbot._internalryZ CONFIG_ITEMSany)rwrxryr&)rxr' _relevants  r) all_valuesrcsBtjj}dd|Dtfdd|jD}|d|d<|S)zReturn a new dict containing only items relevant for renewal. :param dict all_values: The original values. :returns: A new dictionary containing items that can be used in renewal. :rtype dict: cSsg|]}tj|qSr&)plugins_commonZdest_namespace)r{Zpluginr&r&r' "sz#relevant_values..c3s0|](\}}t|rtj||r||fVqdS)N)rrZoption_was_set)r{rxvalue)rwr&r'r|%sz"relevant_values..server) plugins_discoZPluginsRegistryZfind_alldictitems)rZpluginsrvr&)rwr'rfs   rf)rircCs.|jdstjdtjj|dtd S)z:Returns the lineagename for a configuration filename. z.confz*renewal config file name must end in .confN)endswithrr,rr!basenamelen)rir&r&r'lineagename_for_filename/s r)rrdrcCstjj|j|dS)z:Returns the lineagename for a configuration filename. z.conf)rr!r"r#)rrdr&r&r'r`8sr`)rB from_filercCstjj|tjj|S)zPath to a directory from a file)rr!relpathro)rBrr&r&r'_relpath_from_file?sr) config_objr_rdrcCs$|rd|kr|dStjj|j|S)aMReturns the full archive path for a lineagename Uses cli_config to determine archive path if not available from config_obj. :param configobj.ConfigObj config_obj: Renewal conf file contents (can be None) :param configuration.NamespaceConfig cli_config: Main config file :param str lineagename: Certificate name rB)rr!r"default_archive_dir)rr_rdr&r&r'full_archive_pathDs r)r_rdrcCstjj|j|S)z4Returns the full default live path for a lineagename)rr!r"live_dir)r_rdr&r&r'_full_live_pathSsrc )Cst||}td||}t||}zPytj|ddd}Wn6tjk rltjd|||tj dj |YnXWdt j |tj d|Xt}xhtD]`}|j|}yt j |tjd|Wn tk rtjd|YnXt jj|} |j| qWt|dkr|j} t jj| t} yt j | tjd| Wn"tk rZtjd| YnXyt j| tjd| Wn"tk rtjd | YnXy&t|||} tj| tjd| Wn"tk rtjd | YnXdS) zmDelete all files related to the certificate. If some files are not found, ignore them and continue. Nzutf-8)r/r0zNCould not parse %s. You may wish to manually delete the contents of %s and %s.zerror parsing {0}z Removed %szUnable to delete %sz&Unable to remove %s; may not be empty.zUnable to remove %s)r-rrr1r2ConfigObjErrorrOerrorrr,r*rremoveinfosetrMgetrPrbr!roaddrpopr"rrmdirshutilZrmtree) rr)Zrenewal_filenameZfull_default_archive_dirZfull_default_live_dirZrenewal_configZdirectory_namesrXrlZ directoryrrZ archive_pathr&r&r' delete_filesXsV            rc@seZdZdZdReejeddddZe eddd Z e edd d Z e edd d Z e edddZ e edddZe ejdddZe edddZeedddZe eedddZe edddZddddZdddd Zedd!d"Zddd#d$Zeeeefdd%d&Zddd'd(Zeeed)d*d+Zeeed)d,d-Z eeed.d/d0Z!eeed)d1d2Z"eed)d3d4Z#edd5d6Z$edd7d8Z%edd9d:Z&edd;d<Z'eedd.d=d>Z(edd?d@dAZ)eeddBdCZ*eed?dDdEZ+eddFdGZ,eddHdIZ-e.ee/e/e/ejddJdKdLZ0e eddMdNZ1ee/e/e/ejedOdPdQZ2dS)S RenewableCertaRenewable certificate. Represents a lineage of certificates that is under the management of Certbot, indicated by the existence of an associated renewal configuration file. Note that the notion of "current version" for a lineage is maintained on disk in the structure of symbolic links, and is not explicitly stored in any instance variable in this object. The RenewableCert object is able to determine information about the current (or other) version by accessing data on disk, but does not inherently know any of this information except by examining the symbolic links as needed. The instance variables mentioned below point to symlinks that reflect the notion of "current version" of each managed object, and it is these paths that should be used when configuring servers to use the certificate managed in a lineage. These paths are normally within the "live" directory, and their symlink targets -- the actual cert files -- are normally found within the "archive" directory. :ivar str cert: The path to the symlink representing the current version of the certificate managed by this lineage. :ivar str privkey: The path to the symlink representing the current version of the private key managed by this lineage. :ivar str chain: The path to the symlink representing the current version of the chain managed by this lineage. :ivar str fullchain: The path to the symlink representing the current version of the fullchain (combined chain and cert) managed by this lineage. :ivar configobj.ConfigObj configuration: The renewal configuration options associated with this lineage, obtained from parsing the renewal configuration file and/or systemwide defaults. FN)rir_update_symlinksrc s|_t|_ytj|ddd_Wn&tjk rLtjdj |YnXt j_ t fddt Dstjdj jj jd}|dk rtj|tkrtjd ||tjj d _j d _j d _j d _tjjj_j|r jj dS)aInstantiate a RenewableCert object from an existing lineage. :param str config_filename: the path to the renewal config file that defines this lineage. :param .NamespaceConfig: parsed command line arguments :raises .CertStorageError: if the configuration file's name didn't end in ".conf", or the file is missing or broken. zutf-8)r/r0zerror parsing {0}c3s|]}|jkVqdS)N)r )r{x)selfr&r'r|sz)RenewableCert.__init__..z.N) rrrrr!lexistsrerrrmr+)rrrXrZ current_link_rlr&r&r'rs    zRenewableCert._fix_symlinks)rXrcCsB|tkrtjdt||}tjj|s:tjd||dSt |S)a(Returns full path to which the specified item currently points. :param str kind: the lineage member item ("cert", "privkey", "chain", or "fullchain") :returns: The path to the current version of the specified member. :rtype: str or None zunknown kind of itemz*Expected symlink %s for %s does not exist.N) rMrr,rrr!r+rOrPrq)rrXrlr&r&r'rs    zRenewableCert.current_targetcCs|tkrtjdtjdj|}|j|}|dksBtjj | rTt j d||d}|j tjj |}|rzt|jdSt j d|dS)aReturns numerical version of the specified item. For example, if kind is "chain" and the current chain link points to a file named "chain7.pem", returns the integer 7. :param str kind: the lineage member item ("cert", "privkey", "chain", or "fullchain") :returns: the current version of the specified member. :rtype: int zunknown kind of itemz^{0}([0-9]+)\.pem$Nz3Current-version target for %s does not exist at %s.rGrzNo matches for target %s.)rMrr,rrr*rrr!r+rOrPrrintgroups)rrXrrCmatchesr&r&r'current_versions    zRenewableCert.current_version)rXrErcCsT|tkrtjd|j|}|s2tjd|dtjj|}tjj|dj ||S)aThe filename that corresponds to the specified version and kind. .. warning:: The specified version may not exist in this lineage. There is no guarantee that the file path returned by this method actually exists. :param str kind: the lineage member item ("cert", "privkey", "chain", or "fullchain") :param int version: the desired version :returns: The path to the specified version of the specified member. :rtype: str zunknown kind of itemzTarget z does not exist!z {0}{1}.pem) rMrr,rrrr!ror"r*)rrXrErlwherer&r&r'rEs   zRenewableCert.versioncs||tkrtjd|j|}|s2tjd|dtjj|}tj|}t j dj |fdd|D}t dd|DS)aWhich alternative versions of the specified kind of item exist? The archive directory where the current version is stored is consulted to obtain the list of alternatives. :param str kind: the lineage member item ( ``cert``, ``privkey``, ``chain``, or ``fullchain``) :returns: all of the version numbers that currently exist :rtype: `list` of `int` zunknown kind of itemzTarget z does not exist!z^{0}([0-9]+)\.pem$csg|]}j|qSr&)r)r{r[)rr&r'r sz4RenewableCert.available_versions..cSs g|]}|rt|jdqS)r)rr)r{mr&r&r'r!s) rMrr,rrrr!rolistdirrrr*sorted)rrXrlrfilesrr&)rr'available_versions s     z RenewableCert.available_versionscCst|j|S)aNewest available version of the specified kind of item? :param str kind: the lineage member item (``cert``, ``privkey``, ``chain``, or ``fullchain``) :returns: the newest available version of this member :rtype: int )maxr)rrXr&r&r'newest_available_version#s z&RenewableCert.newest_available_versioncs,fddtDtfdddDS)zNewest version for which all items are available? :returns: the newest available version for which all members (``cert, ``privkey``, ``chain``, and ``fullchain``) exist :rtype: int csg|]}j|qSr&)r)r{r)rr&r'r;sz7RenewableCert.latest_common_version..c3s0|](tfddddDrVqdS)c3s|]}|kVqdS)Nr&)r{v)nr&r'r|<sz@RenewableCert.latest_common_version...rN)r)r{)versions)rr'r|<sz6RenewableCert.latest_common_version..r)rMr)rr&)rrr'latest_common_version/s z#RenewableCert.latest_common_versioncstfddtDdS)zSmallest version newer than all full or partial versions? :returns: the smallest version number that is larger than any version of any item currently stored in this lineage :rtype: int c3s|]}j|VqdS)N)r)r{r)rr&r'r|Jsz2RenewableCert.next_free_version..r)rrM)rr&)rr'next_free_version>s zRenewableCert.next_free_versioncCs(|jr$tjd|j|jdSdS)zMake sure we've deployed the latest version. :returns: False if a change was needed, True otherwise :rtype: bool May need to recover from rare interrupted / crashed states.zMFound a new certificate /archive/ that was not linked to in /live/; fixing...FT)has_pending_deploymentrOwarningupdate_all_links_tor)rr&r&r'ensure_deployedLs  zRenewableCert.ensure_deployedcCsRg}x8tD]0}|j|}|dkr0tj|d|j|q Wt|}||jkS)aIs there a later version of all of the managed items? :returns: ``True`` if there is a complete version of this lineage with a larger version number than the current version, and ``False`` otherwise :rtype: bool Nz. is required but missing for this certificate.)rMrrrrminr)rZ all_versionsitemrEZsmallest_currentr&r&r'r[s   z$RenewableCert.has_pending_deploymentcCs^|tkrtjdt||}dj||}tjjtj |}tj |tj tjj |||dS)a7Make the specified item point at the specified version. (Note that this method doesn't verify that the specified version exists.) :param str kind: the lineage member item ("cert", "privkey", "chain", or "fullchain") :param int version: the desired version zunknown kind of itemz {0}{1}.pemN) rMrr,rr*rr!rorrmrerr")rrXrErlfilenameZtarget_directoryr&r&r'_update_link_toos     zRenewableCert._update_link_to)rErc Cstj|j|j}x<|D]4\}}|j|}|sDtjd|dtj||qWxt D]}|j ||qZWx|D]\}}tj |qtWWdQRXdS)zwChange all member objects to point to the specified version. :param int version: the desired version zTarget z does not exist!N) rZ ErrorHandlerrrrrrrrrMrre)rrEZprevious_linksrXrlrCrr&r&r'rs  z!RenewableCert.update_all_links_toc Cs@|jd}|dkrtjdt|d}tj|jSQRXdS)zWhat are the subject names of this certificate? :returns: the subject names :rtype: `list` of `str` :raises .CertStorageError: if could not find cert file. rNz#could not find the certificate filerb)rrr,rQr Zget_names_from_certread)rrCr[r&r&r'namess    zRenewableCert.namescCsh|jd|}|jd|}ytjj||Stk rb}ztjd|tjt|dSd}~XnXdS)a{Is the specified cert version revoked according to OCSP? Also returns True if the cert version is declared as revoked according to OCSP. If OCSP status could not be determined, False is returned. :param int version: the desired version number :returns: True if the certificate is revoked, otherwise, False :rtype: bool rrz4An error occurred determining the OCSP status of %s.FN) rErZRevocationCheckerZocsp_revoked_by_paths ExceptionrOrrPstr)rrErrer&r&r' ocsp_revokeds   zRenewableCert.ocsp_revokedcCsd|jdkp|jdjdS)zIs automatic renewal enabled for this cert? If autorenew is not specified, defaults to True. :returns: True if automatic renewal is enabled :rtype: bool Z autorenewrF)r Zas_bool)rr&r&r'autorenewal_is_enableds z$RenewableCert.autorenewal_is_enabledcCs|jr|j|jr$tjddStjd}|jjd|}t j |j d|j}t j jtjj}|t||krtjd||jddSdS)aTShould we now try to autorenew the most recent cert version? This is a policy question and does not only depend on whether the cert is expired. (This considers whether autorenewal is enabled, whether the cert is revoked, and whether the time interval for autorenewal has been reached.) Note that this examines the numerically most recent cert version, not the currently deployed version. :returns: whether an attempt should now be made to autorenew the most current cert version in this lineage :rtype: bool z%Should renew, certificate is revoked.TrHrz8Should renew, less than %s before certificate expiry %s.z%Y-%m-%d %H:%M:%S %ZF)rrrrOrPrr4r rr rrEr=r>ZfromutcdatetimeZutcnowr?Zstrftime)rrZr8ZexpiryZnowr&r&r'should_autorenews   zRenewableCert.should_autorenew)rdrrrr_rc"sx<|j|j|jfD](}tjj|stj|dtj d|qWt j |j|\}}tjj |jt } tjj| sxt| ddt|}td||t||tjjrtjj stjr|jtjd|tjjotjj stjr |jtjd|x6fD]*}tjj|stj|tj d|qWfdd tD} fd d tD} x,tD]$} tjt| | | | | | qnWt| d d  } tj d | d | j|WdQRXt j| dd td }tj d| d|j|WdQRXt| dd  } tj d| d| j|WdQRXt| dd $} tj d| d| j||WdQRXtjj t }t||jtt|j }t!||| |}||j"|S)aCreate a new certificate lineage. Attempts to create a certificate lineage -- enrolled for potential future renewal -- with the (suggested) lineage name lineagename, and the associated cert, privkey, and chain (the associated fullchain will be created automatically). Optional configurator and renewalparams record the configuration that was originally used to obtain this cert, so that it can be reused later during automated renewal. Returns a new RenewableCert object referring to the created lineage. (The actual lineage name, as well as all the relevant file paths, will be available within this object.) :param str lineagename: the suggested name for this lineage (normally the current cert's first subject DNS name) :param str cert: the initial certificate version in PEM format :param str privkey: the private key in PEM format :param str chain: the certificate chain in PEM format :param .NamespaceConfig cli_config: parsed command line arguments :returns: the newly-created RenewalCert object :rtype: :class:`storage.renewableCert` izCreating directory %s.T)rsNzarchive directory exists for zlive directory exists for cs i|]}tjj|d|qS)z.pem)rr!r")r{rX)rr&r' 6sz-RenewableCert.new_lineage..cs i|]}tjj|d|qS)z1.pem)rr!r")r{rX)archiver&r'r7srrJzWriting certificate to %s.r)rVzWriting private key to %s.rzWriting chain to %s.rzWriting full chain to %s.)#r#rrrr!r+rmakedirsrOrPrZunique_lineage_namer"rrvrrrisdirrcloserr,rMrrrQrW safe_openBASE_PRIVKEY_MODErfrgrhr\r)clsrdrrrr_iZ config_fileriZbase_readme_pathrCZarchive_targetrXZf_bZf_arrrjZ new_configr&)rrr' new_lineages`        $ &   $zRenewableCert.new_lineagec CsFt|jdd}t|jdtd}WdQRXt|tr>dSdSdS)zc :returns: The type of algorithm for the private, RSA or ECDSA :rtype: str rrN)dataZpasswordZbackendZRSAZECDSA)rQr r rr isinstancer )rZ priv_key_filekeyr&r&r'private_key_typeXs zRenewableCert.private_key_type) prior_versionnew_cert new_privkey new_chainr_rc !s|_jfddtD}tjjjdj|}|dkrtjj|rXt j |}n dj|}t j d|tj ||dn^tj|ddtd }t j d |d|j|WdQRXt j|t} t j||d| d d d t|d d }t j d|d |j|WdQRXt|dd }t j d|d|j|WdQRXt|dd$}t j d|d|j||WdQRXfddtD} tjj| |_tj_S)aSave new cert and chain as a successor of a prior version. Returns the new version number that was created. .. note:: this function does NOT update links to deploy this version :param int prior_version: the old version to which this version is regarded as a successor (used to choose a privkey, if the key has not changed, but otherwise this information is not permanently recorded anywhere) :param bytes new_cert: the new certificate, in PEM format :param bytes new_privkey: the new private key, in PEM format, or ``None``, if the private key has not changed :param bytes new_chain: the new chain, in PEM format :param .NamespaceConfig cli_config: parsed command line arguments :returns: the new version number that was created :rtype: int cs&i|]}tjjjdj||qS)z {0}{1}.pem)rr!r"rBr*)r{rX)rtarget_versionr&r'rsz0RenewableCert.save_successor..zprivkey{0}.pemNz'Writing symlink to old private key, %s.rrJ)rVzWriting new private key to %s.FT)Z copy_userZ copy_grouprzWriting certificate to %s.rzWriting chain to %s.rzWriting full chain to %s.csi|]}j||qSr&)r )r{rX)rr&r'rs)r_rrMrr!r"rBr*rrrmrOrPrrrrrWZcompute_private_key_modeZcopy_ownership_and_apply_moderQrkrdrr6r ) rrrrrr_rCZ old_privkeyr[modeZsymlinksr&)rrr'save_successoris@       zRenewableCert.save_successor)F)3__name__ __module__ __qualname____doc__rr NamespaceConfigboolrpropertyrrrrrdrrrBrrrrrrrrrrrrrrrrErrrrrrrrrrrr classmethodbytesrrrr&r&r&r'rsb"5   D  %^r)rrrr)N)F)Nrrr ZloggingrrrRZtypingrrrrrrrr1Zcryptography.hazmat.backendsr Z-cryptography.hazmat.primitives.asymmetric.rsar Z,cryptography.hazmat.primitives.serializationr Z parsedatetimerr=rKr r rrrrr}rrrZcertbot._internal.pluginsrrZcertbot.compatrrZcertbot.pluginsrrZ getLoggerrrOrMrrrLrrrrr(r-r3r2r6ZCalendarr?r\rcrkrqrrvrrfrr`rrrrrr&r&r&r's                             5  C