summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-10-28 19:15:40 +0100
committerRichard Levitte <levitte@openssl.org>2020-10-30 13:07:38 +0100
commitf79289389edef63b76c6c2a3042435dda7d42dfd (patch)
tree6e2d6d1a0b1eafb1460f39e360281f7828a02adb /test
parent231849bc9ca69dfd3adf40821421d8e2d804d8e8 (diff)
test/recipes/15-test_gendh.t: don't try DER params
There is no option to output DH params in DER form. -outform doesn't apply to -genparam with 'openssl genpkey', and it shouldn't. Reviewed-by: Paul Dale <paul.dale@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13266)
Diffstat (limited to 'test')
-rw-r--r--test/recipes/15-test_gendh.t20
1 files changed, 5 insertions, 15 deletions
diff --git a/test/recipes/15-test_gendh.t b/test/recipes/15-test_gendh.t
index e4e5fb837d..c87ae0d89c 100644
--- a/test/recipes/15-test_gendh.t
+++ b/test/recipes/15-test_gendh.t
@@ -18,7 +18,7 @@ setup("test_gendh");
plan skip_all => "This test is unsupported in a no-dh build" if disabled("dh");
-plan tests => 13;
+plan tests => 12;
ok(run(app([ 'openssl', 'genpkey', '-genparam',
'-algorithm', 'DH',
@@ -54,28 +54,18 @@ ok(run(app([ 'openssl', 'genpkey', '-genparam',
'-algorithm', 'DH',
'-pkeyopt', 'gindex:1',
'-pkeyopt', 'type:fips186_4',
- '-out', 'dhgen.pem'])),
+ '-out', 'dhgen.pem' ])),
"genpkey DH params fips186_4 PEM");
-ok(run(app([ 'openssl', 'genpkey', '-genparam',
- '-algorithm', 'DH',
- '-pkeyopt', 'gindex:1',
- '-pkeyopt', 'pbits:2048',
- '-pkeyopt', 'qbits:256',
- '-pkeyopt', 'type:fips186_4',
- '-outform', 'DER',
- '-out', 'dhgen.der'])),
- "genpkey DH params fips186_4 DER");
-
# The seed and counter should be the ones generated from the param generation
# Just put some dummy ones in to show it works.
ok(run(app([ 'openssl', 'genpkey',
- '-paramfile', 'dhgen.der',
+ '-paramfile', 'dhgen.pem',
'-pkeyopt', 'gindex:1',
'-pkeyopt', 'hexseed:0102030405060708090A0B0C0D0E0F1011121314',
'-pkeyopt', 'pcounter:25',
- '-text'])),
- "genpkey DH fips186_4 with DER params");
+ '-text' ])),
+ "genpkey DH fips186_4 with PEM params");
ok(!run(app([ 'openssl', 'genpkey',
'-algorithm', 'DH'])),