summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgregor herrmann <gregoa@debian.org>2020-07-04 14:24:22 +0200
committergregor herrmann <gregoa@debian.org>2020-07-04 14:24:22 +0200
commit3d37880259a1826fe94ae8fc19c59f627a9eabfd (patch)
tree2374f33cf517245c83bb92f26eefe56e8a00bd09
parent11b1e4ca92c681a8e6a5bd1a8d2662d4c3c11df6 (diff)
New upstream version 1.17
-rw-r--r--Changes7
-rw-r--r--META.json2
-rw-r--r--META.yml2
-rw-r--r--Makefile.PL9
-rw-r--r--lib/Net/DNS/SEC.pm6
-rw-r--r--lib/Net/DNS/SEC/Private.pm19
-rw-r--r--t/00-install.t39
7 files changed, 49 insertions, 35 deletions
diff --git a/Changes b/Changes
index f5dbc77..d87b5de 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,11 @@
Revision history for Perl extension Net::DNS::SEC.
+**** 1.17 Jun 26, 2020
+
+ Recognise BIND private key accessed via symbolic link.
+
+
**** 1.16 May 11, 2020
Improve testing of verify() functions.
@@ -638,4 +643,4 @@ Net::DNS. The history of those is documented below.
---------------------------------------------------------------------------
-$Id: Changes 1780 2020-05-11 09:19:56Z willem $
+$Id: Changes 1792 2020-06-26 14:43:25Z willem $
diff --git a/META.json b/META.json
index 28ebd8f..859028d 100644
--- a/META.json
+++ b/META.json
@@ -48,6 +48,6 @@
}
},
"release_status" : "stable",
- "version" : "1.16",
+ "version" : "1.17",
"x_serialization_backend" : "JSON::PP version 4.04"
}
diff --git a/META.yml b/META.yml
index a42bccd..4a47b10 100644
--- a/META.yml
+++ b/META.yml
@@ -30,5 +30,5 @@ requires:
Net::DNS: '1.08'
Test::More: '0.47'
perl: '5.006'
-version: '1.16'
+version: '1.17'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
diff --git a/Makefile.PL b/Makefile.PL
index 429f0fb..26720bf 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -1,5 +1,5 @@
#
-# $Id: Makefile.PL 1777 2020-05-07 08:24:01Z willem $ -*-perl-*-
+# $Id: Makefile.PL 1787 2020-06-18 07:39:28Z willem $ -*-perl-*-
#
use strict;
@@ -90,7 +90,7 @@ sub dist {
return join '', shift->SUPER::dist(), <<'END';
# $(PERM_RWX) raises security issues downstream
-PREOP = $(NOECHO) $(CHMOD) $(PERM_RW) demo$(DFSEP)*
+PREOP = $(CHMOD) $(PERM_RW) $(DISTVNAME)$(DFSEP)demo$(DFSEP)*
END
}
@@ -163,15 +163,16 @@ test_cover :
cover -summary
PlanB
my $ldflags = "-fprofile-arcs -ftest-coverage";
- my $ccflags = "-O0 -DNO_ECCGOST $ldflags";
+ my $ccflags = "-O0 $ldflags";
return <<"PlanA";
test_cover :
cover -delete
+ \$(NOECHO) \$(TOUCH) SEC.c # recompile XS component
HARNESS_PERL_SWITCHES=-MDevel::Cover \$(MAKE) -W SEC.xs test CCFLAGS="$ccflags" OTHERLDFLAGS="$ldflags"
gcov SEC.xs
gcov2perl SEC.xs.gcov
cover -summary
- \$(NOECHO) \$(TOUCH) SEC.c # force partial rebuild before install
+ \$(NOECHO) \$(TOUCH) SEC.c # force XS rebuild before install
PlanA
}
diff --git a/lib/Net/DNS/SEC.pm b/lib/Net/DNS/SEC.pm
index 81e5201..1119228 100644
--- a/lib/Net/DNS/SEC.pm
+++ b/lib/Net/DNS/SEC.pm
@@ -1,11 +1,11 @@
package Net::DNS::SEC;
#
-# $Id: SEC.pm 1780 2020-05-11 09:19:56Z willem $
+# $Id: SEC.pm 1792 2020-06-26 14:43:25Z willem $
#
our $VERSION;
-$VERSION = '1.16';
-our $SVNVERSION = (qw$LastChangedRevision: 1780 $)[1];
+$VERSION = '1.17';
+our $SVNVERSION = (qw$LastChangedRevision: 1792 $)[1];
our $XS_VERSION = $VERSION;
$VERSION = eval $VERSION;
diff --git a/lib/Net/DNS/SEC/Private.pm b/lib/Net/DNS/SEC/Private.pm
index 5236552..9d46af7 100644
--- a/lib/Net/DNS/SEC/Private.pm
+++ b/lib/Net/DNS/SEC/Private.pm
@@ -1,9 +1,9 @@
package Net::DNS::SEC::Private;
#
-# $Id: Private.pm 1705 2018-08-23 10:24:02Z willem $
+# $Id: Private.pm 1786 2020-06-15 15:05:47Z willem $
#
-our $VERSION = (qw$LastChangedRevision: 1705 $)[1];
+our $VERSION = (qw$LastChangedRevision: 1786 $)[1];
=head1 NAME
@@ -41,22 +41,23 @@ use warnings;
use File::Spec;
use IO::File;
+use constant SYMLINK => defined(&CORE::readlink); # Except Win32, VMS, RISC OS
+
sub new { scalar(@_) > 2 ? &_new_params : &_new_keyfile }
sub _new_keyfile {
my ( $class, $file ) = @_;
- my ( $vol, $dir, $keyname ) = File::Spec->splitpath($file);
+ my ($keypath) = SYMLINK ? grep( $_, readlink($file), $file ) : $file;
+ my ( $vol, $dir, $name ) = File::Spec->splitpath($keypath);
- # Format something like: /Kbla.foo.+001+12345.private'
- # as created by BIND keygen.
- # We determine the algorithm from the filename.
- die "$keyname does not appear to be a BIND private key"
- unless $keyname =~ /^K(.*\.)\+(\d+)\+(\d+)\.private$/;
+ # Format something like: 'Kbla.foo.+001+12345.private' as created by BIND dnssec-keygen.
+ die "$file does not appear to be a BIND private key"
+ unless $name =~ /^K([^+]+)\+(\d+)\+(\d+)\.private$/;
my @identifier = ( signame => $1, algorithm => 0 + $2, keytag => 0 + $3 );
- my $handle = new IO::File($file) or die qq(open: "$file" $!);
+ my $handle = new IO::File( $file, '<' ) or die qq(open: "$file" $!);
my @content;
local $_;
diff --git a/t/00-install.t b/t/00-install.t
index c161f7f..bf7df55 100644
--- a/t/00-install.t
+++ b/t/00-install.t
@@ -1,4 +1,4 @@
-# $Id: 00-install.t 1701 2018-07-28 07:36:34Z willem $ -*-perl-*-
+# $Id: 00-install.t 1786 2020-06-15 15:05:47Z willem $ -*-perl-*-
use strict;
use Test::More;
@@ -7,17 +7,11 @@ use File::Find;
use ExtUtils::MakeMaker;
-my @files;
-my $blib = File::Spec->catfile(qw(blib lib));
-
-find( sub { push( @files, $File::Find::name ) if /\.pm$/ }, $blib );
-
my %manifest;
-open MANIFEST, 'MANIFEST' or plan skip_all => "MANIFEST: $!";
+open( MANIFEST, 'MANIFEST' ) or BAIL_OUT("MANIFEST: $!");
while (<MANIFEST>) {
- chomp;
- my ( $volume, $directory, $name ) = File::Spec->splitpath($_);
- $manifest{lc $name}++ if $name;
+ my ($filename) = split;
+ $manifest{$filename}++;
}
close MANIFEST;
@@ -25,13 +19,26 @@ plan skip_all => 'No versions from git checkouts' if -e '.git';
plan skip_all => 'Not sure how to parse versions.' unless eval { MM->can('parse_version') };
-plan tests => scalar @files;
+plan tests => scalar keys %manifest;
+
+
+foreach ( sort keys %manifest ) { # reconcile files with MANIFEST
+ next unless ok( -f $_, "file exists\t$_" );
+ next unless /\.pm$/;
+ next unless /^lib/;
+
+ my $module = File::Spec->catfile( 'blib', $_ ); # library component
+ diag("Missing module: $module") unless -f $module;
+
+ my $version = MM->parse_version($_); # module version
+ diag("\$VERSION = $version\t$_") unless $version =~ /^\d/;
+}
+
-foreach my $file ( sort @files ) { # reconcile files with MANIFEST
- my $version = MM->parse_version($file);
- ok( $version =~ /[\d.]{3}/, "file version: $version\t$file" );
- my ( $volume, $directory, $name ) = File::Spec->splitpath($file);
- diag("File not in MANIFEST: $file") unless $manifest{lc $name};
+my @files; # flag MANIFEST omissions
+find( sub { push( @files, $File::Find::name ) if /\.pm$/ }, 'lib' );
+foreach ( sort @files ) {
+ diag("Filename not in MANIFEST: $_") unless $manifest{$_};
}