- update Digest::SHA (fixes 489221)

This commit is contained in:
Štěpán Kasal 2009-03-23 16:43:17 +00:00
parent dc84d7748e
commit 735f4ad6be
2 changed files with 257 additions and 2 deletions

View File

@ -0,0 +1,248 @@
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
*
*/

View File

@ -7,7 +7,7 @@
Name: perl
Version: %{perl_version}
Release: 62%{?dist}
Release: 63%{?dist}
Epoch: %{perl_epoch}
Summary: Practical Extraction and Report Language
Group: Development/Languages
@ -214,6 +214,8 @@ Patch115: perl-update-Test-Simple.patch
%define Test_Simple_version 0.86
Patch116: perl-update-Time-HiRes.patch
%define Time_HiRes_version 1.9719
Patch117: perl-update-Digest-SHA.patch
%define Digest_SHA_version 5.47
# Fedora uses links instead of lynx
# patches File-Fetch and CPAN
@ -451,7 +453,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
# Epoch bump for clean upgrade over old standalone package
Epoch: 1
Version: 5.45
Version: %{Digest_SHA_version}
Requires: perl = %{perl_epoch}:%{perl_version}-%{release}
%description Digest-SHA
@ -985,6 +987,7 @@ upstream tarball from perl.org.
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch201 -p1
#
@ -1244,6 +1247,7 @@ perl -x patchlevel.h \
'Fedora Patch114: Update Test::Harness to %{Test_Harness_version}' \
'Fedora Patch115: Update Test::Simple to %{Test_Simple_version}' \
'Fedora Patch116: Update Time::HiRes to %{Time_HiRes_version}' \
'Fedora Patch117: Update Digest::SHA to %{Digest_SHA_version}' \
'Fedora Patch201: Fedora uses links instead of lynx' \
%{nil}
@ -1866,6 +1870,9 @@ TMPDIR="$PWD/tmp" make test
# Old changelog entries are preserved in CVS.
%changelog
* Mon Mar 23 2009 Stepan Kasal <skasal@redhat.com> - 4:5.10.0-63
- update Digest::SHA (fixes 489221)
* Wed Mar 11 2009 Tom "spot" Callaway <tcallawa@redhat.com> - 4:5.10.0-62
- drop 26_fix_pod2man_upgrade (don't need it)
- fix typo in %%define ExtUtils_CBuilder_version