Write parameters if -genparam option include.
authorDr. Stephen Henson <steve@openssl.org>
Tue, 11 Apr 2006 18:21:40 +0000 (18:21 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Tue, 11 Apr 2006 18:21:40 +0000 (18:21 +0000)
apps/genpkey.c

index e2e9c56..453dd50 100644 (file)
@@ -255,7 +255,9 @@ int MAIN(int argc, char **argv)
                        }
                }
 
-       if (outformat == FORMAT_PEM) 
+       if (do_param)
+               PEM_write_bio_Parameters(out, pkey);
+       else if (outformat == FORMAT_PEM) 
                PEM_write_bio_PrivateKey(out, pkey, cipher, NULL, 0,
                                                                NULL, pass);
        else if (outformat == FORMAT_ASN1)