mirror of
https://github.com/certbot/certbot.git
synced 2026-05-28 04:34:11 -04:00
Basic functionality of run/auth CLI verbs
This commit is contained in:
parent
0f64082f1d
commit
52fefad693
2 changed files with 8 additions and 3 deletions
|
|
@ -98,9 +98,11 @@ def run(args, config, plugins):
|
|||
return "Configurator could not be determined"
|
||||
|
||||
acme, doms = _common_run(args, config, acc, authenticator, installer)
|
||||
# TODO: Handle errors from _common_run?
|
||||
lineage = acme.obtain_and_enroll_certificate(doms, authenticator,
|
||||
installer)
|
||||
# TODO: Decide whether to enroll or not from config/policy
|
||||
if not lineage:
|
||||
return "Certificate could not be obtained"
|
||||
acme.deploy_certificate(doms, lineage)
|
||||
acme.enhance_config(doms, args.redirect)
|
||||
|
||||
|
|
@ -122,9 +124,11 @@ def auth(args, config, plugins):
|
|||
else:
|
||||
installer = None
|
||||
|
||||
# TODO: Handle errors from _common_run?
|
||||
acme, doms = _common_run(
|
||||
args, config, acc, authenticator=authenticator, installer=installer)
|
||||
acme.obtain_certificate(doms)
|
||||
if not acme.obtain_and_enroll_certificate(doms, authenticator, installer):
|
||||
return "Certificate could not be obtained"
|
||||
|
||||
|
||||
def install(args, config, plugins):
|
||||
|
|
|
|||
|
|
@ -163,7 +163,8 @@ class Client(object):
|
|||
# TODO: Add IPlugin.name or use PluginsFactory.find_init instead
|
||||
# of assuming that each plugin has a .name attribute
|
||||
self.config.namespace.authenticator = authenticator.name
|
||||
self.config.namespace.installer = installer.name
|
||||
if installer is not None:
|
||||
self.config.namespace.installer = installer.name
|
||||
return storage.RenewableCert.new_lineage(domains[0], cert_pem,
|
||||
privkey, chain_pem,
|
||||
vars(self.config.namespace))
|
||||
|
|
|
|||
Loading…
Reference in a new issue