From 715c892dcd366240a45316d2914cf7e98144613b Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Tue, 17 Aug 2021 10:40:15 +0200 Subject: [PATCH] Upgrading to v0.8.4 to support Certbot v1.18. Signed-off-by: Pol Henarejos --- certbot_castle/_version.py | 2 +- certbot_castle/plugins/imap.py | 5 ++--- certbot_castle/plugins/installer.py | 5 ++--- certbot_castle/plugins/interactive.py | 5 ++--- cli.py | 10 ++++++---- setup.py | 4 ++-- 6 files changed, 15 insertions(+), 16 deletions(-) diff --git a/certbot_castle/_version.py b/certbot_castle/_version.py index 334bb5e..1a87348 100755 --- a/certbot_castle/_version.py +++ b/certbot_castle/_version.py @@ -1 +1 @@ -__version__ = "0.8.3.dev" +__version__ = "0.8.4.dev" diff --git a/certbot_castle/plugins/imap.py b/certbot_castle/plugins/imap.py index 1193396..7301a4c 100755 --- a/certbot_castle/plugins/imap.py +++ b/certbot_castle/plugins/imap.py @@ -1,4 +1,5 @@ import logging +import abc logging.basicConfig( format='%(asctime)s - %(levelname)s: %(message)s', @@ -28,9 +29,7 @@ logger = logging.getLogger(__name__) -@zope.interface.implementer(interfaces.IAuthenticator) -@zope.interface.provider(interfaces.IPluginFactory) -class Authenticator(common.Plugin): +class Authenticator(common.Plugin, interfaces.Authenticator, metaclass=abc.ABCMeta): description = "Automatic S/MIME challenge by using IMAP integration" diff --git a/certbot_castle/plugins/installer.py b/certbot_castle/plugins/installer.py index bed3c04..b5ff76e 100755 --- a/certbot_castle/plugins/installer.py +++ b/certbot_castle/plugins/installer.py @@ -1,4 +1,5 @@ import logging +import abc import zope.interface @@ -14,9 +15,7 @@ logger = logging.getLogger(__name__) -@zope.interface.implementer(interfaces.IInstaller) -@zope.interface.provider(interfaces.IPluginFactory) -class Installer(common.Plugin): +class Installer(common.Plugin, interfaces.Installer, metaclass=abc.ABCMeta): description = "Generates PKCS12 container from S/MIME challenge" diff --git a/certbot_castle/plugins/interactive.py b/certbot_castle/plugins/interactive.py index 30c29a6..7606365 100755 --- a/certbot_castle/plugins/interactive.py +++ b/certbot_castle/plugins/interactive.py @@ -1,4 +1,5 @@ import logging +import abc import zope.interface @@ -12,9 +13,7 @@ logger = logging.getLogger(__name__) -@zope.interface.implementer(interfaces.IAuthenticator) -@zope.interface.provider(interfaces.IPluginFactory) -class Authenticator(common.Plugin): +class Authenticator(common.Plugin, interfaces.Authenticator, metaclass=abc.ABCMeta): description = "Performs the S/MIME challenge" diff --git a/cli.py b/cli.py index c160f59..7fcedd8 100644 --- a/cli.py +++ b/cli.py @@ -5,12 +5,14 @@ from certbot._internal.plugins import disco as plugins_disco from certbot._internal.plugins import selection as plug_sel from certbot._internal import cli -from certbot._internal import configuration from certbot._internal import main as certbot_main from certbot._internal import reporter from certbot._internal import log +from certbot._internal.display import obj as display_obj from certbot import errors from certbot import util +from certbot import configuration +from certbot import interfaces from certbot_castle import csr as csr_util @@ -34,7 +36,7 @@ def prepare_config(cli_args): plugins = plugins_disco.PluginsRegistry.find_all() cargs = cli.prepare_and_parse_args(plugins, cli_args) config = configuration.NamespaceConfig(cargs) - zope.component.provideUtility(config) + zope.component.provideUtility(config, interfaces.IConfig) return config,plugins def request_cert(args, config): @@ -108,10 +110,10 @@ def main(args): except errors.Error: raise report = reporter.Reporter(config) - zope.component.provideUtility(report) + zope.component.provideUtility(report, interfaces.IReporter) util.atexit_register(report.print_messages) with certbot_main.make_displayer(config) as displayer: - zope.component.provideUtility(displayer) + display_obj.set_display(displayer) if (command == 'cert'): request_cert(args, config) diff --git a/setup.py b/setup.py index 91be949..1e97b51 100644 --- a/setup.py +++ b/setup.py @@ -42,8 +42,8 @@ 'Topic :: Utilities', ], install_requires=[ - 'certbot>=1.1.0', - 'acme>=0.29.0', + 'certbot>=1.18.0', + 'acme>=1.18.0', 'setuptools', 'zope.interface', 'imapclient'