summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_lcl.h
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2004-03-09 03:53:40 +0000
committerGeoff Thorpe <geoff@openssl.org>2004-03-09 03:53:40 +0000
commita8aa764d3c96eb65b22863cdc5f6ab08d92dd355 (patch)
treef6b27ded43690e9ada28fb27ceba23ba3ea25431 /crypto/bn/bn_lcl.h
parente7716b7a197d551a22dfdb4df6021db8e92bae5d (diff)
Minimise the amount of code dependent on BN_DEBUG_RAND. In particular,
redefine bn_clear_top2max() to be a NOP in the non-debugging case, and remove some unnecessary usages in bn_nist.c. Submitted by: Nils Larsch Reviewed by: Geoff Thorpe, Ulf Möller
Diffstat (limited to 'crypto/bn/bn_lcl.h')
-rw-r--r--crypto/bn/bn_lcl.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/crypto/bn/bn_lcl.h b/crypto/bn/bn_lcl.h
index 18960f191b..45e19221aa 100644
--- a/crypto/bn/bn_lcl.h
+++ b/crypto/bn/bn_lcl.h
@@ -240,7 +240,7 @@ extern "C" {
#define Lw(t) (((BN_ULONG)(t))&BN_MASK2)
#define Hw(t) (((BN_ULONG)((t)>>BN_BITS2))&BN_MASK2)
-
+#ifdef BN_DEBUG_RAND
#define bn_clear_top2max(a) \
{ \
int ind = (a)->dmax - (a)->top; \
@@ -248,6 +248,9 @@ extern "C" {
for (; ind != 0; ind--) \
*(++ftl) = 0x0; \
}
+#else
+#define bn_clear_top2max(a)
+#endif
#ifdef BN_LLONG
#define mul_add(r,a,w,c) { \