summaryrefslogtreecommitdiffstats
path: root/crypto/dh
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/dh')
-rw-r--r--crypto/dh/dh_lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c
index 644508d784..9db45763fa 100644
--- a/crypto/dh/dh_lib.c
+++ b/crypto/dh/dh_lib.c
@@ -303,7 +303,7 @@ int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key)
* as input parameters.
*/
if (dh->pub_key == pub_key
- || (dh->priv_key != NULL && priv_key != dh->priv_key))
+ || (dh->priv_key != NULL && priv_key == dh->priv_key))
return 0;
if (pub_key != NULL) {