mirror of
https://github.com/certbot/certbot.git
synced 2026-07-28 00:24:35 +02:00
Merge pull request #7009 from rigrassm/dns-rfc2136-config-changes
Make tsig algorithm configuration option in the certbot_dns_rfc2136 config file case insensitive
This commit is contained in:
@@ -33,6 +33,9 @@ Certbot adheres to [Semantic Versioning](https://semver.org/).
|
||||
--no-permissions-check.
|
||||
* `acme` module uses now a POST-as-GET request to retrieve the registration
|
||||
from an ACME v2 server
|
||||
* 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
|
||||
|
||||
|
||||
@@ -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])
|
||||
|
||||
Reference in New Issue
Block a user