[openssl-commits] [openssl] master update
Viktor Dukhovni
viktor at openssl.org
Wed Apr 27 20:16:52 UTC 2016
The branch master has been updated
via 4a397f5168d41ef4417f1430f2f5133b92f145b8 (commit)
from 69664d6af0cdd7738f55d10fbbe46cdf15f72e0e (commit)
- Log -----------------------------------------------------------------
commit 4a397f5168d41ef4417f1430f2f5133b92f145b8
Author: Viktor Dukhovni <openssl-users at dukhovni.org>
Date: Wed Apr 27 15:08:33 2016 -0400
Fix set0 reuse test
We must test for new object == current object, not !=.
Reviewed-by: Richard Levitte <levitte at openssl.org>
-----------------------------------------------------------------------
Summary of changes:
crypto/dh/dh_lib.c | 2 +-
crypto/dsa/dsa_lib.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/crypto/dh/dh_lib.c b/crypto/dh/dh_lib.c
index 644508d..9db4576 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) {
diff --git a/crypto/dsa/dsa_lib.c b/crypto/dsa/dsa_lib.c
index 383b48b..7b751a9 100644
--- a/crypto/dsa/dsa_lib.c
+++ b/crypto/dsa/dsa_lib.c
@@ -358,7 +358,7 @@ int DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key)
* as input parameters.
*/
if (d->pub_key == pub_key
- || (d->priv_key != NULL && priv_key != d->priv_key))
+ || (d->priv_key != NULL && priv_key == d->priv_key))
return 0;
if (pub_key != NULL) {
More information about the openssl-commits
mailing list