summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortb <>2021-12-04 16:09:59 +0000
committertb <>2021-12-04 16:09:59 +0000
commitc854c621beec2012e09fabb761b5d7c2355acbc2 (patch)
tree95cb147ec3aa8db65a0d2a4bb8c89ac9116c2c22 /src
parenta75a07c9d53bf7f5f7c73650fec4ba578b806405 (diff)
downloadopenbsd-c854c621beec2012e09fabb761b5d7c2355acbc2.tar.gz
openbsd-c854c621beec2012e09fabb761b5d7c2355acbc2.tar.bz2
openbsd-c854c621beec2012e09fabb761b5d7c2355acbc2.zip
Use BN_is_negative(p) instead of p->neg in one place.
Diffstat (limited to 'src')
-rw-r--r--src/lib/libcrypto/bn/bn_x931p.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_x931p.c b/src/lib/libcrypto/bn/bn_x931p.c
index 55ca21c08c..a0a194aa34 100644
--- a/src/lib/libcrypto/bn/bn_x931p.c
+++ b/src/lib/libcrypto/bn/bn_x931p.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_x931p.c,v 1.11 2019/01/20 01:56:59 tb Exp $ */ 1/* $OpenBSD: bn_x931p.c,v 1.12 2021/12/04 16:09:59 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2005. 3 * project 2005.
4 */ 4 */
@@ -154,7 +154,7 @@ BN_X931_derive_prime_ex(BIGNUM *p, BIGNUM *p1, BIGNUM *p2, const BIGNUM *Xp,
154 if (!BN_sub(p, p, t)) 154 if (!BN_sub(p, p, t))
155 goto err; 155 goto err;
156 156
157 if (p->neg && !BN_add(p, p, p1p2)) 157 if (BN_is_negative(p) && !BN_add(p, p, p1p2))
158 goto err; 158 goto err;
159 159
160 /* p now equals Rp */ 160 /* p now equals Rp */