certbot.renewal
¶
Functionality for autorenewal and associated juggling of configurations
-
certbot.renewal.
_reconstitute
(config, full_path)[source]¶ 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.
Parameters: - config (configuration.NamespaceConfig) – configuration for the current lineage
- full_path (str) – Absolute path to the configuration file that defines this lineage
Returns: the RenewableCert object or None if a fatal error occurred
Return type: storage.RenewableCert
or NoneType
-
certbot.renewal.
_restore_webroot_config
(config, renewalparams)[source]¶ webroot_map is, uniquely, a dict, and the general-purpose configuration restoring logic is not able to correctly parse it from the serialized form.
-
certbot.renewal.
_restore_plugin_configs
(config, renewalparams)[source]¶ Sets plugin specific values in config from renewalparams
Parameters: - config (configuration.NamespaceConfig) – configuration for the current lineage
- renewalparams (configobj.Section) – Parameters from the renewal configuration file that defines this lineage
-
certbot.renewal.
restore_required_config_elements
(config, renewalparams)[source]¶ Sets non-plugin specific values in config from renewalparams
Parameters: - config (configuration.NamespaceConfig) – configuration for the current lineage
- renewalparams (configobj.Section) – parameters from the renewal configuration file that defines this lineage
-
certbot.renewal.
_restore_pref_challs
(unused_name, value)[source]¶ Restores preferred challenges from a renewal config file.
If value is a
str
, it should be a single challenge type.Parameters: - unused_name (str) – option name
- value (
list
ofstr
orstr
) – option value
Returns: converted option value to be stored in the runtime config
Return type: list
ofstr
Raises: errors.Error – if value can’t be converted to an bool
-
certbot.renewal.
_restore_bool
(name, value)[source]¶ Restores an boolean key-value pair from a renewal config file.
Parameters: - name (str) – option name
- value (str) – option value
Returns: converted option value to be stored in the runtime config
Return type: bool
Raises: errors.Error – if value can’t be converted to an bool
-
certbot.renewal.
_restore_int
(name, value)[source]¶ Restores an integer key-value pair from a renewal config file.
Parameters: - name (str) – option name
- value (str) – option value
Returns: converted option value to be stored in the runtime config
Return type: int
Raises: errors.Error – if value can’t be converted to an int
-
certbot.renewal.
_restore_str
(unused_name, value)[source]¶ Restores an string key-value pair from a renewal config file.
Parameters: - unused_name (str) – option name
- value (str) – option value
Returns: converted option value to be stored in the runtime config
Return type: str or None
-
certbot.renewal.
should_renew
(config, lineage)[source]¶ Return true if any of the circumstances for automatic renewal apply.
-
certbot.renewal.
_avoid_invalidating_lineage
(config, lineage, original_server)[source]¶ Do not renew a valid cert with one from a staging server!
-
certbot.renewal.
renew_cert
(config, domains, le_client, lineage)[source]¶ Renew a certificate lineage.