summaryrefslogtreecommitdiffstats
path: root/apps/gendsa.c
diff options
context:
space:
mode:
authorDr. David von Oheimb <David.von.Oheimb@siemens.com>2020-06-09 10:21:58 +0200
committerDr. David von Oheimb <David.von.Oheimb@siemens.com>2021-05-25 15:16:54 +0200
commita7e4ca5b4e1932cb91ea21047403c87a033e524a (patch)
tree1ad41d1f12e8ed09486ca48cf570cff42962ec73 /apps/gendsa.c
parent8d67621de16990132c13f6a11bcc18ce8e9cdd47 (diff)
Add warning to key/param generating apps on potential delay due to missing entropy
This also introduces app_keygen() and app_paramgen() and cleans up err reporting. Reviewed-by: Tomas Mraz <tomas@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12095)
Diffstat (limited to 'apps/gendsa.c')
-rw-r--r--apps/gendsa.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/gendsa.c b/apps/gendsa.c
index f4bd0fe09e..a7857c478c 100644
--- a/apps/gendsa.c
+++ b/apps/gendsa.c
@@ -145,12 +145,7 @@ int gendsa_main(int argc, char **argv)
BIO_printf(bio_err, "unable to set up for key generation\n");
goto end;
}
- if (verbose)
- BIO_printf(bio_err, "Generating DSA key, %d bits\n", nbits);
- if (EVP_PKEY_keygen(ctx, &pkey) <= 0) {
- BIO_printf(bio_err, "unable to generate key\n");
- goto end;
- }
+ pkey = app_keygen(ctx, "DSA", nbits, verbose);
assert(private);
if (!PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, passout)) {