From 05be568e9eda7227ac9b31b36c3d9a4cebb9e455 Mon Sep 17 00:00:00 2001 From: Noah Swartz Date: Thu, 29 Oct 2015 15:18:48 -0700 Subject: [PATCH 1/2] added todo notes --- letsencrypt-apache/letsencrypt_apache/configurator.py | 1 + letsencrypt/cli.py | 1 + letsencrypt/client.py | 1 + 3 files changed, 3 insertions(+) diff --git a/letsencrypt-apache/letsencrypt_apache/configurator.py b/letsencrypt-apache/letsencrypt_apache/configurator.py index d376fe4b6..47e748f9e 100644 --- a/letsencrypt-apache/letsencrypt_apache/configurator.py +++ b/letsencrypt-apache/letsencrypt_apache/configurator.py @@ -219,6 +219,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator): self.parser.add_dir( vhost.path, "SSLCertificateChainFile", chain_path) else: + # TODO: THIS??? self.aug.set(path["chain_path"][-1], chain_path) # Save notes about the transaction that took place diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index 1b396b0b8..e2c11ad98 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -468,6 +468,7 @@ def install(args, config, plugins): # XXX: Update for renewer/RenewableCert try: + #TODO: maybe an error? not choose_configurator_plugins? installer, _ = choose_configurator_plugins(args, config, plugins, "auth") except PluginSelectionError, e: return e.message diff --git a/letsencrypt/client.py b/letsencrypt/client.py index 732bdcf03..0517abc2b 100644 --- a/letsencrypt/client.py +++ b/letsencrypt/client.py @@ -334,6 +334,7 @@ class Client(object): key_path=os.path.abspath(privkey_path), chain_path=chain_path, fullchain_path=fullchain_path) + # TODO: call self.installer.save() << in progress save self.installer.save("Deployed Let's Encrypt Certificate") # sites may have been enabled / final cleanup From fbd09ddbf61451b768a936154d064f66817d5f79 Mon Sep 17 00:00:00 2001 From: Noah Swartz Date: Fri, 30 Oct 2015 13:24:55 -0700 Subject: [PATCH 2/2] added interesticial saves to apache changes which fixed bug when multiple vhosts were specified --- letsencrypt-apache/letsencrypt_apache/configurator.py | 1 - letsencrypt/cli.py | 1 - letsencrypt/client.py | 2 +- letsencrypt/tests/client_test.py | 2 +- 4 files changed, 2 insertions(+), 4 deletions(-) diff --git a/letsencrypt-apache/letsencrypt_apache/configurator.py b/letsencrypt-apache/letsencrypt_apache/configurator.py index 47e748f9e..d376fe4b6 100644 --- a/letsencrypt-apache/letsencrypt_apache/configurator.py +++ b/letsencrypt-apache/letsencrypt_apache/configurator.py @@ -219,7 +219,6 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator): self.parser.add_dir( vhost.path, "SSLCertificateChainFile", chain_path) else: - # TODO: THIS??? self.aug.set(path["chain_path"][-1], chain_path) # Save notes about the transaction that took place diff --git a/letsencrypt/cli.py b/letsencrypt/cli.py index e2c11ad98..1b396b0b8 100644 --- a/letsencrypt/cli.py +++ b/letsencrypt/cli.py @@ -468,7 +468,6 @@ def install(args, config, plugins): # XXX: Update for renewer/RenewableCert try: - #TODO: maybe an error? not choose_configurator_plugins? installer, _ = choose_configurator_plugins(args, config, plugins, "auth") except PluginSelectionError, e: return e.message diff --git a/letsencrypt/client.py b/letsencrypt/client.py index 0517abc2b..937526bbb 100644 --- a/letsencrypt/client.py +++ b/letsencrypt/client.py @@ -334,7 +334,7 @@ class Client(object): key_path=os.path.abspath(privkey_path), chain_path=chain_path, fullchain_path=fullchain_path) - # TODO: call self.installer.save() << in progress save + self.installer.save() self.installer.save("Deployed Let's Encrypt Certificate") # sites may have been enabled / final cleanup diff --git a/letsencrypt/tests/client_test.py b/letsencrypt/tests/client_test.py index 3f7b84a64..0f8b2df61 100644 --- a/letsencrypt/tests/client_test.py +++ b/letsencrypt/tests/client_test.py @@ -159,7 +159,7 @@ class ClientTest(unittest.TestCase): domain='foo.bar', fullchain_path='fullchain', key_path=os.path.abspath("key")) - self.assertEqual(installer.save.call_count, 1) + self.assertEqual(installer.save.call_count, 2) installer.restart.assert_called_once_with() @mock.patch("letsencrypt.client.enhancements")