[openssl] master update

Richard Levitte levitte at openssl.org
Fri Oct 30 12:08:34 UTC 2020


The branch master has been updated
       via  f79289389edef63b76c6c2a3042435dda7d42dfd (commit)
      from  231849bc9ca69dfd3adf40821421d8e2d804d8e8 (commit)


- Log -----------------------------------------------------------------
commit f79289389edef63b76c6c2a3042435dda7d42dfd
Author: Richard Levitte <levitte at openssl.org>
Date:   Wed Oct 28 19:15:40 2020 +0100

    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 at oracle.com>
    (Merged from https://github.com/openssl/openssl/pull/13266)

-----------------------------------------------------------------------

Summary of changes:
 doc/man1/openssl-genpkey.pod.in |  4 +++-
 test/recipes/15-test_gendh.t    | 20 +++++---------------
 2 files changed, 8 insertions(+), 16 deletions(-)

diff --git a/doc/man1/openssl-genpkey.pod.in b/doc/man1/openssl-genpkey.pod.in
index f3937400b7..de947ecd77 100644
--- a/doc/man1/openssl-genpkey.pod.in
+++ b/doc/man1/openssl-genpkey.pod.in
@@ -47,9 +47,11 @@ standard output is used.
 
 =item B<-outform> B<DER>|B<PEM>
 
-The output format; the default is B<PEM>.
+The output format, except when B<-genparam> is given; the default is B<PEM>.
 See L<openssl(1)/Format Options> for details.
 
+When B<-genparam> is given, B<-outform> is ignored.
+
 =item B<-pass> I<arg>
 
 The output file password source. For more information about the format of I<arg>
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'])),


More information about the openssl-commits mailing list