From 394e18c4c6ab0d34b6364b3a44e00dd3f065a37c Mon Sep 17 00:00:00 2001 From: James Kasten Date: Tue, 5 May 2015 14:43:00 -0700 Subject: [PATCH] use certificate_key throughout --- letsencrypt/client/client.py | 11 +++++------ letsencrypt/scripts/main.py | 4 ++-- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/letsencrypt/client/client.py b/letsencrypt/client/client.py index 0422563c3..58cccc3af 100644 --- a/letsencrypt/client/client.py +++ b/letsencrypt/client/client.py @@ -124,11 +124,10 @@ class Client(object): authzr = self.auth_handler.get_authorizations(domains) # Create CSR from names - if csr is None: - cert_key = crypto_util.init_save_key( - self.config.rsa_key_size, self.config.key_dir) - csr = crypto_util.init_save_csr( - cert_key, domains, self.config.cert_dir) + cert_key = crypto_util.init_save_key( + self.config.rsa_key_size, self.config.key_dir) + csr = crypto_util.init_save_csr( + cert_key, domains, self.config.cert_dir) # Retrieve certificate certr = self.network.request_issuance( @@ -143,7 +142,7 @@ class Client(object): revoker.Revoker.store_cert_key( cert_file, self.account.key.file, self.config) - return cert_file, chain_file + return cert_key, cert_file, chain_file def save_certificate(self, certr, cert_path, chain_path): # pylint: disable=no-self-use diff --git a/letsencrypt/scripts/main.py b/letsencrypt/scripts/main.py index ae15f22dd..254df5bdd 100644 --- a/letsencrypt/scripts/main.py +++ b/letsencrypt/scripts/main.py @@ -244,9 +244,9 @@ def main(): # pylint: disable=too-many-branches, too-many-statements acme.register() except errors.LetsEncryptClientError: sys.exit(0) - cert_file, chain_file = acme.obtain_certificate(doms) + cert_key, cert_file, chain_file = acme.obtain_certificate(doms) if installer is not None and cert_file is not None: - acme.deploy_certificate(doms, acc.key, cert_file, chain_file) + acme.deploy_certificate(doms, cert_key, cert_file, chain_file) if installer is not None: acme.enhance_config(doms, args.redirect)