Fix merge issues

This commit is contained in:
Joona Hoikkala 2020-04-22 19:39:05 +03:00
parent 2d9e9c8aef
commit c3ebf331e9
No known key found for this signature in database
GPG key ID: D5AA86BBF9B29A5C
2 changed files with 14 additions and 12 deletions

View file

@ -93,12 +93,12 @@ class OCSPPrefetchTest(util.ApacheTest):
_, self.tmp_certfile = tempfile.mkstemp()
self.lineage = mock.MagicMock(cert_path=self.tmp_certfile, chain_path="chain")
self.config.parser.modules.add("headers_module")
self.config.parser.modules.add("mod_headers.c")
self.config.parser.modules.add("ssl_module")
self.config.parser.modules.add("mod_ssl.c")
self.config.parser.modules.add("socache_dbm_module")
self.config.parser.modules.add("mod_socache_dbm.c")
self.config.parser.modules["headers_module"] = None
self.config.parser.modules["mod_headers.c"] = None
self.config.parser.modules["ssl_module"] = None
self.config.parser.modules["mod_ssl.c"] = None
self.config.parser.modules["socache_dbm_module"] = None
self.config.parser.modules["mod_socache_dbm.c"] = None
self.vh_truth = util.get_vh_truth(
self.temp_dir, "debian_apache_2_4/multiple_vhosts")
@ -152,10 +152,10 @@ class OCSPPrefetchTest(util.ApacheTest):
@mock.patch("certbot_apache._internal.override_debian.DebianConfigurator.enable_mod")
def test_ocsp_prefetch_enable_mods(self, mock_enable):
self.config.parser.modules.discard("socache_dbm_module")
self.config.parser.modules.discard("mod_socache_dbm.c")
self.config.parser.modules.discard("headers_module")
self.config.parser.modules.discard("mod_header.c")
self.config.parser.modules.pop("socache_dbm_module", None)
self.config.parser.modules.pop("mod_socache_dbm.c", None)
self.config.parser.modules.pop("headers_module", None)
self.config.parser.modules.pop("mod_header.c", None)
ref_path = "certbot_apache._internal.override_debian.DebianConfigurator._ocsp_refresh"
with mock.patch(ref_path):

View file

@ -100,7 +100,8 @@ class RevocationChecker(object):
if not host or not url:
return False
if self.use_openssl_binary:
return self._check_ocsp_openssl_bin(cert_path, chain_path, host, url, timeout, response_file)
return self._check_ocsp_openssl_bin(cert_path, chain_path, host, url,
timeout, response_file)
return _check_ocsp_cryptography(cert_path, chain_path, url, timeout, response_file)
def ocsp_times(self, response_file):
@ -120,7 +121,8 @@ class RevocationChecker(object):
return _ocsp_times_openssl_bin(response_file)
return _ocsp_times_cryptography(response_file)
def _check_ocsp_openssl_bin(self, cert_path, chain_path, host, url, timeout, response_file=None):
def _check_ocsp_openssl_bin(self, cert_path, chain_path, host, url, timeout, response_file=None): # pylint: disable=line-too-long
# type: (str, str, str, str, int, Optional[str]) -> bool
# Minimal implementation of proxy selection logic as seen in, e.g., cURL
# Some things that won't work, but may well be in use somewhere: