summaryrefslogtreecommitdiff
path: root/cpan/Digest-SHA
diff options
context:
space:
mode:
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-12-14 18:56:42 +0000
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>2010-12-14 18:57:20 +0000
commit9cc8ef8a050499e8a7c407263539c9b21d850880 (patch)
treedc47b392458530d56d2740e5f399fbf1febc2e23 /cpan/Digest-SHA
parent6c2a892eeccd45d5cba4b4150f993b2f177c3e6a (diff)
downloadperl-9cc8ef8a050499e8a7c407263539c9b21d850880.tar.gz
Update Digest-SHA to CPAN version 5.50
[DELTA] 5.50 Tue Dec 14 06:20:08 MST 2010 - adopted convention that '-' always means STDIN -- actual filename '-' accessed as './-' -- accords with behavior of sha1sum/md5sum - corrected undefined subroutine oversight in shasum -- inadvertent migration of _bail() from SHA.pm
Diffstat (limited to 'cpan/Digest-SHA')
-rw-r--r--cpan/Digest-SHA/Changes7
-rw-r--r--cpan/Digest-SHA/README2
-rw-r--r--cpan/Digest-SHA/lib/Digest/SHA.pm18
-rw-r--r--cpan/Digest-SHA/shasum16
-rw-r--r--cpan/Digest-SHA/src/hmac.c4
-rw-r--r--cpan/Digest-SHA/src/hmac.h4
-rw-r--r--cpan/Digest-SHA/src/sha.c4
-rw-r--r--cpan/Digest-SHA/src/sha.h4
8 files changed, 31 insertions, 28 deletions
diff --git a/cpan/Digest-SHA/Changes b/cpan/Digest-SHA/Changes
index a919f7c93c..2377e28c2e 100644
--- a/cpan/Digest-SHA/Changes
+++ b/cpan/Digest-SHA/Changes
@@ -1,5 +1,12 @@
Revision history for Perl extension Digest::SHA.
+5.50 Tue Dec 14 06:20:08 MST 2010
+ - adopted convention that '-' always means STDIN
+ -- actual filename '-' accessed as './-'
+ -- accords with behavior of sha1sum/md5sum
+ - corrected undefined subroutine oversight in shasum
+ -- inadvertent migration of _bail() from SHA.pm
+
5.49 Sun Dec 12 07:22:04 MST 2010
- modified Addfile to accept all POSIX filenames
-- standard allows all characters except NUL and '/'
diff --git a/cpan/Digest-SHA/README b/cpan/Digest-SHA/README
index df428724b7..7551e32516 100644
--- a/cpan/Digest-SHA/README
+++ b/cpan/Digest-SHA/README
@@ -1,4 +1,4 @@
-Digest::SHA version 5.49
+Digest::SHA version 5.50
========================
Digest::SHA is a complete implementation of the NIST Secure Hash
diff --git a/cpan/Digest-SHA/lib/Digest/SHA.pm b/cpan/Digest-SHA/lib/Digest/SHA.pm
index 01a6313e47..798ef34b85 100644
--- a/cpan/Digest-SHA/lib/Digest/SHA.pm
+++ b/cpan/Digest-SHA/lib/Digest/SHA.pm
@@ -7,7 +7,7 @@ use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
use Fcntl;
use integer;
-$VERSION = '5.49';
+$VERSION = '5.50';
require Exporter;
require DynaLoader;
@@ -114,14 +114,12 @@ sub Addfile {
my ($binary, $portable) = map { $_ eq $mode } ("b", "p");
my $text = -T $file;
- ## Use sysopen to accommodate full range of POSIX
- ## file names; fall back to open for magic (-)
+ ## Always interpret "-" to mean STDIN; otherwise use
+ ## sysopen to handle full range of POSIX file names
local *FH;
- unless (sysopen(FH, $file, O_RDONLY)) {
- unless ($file eq '-' && open(FH, '<&STDIN')) {
- _bail("Open failed");
- }
- }
+ $file eq '-' and open(FH, '< -')
+ or sysopen(FH, $file, O_RDONLY)
+ or _bail('Open failed');
binmode(FH) if $binary || $portable;
unless ($portable && $text) {
@@ -140,8 +138,8 @@ sub Addfile {
last unless $n2;
$buf1 .= $buf2;
}
- $buf1 =~ s/\015?\015\012/\012/g; # DOS/Windows
- $buf1 =~ s/\015/\012/g; # early MacOS
+ $buf1 =~ s/\015?\015\012/\012/g; # DOS/Windows
+ $buf1 =~ s/\015/\012/g; # early MacOS
$self->add($buf1);
}
_bail("Read failed") unless defined $n1;
diff --git a/cpan/Digest-SHA/shasum b/cpan/Digest-SHA/shasum
index c024ff214c..13d4ca3f01 100644
--- a/cpan/Digest-SHA/shasum
+++ b/cpan/Digest-SHA/shasum
@@ -4,8 +4,8 @@
##
## Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
##
- ## Version: 5.49
- ## Sun Dec 12 07:22:04 MST 2010
+ ## Version: 5.50
+ ## Tue Dec 14 06:20:08 MST 2010
=head1 NAME
@@ -74,7 +74,7 @@ use strict;
use FileHandle;
use Getopt::Long;
-my $VERSION = "5.49";
+my $VERSION = "5.50";
## Try to use Digest::SHA, since it's faster. If not installed,
@@ -237,12 +237,10 @@ sub verify {
my ($bslash, $sum, $fname, $rsp, $digest);
local *FH;
- unless (sysopen(FH, $checkfile, O_RDONLY)) {
- unless ($checkfile eq '-' && open(FH, '<&STDIN')) {
- _bail("Open failed");
- }
- $checkfile = 'standard input';
- }
+ $checkfile eq '-' and open(FH, '< -')
+ and $checkfile = 'standard input'
+ or sysopen(FH, $checkfile, O_RDONLY)
+ or die "shasum: $checkfile: $!\n";
while (<FH>) {
next if /^#/; s/\n$//; s/^[ \t]+//; $num_lines++;
$bslash = s/^\\//;
diff --git a/cpan/Digest-SHA/src/hmac.c b/cpan/Digest-SHA/src/hmac.c
index c57dcb5a99..bd92cfb26c 100644
--- a/cpan/Digest-SHA/src/hmac.c
+++ b/cpan/Digest-SHA/src/hmac.c
@@ -5,8 +5,8 @@
*
* Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
*
- * Version: 5.49
- * Sun Dec 12 07:22:04 MST 2010
+ * Version: 5.50
+ * Tue Dec 14 06:20:08 MST 2010
*
*/
diff --git a/cpan/Digest-SHA/src/hmac.h b/cpan/Digest-SHA/src/hmac.h
index 44fa9ddef2..ec466f9824 100644
--- a/cpan/Digest-SHA/src/hmac.h
+++ b/cpan/Digest-SHA/src/hmac.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
*
- * Version: 5.49
- * Sun Dec 12 07:22:04 MST 2010
+ * Version: 5.50
+ * Tue Dec 14 06:20:08 MST 2010
*
*/
diff --git a/cpan/Digest-SHA/src/sha.c b/cpan/Digest-SHA/src/sha.c
index a556b054f8..af6e389450 100644
--- a/cpan/Digest-SHA/src/sha.c
+++ b/cpan/Digest-SHA/src/sha.c
@@ -5,8 +5,8 @@
*
* Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
*
- * Version: 5.49
- * Sun Dec 12 07:22:04 MST 2010
+ * Version: 5.50
+ * Tue Dec 14 06:20:08 MST 2010
*
*/
diff --git a/cpan/Digest-SHA/src/sha.h b/cpan/Digest-SHA/src/sha.h
index 9f07bc970b..20298134b7 100644
--- a/cpan/Digest-SHA/src/sha.h
+++ b/cpan/Digest-SHA/src/sha.h
@@ -5,8 +5,8 @@
*
* Copyright (C) 2003-2010 Mark Shelor, All Rights Reserved
*
- * Version: 5.49
- * Sun Dec 12 07:22:04 MST 2010
+ * Version: 5.50
+ * Tue Dec 14 06:20:08 MST 2010
*
*/