]> granicus.if.org Git - pdns/commitdiff
Lowercase the TSIG algorithm name in hash computation
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 31 Jan 2017 10:18:37 +0000 (11:18 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Thu, 2 Feb 2017 16:25:33 +0000 (17:25 +0100)
`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)

pdns/dnssecinfra.cc

index 6a94950c0b982d056762da2bc51e72bbcaad5035..54f6b8e79f0f1e83b190739dfe3e6deead3481be 100644 (file)
@@ -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;