diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2015-02-14 15:07:55 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2015-02-14 15:07:55 +0000 |
commit | e57638935e4e86aabf4a0bb93d0b8fb965089f35 (patch) | |
tree | 43613da14fddd3d0f0b4b7131fa4ffc4aa73ad7d /lib/libssl | |
parent | 80044915fab3dab04192d5da1c039bde1e3f0497 (diff) |
Fix tests that got incorrectly inverted with the BN_CTX_get() return check
diff.
Spotted by miod@
Diffstat (limited to 'lib/libssl')
-rw-r--r-- | lib/libssl/src/crypto/bn/bn_x931p.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libssl/src/crypto/bn/bn_x931p.c b/lib/libssl/src/crypto/bn/bn_x931p.c index 89c86c1ff70..13abd5923c3 100644 --- a/lib/libssl/src/crypto/bn/bn_x931p.c +++ b/lib/libssl/src/crypto/bn/bn_x931p.c @@ -1,4 +1,4 @@ -/* $OpenBSD: bn_x931p.c,v 1.6 2015/02/09 15:49:22 jsing Exp $ */ +/* $OpenBSD: bn_x931p.c,v 1.7 2015/02/14 15:07:54 jsing Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2005. */ @@ -107,11 +107,11 @@ BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, const BIGNUM *Xp, return 0; BN_CTX_start(ctx); - if (p1 != NULL) { + if (p1 == NULL) { if ((p1 = BN_CTX_get(ctx)) == NULL) goto err; } - if (p2 != NULL) { + if (p2 == NULL) { if ((p2 = BN_CTX_get(ctx)) == NULL) goto err; } @@ -252,11 +252,11 @@ BN_X931_generate_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, BIGNUM *Xp1, int ret = 0; BN_CTX_start(ctx); - if (Xp1 != NULL) { + if (Xp1 == NULL) { if ((Xp1 = BN_CTX_get(ctx)) == NULL) goto error; } - if (Xp2 != NULL) { + if (Xp2 == NULL) { if ((Xp2 = BN_CTX_get(ctx)) == NULL) goto error; } |