summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_mpi.c
diff options
context:
space:
mode:
authorjsing <>2022-11-26 13:56:33 +0000
committerjsing <>2022-11-26 13:56:33 +0000
commitbcbac728558eebfaa4404c405e7dc22769585345 (patch)
tree9f1339c5b70b0cfa4e8a0a5c70345e837a21ce77 /src/lib/libcrypto/bn/bn_mpi.c
parent90d0616c736d954d327f399daa636de8e6a2c4d5 (diff)
downloadopenbsd-bcbac728558eebfaa4404c405e7dc22769585345.tar.gz
openbsd-bcbac728558eebfaa4404c405e7dc22769585345.tar.bz2
openbsd-bcbac728558eebfaa4404c405e7dc22769585345.zip
Remove BIGNUM consistency macros.
Compiling with BN_DEBUG (and if you want to take it further, BN_DEBUG_RAND) supposedly adds consistency checks to the BN code. These are rarely if ever used and introduce a bunch of clutter in the code. Furthermore, there are hacks in place to undo things that the debugging code does. Remove all of this mess and instead rely on always enabled checks, more readable code and proper regress coverage to ensure correct behaviour. "Good riddance." tb@
Diffstat (limited to 'src/lib/libcrypto/bn/bn_mpi.c')
-rw-r--r--src/lib/libcrypto/bn/bn_mpi.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/lib/libcrypto/bn/bn_mpi.c b/src/lib/libcrypto/bn/bn_mpi.c
index 9b743cca8c..75b34511fe 100644
--- a/src/lib/libcrypto/bn/bn_mpi.c
+++ b/src/lib/libcrypto/bn/bn_mpi.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: bn_mpi.c,v 1.9 2022/11/09 01:05:45 tobhe Exp $ */ 1/* $OpenBSD: bn_mpi.c,v 1.10 2022/11/26 13:56:33 jsing Exp $ */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved. 3 * All rights reserved.
4 * 4 *
@@ -131,6 +131,5 @@ BN_mpi2bn(const unsigned char *d, int n, BIGNUM *ain)
131 if (neg) { 131 if (neg) {
132 BN_clear_bit(a, BN_num_bits(a) - 1); 132 BN_clear_bit(a, BN_num_bits(a) - 1);
133 } 133 }
134 bn_check_top(a);
135 return (a); 134 return (a);
136} 135}