summaryrefslogtreecommitdiffstats
path: root/crypto/dh/dh_check.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dh/dh_check.c')
-rw-r--r--crypto/dh/dh_check.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypto/dh/dh_check.c b/crypto/dh/dh_check.c
index f4173e2137..7ba2beae7f 100644
--- a/crypto/dh/dh_check.c
+++ b/crypto/dh/dh_check.c
@@ -259,7 +259,8 @@ int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret)
*/
int ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret)
{
- return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret);
+ return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret)
+ && *ret == 0;
}
int ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret)