summaryrefslogtreecommitdiff
path: root/providers/implementations/keymgmt
diff options
context:
space:
mode:
authorTomas Mraz <tomas@openssl.org>2022-01-13 19:01:33 +0100
committerTomas Mraz <tomas@openssl.org>2022-01-17 16:20:57 +0100
commit3b53f88c008d288e86d2bbdc0c4e2d16c29fcee8 (patch)
tree9c3c56c1f4e4be57cabb21d6bacc66e5f8befb35 /providers/implementations/keymgmt
parentf58bb2dd00c3004552c5c1e8d0f2c1390c004cf8 (diff)
downloadopenssl-new-3b53f88c008d288e86d2bbdc0c4e2d16c29fcee8.tar.gz
Do not call ossl_ffc_name_to_dh_named_group with NULL argument
Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/17498)
Diffstat (limited to 'providers/implementations/keymgmt')
-rw-r--r--providers/implementations/keymgmt/dh_kmgmt.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c
index 98eb882e3f..ab8ef3ac52 100644
--- a/providers/implementations/keymgmt/dh_kmgmt.c
+++ b/providers/implementations/keymgmt/dh_kmgmt.c
@@ -532,6 +532,7 @@ static int dh_gen_common_set_params(void *genctx, const OSSL_PARAM params[])
const DH_NAMED_GROUP *group = NULL;
if (p->data_type != OSSL_PARAM_UTF8_STRING
+ || p->data == NULL
|| (group = ossl_ffc_name_to_dh_named_group(p->data)) == NULL
|| ((gctx->group_nid =
ossl_ffc_named_group_get_uid(group)) == NID_undef)) {