diff options
author | Mark Shelor <mshelor@cpan.org> | 2022-08-10 13:43:02 +0000 |
---|---|---|
committer | James E Keenan <jkeenan@cpan.org> | 2022-08-10 13:43:02 +0000 |
commit | 3fd12c9d6f086a9b0c50794a78d1c078fcb5498d (patch) | |
tree | 3e545af8913043d57ef86af590a1340470b29aec /cpan/Digest-SHA | |
parent | ea9a38e2d3f82f51bc1f6e2fec85911572064a81 (diff) | |
download | perl-3fd12c9d6f086a9b0c50794a78d1c078fcb5498d.tar.gz |
Digest-SHA: Sync with CPAN version 6.03
From Changes:
6.03 - corrected addfile to report error when stdin is a directory
-- ref. rt.cpan.org #143899
-- thanks to Gregor Herrmann for pointing this out
6.02 - silenced compiler warnings from VS2017
-- ref. rt.cpan.org #124477
-- thanks to Sergey Aleynikov for diagnostics
- modified addfile to return error when given a directory name
-- makes behavior consistent with GNU coreutils shaXsum
-- thanks to Scott Baker for pointing this out
Committer: Add new upstream maintainer to AUTHORS
Diffstat (limited to 'cpan/Digest-SHA')
-rw-r--r-- | cpan/Digest-SHA/lib/Digest/SHA.pm | 18 | ||||
-rw-r--r-- | cpan/Digest-SHA/shasum | 10 | ||||
-rw-r--r-- | cpan/Digest-SHA/src/sha.c | 6 | ||||
-rw-r--r-- | cpan/Digest-SHA/src/sha.h | 6 | ||||
-rw-r--r-- | cpan/Digest-SHA/src/sha64bit.c | 6 | ||||
-rw-r--r-- | cpan/Digest-SHA/src/sha64bit.h | 6 |
6 files changed, 31 insertions, 21 deletions
diff --git a/cpan/Digest-SHA/lib/Digest/SHA.pm b/cpan/Digest-SHA/lib/Digest/SHA.pm index dccc0e7aeb..6bb0f42853 100644 --- a/cpan/Digest-SHA/lib/Digest/SHA.pm +++ b/cpan/Digest-SHA/lib/Digest/SHA.pm @@ -6,9 +6,10 @@ use strict; use warnings; use vars qw($VERSION @ISA @EXPORT_OK $errmsg); use Fcntl qw(O_RDONLY O_RDWR); +use Cwd qw(getcwd); use integer; -$VERSION = '6.02'; +$VERSION = '6.03'; require Exporter; @ISA = qw(Exporter); @@ -120,9 +121,18 @@ sub addfile { ## by attempting to open with mode O_RDWR local *FH; - $file eq '-' and open(FH, '< -') - or sysopen(FH, $file, -d $file ? O_RDWR : O_RDONLY) + if ($file eq '-') { + if (-d STDIN) { + sysopen(FH, getcwd(), O_RDWR) + or _bail('Open failed'); + } + open(FH, '< -') + or _bail('Open failed'); + } + else { + sysopen(FH, $file, -d $file ? O_RDWR : O_RDONLY) or _bail('Open failed'); + } if ($BITS) { my ($n, $buf) = (0, ""); @@ -810,7 +820,7 @@ darkness and moored it in so perfect a calm and in so brilliant a light" =head1 COPYRIGHT AND LICENSE -Copyright (C) 2003-2018 Mark Shelor +Copyright (C) 2003-2022 Mark Shelor This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. diff --git a/cpan/Digest-SHA/shasum b/cpan/Digest-SHA/shasum index 46a71627e7..afb6c4e2b6 100644 --- a/cpan/Digest-SHA/shasum +++ b/cpan/Digest-SHA/shasum @@ -2,10 +2,10 @@ ## shasum: filter for computing SHA digests (ref. sha1sum/md5sum) ## - ## Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + ## Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved ## - ## Version: 6.02 - ## Fri Apr 20 16:25:30 MST 2018 + ## Version: 6.03 + ## Mon 08 Aug 2022 11:30:32 AM MST ## shasum SYNOPSIS adapted from GNU Coreutils sha1sum. Add ## "-a" option for algorithm selection, @@ -97,7 +97,7 @@ the 7-bit message I<0001100>: =head1 AUTHOR -Copyright (C) 2003-2018 Mark Shelor <mshelor@cpan.org>. +Copyright (C) 2003-2022 Mark Shelor <mshelor@cpan.org>. =head1 SEE ALSO @@ -107,7 +107,7 @@ I<shasum> is implemented using the Perl module L<Digest::SHA>. END_OF_POD -my $VERSION = "6.02"; +my $VERSION = "6.03"; sub usage { my($err, $msg) = @_; diff --git a/cpan/Digest-SHA/src/sha.c b/cpan/Digest-SHA/src/sha.c index bc337eb38c..235154c507 100644 --- a/cpan/Digest-SHA/src/sha.c +++ b/cpan/Digest-SHA/src/sha.c @@ -3,10 +3,10 @@ * * Ref: NIST FIPS PUB 180-4 Secure Hash Standard * - * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved * - * Version: 6.02 - * Fri Apr 20 16:25:30 MST 2018 + * Version: 6.03 + * Mon 08 Aug 2022 11:30:32 AM MST * */ diff --git a/cpan/Digest-SHA/src/sha.h b/cpan/Digest-SHA/src/sha.h index f6599281de..d3b7926461 100644 --- a/cpan/Digest-SHA/src/sha.h +++ b/cpan/Digest-SHA/src/sha.h @@ -3,10 +3,10 @@ * * Ref: NIST FIPS PUB 180-4 Secure Hash Standard * - * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved * - * Version: 6.02 - * Fri Apr 20 16:25:30 MST 2018 + * Version: 6.03 + * Mon 08 Aug 2022 11:30:32 AM MST * */ diff --git a/cpan/Digest-SHA/src/sha64bit.c b/cpan/Digest-SHA/src/sha64bit.c index 146fb4c35f..02ee1818a4 100644 --- a/cpan/Digest-SHA/src/sha64bit.c +++ b/cpan/Digest-SHA/src/sha64bit.c @@ -3,10 +3,10 @@ * * Ref: NIST FIPS PUB 180-4 Secure Hash Standard * - * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved * - * Version: 6.02 - * Fri Apr 20 16:25:30 MST 2018 + * Version: 6.03 + * Mon 08 Aug 2022 11:30:32 AM MST * */ diff --git a/cpan/Digest-SHA/src/sha64bit.h b/cpan/Digest-SHA/src/sha64bit.h index 8517993f99..0697fa8a33 100644 --- a/cpan/Digest-SHA/src/sha64bit.h +++ b/cpan/Digest-SHA/src/sha64bit.h @@ -3,10 +3,10 @@ * * Ref: NIST FIPS PUB 180-4 Secure Hash Standard * - * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2022 Mark Shelor, All Rights Reserved * - * Version: 6.02 - * Fri Apr 20 16:25:30 MST 2018 + * Version: 6.03 + * Mon 08 Aug 2022 11:30:32 AM MST * * The following macros supply placeholder values that enable the * sha.c module to successfully compile when 64-bit integer types |