r1579 - in packages/libdigest-sha-perl/branches/upstream/current: . src t

Gunnar Wolf gwolf at costa.debian.org
Mon Dec 5 19:00:45 UTC 2005


Author: gwolf
Date: 2005-12-05 19:00:44 +0000 (Mon, 05 Dec 2005)
New Revision: 1579

Modified:
   packages/libdigest-sha-perl/branches/upstream/current/Changes
   packages/libdigest-sha-perl/branches/upstream/current/META.yml
   packages/libdigest-sha-perl/branches/upstream/current/README
   packages/libdigest-sha-perl/branches/upstream/current/SHA.pm
   packages/libdigest-sha-perl/branches/upstream/current/SIGNATURE
   packages/libdigest-sha-perl/branches/upstream/current/shasum
   packages/libdigest-sha-perl/branches/upstream/current/src/hmac.c
   packages/libdigest-sha-perl/branches/upstream/current/src/hmac.h
   packages/libdigest-sha-perl/branches/upstream/current/src/sha.c
   packages/libdigest-sha-perl/branches/upstream/current/src/sha.h
   packages/libdigest-sha-perl/branches/upstream/current/t/0-pod-coverage.t
   packages/libdigest-sha-perl/branches/upstream/current/t/0-pod.t
Log:
Load /tmp/tmp.6aiME0/libdigest-sha-perl-5.32 into
packages/libdigest-sha-perl/branches/upstream/current.


Modified: packages/libdigest-sha-perl/branches/upstream/current/Changes
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/Changes	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/Changes	2005-12-05 19:00:44 UTC (rev 1579)
@@ -1,5 +1,13 @@
 Revision history for Perl extension Digest::SHA.
 
+5.32  Fri Dec  2 02:32:20 MST 2005
+	- added POD section to shasum script
+		-- thanks to Gunnar Wolf for patch
+	- made minor code changes to silence compiler warnings
+		-- resulting from signed/unsigned integer mixing
+	- inserted code in test scripts for POD checking
+		-- to recover gracefully if Test::More isn't installed
+
 5.31  Mon Sep  5 00:52:42 MST 2005
 	- added standard tests for pod and pod-coverage checking
 	- inserted subtest to check for failure when using

Modified: packages/libdigest-sha-perl/branches/upstream/current/META.yml
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/META.yml	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/META.yml	2005-12-05 19:00:44 UTC (rev 1579)
@@ -1,6 +1,6 @@
 --- #YAML:1.0
 name: Digest-SHA
-version: 5.31
+version: 5.32
 author:
   - Mark Shelor, mshelor at cpan.org
 abstract: Perl extension for SHA-1/224/256/384/512
@@ -12,5 +12,5 @@
 provides:
   Digest::SHA:
     file: SHA.pm
-    version: 5.31
+    version: 5.32
 generated_by: Module::Build version 0.22

Modified: packages/libdigest-sha-perl/branches/upstream/current/README
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/README	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/README	2005-12-05 19:00:44 UTC (rev 1579)
@@ -1,4 +1,4 @@
-Digest::SHA version 5.31
+Digest::SHA version 5.32
 ========================
 
 Digest::SHA is a complete implementation of the NIST Secure Hash

Modified: packages/libdigest-sha-perl/branches/upstream/current/SHA.pm
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/SHA.pm	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/SHA.pm	2005-12-05 19:00:44 UTC (rev 1579)
@@ -4,7 +4,7 @@
 use warnings;
 use integer;
 
-our $VERSION = '5.31';
+our $VERSION = '5.32';
 
 require Exporter;
 our @ISA = qw(Exporter);
@@ -543,6 +543,7 @@
 	Alex Muntada
 	Chris Skiscim
 	Martin Thurn
+	Gunnar Wolf
 	Adam Woodbury
 
 for their valuable comments and suggestions.

Modified: packages/libdigest-sha-perl/branches/upstream/current/SIGNATURE
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/SIGNATURE	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/SIGNATURE	2005-12-05 19:00:44 UTC (rev 1579)
@@ -14,25 +14,25 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 226f2775375a3481d1fc34c176b7b10876b43230 Changes
+SHA1 234d6e683cd04f64881c8bfb94bc8de9ab9669ea Changes
 SHA1 952a17b73eeb605287d1aa08d2e8bf4837106b43 MANIFEST
-SHA1 0a2a774c849ac1df06df6c9fc9f32c437032368e META.yml
+SHA1 a69adf3bb5d885f99e4a8f07dd4724decc842355 META.yml
 SHA1 9903634fd8ce5d1ed2fbece7be5ed0cd5d98f158 Makefile.PL
-SHA1 cf127ddcb3023c8f357eea4a377644d36dd2505f README
-SHA1 736019bcd8cc385ffb6d922c37b91a0b17bd1c26 SHA.pm
+SHA1 94739b3bc13e08c7205ef528b693aeac7b1e7035 README
+SHA1 c924486cc12ab9861a1614b165a7fbb47a8acf2b SHA.pm
 SHA1 51d3d1db41241cdf960bb3d5c81efa9eac13b197 SHA.xs
 SHA1 0389154c992f23bfc99b36f187500c4d2e47ac95 ppport.h
-SHA1 d8faf01f83da1fedb6659364fd470adc98f65c10 shasum
-SHA1 c42f2e8f2357ece6882bbe276cb60e397f7151da src/hmac.c
-SHA1 915f3f64518c40a61b4d3ef15f8b93120110aa26 src/hmac.h
+SHA1 4fa482ab1615e7668067755241cf76e93cf78d38 shasum
+SHA1 256bc66f0b6a725a8944517997e6aba03dfcc7a4 src/hmac.c
+SHA1 4142a51a034944b856542995323469c43736b0a9 src/hmac.h
 SHA1 7589c6ce33e74a58ded932d69756659e91723fdb src/hmacxtra.c
-SHA1 42138d24d6db3e6797503a27c93b4ea0120c0c8d src/sha.c
-SHA1 a026c7288fd89b4ef17c37252289082c708dfcdc src/sha.h
+SHA1 95a0da170e7333dea20a83a7004b6b4624f45cc9 src/sha.c
+SHA1 115932cd051663d7cad78bc95627acdb58819ef1 src/sha.h
 SHA1 c1bba35de65c8d81362472b76075dba8cf1e542b src/sha64bit.c
 SHA1 48d806b05a15dfd8211d5f7158b3294d86fa24d2 src/sha64bit.h
 SHA1 329ac17325437c725331fbf84ae0c9484f50041a src/shaxtra.c
-SHA1 40cbf841dee0e93f741ab63e32c9fe5a7177edbd t/0-pod-coverage.t
-SHA1 e9c6a5881fc60173fbc8d479c1afd2ce3b43bef1 t/0-pod.t
+SHA1 fa6461bfc23f1392721d265196b58f607b68fc4f t/0-pod-coverage.t
+SHA1 308ce1bdbb89141d83ffc0470c7f9207286c5be4 t/0-pod.t
 SHA1 9d80d4157cbf2791d830c26e1757cbfb1fda717d t/1-exist.t
 SHA1 89d62a1c05ad0d2721d85d921490b181031ad2f8 t/1-hello-world.t
 SHA1 73700867f0df504d7f4545cd674c6f9bb64e4d1b t/2-nist-sha-1.t
@@ -71,7 +71,7 @@
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1.4.0 (Darwin)
 
-iD8DBQFDG/mEBwNg/wr1Y/4RAlDyAKDe/1HH7Ve16rGkvaLDZCtPlY4iUwCgon76
-x3mClMHPFnCVwnSTFShiPMk=
-=xtkD
+iD8DBQFDkBVdBwNg/wr1Y/4RAlzFAKCazz/1OH93iWzjOHDMHz4A6CNoNwCfVrG/
+Oz3pPPBhIBKQhZehPM6ZxBw=
+=99iU
 -----END PGP SIGNATURE-----

Modified: packages/libdigest-sha-perl/branches/upstream/current/shasum
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/shasum	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/shasum	2005-12-05 19:00:44 UTC (rev 1579)
@@ -4,14 +4,53 @@
 	#
 	# Copyright (C) 2003-2005 Mark Shelor, All Rights Reserved
 	#
-	# Version: 5.31
-	# Mon Sep  5 00:52:42 MST 2005
+	# Version: 5.32
+	# Fri Dec  2 02:32:20 MST 2005
 
+=head1 NAME
 
+shasum - Print or Check SHA Checksums
+
+=head1 SYNOPSIS
+
+ Usage: shasum [OPTION] [FILE]...
+    or: shasum [OPTION] --check [FILE]
+ Print or check SHA checksums.
+ With no FILE, or when FILE is -, read standard input.
+
+  -a, --algorithm    1 (default), 224, 256, 384, 512
+  -b, --binary       read files in binary mode (default on DOS/Windows)
+  -c, --check        check SHA sums against given list
+  -t, --text         read files in text mode (default)
+
+ The following two options are useful only when verifying checksums:
+
+      --status       don't output anything, status code shows success
+  -w, --warn         warn about improperly formatted SHA checksum lines
+
+      --help         display this help and exit
+      --version      output version information and exit
+
+The sums are computed as described in FIPS PUB 180-2.  When checking,
+the input should be a former output of this program.  The default
+mode is to print a line with checksum, a character indicating type
+(`*' for binary, ` ' for text), and name for each FILE.
+
+=head1 AUTHOR
+
+Copyright (c) 2003-2005 Mark Shelor <mshelor at cpan.org>.
+
+=head1 SEE ALSO
+
+Shasum is implemented using the Perl module L<Digest::SHA> or
+L<Digest::SHA::PurePerl>.
+
+=cut
+
 use strict;
 use Getopt::Long;
 
-my $VERSION = "5.31";
+my $VERSION = "5.32";
 
 
 	# Try to use Digest::SHA, since it's faster.  If not installed,
@@ -42,17 +81,17 @@
 Print or check SHA checksums.
 With no FILE, or when FILE is -, read standard input.
 
-  -a, --algorithm         1 (default), 224, 256, 384, 512
-  -b, --binary            read files in binary mode (default on DOS/Windows)
-  -c, --check             check SHA sums against given list
-  -t, --text              read files in text mode (default)
+  -a, --algorithm    1 (default), 224, 256, 384, 512
+  -b, --binary       read files in binary mode (default on DOS/Windows)
+  -c, --check        check SHA sums against given list
+  -t, --text         read files in text mode (default)
 
 The following two options are useful only when verifying checksums:
-      --status            don't output anything, status code shows success
-  -w, --warn              warn about improperly formatted MD5 checksum lines
+      --status       don't output anything, status code shows success
+  -w, --warn         warn about improperly formatted SHA checksum lines
 
-      --help              display this help and exit
-      --version           output version information and exit
+      --help         display this help and exit
+      --version      output version information and exit
 
 The sums are computed as described in FIPS PUB 180-2.  When checking,
 the input should be a former output of this program.  The default


Property changes on: packages/libdigest-sha-perl/branches/upstream/current/shasum
___________________________________________________________________
Name: svn:executable
   - 
   + *

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/hmac.c
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/hmac.c	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/hmac.c	2005-12-05 19:00:44 UTC (rev 1579)
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2005 Mark Shelor, All Rights Reserved
  *
- * Version: 5.31
- * Mon Sep  5 00:52:42 MST 2005
+ * Version: 5.32
+ * Fri Dec  2 02:32:20 MST 2005
  *
  */
 
@@ -22,7 +22,7 @@
 unsigned char *key;
 unsigned int keylen;
 {
-	int i;
+	unsigned int i;
 	HMAC *h;
 
 	SHA_newz(0, h, 1, HMAC);

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/hmac.h
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/hmac.h	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/hmac.h	2005-12-05 19:00:44 UTC (rev 1579)
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2005 Mark Shelor, All Rights Reserved
  *
- * Version: 5.31
- * Mon Sep  5 00:52:42 MST 2005
+ * Version: 5.32
+ * Fri Dec  2 02:32:20 MST 2005
  *
  */
 

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/sha.c
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/sha.c	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/sha.c	2005-12-05 19:00:44 UTC (rev 1579)
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2005 Mark Shelor, All Rights Reserved
  *
- * Version: 5.31
- * Mon Sep  5 00:52:42 MST 2005
+ * Version: 5.32
+ * Fri Dec  2 02:32:20 MST 2005
  *
  */
 
@@ -385,7 +385,7 @@
 ULNG bitcnt;
 SHA *s;
 {
-	if (bitcnt == 0)
+	if (bitcnt < 1)
 		return(0);
 	if (SHA_LO32(s->lenll += bitcnt) < bitcnt)
 		if (SHA_LO32(++s->lenlh) == 0)
@@ -410,19 +410,19 @@
 	llpos  = s->blocksize == SHA1_BLOCK_BITS ?  60 : 124;
 	SETBIT(s->block, s->blockcnt), s->blockcnt++;
 	while (s->blockcnt > lenpos)
-		if (s->blockcnt == s->blocksize)
+		if (s->blockcnt < s->blocksize)
+			CLRBIT(s->block, s->blockcnt), s->blockcnt++;
+		else
 			s->sha(s, s->block), s->blockcnt = 0;
-		else
-			CLRBIT(s->block, s->blockcnt), s->blockcnt++;
 	while (s->blockcnt < lenpos)
 		CLRBIT(s->block, s->blockcnt), s->blockcnt++;
-	if (s->blocksize != SHA1_BLOCK_BITS) {
+	if (s->blocksize > SHA1_BLOCK_BITS) {
 		w32mem(s->block + 112, s->lenhh);
 		w32mem(s->block + 116, s->lenhl);
 	}
 	w32mem(s->block + lhpos, s->lenlh);
 	w32mem(s->block + llpos, s->lenll);
-	s->sha(s, s->block), s->blockcnt = 0;
+	s->sha(s, s->block);
 }
 
 /* shadigest: returns pointer to current digest (binary) */
@@ -517,7 +517,7 @@
 char *file;
 SHA *s;
 {
-	int i, j;
+	unsigned int i, j;
 	SHA_FILE *f;
 	UCHR *p = shadigest(s);
 

Modified: packages/libdigest-sha-perl/branches/upstream/current/src/sha.h
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/src/sha.h	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/src/sha.h	2005-12-05 19:00:44 UTC (rev 1579)
@@ -5,8 +5,8 @@
  *
  * Copyright (C) 2003-2005 Mark Shelor, All Rights Reserved
  *
- * Version: 5.31
- * Mon Sep  5 00:52:42 MST 2005
+ * Version: 5.32
+ * Fri Dec  2 02:32:20 MST 2005
  *
  */
 

Modified: packages/libdigest-sha-perl/branches/upstream/current/t/0-pod-coverage.t
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/t/0-pod-coverage.t	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/t/0-pod-coverage.t	2005-12-05 19:00:44 UTC (rev 1579)
@@ -1,4 +1,11 @@
-use Test::More;
+BEGIN {
+	eval "use Test::More";
+	if ($@) {
+		print "1..0 # Skipped: Test::More not installed\n";
+		exit;
+	}
+}
+
 eval "use Test::Pod::Coverage 0.08";
 plan skip_all => "Test::Pod::Coverage 0.08 required for testing POD coverage" if $@;
 

Modified: packages/libdigest-sha-perl/branches/upstream/current/t/0-pod.t
===================================================================
--- packages/libdigest-sha-perl/branches/upstream/current/t/0-pod.t	2005-12-05 18:57:42 UTC (rev 1578)
+++ packages/libdigest-sha-perl/branches/upstream/current/t/0-pod.t	2005-12-05 19:00:44 UTC (rev 1579)
@@ -1,4 +1,11 @@
-use Test::More;
+BEGIN {
+	eval "use Test::More";
+	if ($@) {
+		print "1..0 # Skipped: Test::More not installed\n";
+		exit;
+	}
+}
+
 eval "use Test::Pod 1.00";
 plan skip_all => "Test::Pod 1.00 required for testing POD" if $@;
 all_pod_files_ok();




More information about the Pkg-perl-cvs-commits mailing list