diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c index 98014593b6..6e1ea5349a 100644 --- a/crypto/dh/dh_check.c +++ b/crypto/dh/dh_check.c @@ -155,6 +155,7 @@ int DH_check(const DH *dh, int *ret) /* Don't do any checks at all with an excessively large modulus */ if (BN_num_bits(dh->params.p) > OPENSSL_DH_CHECK_MAX_MODULUS_BITS) { ERR_raise(ERR_LIB_DH, DH_R_MODULUS_TOO_LARGE); + *ret = DH_MODULUS_TOO_LARGE | DH_CHECK_P_NOT_PRIME; return 0; }