diff --git a/certbot-apache/certbot_apache/override_centos.py b/certbot-apache/certbot_apache/override_centos.py index 4e49545df..6f104582b 100644 --- a/certbot-apache/certbot_apache/override_centos.py +++ b/certbot-apache/certbot_apache/override_centos.py @@ -97,7 +97,6 @@ class CentOSConfigurator(configurator.ApacheConfigurator): if "ifmodule/" in noarg_path or "ifmodule[1]" in noarg_path.lower(): # It's the first or only IfModule in the file return - return if not loadmod_args: # Do not try to enable mod_ssl diff --git a/certbot-apache/certbot_apache/tests/centos6_test.py b/certbot-apache/certbot_apache/tests/centos6_test.py index 90e637592..826bf2503 100644 --- a/certbot-apache/certbot_apache/tests/centos6_test.py +++ b/certbot-apache/certbot_apache/tests/centos6_test.py @@ -183,6 +183,17 @@ class CentOS6Tests(util.ApacheTest): exclude=False) self.assertFalse(post_loadmods) + def test_no_ifmod_search_false(self): + self.assertFalse(self.config.parser.not_modssl_ifmodule( + "/path/does/not/include/ifmod" + )) + self.assertFalse(self.config.parser.not_modssl_ifmodule( + "" + )) + self.assertFalse(self.config.parser.not_modssl_ifmodule( + "/path/includes/IfModule/but/no/arguments" + )) + if __name__ == "__main__": unittest.main() # pragma: no cover