OXIESEC PANEL
- Current Dir:
/
/
usr
/
lib
/
python3
/
dist-packages
/
certbot
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
03/17/2025 09:32:20 AM
rwxr-xr-x
📄
__init__.py
114 bytes
02/07/2019 09:20:31 PM
rw-r--r--
📁
__pycache__
-
05/25/2021 01:14:27 PM
rwxr-xr-x
📄
account.py
13.98 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
achallenges.py
1.59 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
auth_handler.py
20.92 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
cert_manager.py
15.1 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
cli.py
71.49 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
client.py
28.72 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
compat.py
6.91 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
configuration.py
5.66 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
constants.py
6.54 KB
12/18/2020 08:47:58 PM
rw-r--r--
📄
crypto_util.py
15.29 KB
02/07/2019 09:20:29 PM
rw-r--r--
📁
display
-
05/25/2021 01:14:26 PM
rwxr-xr-x
📄
eff.py
3.07 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
error_handler.py
5.81 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
errors.py
2.59 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
hooks.py
8.44 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
interfaces.py
22.02 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
lock.py
3.56 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
log.py
12.39 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
main.py
48.47 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
notify.py
1.04 KB
02/07/2019 09:20:29 PM
rw-r--r--
📄
ocsp.py
4.1 KB
02/07/2019 09:20:29 PM
rw-r--r--
📁
plugins
-
05/25/2021 01:14:26 PM
rwxr-xr-x
📄
renewal.py
20.91 KB
12/18/2020 08:47:58 PM
rw-r--r--
📄
reporter.py
3.46 KB
02/07/2019 09:20:30 PM
rw-r--r--
📄
reverter.py
23.32 KB
02/07/2019 09:20:30 PM
rw-r--r--
📄
ssl-dhparams.pem
424 bytes
02/07/2019 09:20:30 PM
rw-r--r--
📄
storage.py
44.91 KB
02/07/2019 09:20:30 PM
rw-r--r--
📁
tests
-
05/25/2021 01:14:27 PM
rwxr-xr-x
📄
updater.py
3.86 KB
02/07/2019 09:20:30 PM
rw-r--r--
📄
util.py
20.35 KB
02/07/2019 09:20:30 PM
rw-r--r--
Editing: updater.py
Close
"""Updaters run at renewal""" import logging from certbot import errors from certbot import interfaces from certbot.plugins import selection as plug_sel import certbot.plugins.enhancements as enhancements logger = logging.getLogger(__name__) def run_generic_updaters(config, lineage, plugins): """Run updaters that the plugin supports :param config: Configuration object :type config: interfaces.IConfig :param lineage: Certificate lineage object :type lineage: storage.RenewableCert :param plugins: List of plugins :type plugins: `list` of `str` :returns: `None` :rtype: None """ if config.dry_run: logger.debug("Skipping updaters in dry-run mode.") return try: installer = plug_sel.get_unprepared_installer(config, plugins) except errors.Error as e: logger.warning("Could not choose appropriate plugin for updaters: %s", e) return if installer: _run_updaters(lineage, installer, config) _run_enhancement_updaters(lineage, installer, config) def run_renewal_deployer(config, lineage, installer): """Helper function to run deployer interface method if supported by the used installer plugin. :param config: Configuration object :type config: interfaces.IConfig :param lineage: Certificate lineage object :type lineage: storage.RenewableCert :param installer: Installer object :type installer: interfaces.IInstaller :returns: `None` :rtype: None """ if config.dry_run: logger.debug("Skipping renewal deployer in dry-run mode.") return if not config.disable_renew_updates and isinstance(installer, interfaces.RenewDeployer): installer.renew_deploy(lineage) _run_enhancement_deployers(lineage, installer, config) def _run_updaters(lineage, installer, config): """Helper function to run the updater interface methods if supported by the used installer plugin. :param lineage: Certificate lineage object :type lineage: storage.RenewableCert :param installer: Installer object :type installer: interfaces.IInstaller :returns: `None` :rtype: None """ if not config.disable_renew_updates: if isinstance(installer, interfaces.GenericUpdater): installer.generic_updates(lineage) def _run_enhancement_updaters(lineage, installer, config): """Iterates through known enhancement interfaces. If the installer implements an enhancement interface and the enhance interface has an updater method, the updater method gets run. :param lineage: Certificate lineage object :type lineage: storage.RenewableCert :param installer: Installer object :type installer: interfaces.IInstaller :param config: Configuration object :type config: interfaces.IConfig """ if config.disable_renew_updates: return for enh in enhancements._INDEX: # pylint: disable=protected-access if isinstance(installer, enh["class"]) and enh["updater_function"]: getattr(installer, enh["updater_function"])(lineage) def _run_enhancement_deployers(lineage, installer, config): """Iterates through known enhancement interfaces. If the installer implements an enhancement interface and the enhance interface has an deployer method, the deployer method gets run. :param lineage: Certificate lineage object :type lineage: storage.RenewableCert :param installer: Installer object :type installer: interfaces.IInstaller :param config: Configuration object :type config: interfaces.IConfig """ if config.disable_renew_updates: return for enh in enhancements._INDEX: # pylint: disable=protected-access if isinstance(installer, enh["class"]) and enh["deployer_function"]: getattr(installer, enh["deployer_function"])(lineage)