Bug#962334: .key files not handled correctly in TSIG.pm in version 1.24

Wolfgang Walter wolfgang.walter at stwm.de
Sat Jun 6 13:21:11 BST 2020


Package: libnet-dns-perl
Version: 1.24-1


Hello,

after upgrading from 1.23 to 1.24 I get the following error:

Use of uninitialized value $_[0] in join or string at /usr/share/perl5/Net/DNS/RR/TSIG.pm line 182.

when I call sign_tsig() with a .key file.

I think the reason is that .key files are now handled as .private file due to the new code in TSIG.pm, line 384:

                 $filename =~ m/^K([^+]+)\+\d+\+\d+\./;          # BIND dnssec-keygen
                my $key = $1;

                if ( $key && $filename =~ /\.key$/ ) { 
  
If it is a .key file, $key will usually be undefined and the code path for handling .key files will therefore not be entered.

If I change the condition to

	 if ( ! $key || $filename =~ /\.key$/ ) { 

sign_tsig() works fine again.

Regards,
-- 
Wolfgang Walter
Studentenwerk München
Anstalt des öffentlichen Rechts



More information about the pkg-perl-maintainers mailing list