Merge pull request #2939 from certbot/legacy-standalone

Fixes references to dvsni in renewal config files
This commit is contained in:
schoen
2016-05-09 17:12:16 -07:00
2 changed files with 13 additions and 0 deletions
+8
View File
@@ -120,6 +120,14 @@ def supported_challenges_validator(data):
"""
challs = data.split(",")
# tls-sni-01 was dvsni during private beta
if "dvsni" in challs:
logger.info("Updating legacy standalone_supported_challenges value")
challs = [challenges.TLSSNI01.typ if chall == "dvsni" else chall
for chall in challs]
data = ",".join(challs)
unrecognized = [name for name in challs
if name not in challenges.Challenge.TYPES]
if unrecognized:
+5
View File
@@ -85,6 +85,11 @@ class SupportedChallengesValidatorTest(unittest.TestCase):
def test_not_subset(self):
self.assertRaises(argparse.ArgumentTypeError, self._call, "dns")
def test_dvsni(self):
self.assertEqual("tls-sni-01", self._call("dvsni"))
self.assertEqual("http-01,tls-sni-01", self._call("http-01,dvsni"))
self.assertEqual("tls-sni-01,http-01", self._call("dvsni,http-01"))
class AuthenticatorTest(unittest.TestCase):
"""Tests for certbot.plugins.standalone.Authenticator."""