Fix set0 reuse test
We must test for new object == current object, not !=. Reviewed-by: Richard Levitte <levitte@openssl.org>
This commit is contained in:
parent
69664d6af0
commit
4a397f5168
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue