diff options
author | Matt Caswell <matt@openssl.org> | 2020-11-04 15:20:36 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2020-11-10 14:51:54 +0100 |
commit | 8b0ec09934a3f76f6d3e83793b5434e76fdd8c2c (patch) | |
tree | 33961498a3e9ed15bbcdf1b19f91693f65a8d797 /apps/dsaparam.c | |
parent | Document pkcs12 alg NONE (diff) | |
download | openssl-8b0ec09934a3f76f6d3e83793b5434e76fdd8c2c.tar.xz openssl-8b0ec09934a3f76f6d3e83793b5434e76fdd8c2c.zip |
Fix the reading of DSA parameters files using the dsaparam app
DSA parameters files were failing to load correctly. We also fix a number
of follow on issues which resulted in multiple similar errors messages
being displayed for the same problem, as well as a seg-fault.
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
(Merged from https://github.com/openssl/openssl/pull/13317)
Diffstat (limited to 'apps/dsaparam.c')
-rw-r--r-- | apps/dsaparam.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/apps/dsaparam.c b/apps/dsaparam.c index 7e374eb6ad..06d1b95902 100644 --- a/apps/dsaparam.c +++ b/apps/dsaparam.c @@ -179,14 +179,10 @@ int dsaparam_main(int argc, char **argv) goto end; } } else { - params = load_keyparams(infile, 1, "DSA parameters"); - if (!EVP_PKEY_is_a(params, "DSA")) { - EVP_PKEY_free(params); - params = NULL; - } + params = load_keyparams(infile, 1, "DSA", "DSA parameters"); } if (params == NULL) { - BIO_printf(bio_err, "Error, unable to load DSA parameters\n"); + /* Error message should already have been displayed */ goto end; } |