diff options
author | PW Hu <jlu.hpw@foxmail.com> | 2021-10-08 17:01:47 +0800 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-10-11 10:46:19 +0200 |
commit | fa885e4ba153b6be3e446c8f323762482cef92ae (patch) | |
tree | 40bcb287f4d61bb4f901b1c81b235292107b57b8 /test/helpers/predefined_dhparams.c | |
parent | 6e463bcd53fedbb4ec277a5eb885619e32adcdd2 (diff) |
Bugfix: unsafe return check of EVP_PKEY_fromdata
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/16783)
(cherry picked from commit d11cab47810715ba472070300b180944a1d93633)
Diffstat (limited to 'test/helpers/predefined_dhparams.c')
-rw-r--r-- | test/helpers/predefined_dhparams.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/helpers/predefined_dhparams.c b/test/helpers/predefined_dhparams.c index b2f6601188..ebb9c8891d 100644 --- a/test/helpers/predefined_dhparams.c +++ b/test/helpers/predefined_dhparams.c @@ -35,7 +35,7 @@ static EVP_PKEY *get_dh_from_pg_bn(OSSL_LIB_CTX *libctx, const char *type, params = OSSL_PARAM_BLD_to_param(tmpl); if (params == NULL - || !EVP_PKEY_fromdata(pctx, &dhpkey, EVP_PKEY_KEY_PARAMETERS, params)) + || EVP_PKEY_fromdata(pctx, &dhpkey, EVP_PKEY_KEY_PARAMETERS, params) <= 0) goto err; err: |