From: Remi Gacogne Date: Tue, 31 Jan 2017 10:18:37 +0000 (+0100) Subject: Lowercase the TSIG algorithm name in hash computation X-Git-Tag: auth-4.0.4-rc1~33^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=6b074ab8765d425df2c8bce95123894bb14ef343;p=pdns Lowercase the TSIG algorithm name in hash computation `RFC2845` states that the algorithm name should be in `canonical wire format` for the hash computation, which implies it should be lowercased. We actually did lowercase it in 3.x, until it was moved to a `DNSName` in 4.x. (cherry picked from commit 68e9d647d4229c7a2ebd64d50837195d148c574b) --- diff --git a/pdns/dnssecinfra.cc b/pdns/dnssecinfra.cc index 6a94950c0..54f6b8e79 100644 --- a/pdns/dnssecinfra.cc +++ b/pdns/dnssecinfra.cc @@ -657,8 +657,7 @@ string makeTSIGMessageFromTSIGPacket(const string& opacket, unsigned int tsigOff dw.xfrName(keyname, false); dw.xfr16BitInt(QClass::ANY); // class dw.xfr32BitInt(0); // TTL - // dw.xfrName(toLower(trc.d_algoName), false); //FIXME400 - dw.xfrName(trc.d_algoName, false); + dw.xfrName(trc.d_algoName.makeLowerCase(), false); } uint32_t now = trc.d_time;