From 375b2f5b4e5f5fb874c660c8fe7f09ad6350b523 Mon Sep 17 00:00:00 2001 From: Joona Hoikkala Date: Wed, 13 Mar 2019 15:10:54 +0200 Subject: [PATCH] Address review comments --- CHANGELOG.md | 4 +++- certbot-apache/certbot_apache/override_centos.py | 3 ++- .../certbot_apache/tests/centos6_test.py | 15 ++++++++------- 3 files changed, 13 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9d2130168..518c3bd0d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,9 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). * Certbot uses the Python library cryptography for OCSP when cryptography>=2.5 is installed. We fixed a bug in Certbot causing it to interpret timestamps in the OCSP response as being in the local timezone rather than UTC. -* Issue causing the default CentOS 6 TLS configuration to ignore some of the HTTPS VirtualHosts created by Certbot. mod_ssl loading is now moved to main http.conf for this environment where possible. +* Issue causing the default CentOS 6 TLS configuration to ignore some of the + HTTPS VirtualHosts created by Certbot. mod_ssl loading is now moved to main + http.conf for this environment where possible. Despite us having broken lockstep, we are continuing to release new versions of all Certbot components during releases for the time being, however, the only diff --git a/certbot-apache/certbot_apache/override_centos.py b/certbot-apache/certbot_apache/override_centos.py index 61658db8c..b39010047 100644 --- a/certbot-apache/certbot_apache/override_centos.py +++ b/certbot-apache/certbot_apache/override_centos.py @@ -83,7 +83,8 @@ class CentOSConfigurator(configurator.ApacheConfigurator): logger.info("Multiple different LoadModule directives for mod_ssl " "were found. If you encounter issues with resulting " "configuration, it's suggested to move the LoadModule " - "ssl_module directive to the beginning of main httpd.conf.") + "ssl_module directive to the beginning of main Apache " + "configuration file at /etc/httpd/conf/httpd.conf") return else: loadmod_args = path_args diff --git a/certbot-apache/certbot_apache/tests/centos6_test.py b/certbot-apache/certbot_apache/tests/centos6_test.py index 08807d911..da98f0375 100644 --- a/certbot-apache/certbot_apache/tests/centos6_test.py +++ b/certbot-apache/certbot_apache/tests/centos6_test.py @@ -154,13 +154,14 @@ class CentOS6Tests(util.ApacheTest): noarg_path = mod.rpartition("/")[0] self.config.aug.remove(noarg_path) self.config.save() - # get_all_args() is called for each LoadModule that was found - getall = "certbot_apache.override_centos.CentOSParser.get_all_args" - with mock.patch(getall) as mock_getall: - self.config.deploy_cert( - "random.demo", "example/cert.pem", "example/key.pem", - "example/cert_chain.pem", "example/fullchain.pem") - self.assertFalse(mock_getall.called) + self.config.deploy_cert( + "random.demo", "example/cert.pem", "example/key.pem", + "example/cert_chain.pem", "example/fullchain.pem") + + post_loadmods = self.config.parser.find_dir("LoadModule", + "ssl_module", + exclude=False) + self.assertFalse(post_loadmods) if __name__ == "__main__":