From a1dc63a0a226b296c6679c1787cfe60c69b7e943 Mon Sep 17 00:00:00 2001 From: Ricky Grassmuck Date: Sun, 28 Apr 2019 21:45:27 -0500 Subject: [PATCH 1/2] 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. --- certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136.py | 2 +- certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136.py b/certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136.py index f985c9bf4..2061374e0 100644 --- a/certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136.py +++ b/certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136.py @@ -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): diff --git a/certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136_test.py b/certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136_test.py index 2eb0517f6..d800f1ec7 100644 --- a/certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136_test.py +++ b/certbot-dns-rfc2136/certbot_dns_rfc2136/dns_rfc2136_test.py @@ -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]) From 40481e0fdb518453f92893358a7fded0be104728 Mon Sep 17 00:00:00 2001 From: Ricky Grassmuck Date: Tue, 30 Apr 2019 20:33:05 -0500 Subject: [PATCH 2/2] Update CHANGELOG.md Signed-off-by: Ricky Grassmuck --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d80f1baa5..9982c710e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,9 @@ Certbot adheres to [Semantic Versioning](https://semver.org/). * Adding a warning noting that future versions of Certbot will automatically configure the webserver so that all requests redirect to secure HTTPS access. You can control this behavior and disable this warning with the --redirect and --no-redirect flags. +* Convert the tsig algorithm specified in the certbot_dns_rfc2136 configuration file to + all uppercase letters before validating. This makes the value in the config case + insensitive. ### Fixed