r76322 - in /trunk/libauthen-dechpwd-perl: .cvsignore Build.PL Changes MANIFEST META.json META.yml Makefile.PL README SIGNATURE debian/changelog lib/Authen/DecHpwd.pm lib/Authen/DecHpwd.xs t/ad_ii.t t/ad_ii_pp.t t/setup_pp.pl

mxey-guest at users.alioth.debian.org mxey-guest at users.alioth.debian.org
Thu Jun 23 11:26:15 UTC 2011


Author: mxey-guest
Date: Thu Jun 23 11:26:13 2011
New Revision: 76322

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=76322
Log:
New upstream release

Added:
    trunk/libauthen-dechpwd-perl/META.json
      - copied unchanged from r76321, branches/upstream/libauthen-dechpwd-perl/current/META.json
    trunk/libauthen-dechpwd-perl/t/ad_ii.t
      - copied unchanged from r76321, branches/upstream/libauthen-dechpwd-perl/current/t/ad_ii.t
    trunk/libauthen-dechpwd-perl/t/ad_ii_pp.t
      - copied unchanged from r76321, branches/upstream/libauthen-dechpwd-perl/current/t/ad_ii_pp.t
Modified:
    trunk/libauthen-dechpwd-perl/.cvsignore
    trunk/libauthen-dechpwd-perl/Build.PL
    trunk/libauthen-dechpwd-perl/Changes
    trunk/libauthen-dechpwd-perl/MANIFEST
    trunk/libauthen-dechpwd-perl/META.yml
    trunk/libauthen-dechpwd-perl/Makefile.PL
    trunk/libauthen-dechpwd-perl/README
    trunk/libauthen-dechpwd-perl/SIGNATURE
    trunk/libauthen-dechpwd-perl/debian/changelog
    trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.pm
    trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.xs
    trunk/libauthen-dechpwd-perl/t/setup_pp.pl

Modified: trunk/libauthen-dechpwd-perl/.cvsignore
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/.cvsignore?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/.cvsignore (original)
+++ trunk/libauthen-dechpwd-perl/.cvsignore Thu Jun 23 11:26:13 2011
@@ -1,4 +1,4 @@
 Build Makefile
 _build blib
-META.yml MYMETA.yml Makefile.PL SIGNATURE
+META.json META.yml MYMETA.json MYMETA.yml Makefile.PL SIGNATURE
 Authen-DecHpwd-*

Modified: trunk/libauthen-dechpwd-perl/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/Build.PL?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/Build.PL (original)
+++ trunk/libauthen-dechpwd-perl/Build.PL Thu Jun 23 11:26:13 2011
@@ -68,6 +68,7 @@
 	},
 	requires => {
 		"Data::Integer" => "0.003",
+		"Digest::CRC" => "0.14",
 		"Exporter" => 0,
 		"Scalar::String" => 0,
 		"constant" => 0,

Modified: trunk/libauthen-dechpwd-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/Changes?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/Changes (original)
+++ trunk/libauthen-dechpwd-perl/Changes Thu Jun 23 11:26:13 2011
@@ -1,3 +1,26 @@
+version 2.006; 2011-05-07
+
+  * implement AUTODIN-II CRC hashing, delegating to Digest::CRC to
+    perform the actual CRC calculation
+
+  * in documentation, refer to the VMS function principally as
+    "SYS$HASH_PASWORD" (which seems to be its primary name) and only
+    secondarily as "LGI$HPWD"
+
+  * in XS, use save stack to clean up temporarily allocated memory
+
+  * in XS, declare "PROTOTYPES: DISABLE" to prevent automatic generation
+    of unintended prototypes
+
+  * in t/setup_pp.pl, avoid a warning that occurs if XSLoader::load()
+    is given no arguments, which is now a valid usage
+
+  * slightly reformat some C code to avoid exceeding 80 columns
+
+  * include META.json in distribution
+
+  * add MYMETA.json to .cvsignore
+
 version 2.005; 2010-07-30
 
   * in XS, use the correct "PREINIT:" instead of "INIT:" to introduce

Modified: trunk/libauthen-dechpwd-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/MANIFEST?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/MANIFEST (original)
+++ trunk/libauthen-dechpwd-perl/MANIFEST Thu Jun 23 11:26:13 2011
@@ -2,12 +2,15 @@
 Build.PL
 Changes
 MANIFEST
+META.json
 META.yml
 Makefile.PL
 README
 lib/Authen/.cvsignore
 lib/Authen/DecHpwd.pm
 lib/Authen/DecHpwd.xs
+t/ad_ii.t
+t/ad_ii_pp.t
 t/error.t
 t/error_pp.t
 t/pod_cvg.t

Modified: trunk/libauthen-dechpwd-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/META.yml?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/META.yml (original)
+++ trunk/libauthen-dechpwd-perl/META.yml Thu Jun 23 11:26:13 2011
@@ -21,9 +21,8 @@
   perl: 5.006
   strict: 0
   warnings: 0
-distribution_type: module
 dynamic_config: 1
-generated_by: 'Module::Build version 0.3607'
+generated_by: 'Module::Build version 0.38, CPAN::Meta::Converter version 2.110580'
 license: gpl
 meta-spec:
   url: http://module-build.sourceforge.net/META-spec-v1.4.html
@@ -32,11 +31,12 @@
 provides:
   Authen::DecHpwd:
     file: lib/Authen/DecHpwd.pm
-    version: 2.005
+    version: 2.006
 recommends:
   XSLoader: 0
 requires:
   Data::Integer: 0.003
+  Digest::CRC: 0.14
   Exporter: 0
   Scalar::String: 0
   constant: 0
@@ -46,4 +46,4 @@
   warnings: 0
 resources:
   license: http://www.gnu.org/licenses/old-licenses/gpl-1.0.txt
-version: 2.005
+version: 2.006

Modified: trunk/libauthen-dechpwd-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/Makefile.PL?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/Makefile.PL (original)
+++ trunk/libauthen-dechpwd-perl/Makefile.PL Thu Jun 23 11:26:13 2011
@@ -1,4 +1,4 @@
-# Note: this file was auto-generated by Module::Build::Compat version 0.3607
+# Note: this file was auto-generated by Module::Build::Compat version 0.3800
 require 5.006;
 
     unless (eval "use Module::Build::Compat 0.02; 1" ) {

Modified: trunk/libauthen-dechpwd-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/README?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/README (original)
+++ trunk/libauthen-dechpwd-perl/README Thu Jun 23 11:26:13 2011
@@ -4,8 +4,9 @@
 
 DESCRIPTION
 
-This module implements the LGI$HPWD password hashing function from VMS,
-and some associated VMS username and password handling functions.
+This module implements the SYS$HASH_PASSWORD password hashing function
+from VMS (also known as LGI$HPWD), and some associated VMS username and
+password handling functions.
 
 The password hashing function is implemented in XS, with a hideously
 slow pure Perl backup version for systems that can't handle XS.
@@ -38,7 +39,7 @@
 Based in part on code from John the Ripper, Copyright (C) 1996-2002
 Solar Designer
 
-Copyright (C) 2006, 2007, 2009, 2010
+Copyright (C) 2006, 2007, 2009, 2010, 2011
 Andrew Main (Zefram) <zefram at fysh.org>
 
 LICENSE

Modified: trunk/libauthen-dechpwd-perl/SIGNATURE
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/SIGNATURE?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/SIGNATURE (original)
+++ trunk/libauthen-dechpwd-perl/SIGNATURE Thu Jun 23 11:26:13 2011
@@ -1,5 +1,5 @@
 This file contains message digests of all files listed in MANIFEST,
-signed via the Module::Signature module, version 0.64.
+signed via the Module::Signature module, version 0.66.
 
 To verify the content in this distribution, first make sure you have
 Module::Signature installed, then type:
@@ -14,16 +14,19 @@
 -----BEGIN PGP SIGNED MESSAGE-----
 Hash: SHA1
 
-SHA1 873f19a831c02dd739ff2992f8f2b270381d1fcd .cvsignore
-SHA1 1919de7a682ced6d66cd95df46148f077693a7b3 Build.PL
-SHA1 160cc300a625c71c09c87af5d7b92798355f53ef Changes
-SHA1 26e706b2c3adbcff83200d7db55665f68692d81a MANIFEST
-SHA1 b4a724dc860d56ea249a5b21d89fea6c00b15e07 META.yml
-SHA1 0f1b3b6269550b5135e10b3cae1b6b41d274b276 Makefile.PL
-SHA1 88888034f076b43f8c45f4e11b6753d4dd886b4c README
+SHA1 34c481cb2456e7c438729e5ffe47fa4ee48cac13 .cvsignore
+SHA1 36d9a1cc3dc972d4194c80bf2c278874615290a8 Build.PL
+SHA1 cc866d014b2776a03d4a0d28098198baa87121e6 Changes
+SHA1 c3cc5da825f8df10b51844de2c0f83e32bd9d750 MANIFEST
+SHA1 895ed53852c915640ec6aa2ccd54e97794000e31 META.json
+SHA1 1e98a31999bcee33232a02bad5200fc49046b83e META.yml
+SHA1 2157ae40589595d6cc1585fd7279b25bcf8f5852 Makefile.PL
+SHA1 33252596b5db378b8990528c2993509ab6c3c187 README
 SHA1 e6329de2cc61d37633dbeae6a76de2a6c0db4d1c lib/Authen/.cvsignore
-SHA1 805017e12229312f859974bfc39afe330f9305ee lib/Authen/DecHpwd.pm
-SHA1 4bb2e9ffbc8c3b40ff96f6692b9a86bf87187346 lib/Authen/DecHpwd.xs
+SHA1 3f1d891c4ead1e9f41b628b5d33c7463c9803469 lib/Authen/DecHpwd.pm
+SHA1 84b1bc108a7e96d074e8fe9e7a4d326f8ab2482a lib/Authen/DecHpwd.xs
+SHA1 ec9d474d408610cc407a7a6acd6a57290ca1ffde t/ad_ii.t
+SHA1 e35855e0647f540961d852bc08375a55f79c4c46 t/ad_ii_pp.t
 SHA1 0c878ae29b417db5507ba73cb8003a9fe7d872eb t/error.t
 SHA1 fc008cb61eb02798d6ec02df230ef4d59bcdca12 t/error_pp.t
 SHA1 904d9a4f76525e2303e4b0c168c68230f223c8de t/pod_cvg.t
@@ -35,13 +38,13 @@
 SHA1 f3481010321f8d330a916d7df959adca2b7667dd t/purdy_s_pp.t
 SHA1 c44b75ae3c2a2ded3d620e8d7a9cc240f0f870d5 t/purdy_v.t
 SHA1 b609e9e46fec79dd78108d71961d331ca2bfa0fd t/purdy_v_pp.t
-SHA1 13e0c865134cb43ba7608cb6e1f6ca29ac57c3f0 t/setup_pp.pl
+SHA1 39855833b066d96722c23f00b99b17ea750db360 t/setup_pp.pl
 SHA1 296fe58b26077980410206b30534093e302f90c5 t/vms_pass.t
 SHA1 5a5c9c0be3c3e92a91d1d655f93e4ab0e805b116 t/vms_user.t
 -----BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.9 (GNU/Linux)
+Version: GnuPG v1.4.10 (GNU/Linux)
 
-iEYEARECAAYFAkxTGsoACgkQOV9mt2VyAVElXACfd3ewfdG/PlCvUTXDsT6vbZUX
-+OMAn15JSdNf9iz+SjJdRDYzwNaRl1wR
-=8MPO
+iEYEARECAAYFAk3FhDMACgkQOV9mt2VyAVFdKQCfYYF/Z2FIBaxdcDR4DWIb2bb0
+fuMAoKh6Fz+rQLAAaVg5Ch828psQKyKX
+=mwGN
 -----END PGP SIGNATURE-----

Modified: trunk/libauthen-dechpwd-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/debian/changelog?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/debian/changelog (original)
+++ trunk/libauthen-dechpwd-perl/debian/changelog Thu Jun 23 11:26:13 2011
@@ -1,8 +1,12 @@
-libauthen-dechpwd-perl (2.005-2) UNRELEASED; urgency=low
+libauthen-dechpwd-perl (2.006-1) UNRELEASED; urgency=low
 
+  [ Ansgar Burchardt ]
   * Update my email address.
 
- -- Ansgar Burchardt <ansgar at debian.org>  Mon, 01 Nov 2010 11:16:17 +0100
+  [ Maximilian Gass ]
+  * New upstream release
+
+ -- Maximilian Gass <mxey at cloudconnected.org>  Thu, 23 Jun 2011 13:23:36 +0200
 
 libauthen-dechpwd-perl (2.005-1) unstable; urgency=low
 

Modified: trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.pm?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.pm (original)
+++ trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.pm Thu Jun 23 11:26:13 2011
@@ -18,8 +18,9 @@
 
 =head1 DESCRIPTION
 
-This module implements the C<LGI$HPWD> password hashing function from VMS,
-and some associated VMS username and password handling functions.
+This module implements the C<SYS$HASH_PASSWORD> password hashing function
+from VMS (also known as C<LGI$HPWD>), and some associated VMS username
+and password handling functions.
 
 The password hashing function is implemented in XS, with a hideously
 slow pure Perl backup version for systems that can't handle XS.
@@ -32,7 +33,9 @@
 use warnings;
 use strict;
 
-our $VERSION = "2.005";
+use Digest::CRC 0.14 qw(crc32);
+
+our $VERSION = "2.006";
 
 use parent "Exporter";
 our @EXPORT_OK = qw(
@@ -61,8 +64,9 @@
 These constants are used to identify the four password hashing algorithms
 used by VMS.  They are the C<UAI$C_> constants in VMS.
 
-C<UAI_C_AD_II> refers to an AUTODIN-II 32-bit CRC algorithm.  This is
-unimplemented by this module.
+C<UAI_C_AD_II> refers to a 32-bit CRC algorithm.  The CRC polynomial used
+is the IEEE CRC-32 polynomial, as used in Ethernet, and in this context
+is known as "AUTODIN-II".  The hash is merely the CRC of the password.
 
 C<UAI_C_PURDY>, C<UAI_C_PURDY_V>, and C<UAI_C_PURDY_S> refer to successive
 refinements of an algorithm based on Purdy polynomials.  All of these
@@ -88,13 +92,14 @@
 
 =item lgi_hpwd(USERNAME, PASSWORD, ALGORITHM, SALT)
 
-This is the C<LGI$HPWD> function from VMS (but with the parameters in a
-different order).  It hashes the PASSWORD string in a manner determined
-by the other parameters, and returns the hash as a string of bytes.
+This is the C<SYS$HASH_PASSWORD> function from VMS (also known as
+C<LGI$HPWD>), but with the parameters in a different order.  It hashes
+the PASSWORD string in a manner determined by the other parameters,
+and returns the hash as a string of bytes.
 
 ALGORITHM determines which hashing algorithm will be used.  It must
 be the value of one of the algorithm constants supplied by this module
-(see above).  The AUTODIN-II CRC algorithm is currently unimplemented.
+(see above).
 
 SALT must be an integer in the range [0, 2^16).  It modifies the hashing
 so that the same password does not always produce the same hash.
@@ -325,7 +330,6 @@
 
 sub lgi_hpwd($$$$) {
 	my($username, $password, $alg, $salt) = @_;
-	if($alg == UAI_C_AD_II) { die "UAI_C_AD_II is not implemented" }
 	if($alg > UAI_C_PURDY_S) {
 		die "algorithm value $alg is not recognised";
 	}
@@ -338,6 +342,9 @@
 	die "input must contain only octets"
 		unless sclstr_is_downgraded($username) &&
 			sclstr_is_downgraded($password);
+	if($alg == UAI_C_AD_II) {
+		return pack("VV", Digest::CRC::crc32($password)^0xffffffff, 0);
+	}
 	my $isPurdyS = $alg == UAI_C_PURDY_S;
 	my $output = pack("VV", 0, 0);
 	if($alg == UAI_C_PURDY) {
@@ -413,7 +420,7 @@
 Based in part on code from John the Ripper, Copyright (C) 1996-2002
 Solar Designer
 
-Copyright (C) 2006, 2007, 2009, 2010
+Copyright (C) 2006, 2007, 2009, 2010, 2011
 Andrew Main (Zefram) <zefram at fysh.org>
 
 =head1 LICENSE

Modified: trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.xs
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.xs?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.xs (original)
+++ trunk/libauthen-dechpwd-perl/lib/Authen/DecHpwd.xs Thu Jun 23 11:26:13 2011
@@ -115,7 +115,7 @@
 # error not a recognised endianness
 #endif
 
-#define UAIC_AD_II   0  /* AUTODIN-II 32 bit crc code, not supported   */
+#define UAIC_AD_II   0  /* AUTODIN-II 32 bit crc code                  */
 #define UAIC_PURDY   1  /* Purdy polynomial over salted input          */
 #define UAIC_PURDY_V 2  /* Purdy polynomial + variable length username */
 #define UAIC_PURDY_S 3  /* PURDY_V + additional bit rotation           */
@@ -154,7 +154,8 @@
     }
 
 #if ARCH_LITTLE_ENDIAN
-#  define qwordConstant(low, high) { { (low), (high) } } /* qword in host format */
+#  define qwordConstant(low, high) { { (low), (high) } }
+					/* qword in host format */
 #  define normalizeQword(q) /* do not reverse order on little-endian systems */
 #else
 #  define qwordConstant(low, high) { { (high), (low) } }
@@ -408,8 +409,7 @@
 #endif /* asm */
 
 /* ============================================================================
-   Portable C version of the last 3 encryption methods for DEC's
-   password hashing algorithms.
+   Portable C version of DEC's Purdy password hashing algorithms.
            output = 8 byte output buffer in host format
 	 password = up to 32 characters, upper case, without spaces
 	  encrypt = determines algorithm to use
@@ -419,7 +419,7 @@
 	     salt = 2 byte random number
 	 username = up to 31 characters username, upper case.
 */
-static void VMS_lgihpwd(qword *output,
+static void lgihpwd_purdy(qword *output,
 	char *password, size_t password_len,
 	int encrypt, word salt,
 	char *username, size_t username_len)
@@ -441,7 +441,8 @@
 	username_len = PURDY_USERNAME_LENGTH;
     } else if (encrypt == UAIC_PURDY_S) {
 	/* Hickory algorithm; Purdy_V with rotation */
-	addUnalignedWord(((char *)output), password_len); /* Bytes 0-1 => length */
+	addUnalignedWord(((char *)output), password_len);
+	/* Bytes 0-1 => length */
     }
 
     /* Collapse the password to the output quadword: */
@@ -644,6 +645,8 @@
 
 MODULE = Authen::DecHpwd PACKAGE = Authen::DecHpwd
 
+PROTOTYPES: DISABLE
+
 SV *
 lgi_hpwd(SV *username_sv, SV *password_sv, unsigned alg, unsigned salt)
 PROTOTYPE: $$$$
@@ -653,26 +656,34 @@
 	bool is_utf8;
 	qword hash;
 CODE:
-	if(alg == UAIC_AD_II)
-		croak("UAI_C_AD_II is not implemented");
 	if(alg > UAIC_PURDY_S)
 		croak("algorithm value %u is not recognised", alg);
 	username_str = (U8*)SvPV(username_sv, username_len);
 	is_utf8 = !!SvUTF8(username_sv);
 	username_octs = bytes_from_utf8(username_str, &username_len, &is_utf8);
+	if(username_octs != username_str) SAVEFREEPV(username_octs);
 	if(is_utf8)
 		croak("input must contain only octets");
 	password_str = (U8*)SvPV(password_sv, password_len);
 	is_utf8 = !!SvUTF8(password_sv);
 	password_octs = bytes_from_utf8(password_str, &password_len, &is_utf8);
-	if(is_utf8) {
-		if(username_octs != username_str) Safefree(username_octs);
+	if(is_utf8)
 		croak("input must contain only octets");
+	if(password_octs != password_str) SAVEFREEPV(password_octs);
+	if(alg == UAIC_AD_II) {
+		PUSHMARK(SP);
+		XPUSHs(password_octs == password_str ? password_sv :
+			sv_2mortal(newSVpvn((char*)password_octs,
+						password_len)));
+		PUTBACK;
+		call_pv("Digest::CRC::crc32", G_SCALAR);
+		SPAGAIN;
+		hash.d_low = POPu ^ 0xffffffffUL;
+		hash.d_high = 0;
+	} else {
+		lgihpwd_purdy(&hash, (char *)password_octs, password_len, alg,
+			salt & 0xffff, (char *)username_octs, username_len);
 	}
-	VMS_lgihpwd(&hash, (char *)password_octs, password_len, alg,
-		salt & 0xffff, (char *)username_octs, username_len);
-	if(username_octs != username_str) Safefree(username_octs);
-	if(password_octs != password_str) Safefree(password_octs);
 	normalizeQword(&hash);
 	RETVAL = newSVpvn((char *)&hash, 8);
 OUTPUT:

Modified: trunk/libauthen-dechpwd-perl/t/setup_pp.pl
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libauthen-dechpwd-perl/t/setup_pp.pl?rev=76322&op=diff
==============================================================================
--- trunk/libauthen-dechpwd-perl/t/setup_pp.pl (original)
+++ trunk/libauthen-dechpwd-perl/t/setup_pp.pl Thu Jun 23 11:26:13 2011
@@ -4,7 +4,7 @@
 no warnings "redefine";
 *XSLoader::load = sub {
 	die "XS loading disabled for Authen::DecHpwd"
-		if $_[0] eq "Authen::DecHpwd";
+		if ($_[0] || "") eq "Authen::DecHpwd";
 	goto &$orig_load;
 };
 




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