From: Aki Tuomi Date: Thu, 12 Sep 2013 17:28:53 +0000 (+0300) Subject: Fixed stupid mistake and now uses toLowerCanonic X-Git-Tag: rec-3.6.0-rc1~444^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F1014%2Fhead;p=thirdparty%2Fpdns.git Fixed stupid mistake and now uses toLowerCanonic --- 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;