Affected functions:
dsa_validate_public
dsa_validate_private
dh_validate_public
dh_validate_private
Reviewed-by: Tomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/11598)
const BIGNUM *pub_key = NULL;
DH_get0_key(dh, &pub_key, NULL);
+ if (pub_key == NULL)
+ return 0;
return DH_check_pub_key_ex(dh, pub_key);
}
const BIGNUM *priv_key = NULL;
DH_get0_key(dh, NULL, &priv_key);
+ if (priv_key == NULL)
+ return 0;
return dh_check_priv_key(dh, priv_key, &status);;
}
const BIGNUM *pub_key = NULL;
DSA_get0_key(dsa, &pub_key, NULL);
+ if (pub_key == NULL)
+ return 0;
return dsa_check_pub_key(dsa, pub_key, &status);
}
const BIGNUM *priv_key = NULL;
DSA_get0_key(dsa, NULL, &priv_key);
+ if (priv_key == NULL)
+ return 0;
return dsa_check_priv_key(dsa, priv_key, &status);
}