perl/perl-update-Digest-SHA.patch
2009-03-23 16:43:17 +00:00

249 lines
7.8 KiB
Diff

Digest-SHA-5.47
- minus the move of SHA.pm from topdir to lib/Digest
(and the induced changes to *.t files and Makefile.PL
diff -urN perl-5.10.0.orig/ext/Digest/SHA/Changes perl-5.10.0/ext/Digest/SHA/Changes
--- perl-5.10.0.orig/ext/Digest/SHA/Changes 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/Changes 2009-03-23 16:33:05.000000000 +0100
@@ -1,5 +1,21 @@
Revision history for Perl extension Digest::SHA.
+5.47 Wed Apr 30 04:00:54 MST 2008
+ - modified Makefile.PL to install in core for Perls >= 5.10
+ -- thanks to Jerry Hedden for patch
+ - changed from #include <> to #include "" in SHA.xs
+ -- some platforms not able to find SHA source files
+ -- thanks to Alexandr Ciornii for testing
+ - moved .pm file to appropriate lib directory
+ - minor addition to META.yml
+
+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 -urN perl-5.10.0.orig/ext/Digest/SHA/README perl-5.10.0/ext/Digest/SHA/README
--- perl-5.10.0.orig/ext/Digest/SHA/README 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/README 2009-03-23 16:33:05.000000000 +0100
@@ -1,4 +1,4 @@
-Digest::SHA version 5.45
+Digest::SHA version 5.47
========================
Digest::SHA is a complete implementation of the NIST Secure Hash
@@ -34,7 +34,7 @@
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 -urN perl-5.10.0.orig/ext/Digest/SHA/SHA.pm perl-5.10.0/ext/Digest/SHA/SHA.pm
--- perl-5.10.0.orig/ext/Digest/SHA/SHA.pm 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/SHA.pm 2009-03-23 16:33:05.000000000 +0100
@@ -6,7 +6,7 @@
use integer;
use vars qw($VERSION @ISA @EXPORT @EXPORT_OK);
-$VERSION = '5.45';
+$VERSION = '5.47';
require Exporter;
require DynaLoader;
@@ -114,7 +114,10 @@
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) {
@@ -496,9 +499,9 @@
The "p" mode is handy since it ensures that the digest value of
I<$filename> will be the same when computed on different operating
-systems. It accomplishes this by internally translating all newlines
-in text files to UNIX format before calculating the digest; on the other
-hand, binary files are read in raw mode with no translation whatsoever.
+systems. It accomplishes this by internally translating all newlines in
+text files to UNIX format before calculating the digest. Binary files
+are read in raw mode with no translation whatsoever.
For a fuller discussion of newline formats, refer to CPAN module
L<File::LocalizeNewlines>. Its "universal line separator" regex forms
@@ -637,6 +640,7 @@
Gisle Aas
Chris Carey
+ Alexandr Ciornii
Jim Doble
Julius Duque
Jeffrey Friedl
@@ -655,7 +659,7 @@
=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 -urN perl-5.10.0.orig/ext/Digest/SHA/SHA.xs perl-5.10.0/ext/Digest/SHA/SHA.xs
--- perl-5.10.0.orig/ext/Digest/SHA/SHA.xs 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/SHA.xs 2009-03-23 16:33:05.000000000 +0100
@@ -2,8 +2,8 @@
#include "perl.h"
#include "XSUB.h"
-#include <src/sha.c>
-#include <src/hmac.c>
+#include "src/sha.c"
+#include "src/hmac.c"
static int ix2alg[] =
{1,1,1,224,224,224,256,256,256,384,384,384,512,512,512};
@@ -12,8 +12,8 @@
PROTOTYPES: ENABLE
-#include <src/sha.h>
-#include <src/hmac.h>
+#include "src/sha.h"
+#include "src/hmac.h"
#ifndef INT2PTR
#define INT2PTR(p, i) (p) (i)
diff -urN perl-5.10.0.orig/ext/Digest/SHA/bin/shasum perl-5.10.0/ext/Digest/SHA/bin/shasum
--- perl-5.10.0.orig/ext/Digest/SHA/bin/shasum 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/bin/shasum 2009-03-23 16:33:05.000000000 +0100
@@ -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.47
+ # Wed Apr 30 04:00:54 MST 2008
=head1 NAME
@@ -61,7 +61,7 @@
=head1 AUTHOR
-Copyright (c) 2003-2007 Mark Shelor <mshelor@cpan.org>.
+Copyright (c) 2003-2008 Mark Shelor <mshelor@cpan.org>.
=head1 SEE ALSO
@@ -74,7 +74,7 @@
use FileHandle;
use Getopt::Long;
-my $VERSION = "5.45";
+my $VERSION = "5.47";
# Try to use Digest::SHA, since it's faster. If not installed,
diff -urN perl-5.10.0.orig/ext/Digest/SHA/src/hmac.c perl-5.10.0/ext/Digest/SHA/src/hmac.c
--- perl-5.10.0.orig/ext/Digest/SHA/src/hmac.c 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/src/hmac.c 2009-03-23 16:33:05.000000000 +0100
@@ -3,10 +3,10 @@
*
* Ref: FIPS PUB 198 The Keyed-Hash Message Authentication Code
*
- * 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.47
+ * Wed Apr 30 04:00:54 MST 2008
*
*/
@@ -94,8 +94,8 @@
/* 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 -urN perl-5.10.0.orig/ext/Digest/SHA/src/hmac.h perl-5.10.0/ext/Digest/SHA/src/hmac.h
--- perl-5.10.0.orig/ext/Digest/SHA/src/hmac.h 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/src/hmac.h 2009-03-23 16:33:05.000000000 +0100
@@ -3,10 +3,10 @@
*
* Ref: FIPS PUB 198 The Keyed-Hash Message Authentication Code
*
- * 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.47
+ * Wed Apr 30 04:00:54 MST 2008
*
*/
diff -urN perl-5.10.0.orig/ext/Digest/SHA/src/sha.c perl-5.10.0/ext/Digest/SHA/src/sha.c
--- perl-5.10.0.orig/ext/Digest/SHA/src/sha.c 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/src/sha.c 2009-03-23 16:33:05.000000000 +0100
@@ -3,10 +3,10 @@
*
* Ref: NIST FIPS PUB 180-2 Secure Hash Standard
*
- * 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.47
+ * Wed Apr 30 04:00:54 MST 2008
*
*/
@@ -560,7 +560,7 @@
/* 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 -urN perl-5.10.0.orig/ext/Digest/SHA/src/sha.h perl-5.10.0/ext/Digest/SHA/src/sha.h
--- perl-5.10.0.orig/ext/Digest/SHA/src/sha.h 2007-12-18 11:47:07.000000000 +0100
+++ perl-5.10.0/ext/Digest/SHA/src/sha.h 2009-03-23 16:33:05.000000000 +0100
@@ -3,10 +3,10 @@
*
* Ref: NIST FIPS PUB 180-2 Secure Hash Standard
*
- * 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.47
+ * Wed Apr 30 04:00:54 MST 2008
*
*/