Fix dsaparam -genkey with DER outform
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Sun, 25 Mar 2018 10:50:17 +0000 (12:50 +0200)
committerBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 26 Mar 2018 13:13:29 +0000 (15:13 +0200)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5744)

(cherry picked from commit 5281435258b5d8201a00b4a9781bb724d99630f0)

apps/dsaparam.c

index dd69461b21fb09eabbcd7bb932a34340da40dafb..b9d6a4208ab8359e42d4fbdb56c2a282dc4e24c4 100644 (file)
@@ -248,6 +248,9 @@ int dsaparam_main(int argc, char **argv)
         OPENSSL_free(data);
     }
 
+    if (outformat == FORMAT_ASN1 && genkey)
+        noout = 1;
+
     if (!noout) {
         if (outformat == FORMAT_ASN1)
             i = i2d_DSAparams_bio(out, dsa);