diff options
author | Steve Hay <steve.m.hay@googlemail.com> | 2018-07-03 08:40:09 +0100 |
---|---|---|
committer | Steve Hay <steve.m.hay@googlemail.com> | 2018-07-03 17:26:21 +0100 |
commit | 78ce14b42853c46407abbca9a5916d9b8697be27 (patch) | |
tree | 13407f76f567a245f92eea4420f30b11cf9152f1 /cpan/Digest-SHA | |
parent | 9003d70e62d94b53f19b26abf091589602b284e9 (diff) | |
download | perl-78ce14b42853c46407abbca9a5916d9b8697be27.tar.gz |
Upgrade Digest::SHA from version 6.01 to 6.02
Diffstat (limited to 'cpan/Digest-SHA')
-rw-r--r-- | cpan/Digest-SHA/SHA.xs | 14 | ||||
-rw-r--r-- | cpan/Digest-SHA/lib/Digest/SHA.pm | 12 | ||||
-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 |
7 files changed, 31 insertions, 29 deletions
diff --git a/cpan/Digest-SHA/SHA.xs b/cpan/Digest-SHA/SHA.xs index 62eaad8d53..d3a3baf186 100644 --- a/cpan/Digest-SHA/SHA.xs +++ b/cpan/Digest-SHA/SHA.xs @@ -111,7 +111,7 @@ DESTROY(s) SHA * s CODE: Safefree(s); - + SV * sha1(...) ALIAS: @@ -152,7 +152,7 @@ CODE: data += MAX_WRITE_SIZE; len -= MAX_WRITE_SIZE; } - shawrite(data, len << 3, &sha); + shawrite(data, (ULNG) len << 3, &sha); } shafinish(&sha); len = 0; @@ -203,7 +203,7 @@ CODE: if (items > 0) { key = (UCHR *) (SvPVbyte(ST(items-1), len)); } - if (hmacinit(&hmac, ix2alg[ix], key, len) == NULL) + if (hmacinit(&hmac, ix2alg[ix], key, (UINT) len) == NULL) XSRETURN_UNDEF; for (i = 0; i < items - 1; i++) { data = (UCHR *) (SvPVbyte(ST(i), len)); @@ -212,7 +212,7 @@ CODE: data += MAX_WRITE_SIZE; len -= MAX_WRITE_SIZE; } - hmacwrite(data, len << 3, &hmac); + hmacwrite(data, (ULNG) len << 3, &hmac); } hmacfinish(&hmac); len = 0; @@ -261,7 +261,7 @@ PPCODE: data += MAX_WRITE_SIZE; len -= MAX_WRITE_SIZE; } - shawrite(data, len << 3, state); + shawrite(data, (ULNG) len << 3, state); } XSRETURN(1); @@ -356,7 +356,7 @@ PREINIT: PPCODE: if (!f || (state = getSHA(aTHX_ self)) == NULL) XSRETURN_UNDEF; - while ((n = PerlIO_read(f, in, sizeof(in))) > 0) + while ((n = (int) PerlIO_read(f, in, sizeof(in))) > 0) shawrite(in, (ULNG) n << 3, state); XSRETURN(1); @@ -374,7 +374,7 @@ PREINIT: PPCODE: if (!f || (state = getSHA(aTHX_ self)) == NULL) XSRETURN_UNDEF; - while ((n = PerlIO_read(f, in+1, IO_BUFFER_SIZE)) > 0) { + while ((n = (int) PerlIO_read(f, in+1, IO_BUFFER_SIZE)) > 0) { for (dst = in, src = in + 1; n; n--) { c = *src++; if (!cr) { diff --git a/cpan/Digest-SHA/lib/Digest/SHA.pm b/cpan/Digest-SHA/lib/Digest/SHA.pm index 2e86d4eea1..dccc0e7aeb 100644 --- a/cpan/Digest-SHA/lib/Digest/SHA.pm +++ b/cpan/Digest-SHA/lib/Digest/SHA.pm @@ -5,10 +5,10 @@ require 5.003000; use strict; use warnings; use vars qw($VERSION @ISA @EXPORT_OK $errmsg); -use Fcntl qw(O_RDONLY); +use Fcntl qw(O_RDONLY O_RDWR); use integer; -$VERSION = '6.01'; +$VERSION = '6.02'; require Exporter; @ISA = qw(Exporter); @@ -115,11 +115,13 @@ sub addfile { map { $_ eq $mode } ("b", "U", "0"); ## Always interpret "-" to mean STDIN; otherwise use - ## sysopen to handle full range of POSIX file names + ## sysopen to handle full range of POSIX file names. + ## If $file is a directory, force an EISDIR error + ## by attempting to open with mode O_RDWR local *FH; $file eq '-' and open(FH, '< -') - or sysopen(FH, $file, O_RDONLY) + or sysopen(FH, $file, -d $file ? O_RDWR : O_RDONLY) or _bail('Open failed'); if ($BITS) { @@ -808,7 +810,7 @@ darkness and moored it in so perfect a calm and in so brilliant a light" =head1 COPYRIGHT AND LICENSE -Copyright (C) 2003-2017 Mark Shelor +Copyright (C) 2003-2018 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 f8bc02098d..46a71627e7 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-2017 Mark Shelor, All Rights Reserved + ## Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved ## - ## Version: 6.01 - ## Mon Dec 25 00:08:08 MST 2017 + ## Version: 6.02 + ## Fri Apr 20 16:25:30 MST 2018 ## 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-2017 Mark Shelor <mshelor@cpan.org>. +Copyright (C) 2003-2018 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.01"; +my $VERSION = "6.02"; sub usage { my($err, $msg) = @_; diff --git a/cpan/Digest-SHA/src/sha.c b/cpan/Digest-SHA/src/sha.c index 79557fff8f..bc337eb38c 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-2017 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved * - * Version: 6.01 - * Mon Dec 25 00:08:08 MST 2017 + * Version: 6.02 + * Fri Apr 20 16:25:30 MST 2018 * */ diff --git a/cpan/Digest-SHA/src/sha.h b/cpan/Digest-SHA/src/sha.h index 91f181b0be..f6599281de 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-2017 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved * - * Version: 6.01 - * Mon Dec 25 00:08:08 MST 2017 + * Version: 6.02 + * Fri Apr 20 16:25:30 MST 2018 * */ diff --git a/cpan/Digest-SHA/src/sha64bit.c b/cpan/Digest-SHA/src/sha64bit.c index 4d6e9dd404..146fb4c35f 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-2017 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved * - * Version: 6.01 - * Mon Dec 25 00:08:08 MST 2017 + * Version: 6.02 + * Fri Apr 20 16:25:30 MST 2018 * */ diff --git a/cpan/Digest-SHA/src/sha64bit.h b/cpan/Digest-SHA/src/sha64bit.h index 2b8dc55a9b..8517993f99 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-2017 Mark Shelor, All Rights Reserved + * Copyright (C) 2003-2018 Mark Shelor, All Rights Reserved * - * Version: 6.01 - * Mon Dec 25 00:08:08 MST 2017 + * Version: 6.02 + * Fri Apr 20 16:25:30 MST 2018 * * The following macros supply placeholder values that enable the * sha.c module to successfully compile when 64-bit integer types |