]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Lowercase the TSIG algorithm name in hash computation 4961/head
authorRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 31 Jan 2017 10:18:37 +0000 (11:18 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Tue, 31 Jan 2017 11:14:50 +0000 (12:14 +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.

pdns/dnssecinfra.cc

index d2eafc4759636f9ba25849c7df5cd2e16afe0d55..79278fabd86bfbce83f574005ee57012d6212911 100644 (file)
@@ -658,8 +658,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;