change to not make a permanent file if just doing dvsni

This commit is contained in:
Noah Swartz 2015-11-18 18:59:22 -08:00
parent 8c9ead3c40
commit 707bb55c81
2 changed files with 4 additions and 2 deletions

View file

@ -234,7 +234,7 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
if not vhost.enabled:
self.enable_site(vhost)
def choose_vhost(self, target_name):
def choose_vhost(self, target_name, dvsni=False):
"""Chooses a virtual host based on the given domain name.
If there is no clear virtual host to be selected, the user is prompted
@ -255,6 +255,8 @@ class ApacheConfigurator(augeas_configurator.AugeasConfigurator):
# Try to find a reasonable vhost
vhost = self._find_best_vhost(target_name)
if vhost is not None:
if dvsni:
return vhost
if not vhost.ssl:
vhost = self.make_vhost_ssl(vhost)

View file

@ -110,7 +110,7 @@ class ApacheDvsni(common.TLSSNI01):
def get_dvsni_addrs(self, achall):
"""Return the Apache addresses needed for DVSNI."""
vhost = self.configurator.choose_vhost(achall.domain)
vhost = self.configurator.choose_vhost(achall.domain, dvsni=True)
# TODO: Checkout _default_ rules.
dvsni_addrs = set()