Skip to content

Commit

Permalink
fixup! Check DSA parameters for excessive sizes before validating
Browse files Browse the repository at this point in the history
  • Loading branch information
t8m committed May 9, 2024
1 parent c133bc0 commit 1f125d3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions crypto/dsa/dsa_check.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

static int dsa_precheck_params(const DSA *dsa, int *ret)
{
if (dsa->params.p == NULL || dsa->params.q == NULL
|| dsa->params.g == NULL) {
if (dsa->params.p == NULL || dsa->params.q == NULL) {
ERR_raise(ERR_LIB_DSA, DSA_R_BAD_FFC_PARAMETERS);
*ret = FFC_CHECK_INVALID_PQ;
return 0;
Expand Down Expand Up @@ -111,7 +110,8 @@ int ossl_dsa_check_pairwise(const DSA *dsa)
if (!dsa_precheck_params(dsa, &ret))
return 0;

if (dsa->priv_key == NULL
if (dsa->params.g == NULL
|| dsa->priv_key == NULL
|| dsa->pub_key == NULL)
return 0;

Expand Down

0 comments on commit 1f125d3

Please sign in to comment.