Hello community, here is the log from the commit of package perl-Net-DNS for openSUSE:Factory checked in at 2020-03-25 23:42:07 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/perl-Net-DNS (Old) and /work/SRC/openSUSE:Factory/.perl-Net-DNS.new.3160 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "perl-Net-DNS" Wed Mar 25 23:42:07 2020 rev:58 rq:786400 version:1.23 Changes: -------- --- /work/SRC/openSUSE:Factory/perl-Net-DNS/perl-Net-DNS.changes 2020-02-19 12:40:01.303564697 +0100 +++ /work/SRC/openSUSE:Factory/.perl-Net-DNS.new.3160/perl-Net-DNS.changes 2020-03-25 23:42:14.199972803 +0100 @@ -1,0 +2,6 @@ +Thu Mar 19 03:12:27 UTC 2020 - <[email protected]> + +- updated to 1.23 + see /usr/share/doc/packages/perl-Net-DNS/Changes + +------------------------------------------------------------------- Old: ---- Net-DNS-1.22.tar.gz New: ---- Net-DNS-1.23.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ perl-Net-DNS.spec ++++++ --- /var/tmp/diff_new_pack.JlS3bQ/_old 2020-03-25 23:42:14.823973007 +0100 +++ /var/tmp/diff_new_pack.JlS3bQ/_new 2020-03-25 23:42:14.827973008 +0100 @@ -17,7 +17,7 @@ Name: perl-Net-DNS -Version: 1.22 +Version: 1.23 Release: 0 %define cpan_name Net-DNS Summary: Perl Interface to the Domain Name System ++++++ Net-DNS-1.22.tar.gz -> Net-DNS-1.23.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/Changes new/Net-DNS-1.23/Changes --- old/Net-DNS-1.22/Changes 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/Changes 2020-03-18 15:45:20.000000000 +0100 @@ -1,4 +1,17 @@ -$Id: Changes 1770 2020-02-13 10:42:04Z willem $ -*-text-*- +$Id: Changes 1776 2020-03-18 14:39:38Z willem $ -*-text-*- + + +**** 1.23 Mar 18, 2020 + + Deprecate 2-argument form of TSIG create(). + +Fix rt.cpan.org #132170 + + [Documentation] Problems with TSIG on ddns update. + +Fix rt.cpan.org #131906 + + Undefined errorstring/warning when axfr fails **** 1.22 Feb 13, 2020 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/META.json new/Net-DNS-1.23/META.json --- old/Net-DNS-1.22/META.json 2020-02-13 11:42:30.000000000 +0100 +++ new/Net-DNS-1.23/META.json 2020-03-18 15:45:34.000000000 +0100 @@ -55,6 +55,6 @@ } }, "release_status" : "stable", - "version" : "1.22", + "version" : "1.23", "x_serialization_backend" : "JSON::PP version 2.97001" } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/META.yml new/Net-DNS-1.23/META.yml --- old/Net-DNS-1.22/META.yml 2020-02-13 11:42:30.000000000 +0100 +++ new/Net-DNS-1.23/META.yml 2020-03-18 15:45:34.000000000 +0100 @@ -36,5 +36,5 @@ Test::More: '0.52' Time::Local: '1.19' perl: '5.006' -version: '1.22' +version: '1.23' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/RR/CAA.pm new/Net-DNS-1.23/lib/Net/DNS/RR/CAA.pm --- old/Net-DNS-1.22/lib/Net/DNS/RR/CAA.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/RR/CAA.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::RR::CAA; # -# $Id: CAA.pm 1741 2019-04-16 13:10:38Z willem $ +# $Id: CAA.pm 1771 2020-02-25 14:23:23Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1741 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1771 $)[1]; use strict; @@ -36,16 +36,14 @@ sub _encode_rdata { ## encode rdata as wire-format octet string my $self = shift; - my $tag = $self->{tag}; - pack 'C a* a*', $self->flags, $tag->encode, $self->{value}->raw; + pack 'C a* a*', $self->flags, $self->{tag}->encode, $self->{value}->raw; } sub _format_rdata { ## format rdata portion of RR string. my $self = shift; - my $tag = $self->{tag}; - my @rdata = ( $self->flags, $tag->string, $self->{value}->string ); + my @rdata = ( $self->flags, $self->{tag}->string, $self->{value}->string ); } @@ -53,7 +51,7 @@ my $self = shift; $self->flags(shift); - $self->tag(shift); + $self->tag( lc shift ); $self->value(shift); } @@ -148,7 +146,7 @@ The property identifier, a sequence of ASCII characters. -Tag values may contain ASCII characters a-z, A-Z, and 0-9. +Tag values may contain ASCII characters a-z, hyphen and 0-9. Tag values should not contain any other characters. Matching of tag values is not case sensitive. @@ -192,6 +190,6 @@ =head1 SEE ALSO -L<perl>, L<Net::DNS>, L<Net::DNS::RR>, RFC6844 +L<perl>, L<Net::DNS>, L<Net::DNS::RR>, RFC8659 =cut diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/RR/CERT.pm new/Net-DNS-1.23/lib/Net/DNS/RR/CERT.pm --- old/Net-DNS-1.22/lib/Net/DNS/RR/CERT.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/RR/CERT.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::RR::CERT; # -# $Id: CERT.pm 1729 2019-01-28 09:45:47Z willem $ +# $Id: CERT.pm 1773 2020-03-17 08:40:55Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1729 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1773 $)[1]; use strict; @@ -69,7 +69,7 @@ my %algbyval = reverse @algbyname; my @algrehash = map /^\d/ ? ($_) x 3 : do { s/[\W_]//g; uc($_) }, @algbyname; - my %algbyname = @algrehash; # work around broken cperl + my %algbyname = @algrehash; # work around broken cperl sub _algbyname { my $arg = shift; @@ -106,8 +106,8 @@ sub _format_rdata { ## format rdata portion of RR string. my $self = shift; - my @base64 = split /\s+/, encode_base64( $self->{certbin} ); - my @rdata = ( $self->certtype, $self->keytag, $self->algorithm, @base64 ); + my @param = ( $self->certtype, $self->keytag, $self->algorithm ); + my @rdata = ( @param, split /\s+/, encode_base64( $self->{certbin} ) ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/RR/DNSKEY.pm new/Net-DNS-1.23/lib/Net/DNS/RR/DNSKEY.pm --- old/Net-DNS-1.22/lib/Net/DNS/RR/DNSKEY.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/RR/DNSKEY.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::RR::DNSKEY; # -# $Id: DNSKEY.pm 1741 2019-04-16 13:10:38Z willem $ +# $Id: DNSKEY.pm 1773 2020-03-17 08:40:55Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1741 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1773 $)[1]; use strict; @@ -55,7 +55,7 @@ my %algbyval = reverse @algbyname; my @algrehash = map /^\d/ ? ($_) x 3 : do { s/[\W_]//g; uc($_) }, @algbyname; - my %algbyname = @algrehash; # work around broken cperl + my %algbyname = @algrehash; # work around broken cperl sub _algbyname { my $arg = shift; @@ -96,8 +96,8 @@ my $algorithm = $self->{algorithm}; $self->_annotation( 'Key ID =', $self->keytag ) if $algorithm; return $self->SUPER::_format_rdata() unless BASE64; - my @base64 = split /\s+/, MIME::Base64::encode( $self->{keybin} ) || '-'; - my @rdata = ( @{$self}{qw(flags protocol)}, $algorithm, @base64 ); + my @param = ( @{$self}{qw(flags protocol)}, $algorithm ); + my @rdata = ( @param, split /\s+/, MIME::Base64::encode( $self->{keybin} ) || '-' ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/RR/DS.pm new/Net-DNS-1.23/lib/Net/DNS/RR/DS.pm --- old/Net-DNS-1.22/lib/Net/DNS/RR/DS.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/RR/DS.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::RR::DS; # -# $Id: DS.pm 1741 2019-04-16 13:10:38Z willem $ +# $Id: DS.pm 1774 2020-03-18 07:49:22Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1741 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1774 $)[1]; use strict; @@ -66,7 +66,7 @@ my %algbyval = reverse @algbyname; my @algrehash = map /^\d/ ? ($_) x 3 : do { s/[\W_]//g; uc($_) }, @algbyname; - my %algbyname = @algrehash; # work around broken cperl + my %algbyname = @algrehash; # work around broken cperl sub _algbyname { my $arg = shift; @@ -140,8 +140,8 @@ my $self = shift; $self->_annotation( $self->babble ) if BABBLE && $self->{algorithm}; - my @digest = split /(\S{64})/, $self->digest || '-'; - my @rdata = ( @{$self}{qw(keytag algorithm digtype)}, @digest ); + my @param = @{$self}{qw(keytag algorithm digtype)}; + my @rdata = ( @param, split /(\S{64})/, $self->digest || '-' ); } @@ -219,14 +219,13 @@ my ($type) = reverse split '::', $class; - my $kname = $keyrr->name; my $flags = $keyrr->flags; croak "Unable to create $type record for non-DNSSEC key" unless $keyrr->protocol == 3; croak "Unable to create $type record for non-authentication key" if $flags & 0x8000; croak "Unable to create $type record for non-ZONE key" unless ( $flags & 0x300 ) == 0x100; my $self = new Net::DNS::RR( - name => $kname, # per definition, same as keyrr + owner => $keyrr->owner, # per definition, same as keyrr type => $type, class => $keyrr->class, keytag => $keyrr->keytag, @@ -235,14 +234,12 @@ %args ); - my $owner = $self->{owner}->encode(); - my $data = pack 'a* a*', $owner, $keyrr->_encode_rdata; - my $arglist = $digest{$self->digtype}; croak join ' ', 'digtype', $self->digtype('MNEMONIC'), 'not supported' unless $arglist; my ( $object, @argument ) = @$arglist; my $hash = $object->new(@argument); - $hash->add($data); + $hash->add( $keyrr->{owner}->canonical ); + $hash->add( $keyrr->_encode_rdata ); $self->digestbin( $hash->digest ); return $self; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/RR/OPT.pm new/Net-DNS-1.23/lib/Net/DNS/RR/OPT.pm --- old/Net-DNS-1.22/lib/Net/DNS/RR/OPT.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/RR/OPT.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::RR::OPT; # -# $Id: OPT.pm 1754 2019-08-19 14:12:28Z willem $ +# $Id: OPT.pm 1773 2020-03-17 08:40:55Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1754 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1773 $)[1]; use strict; @@ -116,12 +116,8 @@ sub size { my $self = shift; - for ( $self->{size} ) { - my $UDP_size = 0; - ( $UDP_size, $_ ) = ( shift || 0 ) if scalar @_; - return $UDP_size < 512 ? 512 : ( $_ = $UDP_size ) unless $_; - return $_ > 512 ? $_ : 512; - } + $self->{size} = shift if scalar @_; + return ( $self->{size} || 0 ) > 512 ? $self->{size} : 512; } @@ -143,8 +139,8 @@ sub options { my ($self) = @_; - my $options = $self->{option} || {}; - my @options = sort { $a <=> $b } keys %$options; + my $option = $self->{option} || {}; + my @option = sort { $a <=> $b } keys %$option; } sub option { @@ -251,9 +247,8 @@ sub _compose { my ( $class, %argument ) = @_; my $address = bless( {}, $family{$argument{FAMILY}} )->address( $argument{ADDRESS} ); - my $preamble = pack 'nC2', map $_ || 0, @argument{@field8}; - my $bitmask = $argument{'SOURCE-PREFIX-LENGTH'}; - pack "a* B$bitmask", $preamble, unpack 'B*', $address; + my $bitmask = $argument{'SOURCE-PREFIX-LENGTH'}; + pack "a* B$bitmask", pack( 'nC2', map $_ || 0, @argument{@field8} ), unpack 'B*', $address; } sub _decompose { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/RR/TSIG.pm new/Net-DNS-1.23/lib/Net/DNS/RR/TSIG.pm --- old/Net-DNS-1.22/lib/Net/DNS/RR/TSIG.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/RR/TSIG.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::RR::TSIG; # -# $Id: TSIG.pm 1749 2019-07-21 09:15:55Z willem $ +# $Id: TSIG.pm 1774 2020-03-18 07:49:22Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1749 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1774 $)[1]; use strict; @@ -369,6 +369,7 @@ } elsif ( scalar(@_) == 1 ) { my $key = shift; # ( keyname, key ) + $class->_deprecate('create( $key_name, $key )'); return new Net::DNS::RR( name => $karg, type => 'TSIG', @@ -710,10 +711,6 @@ Returns a TSIG RR constructed using the parameters in the specified key file, which is assumed to have been generated by dnssec-keygen. - $tsig = create Net::DNS::RR::TSIG( $keyname, $key ); - -The two argument form is supported for backward compatibility. - =head2 verify $verify = $tsig->verify( $data ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/RR/ZONEMD.pm new/Net-DNS-1.23/lib/Net/DNS/RR/ZONEMD.pm --- old/Net-DNS-1.22/lib/Net/DNS/RR/ZONEMD.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/RR/ZONEMD.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::RR::ZONEMD; # -# $Id: ZONEMD.pm 1761 2020-01-01 11:58:34Z willem $ +# $Id: ZONEMD.pm 1771 2020-02-25 14:23:23Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1761 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1771 $)[1]; use strict; @@ -27,14 +27,14 @@ my ( $data, $offset ) = @_; my $rdata = substr $$data, $offset, $self->{rdlength}; - @{$self}{qw(serial digtype parameter digestbin)} = unpack 'NC2a*', $rdata; + @{$self}{qw(serial scheme algorithm digestbin)} = unpack 'NC2a*', $rdata; } sub _encode_rdata { ## encode rdata as wire-format octet string my $self = shift; - pack 'NC2a*', @{$self}{qw(serial digtype parameter digestbin)}; + pack 'NC2a*', @{$self}{qw(serial scheme algorithm digestbin)}; } @@ -42,7 +42,7 @@ my $self = shift; my @digest = split /(\S{64})/, $self->digest || qq(""); - my @rdata = ( @{$self}{qw(serial digtype parameter)}, @digest ); + my @rdata = ( @{$self}{qw(serial scheme algorithm)}, @digest ); } @@ -50,8 +50,8 @@ my $self = shift; $self->serial(shift); - $self->digtype(shift); - $self->parameter(shift); + $self->scheme(shift); + $self->algorithm(shift); $self->digest(@_); } @@ -59,7 +59,7 @@ sub _defaults { ## specify RR attribute default values my $self = shift; - $self->_parse_rdata( 0, 1, 0, '' ); + $self->_parse_rdata( 0, 1, 1, '' ); } @@ -71,19 +71,19 @@ } -sub digtype { +sub scheme { my $self = shift; - $self->{digtype} = 0 + shift if scalar @_; - $self->{digtype} || 0; + $self->{scheme} = 0 + shift if scalar @_; + $self->{scheme} || 0; } -sub parameter { +sub algorithm { my $self = shift; - $self->{parameter} = 0 + shift if scalar @_; - $self->{parameter} || 0; + $self->{algorithm} = 0 + shift if scalar @_; + $self->{algorithm} || 0; } @@ -109,7 +109,7 @@ =head1 SYNOPSIS use Net::DNS; - $rr = new Net::DNS::RR("zone. ZONEMD 2018121500 1 0 + $rr = new Net::DNS::RR("example.com. ZONEMD 2018031500 1 1 FEBE3D4CE2EC2FFA4BA99D46CD69D6D29711E55217057BEE 7EB1A7B641A47BA7FED2DD5B97AE499FAFA4F22C6BD647DE"); @@ -134,19 +134,22 @@ Unsigned 32-bit integer zone serial number. -=head2 digtype +=head2 scheme - $digtype = $rr->digtype; - $rr->digtype( $digtype ); + $scheme = $rr->scheme; + $rr->scheme( $scheme ); -8-bit integer digest type field. +The scheme field is an 8-bit unsigned integer that identifies the +methods by which data is collated and presented as input to the +hashing function. -=head2 parameter +=head2 algorithm - $parameter = $rr->parameter; - $rr->parameter( $parameter ); + $algorithm = $rr->algorithm; + $rr->algorithm( $algorithm ); -Digest algorithm parameter field. +The algorithm field is an 8-bit unsigned integer that identifies +the cryptographic hash algorithm used to construct the digest. =head2 digest diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/Resolver/Base.pm new/Net-DNS-1.23/lib/Net/DNS/Resolver/Base.pm --- old/Net-DNS-1.22/lib/Net/DNS/Resolver/Base.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/Resolver/Base.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::Resolver::Base; # -# $Id: Base.pm 1762 2020-02-02 21:39:02Z willem $ +# $Id: Base.pm 1771 2020-02-25 14:23:23Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1762 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1771 $)[1]; # @@ -430,11 +430,12 @@ my $timeout = $self->{tcp_timeout}; foreach my $ip (@ns) { - my $socket = $self->_create_tcp_socket($ip) || next; - my $select = IO::Select->new($socket); - $self->_diag( 'tcp send', "[$ip]" ); + my $socket = $self->_create_tcp_socket($ip); + $self->errorstring($!); + my $select = IO::Select->new( $socket || next ); + $socket->send($tcp_packet); $self->errorstring($!); @@ -565,10 +566,12 @@ my $tcp_packet = pack 'n a*', length($packet_data), $packet_data; foreach my $ip ( $self->nameservers ) { - my $socket = $self->_create_tcp_socket($ip) || next; - $self->_diag( 'bgsend', "[$ip]" ); + my $socket = $self->_create_tcp_socket($ip); + $self->errorstring($!); + next unless $socket; + $socket->blocking(0); $socket->send($tcp_packet); $self->errorstring($!); @@ -756,15 +759,16 @@ my $content = $request->data; my $TCP_msg = pack 'n a*', length($content), $content; - $self->_diag("axfr_start( $dname @class )"); + $self->_diag("axfr( $dname @class )"); my ( $select, $reply, $rcode ); foreach my $ns ( $self->nameservers ) { - my $socket = $self->_create_tcp_socket($ns) || next; + $self->_diag("axfr send [$ns]"); - $self->_diag("axfr_start nameserver [$ns]"); + my $socket = $self->_create_tcp_socket($ns); + $self->errorstring($!); + $select = IO::Select->new( $socket || next ); - $select = IO::Select->new($socket); $socket->send($TCP_msg); $self->errorstring($!); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS/Update.pm new/Net-DNS-1.23/lib/Net/DNS/Update.pm --- old/Net-DNS-1.22/lib/Net/DNS/Update.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS/Update.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,9 +1,9 @@ package Net::DNS::Update; # -# $Id: Update.pm 1726 2018-12-15 12:59:56Z willem $ +# $Id: Update.pm 1774 2020-03-18 07:49:22Z willem $ # -our $VERSION = (qw$LastChangedRevision: 1726 $)[1]; +our $VERSION = (qw$LastChangedRevision: 1774 $)[1]; =head1 NAME @@ -237,10 +237,9 @@ =head2 Another way to sign a DNS update - my $key_name = 'tsig-key'; - my $key = 'awwLOtRfpGE+rRKF2+DEiw=='; + use Net::DNS::RR::TSIG; - my $tsig = new Net::DNS::RR("$key_name TSIG $key"); + my $tsig = create Net::DNS::RR::TSIG( $key_file ); $tsig->fudge(60); my $update = new Net::DNS::Update('example.com'); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/lib/Net/DNS.pm new/Net-DNS-1.23/lib/Net/DNS.pm --- old/Net-DNS-1.22/lib/Net/DNS.pm 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/lib/Net/DNS.pm 2020-03-18 15:45:20.000000000 +0100 @@ -1,13 +1,13 @@ package Net::DNS; # -# $Id: DNS.pm 1770 2020-02-13 10:42:04Z willem $ +# $Id: DNS.pm 1776 2020-03-18 14:39:38Z willem $ # require 5.006; our $VERSION; -$VERSION = '1.22'; +$VERSION = '1.23'; $VERSION = eval $VERSION; -our $SVNVERSION = (qw$LastChangedRevision: 1770 $)[1]; +our $SVNVERSION = (qw$LastChangedRevision: 1776 $)[1]; =head1 NAME diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/t/04-packet-truncate.t new/Net-DNS-1.23/t/04-packet-truncate.t --- old/Net-DNS-1.22/t/04-packet-truncate.t 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/t/04-packet-truncate.t 2020-03-18 15:45:20.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: 04-packet-truncate.t 1449 2016-02-01 12:27:12Z willem $ -*-perl-*- +# $Id: 04-packet-truncate.t 1774 2020-03-18 07:49:22Z willem $ -*-perl-*- use strict; use Test::More tests => 33; @@ -54,7 +54,9 @@ $packet->push( authority => @rr ); $packet->push( additional => @rr ); - my $tsig = eval { $packet->sign_tsig( 'tsig.example', 'ARDJZgtuTDzAWeSGYPAu9uJUkX0=' ) }; + my $keyrr = new Net::DNS::RR('tsig.example KEY 512 3 157 ARDJZgtuTDzAWeSGYPAu9uJUkX0='); + + my $tsig = eval { $packet->sign_tsig($keyrr) }; my $unlimited = length $packet->data; my %before = map { ( $_, scalar $packet->$_ ) } qw(answer authority additional); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/t/05-ZONEMD.t new/Net-DNS-1.23/t/05-ZONEMD.t --- old/Net-DNS-1.22/t/05-ZONEMD.t 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/t/05-ZONEMD.t 2020-03-18 15:45:19.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: 05-ZONEMD.t 1761 2020-01-01 11:58:34Z willem $ -*-perl-*- +# $Id: 05-ZONEMD.t 1771 2020-02-25 14:23:23Z willem $ -*-perl-*- use strict; use Test::More tests => 20; @@ -8,11 +8,11 @@ my $name = 'ZONEMD.example'; my $type = 'ZONEMD'; my $code = 63; -my @attr = qw( serial digtype parameter digest); -my @data = ( 12345, 1, 2, '2bb183af5f22588179a53b0a98631fad1a292118' ); +my @attr = qw( serial scheme algorithm digest); +my @data = ( 12345, 1, 1, '2bb183af5f22588179a53b0a98631fad1a292118' ); my @also = qw( digestbin ); -my $wire = join '', qw( 00003039 01 02 2BB183AF5F22588179A53B0A98631FAD1A292118 ); +my $wire = join '', qw( 00003039 01 01 2BB183AF5F22588179A53B0A98631FAD1A292118 ); { @@ -63,7 +63,7 @@ { - my $rr = new Net::DNS::RR( type => $type, digtype => 1 ); + my $rr = new Net::DNS::RR( type => $type, scheme => 1 ); ok( $rr->string, 'string method with default values' ); is( $rr->string, Net::DNS::RR->new( $rr->string )->string, 'parse $rr->string' ); $rr->digestbin(''); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/t/08-IPv4.t new/Net-DNS-1.23/t/08-IPv4.t --- old/Net-DNS-1.22/t/08-IPv4.t 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/t/08-IPv4.t 2020-03-18 15:45:19.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: 08-IPv4.t 1761 2020-01-01 11:58:34Z willem $ -*-perl-*- +# $Id: 08-IPv4.t 1774 2020-03-18 07:49:22Z willem $ -*-perl-*- use strict; use Test::More; @@ -205,10 +205,19 @@ } -SKIP: { +my $tsig_key = eval { my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); $resolver->domain('net-dns.org'); - eval { $resolver->tsig( $resolver->query(qw(tsig-md5 KEY))->answer ) }; + my @answer = $resolver->query(qw(tsig-md5 KEY))->answer; + shift @answer; +}; + +my $bad_key = new Net::DNS::RR('MD5.example KEY 512 3 157 MD5keyMD5keyMD5keyMD5keyMD5='); + + +SKIP: { + my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); + eval { $resolver->tsig($tsig_key) }; skip( 'automatic TSIG tests', 3 ) if $@; $resolver->igntc(1); @@ -235,7 +244,7 @@ my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); $resolver->igntc(1); - eval { $resolver->tsig( 'MD5.example', 'MD5keyMD5keyMD5keyMD5keyMD5=' ) }; + eval { $resolver->tsig($bad_key) }; skip( 'failed TSIG tests', 3 ) if $@; my $udp = $resolver->send(qw(net-dns.org SOA IN)); @@ -336,7 +345,7 @@ SKIP: { my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); $resolver->domain('net-dns.org'); - eval { $resolver->tsig( $resolver->query(qw(tsig-md5 KEY))->answer ) }; + eval { $resolver->tsig($tsig_key) }; skip( 'TSIG AXFR tests', 4 ) if $@; $resolver->tcp_timeout(10); @@ -347,7 +356,8 @@ my $notauth = $resolver->errorstring; ok( !scalar(@notauth), "mismatched zone\t[$notauth]" ); - eval { $resolver->tsig( 'MD5.example', 'MD5keyMD5keyMD5keyMD5keyMD5=' ) }; + eval { $resolver->tsig($bad_key) }; + skip( 'failed AXFR tests', 3 ) if $@; my @unverifiable = $resolver->axfr(); my $errorstring = $resolver->errorstring; ok( !scalar(@unverifiable), "mismatched key\t[$errorstring]" ); @@ -360,8 +370,8 @@ SKIP: { my $resolver = Net::DNS::Resolver->new( nameservers => $NOIP ); - eval { $resolver->tsig( 'MD5.example', 'MD5keyMD5keyMD5keyMD5keyMD5=' ) }; - skip( 'TSIG AXFR tests', 2 ) if $@; + eval { $resolver->tsig($tsig_key) }; + skip( 'TSIG bgsend tests', 2 ) if $@; my $query = new Net::DNS::Packet(qw(. SOA IN)); ok( $resolver->bgsend($query), '$resolver->bgsend() + automatic TSIG' ); @@ -379,7 +389,7 @@ { ## exercise exceptions in _axfr_next() my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); $resolver->domain('net-dns.org'); - eval { $resolver->tsig( $resolver->query(qw(tsig-md5 KEY))->answer ) }; + eval { $resolver->tsig($tsig_key) }; $resolver->tcp_timeout(10); { @@ -452,9 +462,8 @@ my $socket = $resolver->_bgsend_tcp( $packet, $packet->data ); while ( $resolver->bgbusy($socket) ) { sleep 1 } - my $discard = ''; - $socket->recv( $discard, 1 ) if $socket; # discard first octet - $socket->blocking(0); + my $discarded = ''; ## [size][id][status][qd count]... + $socket->recv( $discarded, 7 ) if $socket; ok( !$resolver->_bgread($socket), '_read_tcp() incomplete data' ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/t/08-IPv6.t new/Net-DNS-1.23/t/08-IPv6.t --- old/Net-DNS-1.22/t/08-IPv6.t 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/t/08-IPv6.t 2020-03-18 15:45:19.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: 08-IPv6.t 1761 2020-01-01 11:58:34Z willem $ -*-perl-*- +# $Id: 08-IPv6.t 1774 2020-03-18 07:49:22Z willem $ -*-perl-*- use strict; use Test::More; @@ -208,10 +208,19 @@ } -SKIP: { +my $tsig_key = eval { my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); $resolver->domain('net-dns.org'); - eval { $resolver->tsig( $resolver->query(qw(tsig-md5 KEY))->answer ) }; + my @answer = $resolver->query(qw(tsig-md5 KEY))->answer; + shift @answer; +}; + +my $bad_key = new Net::DNS::RR('MD5.example KEY 512 3 157 MD5keyMD5keyMD5keyMD5keyMD5='); + + +SKIP: { + my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); + eval { $resolver->tsig($tsig_key) }; skip( 'automatic TSIG tests', 3 ) if $@; $resolver->igntc(1); @@ -238,7 +247,7 @@ my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); $resolver->igntc(1); - eval { $resolver->tsig( 'MD5.example', 'MD5keyMD5keyMD5keyMD5keyMD5=' ) }; + eval { $resolver->tsig($bad_key) }; skip( 'failed TSIG tests', 3 ) if $@; my $udp = $resolver->send(qw(net-dns.org SOA IN)); @@ -339,7 +348,7 @@ SKIP: { my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); $resolver->domain('net-dns.org'); - eval { $resolver->tsig( $resolver->query(qw(tsig-md5 KEY))->answer ) }; + eval { $resolver->tsig($tsig_key) }; skip( 'TSIG AXFR tests', 4 ) if $@; $resolver->tcp_timeout(10); @@ -350,7 +359,8 @@ my $notauth = $resolver->errorstring; ok( !scalar(@notauth), "mismatched zone\t[$notauth]" ); - eval { $resolver->tsig( 'MD5.example', 'MD5keyMD5keyMD5keyMD5keyMD5=' ) }; + eval { $resolver->tsig($bad_key) }; + skip( 'failed AXFR tests', 3 ) if $@; my @unverifiable = $resolver->axfr(); my $errorstring = $resolver->errorstring; ok( !scalar(@unverifiable), "mismatched key\t[$errorstring]" ); @@ -363,8 +373,8 @@ SKIP: { my $resolver = Net::DNS::Resolver->new( nameservers => $NOIP ); - eval { $resolver->tsig( 'MD5.example', 'MD5keyMD5keyMD5keyMD5keyMD5=' ) }; - skip( 'TSIG AXFR tests', 2 ) if $@; + eval { $resolver->tsig($tsig_key) }; + skip( 'TSIG bgsend tests', 2 ) if $@; my $query = new Net::DNS::Packet(qw(. SOA IN)); ok( $resolver->bgsend($query), '$resolver->bgsend() + automatic TSIG' ); @@ -382,7 +392,7 @@ { ## exercise exceptions in _axfr_next() my $resolver = Net::DNS::Resolver->new( nameservers => $IP ); $resolver->domain('net-dns.org'); - eval { $resolver->tsig( $resolver->query(qw(tsig-md5 KEY))->answer ) }; + eval { $resolver->tsig($tsig_key) }; $resolver->tcp_timeout(10); { @@ -455,9 +465,8 @@ my $socket = $resolver->_bgsend_tcp( $packet, $packet->data ); while ( $resolver->bgbusy($socket) ) { sleep 1 } - my $discard = ''; - $socket->recv( $discard, 1 ) if $socket; # discard first octet - $socket->blocking(0); + my $discarded = ''; ## [size][id][status][qd count]... + $socket->recv( $discarded, 7 ) if $socket; ok( !$resolver->_bgread($socket), '_read_tcp() incomplete data' ); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Net-DNS-1.22/t/71-TSIG-create.t new/Net-DNS-1.23/t/71-TSIG-create.t --- old/Net-DNS-1.22/t/71-TSIG-create.t 2020-02-13 11:42:25.000000000 +0100 +++ new/Net-DNS-1.23/t/71-TSIG-create.t 2020-03-18 15:45:20.000000000 +0100 @@ -1,4 +1,4 @@ -# $Id: 71-TSIG-create.t 1748 2019-07-15 07:57:00Z willem $ -*-perl-*- +# $Id: 71-TSIG-create.t 1774 2020-03-18 07:49:22Z willem $ -*-perl-*- use strict; use Test::More; @@ -52,12 +52,6 @@ } -{ - my $tsig = create $class( $keyrr->owner, $keyrr->key ); - is( ref($tsig), $class, 'create TSIG from argument list' ); -} - - my $publickey = 'Khmac-sha1.example.+161+39562.key'; END { unlink($publickey) if defined $publickey; } @@ -151,5 +145,14 @@ } +{ + my @warning; + local $SIG{__WARN__} = sub { @warning = @_ }; + create $class( $keyrr->owner, $keyrr->key ); + my ($warning) = split /\n/, "@warning\n"; + ok( $warning, "2-argument create:\t[$warning]" ); +} + + __END__
