Allow algorithm in certbot_dns_rfc2136's config to be case insensitive

Update dns_rfc2136_test to use a mixed-case test value in the valid algorithm test.
This commit is contained in:
Ricky Grassmuck
2019-04-28 21:45:27 -05:00
parent c99079fb0a
commit a1dc63a0a2
2 changed files with 2 additions and 2 deletions
@@ -57,7 +57,7 @@ class Authenticator(dns_common.DNSAuthenticator):
def _validate_algorithm(self, credentials):
algorithm = credentials.conf('algorithm')
if algorithm:
if not self.ALGORITHMS.get(algorithm):
if not self.ALGORITHMS.get(algorithm.upper()):
raise errors.PluginError("Unknown algorithm: {0}.".format(algorithm))
def _setup_credentials(self):
@@ -64,7 +64,7 @@ class AuthenticatorTest(test_util.TempDirTestCase, dns_test_common.BaseAuthentic
def test_valid_algorithm_passes(self):
config = VALID_CONFIG.copy()
config["rfc2136_algorithm"] = "HMAC-SHA512"
config["rfc2136_algorithm"] = "HMAC-sha512"
dns_test_common.write(config, self.config.rfc2136_credentials)
self.auth.perform([self.achall])