Skip Menu |

This queue is for tickets about the Crypt-DSA CPAN distribution.

Report information
The Basics
Id: 49668
Status: open
Priority: 0/
Queue: Crypt-DSA

People
Owner: Nobody in particular
Requestors: paul [...] city-fan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.16
Fixed in: (no value)



Subject: openssl dsaparam output format change in 1.0 beta 3 breaks Crypt::DSA::KeyChain
There's a slight change of output format in the openssl dsaparam command from current versions to the forthcoming 1.0 release: openssl 0.9.8k: $ openssl dsaparam -text -noout 512 Generating DSA parameters, 512 bit long prime This could take some time ........+..+++++++++++++++++++++++++++++++++++++++++++++++++++* ..+....................+................+.+................+................................+...+..+...........+.....+.............+.......+....+..............+.......+...+.....+.................+....+.............................+.......+..........+..+...+........+...............+......+..........+..+.....+............+.+..+...+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++* DSA-Parameters: (512 bit) p: 00:e6:6c:38:ce:8d:9f:1d:f0:7a:12:50:1e:ef:5c: 73:fe:2e:7a:b0:ed:27:a0:96:c3:37:98:de:e9:b6: a2:e6:3a:97:9d:d5:c1:f8:1e:f4:2d:38:29:d8:08: ac:f1:20:28:51:54:cb:7a:a1:36:f6:e7:07:b1:cf: 23:8d:6e:a1:33 q: 00:f4:7b:0c:a8:98:d7:e0:d0:3e:92:94:95:30:f5: 21:0a:86:db:16:55 g: 00:c6:81:8d:32:72:6b:6b:a5:d2:90:fb:c2:31:c4: 73:e0:1b:05:bb:17:5c:b2:b2:09:69:17:78:41:fc: 99:a1:9b:07:ca:a7:02:5f:0e:1f:dd:35:05:90:ac: e8:66:47:ca:9a:1a:77:a4:f4:5e:65:66:64:bf:34: 7d:fe:30:bf:5a openssl 1.0 beta 3: $ openssl dsaparam -text -noout 512 Generating DSA parameters, 512 bit long prime This could take some time .+........+++++++++++++++++++++++++++++++++++++++++++++++++++* ...+................+.....+..........+.+.+...........+.+............+............+......+...+.........................................+......+......+...............+...+....+..............+++++++++++++++++++++++++++++++++++++++++++++++++++* P: 00:82:ab:91:c2:9e:8e:c1:cd:cb:70:68:12:c9:44: 90:20:97:e4:69:77:fc:53:ce:78:2c:3d:01:5c:69: 42:45:bc:e7:06:2f:4e:75:d4:10:3b:ae:de:43:6f: d8:86:6d:1e:f9:1d:c5:8e:0d:92:ca:e7:23:2e:5b: 42:26:09:88:3b Q: 00:f9:dc:55:fd:ca:48:8c:d4:e9:df:8a:25:6d:f7: 82:5d:f8:34:34:3f G: 6b:75:a7:e5:ac:2e:3a:79:65:01:51:cb:78:a3:06: 73:47:0a:b8:9c:de:68:36:c5:5e:44:02:fe:8a:73: 73:bc:d3:1a:ec:08:40:da:b3:f6:e2:0b:14:e6:1c: 0d:f5:ef:62:0e:bf:64:18:96:ee:87:f7:13:89:42: cc:69:6e:be The change to labelling the parameters in upper case causes Crypt::DSA::Keychain to fail like this (from the test suite): Use of uninitialized value $parts{"p"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 69. Use of uninitialized value $parts{"q"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 70. Use of uninitialized value $parts{"g"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 71. Can't locate object method "copy" via package "NaN" (perhaps you forgot to load "NaN"?) at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/Util.pm line 43. # Looks like your test exited with 255 before it could output anything. The patch changes the parameter labels to lower case, making the code compatible with both old and new versions of openssl.
Subject: perl-Crypt-DSA-dsaparam.patch
There's a slight change of output format in the openssl dsaparam command from current versions to the forthcoming 1.0 release: openssl 0.9.8k: $ openssl dsaparam -text -noout 512 Generating DSA parameters, 512 bit long prime This could take some time ........+..+++++++++++++++++++++++++++++++++++++++++++++++++++* ..+....................+................+.+................+................................+...+..+...........+.....+.............+.......+....+..............+.......+...+.....+.................+....+.............................+.......+..........+..+...+........+...............+......+..........+..+.....+............+.+..+...+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++* DSA-Parameters: (512 bit) p: 00:e6:6c:38:ce:8d:9f:1d:f0:7a:12:50:1e:ef:5c: 73:fe:2e:7a:b0:ed:27:a0:96:c3:37:98:de:e9:b6: a2:e6:3a:97:9d:d5:c1:f8:1e:f4:2d:38:29:d8:08: ac:f1:20:28:51:54:cb:7a:a1:36:f6:e7:07:b1:cf: 23:8d:6e:a1:33 q: 00:f4:7b:0c:a8:98:d7:e0:d0:3e:92:94:95:30:f5: 21:0a:86:db:16:55 g: 00:c6:81:8d:32:72:6b:6b:a5:d2:90:fb:c2:31:c4: 73:e0:1b:05:bb:17:5c:b2:b2:09:69:17:78:41:fc: 99:a1:9b:07:ca:a7:02:5f:0e:1f:dd:35:05:90:ac: e8:66:47:ca:9a:1a:77:a4:f4:5e:65:66:64:bf:34: 7d:fe:30:bf:5a openssl 1.0 beta 3: $ openssl dsaparam -text -noout 512 Generating DSA parameters, 512 bit long prime This could take some time .+........+++++++++++++++++++++++++++++++++++++++++++++++++++* ...+................+.....+..........+.+.+...........+.+............+............+......+...+.........................................+......+......+...............+...+....+..............+++++++++++++++++++++++++++++++++++++++++++++++++++* P: 00:82:ab:91:c2:9e:8e:c1:cd:cb:70:68:12:c9:44: 90:20:97:e4:69:77:fc:53:ce:78:2c:3d:01:5c:69: 42:45:bc:e7:06:2f:4e:75:d4:10:3b:ae:de:43:6f: d8:86:6d:1e:f9:1d:c5:8e:0d:92:ca:e7:23:2e:5b: 42:26:09:88:3b Q: 00:f9:dc:55:fd:ca:48:8c:d4:e9:df:8a:25:6d:f7: 82:5d:f8:34:34:3f G: 6b:75:a7:e5:ac:2e:3a:79:65:01:51:cb:78:a3:06: 73:47:0a:b8:9c:de:68:36:c5:5e:44:02:fe:8a:73: 73:bc:d3:1a:ec:08:40:da:b3:f6:e2:0b:14:e6:1c: 0d:f5:ef:62:0e:bf:64:18:96:ee:87:f7:13:89:42: cc:69:6e:be The change to labelling the parameters in upper case causes Crypt::DSA::Keychain to fail like this (from the test suite): Use of uninitialized value $parts{"p"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 69. Use of uninitialized value $parts{"q"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 70. Use of uninitialized value $parts{"g"} in concatenation (.) or string at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/KeyChain.pm line 71. Can't locate object method "copy" via package "NaN" (perhaps you forgot to load "NaN"?) at /builddir/build/BUILD/Crypt-DSA-1.16/blib/lib/Crypt/DSA/Util.pm line 43. # Looks like your test exited with 255 before it could output anything. The patch changes the parameter labels to lower case, making the code compatible with both old and new versions of openssl. --- Crypt-DSA-1.16/lib/Crypt/DSA/KeyChain.pm 2009-09-11 13:45:37.000000000 +0100 +++ Crypt-DSA-1.16/lib/Crypt/DSA/KeyChain.pm 2009-09-12 22:56:31.000000000 +0100 @@ -53,7 +53,7 @@ my $cur_part; foreach (@res) { if (/^\s+(\w):\s*$/) { - $cur_part = $1; + $cur_part = lc($1); next; } if (/^\s*((?:[0-9a-f]{2,2}:?)+)\s*$/) {
Crypt::OpenPGP test suite now fails as a result of this bug. https://rt.cpan.org/Ticket/Display.html?id=57861 I've applied the DSA patch but now the Crypt::OpenPGP test suite takes a really long time to run so I'm not sure if more of a patch is required and we just don't have a full enough test suite to catch the problem in Crypt::DSA
Show quoted text
> I've applied the DSA patch but now the Crypt::OpenPGP test suite takes > a really long time to run
My bad. Not enough entrophy on the system causes reads to /dev/random to hang. The test suite runs fine now.
On Wed May 26 19:27:32 2010, TODDR wrote: Show quoted text
> > I've applied the DSA patch but now the Crypt::OpenPGP test suite
> takes
> > a really long time to run
> > My bad. Not enough entrophy on the system causes reads to /dev/random > to hang. The test > suite runs fine now. >
This patch fixed the failures I was having on Strawberry Perl v5.12.2
Comitted to repo as r14507. ->patched.
From: vvm [...] tut.by
On Wed Jun 15 06:18:25 2011, CSJEWELL wrote: Show quoted text
> Comitted to repo as r14507. ->patched.
Full description: Crypt::DSA needs a patch to install with OpenSSL v1.X in Strawberry Perl v5.14.X / v5.12.X ( see RT #49668 "Crypt-DSA Bug #49668") http://vvm.blog.tut.by/2011/06/14/strawberry-perl-v5-12-3-and-crypt-dsa- bug-49668/ == # Strawberry Perl v5.14.X / v5.12.X and Crypt-DSA Bug RT #49668 # See: # http://rt.cpan.org/Public/Bug/Display.html?id=49668 # # perl-Crypt-DSA-dsaparam.patch 2009-09-12 22:56:31 by paul (at) city- fan.org # # Crypt-DSA-1.16.patch == Tested with: -- Strawberry Perl v5.12.3 x86 with GCC toolchain mingw64-w32- gcc4.4.6_20110503-v2.zip and kmx/32_libs 20110506.zip ( strawberry-perl-5.12.3.0-32bit-build-2011-06-09.zip / .msi ) ( build instruction see: HowTo: Build Strawberry Perl v5.12.3 x86 with GCC toolchain mingw64-w32- gcc4.4.6_20110503-v2.zip and kmx/32_libs 20110506.zip http://vvm.blog.tut.by/2011/06/13/howto-build-strawberry-perl-v5-12-3- x86-with-gcc-toolchain-mingw64-w32-gcc4-4-6_20110503-v2-zip-and-kmx- 32_libs-20110506-zip/ )