Hello community,

here is the log from the commit of package perl-Net-DNS for openSUSE:Factory 
checked in at 2020-07-01 18:22:22
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/perl-Net-DNS (Old)
 and      /work/SRC/openSUSE:Factory/.perl-Net-DNS.new.3060 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "perl-Net-DNS"

Wed Jul  1 18:22:22 2020 rev:60 rq:817855 version:1.25

Changes:
--------
--- /work/SRC/openSUSE:Factory/perl-Net-DNS/perl-Net-DNS.changes        
2020-06-03 20:29:14.180574219 +0200
+++ /work/SRC/openSUSE:Factory/.perl-Net-DNS.new.3060/perl-Net-DNS.changes      
2020-07-01 18:22:22.585891109 +0200
@@ -1,0 +2,6 @@
+Sat Jun 27 03:13:16 UTC 2020 - Tina Müller <[email protected]>
+
+- updated to 1.25
+   see /usr/share/doc/packages/perl-Net-DNS/Changes
+
+-------------------------------------------------------------------

Old:
----
  Net-DNS-1.24.tar.gz

New:
----
  Net-DNS-1.25.tar.gz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ perl-Net-DNS.spec ++++++
--- /var/tmp/diff_new_pack.tURzU3/_old  2020-07-01 18:22:23.205893022 +0200
+++ /var/tmp/diff_new_pack.tURzU3/_new  2020-07-01 18:22:23.205893022 +0200
@@ -17,7 +17,7 @@
 
 
 Name:           perl-Net-DNS
-Version:        1.24
+Version:        1.25
 Release:        0
 %define cpan_name Net-DNS
 Summary:        Perl Interface to the Domain Name System

++++++ Net-DNS-1.24.tar.gz -> Net-DNS-1.25.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.24/Changes new/Net-DNS-1.25/Changes
--- old/Net-DNS-1.24/Changes    2020-05-27 11:31:07.000000000 +0200
+++ new/Net-DNS-1.25/Changes    2020-06-26 17:14:19.000000000 +0200
@@ -1,4 +1,9 @@
-$Id: Changes 1785 2020-05-27 09:30:53Z willem $                       
-*-text-*-
+$Id: Changes 1792 2020-06-26 14:43:25Z willem $                       
-*-text-*-
+
+
+**** 1.25 Jun 26, 2020
+
+       Parsing of TSIG keyfiles made more robust.
 
 
 **** 1.24 May 27, 2020
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.24/META.json new/Net-DNS-1.25/META.json
--- old/Net-DNS-1.24/META.json  2020-05-27 11:31:14.000000000 +0200
+++ new/Net-DNS-1.25/META.json  2020-06-26 17:14:24.000000000 +0200
@@ -56,6 +56,6 @@
       }
    },
    "release_status" : "stable",
-   "version" : "1.24",
+   "version" : "1.25",
    "x_serialization_backend" : "JSON::PP version 4.04"
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.24/META.yml new/Net-DNS-1.25/META.yml
--- old/Net-DNS-1.24/META.yml   2020-05-27 11:31:14.000000000 +0200
+++ new/Net-DNS-1.25/META.yml   2020-06-26 17:14:24.000000000 +0200
@@ -37,5 +37,5 @@
   Test::More: '0.52'
   Time::Local: '1.19'
   perl: '5.006'
-version: '1.24'
+version: '1.25'
 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.24/Makefile.PL new/Net-DNS-1.25/Makefile.PL
--- old/Net-DNS-1.24/Makefile.PL        2020-05-27 11:31:07.000000000 +0200
+++ new/Net-DNS-1.25/Makefile.PL        2020-06-26 17:14:19.000000000 +0200
@@ -1,5 +1,5 @@
 #
-# $Id: Makefile.PL 1781 2020-05-13 08:58:25Z willem $  -*-perl-*-
+# $Id: Makefile.PL 1791 2020-06-26 14:34:36Z willem $  -*-perl-*-
 #
 
 use strict;
@@ -222,7 +222,7 @@
        return join '', shift->SUPER::dist(), <<'END';
 
 # $(PERM_RWX) raises security issues downstream
-PREOP =        $(NOECHO) $(CHMOD) $(PERM_RW) contrib$(DFSEP)* demo$(DFSEP)*
+PREOP = $(CHMOD) $(PERM_RW) $(DISTVNAME)$(DFSEP)contrib$(DFSEP)* 
$(DISTVNAME)$(DFSEP)demo$(DFSEP)*
 END
 }
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.24/lib/Net/DNS/RR/TSIG.pm 
new/Net-DNS-1.25/lib/Net/DNS/RR/TSIG.pm
--- old/Net-DNS-1.24/lib/Net/DNS/RR/TSIG.pm     2020-05-27 11:31:07.000000000 
+0200
+++ new/Net-DNS-1.25/lib/Net/DNS/RR/TSIG.pm     2020-06-26 17:14:19.000000000 
+0200
@@ -1,9 +1,9 @@
 package Net::DNS::RR::TSIG;
 
 #
-# $Id: TSIG.pm 1779 2020-05-11 09:11:17Z willem $
+# $Id: TSIG.pm 1786 2020-06-15 15:05:47Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1779 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1786 $)[1];
 
 
 use strict;
@@ -29,6 +29,8 @@
 use Net::DNS::DomainName;
 use Net::DNS::Parameters;
 
+use constant SYMLINK => defined(&CORE::readlink);              # Except Win32, 
VMS, RISC OS
+
 use constant ANY  => classbyname qw(ANY);
 use constant TSIG => typebyname qw(TSIG);
 
@@ -378,36 +380,34 @@
        } else {
                require File::Spec;                             # ( keyfile, 
options )
                require Net::DNS::ZoneFile;
-               my $keyfile = new Net::DNS::ZoneFile($karg);
-               my ( $vol, $dir, $filename ) = File::Spec->splitpath( 
$keyfile->name );
-
-               $filename =~ m/^K([^+]+)\+\d+\+\d+\./;          # BIND 
dnssec-keygen
-               my $key = $1;
+               my ($keypath) = SYMLINK ? grep( $_, readlink($karg), $karg ) : 
$karg;
+               my ( $vol, $dir, $name ) = File::Spec->splitpath($keypath);
+               $name =~ m/^K([^+]+)\+\d+\+(\d+)\./;            # BIND 
dnssec-keygen
+               my ( $keyname, $keytag ) = ( $1, $2 );
 
-               if ( $key && $filename =~ /\.key$/ ) {
-                       my $keyrr = $keyfile->read;             # BIND dnssec 
public key
-                       croak 'key file incompatible with TSIG' if $keyrr->type 
ne 'KEY';
-                       return new Net::DNS::RR(
-                               name      => $keyrr->name,
-                               type      => 'TSIG',
-                               algorithm => $keyrr->algorithm,
-                               key       => $keyrr->key,
-                               @_
-                               );
-               }
-
-               my ( $algorithm, $secret, $junk );
+               my $keyfile = new Net::DNS::ZoneFile($karg);
+               my ( $algorithm, $secret, $x );
                while ( $keyfile->_getline ) {
-                       $key       = $1 if /^key "([^"]+)"/;    # BIND tsig key
-                       $secret    = $1 if /secret "([^"]+)";/;
-                       $algorithm = $1 if /algorithm ([^;]+);/;
+                       /^key "([^"]+)"/     and $keyname   = $1;    # BIND 
tsig key
+                       /algorithm ([^;]+);/ and $algorithm = $1;
+                       /secret "([^"]+)";/  and $secret    = $1;
+
+                       /^Algorithm:/ and ( $x, $algorithm ) = split;    # BIND 
dnssec private key
+                       /^Key:/       and ( $x, $secret )    = split;
+
+                       next unless /\bIN\s+KEY\b/;             # BIND dnssec 
public key
+                       my $keyrr = new Net::DNS::RR($_);
+                       carp "$karg  does not appear to be a BIND dnssec public 
key"
+                                       unless $keytag and ( $keytag == 
$keyrr->keytag );
+                       return $class->create( $keyrr, @_ );
+               }
 
-                       ( $junk, $secret )    = split if /^Key:/;         # 
BIND dnssec private key
-                       ( $junk, $algorithm ) = split if /^Algorithm:/;
+               foreach ( $keyname, $algorithm, $secret ) {
+                       croak 'key file incompatible with TSIG' unless $_;
                }
 
                return new Net::DNS::RR(
-                       name      => $key,
+                       name      => $keyname,
                        type      => 'TSIG',
                        algorithm => $algorithm,
                        key       => $secret,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.24/lib/Net/DNS/Resolver/Base.pm 
new/Net-DNS-1.25/lib/Net/DNS/Resolver/Base.pm
--- old/Net-DNS-1.24/lib/Net/DNS/Resolver/Base.pm       2020-05-27 
11:31:07.000000000 +0200
+++ new/Net-DNS-1.25/lib/Net/DNS/Resolver/Base.pm       2020-06-26 
17:14:19.000000000 +0200
@@ -1,9 +1,9 @@
 package Net::DNS::Resolver::Base;
 
 #
-# $Id: Base.pm 1784 2020-05-24 19:27:13Z willem $
+# $Id: Base.pm 1786 2020-06-15 15:05:47Z willem $
 #
-our $VERSION = (qw$LastChangedRevision: 1784 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1786 $)[1];
 
 
 #
@@ -508,8 +508,7 @@
 
                        my $reply;
                        while ( my ($socket) = $select->can_read($timeout) ) {
-                               my $peer = $socket->peerhost;
-                               $self->{replyfrom} = $peer;
+                               my $peer = $self->{replyfrom} = 
$socket->peerhost;
 
                                my $buffer = _read_udp( $socket, 
$self->_packetsz );
                                $self->_diag( "reply from [$peer]", 
length($buffer), 'bytes' );
@@ -801,12 +800,8 @@
        my ($socket) = $select->can_read( $self->{tcp_timeout} );
        croak $self->errorstring('timed out') unless $socket;
 
-       $self->{replyfrom} = $socket->peerhost;
-
        my $buffer = _read_tcp($socket);
-       $self->_diag( 'received', length($buffer), 'bytes' );
-
-       my $packet = Net::DNS::Packet->new( \$buffer );
+       my $packet = Net::DNS::Packet->decode( \$buffer );
        croak $@, $self->errorstring('corrupt packet') if $@;
 
        return ( $packet, $verify ) unless $verify;
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.24/lib/Net/DNS.pm 
new/Net-DNS-1.25/lib/Net/DNS.pm
--- old/Net-DNS-1.24/lib/Net/DNS.pm     2020-05-27 11:31:07.000000000 +0200
+++ new/Net-DNS-1.25/lib/Net/DNS.pm     2020-06-26 17:14:19.000000000 +0200
@@ -1,13 +1,13 @@
 package Net::DNS;
 
 #
-# $Id: DNS.pm 1785 2020-05-27 09:30:53Z willem $
+# $Id: DNS.pm 1792 2020-06-26 14:43:25Z willem $
 #
 require 5.006;
 our $VERSION;
-$VERSION = '1.24';
+$VERSION = '1.25';
 $VERSION = eval $VERSION;
-our $SVNVERSION = (qw$LastChangedRevision: 1785 $)[1];
+our $SVNVERSION = (qw$LastChangedRevision: 1792 $)[1];
 
 
 =head1 NAME
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/Net-DNS-1.24/t/71-TSIG-create.t 
new/Net-DNS-1.25/t/71-TSIG-create.t
--- old/Net-DNS-1.24/t/71-TSIG-create.t 2020-05-27 11:31:07.000000000 +0200
+++ new/Net-DNS-1.25/t/71-TSIG-create.t 2020-06-26 17:14:19.000000000 +0200
@@ -1,4 +1,4 @@
-# $Id: 71-TSIG-create.t 1779 2020-05-11 09:11:17Z willem $     -*-perl-*-
+# $Id: 71-TSIG-create.t 1786 2020-06-15 15:05:47Z willem $     -*-perl-*-
 
 use strict;
 use Test::More;
@@ -18,7 +18,7 @@
        exit;
 }
 
-plan tests => 20;
+plan tests => 22;
 
 
 my $tsig  = new Net::DNS::RR( type => 'TSIG' );
@@ -42,17 +42,18 @@
 HMAC-SHA256.example. IN KEY 512 3 163 
f+JImRXRzLpKseG+bP+W9Vwb2QAgtFuIlRU80OA3NU8=
 END
 
-my $publickey = 'Khmac-sha256.example.+163+52011.key';
+my $privatekey = $keyrr->privatekeyname;
+END { unlink($privatekey) if defined $privatekey; }
+
+my $publickey;
+( $publickey = $privatekey ) =~ s/\.private$/\.key/;
 END { unlink($publickey) if defined $publickey; }
 
 open( KEY, ">", $publickey ) or die "$publickey $!";
-print KEY $keyrr->string;
+print KEY $keyrr->plain;
 close KEY;
 
 
-my $privatekey = $keyrr->privatekeyname;
-END { unlink($privatekey) if defined $privatekey; }
-
 open( KEY, ">", $privatekey ) or die "$privatekey $!";
 print KEY <<'END';
 Private-key-format: v1.2
@@ -149,7 +150,7 @@
 my $dnskey = 'Kbad.example.+161+39562.key';
 END { unlink($dnskey) if defined $dnskey; }
 
-open( KEY, ">$dnskey" ) or die "$dnskey $!";
+open( KEY, ">", $dnskey ) or die "$dnskey $!";
 print KEY <<'END';
 HMAC-SHA1.example. IN DNSKEY 512 3 161 xdX9m8UtQNbJUzUgQ4xDtUNZAmU=
 END
@@ -158,7 +159,43 @@
 {
        eval { create $class($dnskey); };
        my ($exception) = split /\n/, "$@\n";
-       ok( $exception, "unrecognised public key\t[$exception]" );
+       ok( $exception, "unrecognised key format\t[$exception]" );
+}
+
+
+my $renamedBINDkey = 'arbitrary.key';
+END { unlink($renamedBINDkey) if defined $renamedBINDkey; }
+
+open( KEY, ">", $renamedBINDkey ) or die "$renamedBINDkey $!";
+print KEY <<'END';
+HMAC-SHA1.example. IN KEY 512 3 161 xdX9m8UtQNbJUzUgQ4xDtUNZAmU=
+END
+close KEY;
+
+my $corruptBINDkey = 'Kcorrupt.example.+161+13198.key';                # 
unmatched keytag
+END { unlink($corruptBINDkey) if defined $corruptBINDkey; }
+
+open( KEY, ">", $corruptBINDkey ) or die "$corruptBINDkey $!";
+print KEY <<'END';
+HMAC-SHA1.example. IN KEY 512 3 161 xdX9m8UtQNbJUzUgQ4xDtUNZAmU=
+END
+close KEY;
+
+{
+       my @warning;
+       local $SIG{__WARN__} = sub { @warning = @_ };
+       create $class($renamedBINDkey);
+       my ($warning) = split /\n/, "@warning\n";
+       ok( $warning, "renamed BIND public key\t[$warning]" );
+}
+
+
+{
+       my @warning;
+       local $SIG{__WARN__} = sub { @warning = @_ };
+       create $class($corruptBINDkey);
+       my ($warning) = split /\n/, "@warning\n";
+       ok( $warning, "corrupt BIND public key\t[$warning]" );
 }
 
 
@@ -167,7 +204,7 @@
        local $SIG{__WARN__} = sub { @warning = @_ };
        create $class( $keyrr->owner, $keyrr->key );
        my ($warning) = split /\n/, "@warning\n";
-       ok( $warning, "2-argument create:\t[$warning]" );
+       ok( $warning, "2-argument create\t[$warning]" );
 }
 
 


Reply via email to