From: Rafael Garcia-Suarez Date: Wed, 16 Apr 2008 14:01:46 +0000 (+0000) Subject: Upgrade to Digest::SHA 5.46 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0bc2b4f8b4d096f81c3ea8afe00e879537239c24;p=p5sagit%2Fp5-mst-13.2.git Upgrade to Digest::SHA 5.46 (but keep core-compliant test preambles) p4raw-id: //depot/perl@33699 --- diff --git a/ext/Digest/SHA/Changes b/ext/Digest/SHA/Changes index dff2302..a183e9f 100644 --- a/ext/Digest/SHA/Changes +++ b/ext/Digest/SHA/Changes @@ -1,5 +1,12 @@ Revision history for Perl extension Digest::SHA. +5.46 Wed Apr 9 05:04:00 MST 2008 + - modified Addfile to recognize leading and trailing + whitespace in filenames (ref. rt.cpan.org #34690) + - minor C source code modification (ref. hmac.c) + - use const in sha.c for clean builds with -Wwrite-strings + -- thanks to Robin Barker for patch + 5.45 Tue Jun 26 02:36:00 MST 2007 - extended portability to earlier Perls -- works on Perl 5.003 and later diff --git a/ext/Digest/SHA/README b/ext/Digest/SHA/README index 862228b..847a9dd 100644 --- a/ext/Digest/SHA/README +++ b/ext/Digest/SHA/README @@ -1,4 +1,4 @@ -Digest::SHA version 5.45 +Digest::SHA version 5.46 ======================== Digest::SHA is a complete implementation of the NIST Secure Hash @@ -34,7 +34,7 @@ DEPENDENCIES COPYRIGHT AND LICENSE -Copyright (C) 2003-2007 Mark Shelor +Copyright (C) 2003-2008 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/ext/Digest/SHA/SHA.pm b/ext/Digest/SHA/SHA.pm index 7df8b0b..eeb9fcb 100644 --- a/ext/Digest/SHA/SHA.pm +++ b/ext/Digest/SHA/SHA.pm @@ -6,7 +6,7 @@ use strict; use integer; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); -$VERSION = '5.45'; +$VERSION = '5.46'; require Exporter; require DynaLoader; @@ -114,7 +114,10 @@ sub Addfile { my $text = -T $file; local *FH; - open(FH, "<$file") or _bail("Open failed"); + # protect any leading or trailing whitespace in $file; + # otherwise, 2-arg "open" will ignore them + $file =~ s#^(\s)#./$1#; + open(FH, "< $file\0") or _bail("Open failed"); binmode(FH) if $binary || $portable; unless ($portable && $text) { @@ -655,7 +658,7 @@ for their valuable comments and suggestions. =head1 COPYRIGHT AND LICENSE -Copyright (C) 2003-2007 Mark Shelor +Copyright (C) 2003-2008 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/ext/Digest/SHA/bin/shasum b/ext/Digest/SHA/bin/shasum index f81b856..bdf93d8 100755 --- a/ext/Digest/SHA/bin/shasum +++ b/ext/Digest/SHA/bin/shasum @@ -2,10 +2,10 @@ # shasum: filter for computing SHA digests (analogous to sha1sum) # - # Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved + # Copyright (C) 2003-2008 Mark Shelor, All Rights Reserved # - # Version: 5.45 - # Tue Jun 26 02:36:00 MST 2007 + # Version: 5.46 + # Wed Apr 9 05:04:00 MST 2008 =head1 NAME @@ -61,7 +61,7 @@ you can install this script as a convenient drop-in replacement. =head1 AUTHOR -Copyright (c) 2003-2007 Mark Shelor . +Copyright (c) 2003-2008 Mark Shelor . =head1 SEE ALSO @@ -74,7 +74,7 @@ use strict; use FileHandle; use Getopt::Long; -my $VERSION = "5.45"; +my $VERSION = "5.46"; # Try to use Digest::SHA, since it's faster. If not installed, diff --git a/ext/Digest/SHA/src/hmac.c b/ext/Digest/SHA/src/hmac.c index 9ecfc38..9c108f9 100644 --- a/ext/Digest/SHA/src/hmac.c +++ b/ext/Digest/SHA/src/hmac.c @@ -5,8 +5,8 @@ * * Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved * - * Version: 5.45 - * Tue Jun 26 02:36:00 MST 2007 + * Version: 5.46 + * Wed Apr 9 05:04:00 MST 2008 * */ @@ -94,8 +94,8 @@ char *hmacbase64(HMAC *h) /* hmacclose: de-allocates digest object */ int hmacclose(HMAC *h) { - shaclose(h->osha); if (h != NULL) { + shaclose(h->osha); memset(h, 0, sizeof(HMAC)); SHA_free(h); } diff --git a/ext/Digest/SHA/src/hmac.h b/ext/Digest/SHA/src/hmac.h index 88b2af0..b2ea575 100644 --- a/ext/Digest/SHA/src/hmac.h +++ b/ext/Digest/SHA/src/hmac.h @@ -5,8 +5,8 @@ * * Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved * - * Version: 5.45 - * Tue Jun 26 02:36:00 MST 2007 + * Version: 5.46 + * Wed Apr 9 05:04:00 MST 2008 * */ diff --git a/ext/Digest/SHA/src/sha.c b/ext/Digest/SHA/src/sha.c index d996323..b97fa07 100644 --- a/ext/Digest/SHA/src/sha.c +++ b/ext/Digest/SHA/src/sha.c @@ -5,8 +5,8 @@ * * Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved * - * Version: 5.45 - * Tue Jun 26 02:36:00 MST 2007 + * Version: 5.46 + * Wed Apr 9 05:04:00 MST 2008 * */ @@ -560,7 +560,7 @@ static char *getval(char *line, char **pprest) /* ldvals: checks next line in dump file against tag, and loads values */ static int ldvals( SHA_FILE *f, - char *tag, + const char *tag, int type, void *pval, int reps, diff --git a/ext/Digest/SHA/src/sha.h b/ext/Digest/SHA/src/sha.h index ca04350..547347b 100644 --- a/ext/Digest/SHA/src/sha.h +++ b/ext/Digest/SHA/src/sha.h @@ -5,8 +5,8 @@ * * Copyright (C) 2003-2007 Mark Shelor, All Rights Reserved * - * Version: 5.45 - * Tue Jun 26 02:36:00 MST 2007 + * Version: 5.46 + * Wed Apr 9 05:04:00 MST 2008 * */