Skip to content

Commit

Permalink
Do not call ossl_ffc_name_to_dh_named_group with NULL argument
Browse files Browse the repository at this point in the history
Reviewed-by: Matt Caswell <[email protected]>
(Merged from openssl#17498)
  • Loading branch information
t8m committed Jan 17, 2022
1 parent f58bb2d commit 3b53f88
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions crypto/ffc/ffc_backend.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ int ossl_ffc_params_fromdata(FFC_PARAMS *ffc, const OSSL_PARAM params[])
const DH_NAMED_GROUP *group = NULL;

if (prm->data_type != OSSL_PARAM_UTF8_STRING
|| prm->data == NULL
|| (group = ossl_ffc_name_to_dh_named_group(prm->data)) == NULL
|| !ossl_ffc_named_group_set_pqg(ffc, group))
#endif
Expand Down
1 change: 1 addition & 0 deletions providers/implementations/keymgmt/dh_kmgmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)) {
Expand Down

0 comments on commit 3b53f88

Please sign in to comment.