This commit is contained in:
Brad Warren 2018-01-17 09:30:53 -08:00
parent d87cd3bca6
commit 613d5eea05
2 changed files with 4 additions and 2 deletions

View file

@ -99,7 +99,7 @@ class ApacheHttp01(common.TLSSNI01):
new_conf.write(config_text)
def _relevant_vhosts(self):
http01_port = self.configurator.config.http01_port
http01_port = str(self.configurator.config.http01_port)
relevant_vhosts = []
for vhost in self.configurator.vhosts:
if any(a.is_wildcard() or a.get_port() == http01_port for a in vhost.addrs):

View file

@ -141,8 +141,10 @@ class ApacheHttp01Test(util.ApacheTest):
self.common_perform_test(achalls, vhosts)
def test_no_vhost(self):
for achall in self.achalls:
self.http.add_chall(achall)
self.config.config.http01_port = 12345
self.assertRaises(errors.PluginError, self.http.perform, self.achalls)
self.assertRaises(errors.PluginError, self.http.perform)
def common_perform_test(self, achalls, vhosts):
"""Tests perform with the given achalls."""