From fe01a1936b8c29beb4d4bf934163894855eafc7a Mon Sep 17 00:00:00 2001 From: Aki Tuomi Date: Thu, 12 Sep 2013 20:28:53 +0300 Subject: [PATCH] Fixed stupid mistake and now uses toLowerCanonic --- pdns/dnssecinfra.cc | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/pdns/dnssecinfra.cc b/pdns/dnssecinfra.cc index 1331c318cc..24e2ea338d 100644 --- a/pdns/dnssecinfra.cc +++ b/pdns/dnssecinfra.cc @@ -560,22 +560,19 @@ string makeTSIGMessageFromTSIGPacket(const string& opacket, unsigned int tsigOff bool getTSIGHashEnum(const string &algoName, TSIGHashEnum& algoEnum) { - string normalizedName = toLower(normalizedName); + string normalizedName = toLowerCanonic(algoName); - if (*(normalizedName.rbegin()) != '.') - normalizedName.append("."); - - if (normalizedName == "hmac-md5.sig-alg.reg.int.") + if (normalizedName == "hmac-md5.sig-alg.reg.int") algoEnum = TSIG_MD5; - else if (normalizedName == "hmac-sha1.") + else if (normalizedName == "hmac-sha1") algoEnum = TSIG_SHA1; - else if (normalizedName == "hmac-sha224.") + else if (normalizedName == "hmac-sha224") algoEnum = TSIG_SHA224; - else if (normalizedName == "hmac-sha256.") + else if (normalizedName == "hmac-sha256") algoEnum = TSIG_SHA256; - else if (normalizedName == "hmac-sha384.") + else if (normalizedName == "hmac-sha384") algoEnum = TSIG_SHA384; - else if (normalizedName == "hmac-sha512.") + else if (normalizedName == "hmac-sha512") algoEnum = TSIG_SHA512; else { return false; -- 2.47.2