Subject: | 1.04: TSIG not working anymore (TSIG.pm) |
Date: | Sat, 30 Jan 2016 02:08:13 +0100 |
To: | bug-Net-DNS [...] rt.cpan.org |
From: | "Jørgen Thomsen" <jth [...] jth.net> |
It appears to me, that bugs have been introduced into the TSIG handling.
1) algorithm names (HMAC-SHA384 etc) are in upper case, but BIND9 is using lower case
causing the case sensitive comparisons in TSIG.pm to fail:
e.g. unless ( $signerkey eq $priorkey ) {
2) changing the algorithm name to lower case is not sufficient as several places it is
assumed that it is in upper case and forced to upper case or stripped from lower case
chars (why strip dashes and '.' in the names beats me and complicates things ?).
3) even when fixing 1) and 2) the verify-procedure is failing with BADSIG (my test case is
an AXFR)
4) the extensive use of terminating with BADSIG, BADKEY etc instead of returning a boolean
false as described in the documentation should definitely be avoided. A Perl warn
could be used for a message to be displayed or found in the webserver log.
"The boolean verify method will return true if the hash over the packet data conforms
to the data in the TSIG itself"
- Jørgen Th.