提交 448155e9 编写于 作者: D Doug Goldstein 提交者: Rich Salz

RT2163: Remove some unneeded #include's

Several files #include stdio.h and don't need it.
Also, per tjh, remove BN_COUNT
Reviewed-by: NEmilia Kasper <emilia@openssl.org>
上级 f756fb43
......@@ -58,7 +58,6 @@
#define OPENSSL_FIPSAPI
#include <stdio.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......
......@@ -61,7 +61,6 @@
# define NDEBUG
#endif
#include <stdio.h>
#include <assert.h>
#include <openssl/crypto.h>
#include "cryptlib.h"
......
......@@ -111,7 +111,6 @@
#define OPENSSL_FIPSAPI
#include <stdio.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......
......@@ -62,7 +62,6 @@
#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <assert.h>
#include "cryptlib.h"
......
......@@ -58,7 +58,6 @@
#define OPENSSL_FIPSAPI
#include <stdio.h>
#include <openssl/bn.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......
......@@ -65,7 +65,6 @@
#include <assert.h>
#include <limits.h>
#include <stdio.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......
......@@ -118,7 +118,6 @@
#define OPENSSL_FIPSAPI
#include <stdio.h>
#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<nl; i++, rp++)
{
#ifdef __TANDEM
......
......@@ -61,7 +61,6 @@
# define NDEBUG
#endif
#include <stdio.h>
#include <assert.h>
#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 (;;)
......
......@@ -58,7 +58,6 @@
#define OPENSSL_FIPSAPI
#include <stdio.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......
......@@ -56,7 +56,6 @@
* [including the GNU Public Licence.]
*/
#include <stdio.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......
......@@ -56,7 +56,6 @@
* [including the GNU Public Licence.]
*/
#include <stdio.h>
#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
......
......@@ -56,7 +56,6 @@
* [including the GNU Public Licence.]
*/
#include <stdio.h>
#include "cryptlib.h"
#include "bn_lcl.h"
......
......@@ -111,7 +111,6 @@
#define OPENSSL_FIPSAPI
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/bn.h>
#include <openssl/rsa.h>
......
......@@ -58,7 +58,6 @@
#define OPENSSL_FIPSAPI
#include <stdio.h>
#include "cryptlib.h"
#include <openssl/bn.h>
#include <openssl/rsa.h>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册