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*$/) {