def _init_acme(config, acc, authenticator, installer): acme = client.Client(config, acc, authenticator, installer) # Validate the key and csr client.validate_key_csr(acc.key) if authenticator is not None: if acc.regr is None: try: acme.register() except errors.LetsEncryptClientError: sys.exit("Unable to register an account with ACME server") return acme
def _init_acme(config, acc, authenticator, installer): acme = client.Client(config, acc, authenticator, installer) # Validate the key and csr client.validate_key_csr(acc.key) if authenticator is not None: if acc.regr is None: try: acme.register() except errors.Error as error: logger.debug(error) raise errors.Error("Unable to register an account with ACME " "server") return acme
def _common_run(args, config, acc, authenticator, installer): if args.domains is None: doms = display_ops.choose_names(installer) else: doms = args.domains if not doms: sys.exit("Please specify --domains, or --installer that will " "help in domain names autodiscovery") acme = client.Client(config, acc, authenticator, installer) # Validate the key and csr client.validate_key_csr(acc.key) if authenticator is not None: if acc.regr is None: try: acme.register() except errors.LetsEncryptClientError: sys.exit("Unable to register an account with ACME server") return acme, doms