From 448155e9bbda27cbba365ff549a7e2044a8a399f Mon Sep 17 00:00:00 2001 From: Doug Goldstein Date: Thu, 14 Aug 2014 23:22:41 -0400 Subject: [PATCH] RT2163: Remove some unneeded #include's Several files #include stdio.h and don't need it. Also, per tjh, remove BN_COUNT Reviewed-by: Emilia Kasper --- crypto/bn/bn_add.c | 1 - crypto/bn/bn_asm.c | 1 - crypto/bn/bn_blind.c | 1 - crypto/bn/bn_ctx.c | 1 - crypto/bn/bn_div.c | 1 - crypto/bn/bn_lib.c | 1 - crypto/bn/bn_mont.c | 4 ---- crypto/bn/bn_mul.c | 56 ------------------------------------------- crypto/bn/bn_recp.c | 1 - crypto/bn/bn_shift.c | 1 - crypto/bn/bn_sqr.c | 7 ------ crypto/bn/bn_word.c | 1 - crypto/rsa/rsa_eay.c | 1 - crypto/rsa/rsa_none.c | 1 - 14 files changed, 78 deletions(-) diff --git a/crypto/bn/bn_add.c b/crypto/bn/bn_add.c index 257c2eafe5..3835a8428c 100644 --- a/crypto/bn/bn_add.c +++ b/crypto/bn/bn_add.c @@ -58,7 +58,6 @@ #define OPENSSL_FIPSAPI -#include #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_asm.c b/crypto/bn/bn_asm.c index 7b1280ae61..23766243be 100644 --- a/crypto/bn/bn_asm.c +++ b/crypto/bn/bn_asm.c @@ -61,7 +61,6 @@ # define NDEBUG #endif -#include #include #include #include "cryptlib.h" diff --git a/crypto/bn/bn_blind.c b/crypto/bn/bn_blind.c index c1ce1614c5..c0fe57a829 100644 --- a/crypto/bn/bn_blind.c +++ b/crypto/bn/bn_blind.c @@ -111,7 +111,6 @@ #define OPENSSL_FIPSAPI -#include #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_ctx.c b/crypto/bn/bn_ctx.c index 0272dbb62b..5288a20be9 100644 --- a/crypto/bn/bn_ctx.c +++ b/crypto/bn/bn_ctx.c @@ -62,7 +62,6 @@ #define OPENSSL_FIPSAPI -#include #include #include "cryptlib.h" diff --git a/crypto/bn/bn_div.c b/crypto/bn/bn_div.c index 034a80a4a6..7adda12ad9 100644 --- a/crypto/bn/bn_div.c +++ b/crypto/bn/bn_div.c @@ -58,7 +58,6 @@ #define OPENSSL_FIPSAPI -#include #include #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index efa77999ff..72c2cf0a3d 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -65,7 +65,6 @@ #include #include -#include #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index 799763ea9c..e41f849479 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -118,7 +118,6 @@ #define OPENSSL_FIPSAPI -#include #include "cryptlib.h" #include "bn_lcl.h" @@ -204,9 +203,6 @@ static int BN_from_montgomery_word(BIGNUM *ret, BIGNUM *r, BN_MONT_CTX *mont) r->top=max; n0=mont->n0[0]; -#ifdef BN_COUNT - fprintf(stderr,"word BN_from_montgomery_word %d * %d\n",nl,nl); -#endif for (carry=0, i=0; i #include #include "cryptlib.h" #include "bn_lcl.h" @@ -95,9 +94,6 @@ BN_ULONG bn_sub_part_words(BN_ULONG *r, if (dl < 0) { -#ifdef BN_COUNT - fprintf(stderr, " bn_sub_part_words %d + %d (dl < 0, c = %d)\n", cl, dl, c); -#endif for (;;) { t = b[0]; @@ -127,9 +123,6 @@ BN_ULONG bn_sub_part_words(BN_ULONG *r, else { int save_dl = dl; -#ifdef BN_COUNT - fprintf(stderr, " bn_sub_part_words %d + %d (dl > 0, c = %d)\n", cl, dl, c); -#endif while(c) { t = a[0]; @@ -158,9 +151,6 @@ BN_ULONG bn_sub_part_words(BN_ULONG *r, } if (dl > 0) { -#ifdef BN_COUNT - fprintf(stderr, " bn_sub_part_words %d + %d (dl > 0, c == 0)\n", cl, dl); -#endif if (save_dl > dl) { switch (save_dl - dl) @@ -181,9 +171,6 @@ BN_ULONG bn_sub_part_words(BN_ULONG *r, } if (dl > 0) { -#ifdef BN_COUNT - fprintf(stderr, " bn_sub_part_words %d + %d (dl > 0, copy)\n", cl, dl); -#endif for(;;) { r[0] = a[0]; @@ -223,9 +210,6 @@ BN_ULONG bn_add_part_words(BN_ULONG *r, if (dl < 0) { int save_dl = dl; -#ifdef BN_COUNT - fprintf(stderr, " bn_add_part_words %d + %d (dl < 0, c = %d)\n", cl, dl, c); -#endif while (c) { l=(c+b[0])&BN_MASK2; @@ -254,9 +238,6 @@ BN_ULONG bn_add_part_words(BN_ULONG *r, } if (dl < 0) { -#ifdef BN_COUNT - fprintf(stderr, " bn_add_part_words %d + %d (dl < 0, c == 0)\n", cl, dl); -#endif if (save_dl < dl) { switch (dl - save_dl) @@ -277,9 +258,6 @@ BN_ULONG bn_add_part_words(BN_ULONG *r, } if (dl < 0) { -#ifdef BN_COUNT - fprintf(stderr, " bn_add_part_words %d + %d (dl < 0, copy)\n", cl, dl); -#endif for(;;) { r[0] = b[0]; @@ -299,9 +277,6 @@ BN_ULONG bn_add_part_words(BN_ULONG *r, else { int save_dl = dl; -#ifdef BN_COUNT - fprintf(stderr, " bn_add_part_words %d + %d (dl > 0)\n", cl, dl); -#endif while (c) { t=(a[0]+c)&BN_MASK2; @@ -328,9 +303,6 @@ BN_ULONG bn_add_part_words(BN_ULONG *r, a+=4; r+=4; } -#ifdef BN_COUNT - fprintf(stderr, " bn_add_part_words %d + %d (dl > 0, c == 0)\n", cl, dl); -#endif if (dl > 0) { if (save_dl > dl) @@ -353,9 +325,6 @@ BN_ULONG bn_add_part_words(BN_ULONG *r, } if (dl > 0) { -#ifdef BN_COUNT - fprintf(stderr, " bn_add_part_words %d + %d (dl > 0, copy)\n", cl, dl); -#endif for(;;) { r[0] = a[0]; @@ -398,9 +367,6 @@ void bn_mul_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2, unsigned int neg,zero; BN_ULONG ln,lo,*p; -# ifdef BN_COUNT - fprintf(stderr," bn_mul_recursive %d%+d * %d%+d\n",n2,dna,n2,dnb); -# endif # ifdef BN_MUL_COMBA # if 0 if (n2 == 4) @@ -554,10 +520,6 @@ void bn_mul_part_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n, int c1,c2,neg; BN_ULONG ln,lo,*p; -# ifdef BN_COUNT - fprintf(stderr," bn_mul_part_recursive (%d%+d) * (%d%+d)\n", - n, tna, n, tnb); -# endif if (n < 8) { bn_mul_normal(r,a,n+tna,b,n+tnb); @@ -728,10 +690,6 @@ void bn_mul_low_recursive(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n2, { int n=n2/2; -# ifdef BN_COUNT - fprintf(stderr," bn_mul_low_recursive %d * %d\n",n2,n2); -# endif - bn_mul_recursive(r,a,b,n,0,0,&(t[0])); if (n >= BN_MUL_LOW_RECURSIVE_SIZE_NORMAL) { @@ -762,9 +720,6 @@ void bn_mul_high(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, BN_ULONG *l, int n2, int neg,oneg,zero; BN_ULONG ll,lc,*lp,*mp; -# ifdef BN_COUNT - fprintf(stderr," bn_mul_high %d * %d\n",n2,n2); -# endif n=n2/2; /* Calculate (al-ah)*(bh-bl) */ @@ -953,10 +908,6 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx) int j=0,k; #endif -#ifdef BN_COUNT - fprintf(stderr,"BN_mul %d * %d\n",a->top,b->top); -#endif - bn_check_top(a); bn_check_top(b); bn_check_top(r); @@ -1105,10 +1056,6 @@ void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb) { BN_ULONG *rr; -#ifdef BN_COUNT - fprintf(stderr," bn_mul_normal %d * %d\n",na,nb); -#endif - if (na < nb) { int itmp; @@ -1145,9 +1092,6 @@ void bn_mul_normal(BN_ULONG *r, BN_ULONG *a, int na, BN_ULONG *b, int nb) void bn_mul_low_normal(BN_ULONG *r, BN_ULONG *a, BN_ULONG *b, int n) { -#ifdef BN_COUNT - fprintf(stderr," bn_mul_low_normal %d * %d\n",n,n); -#endif bn_mul_words(r,a,n,b[0]); for (;;) diff --git a/crypto/bn/bn_recp.c b/crypto/bn/bn_recp.c index 0145d0fa9b..cec2863328 100644 --- a/crypto/bn/bn_recp.c +++ b/crypto/bn/bn_recp.c @@ -58,7 +58,6 @@ #define OPENSSL_FIPSAPI -#include #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_shift.c b/crypto/bn/bn_shift.c index a6fca2c424..c92eb8b60e 100644 --- a/crypto/bn/bn_shift.c +++ b/crypto/bn/bn_shift.c @@ -56,7 +56,6 @@ * [including the GNU Public Licence.] */ -#include #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/bn/bn_sqr.c b/crypto/bn/bn_sqr.c index 65bbf165d0..74d7df6ef4 100644 --- a/crypto/bn/bn_sqr.c +++ b/crypto/bn/bn_sqr.c @@ -56,7 +56,6 @@ * [including the GNU Public Licence.] */ -#include #include "cryptlib.h" #include "bn_lcl.h" @@ -68,9 +67,6 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx) int ret = 0; BIGNUM *tmp,*rr; -#ifdef BN_COUNT - fprintf(stderr,"BN_sqr %d * %d\n",a->top,a->top); -#endif bn_check_top(a); al=a->top; @@ -210,9 +206,6 @@ void bn_sqr_recursive(BN_ULONG *r, const BN_ULONG *a, int n2, BN_ULONG *t) int zero,c1; BN_ULONG ln,lo,*p; -#ifdef BN_COUNT - fprintf(stderr," bn_sqr_recursive %d * %d\n",n2,n2); -#endif if (n2 == 4) { #ifndef BN_SQR_COMBA diff --git a/crypto/bn/bn_word.c b/crypto/bn/bn_word.c index de83a15b99..8809d0714a 100644 --- a/crypto/bn/bn_word.c +++ b/crypto/bn/bn_word.c @@ -56,7 +56,6 @@ * [including the GNU Public Licence.] */ -#include #include "cryptlib.h" #include "bn_lcl.h" diff --git a/crypto/rsa/rsa_eay.c b/crypto/rsa/rsa_eay.c index 64c23f7cdb..683181f3eb 100644 --- a/crypto/rsa/rsa_eay.c +++ b/crypto/rsa/rsa_eay.c @@ -111,7 +111,6 @@ #define OPENSSL_FIPSAPI -#include #include "cryptlib.h" #include #include diff --git a/crypto/rsa/rsa_none.c b/crypto/rsa/rsa_none.c index b8d01a92cf..f1fcd9c71d 100644 --- a/crypto/rsa/rsa_none.c +++ b/crypto/rsa/rsa_none.c @@ -58,7 +58,6 @@ #define OPENSSL_FIPSAPI -#include #include "cryptlib.h" #include #include -- 2.34.1