From 371b262f96b80f0c753f37c86ea196cbbc8b53b7 Mon Sep 17 00:00:00 2001 From: "Dr. Stephen Henson" Date: Wed, 27 Jan 2010 13:32:31 +0000 Subject: [PATCH] stop missing prototype warnings --- fips/aes/fips_aesavs.c | 6 +++--- fips/des/fips_desmovs.c | 14 +++++++------- fips/dsa/fips_dssvs.c | 14 +++++++------- fips/fips_utl.h | 16 ++++++++++++++++ fips/rand/fips_rngvs.c | 4 ++-- 5 files changed, 35 insertions(+), 19 deletions(-) diff --git a/fips/aes/fips_aesavs.c b/fips/aes/fips_aesavs.c index 15dd4634dc..a3c8b400af 100644 --- a/fips/aes/fips_aesavs.c +++ b/fips/aes/fips_aesavs.c @@ -89,7 +89,7 @@ int main(int argc, char *argv[]) /*-----------------------------------------------*/ -int AESTest(EVP_CIPHER_CTX *ctx, +static int AESTest(EVP_CIPHER_CTX *ctx, char *amode, int akeysz, unsigned char *aKey, unsigned char *iVec, int dir, /* 0 = decrypt, 1 = encrypt */ @@ -238,7 +238,7 @@ enum XCrypt {XDECRYPT, XENCRYPT}; #define gb(a,b) (((a)[(b)/8] >> (7-(b)%8))&1) #define sb(a,b,v) ((a)[(b)/8]=((a)[(b)/8]&~(1 << (7-(b)%8)))|(!!(v) << (7-(b)%8))) -int do_mct(char *amode, +static int do_mct(char *amode, int akeysz, unsigned char *aKey,unsigned char *iVec, int dir, unsigned char *text, int len, FILE *rfp) @@ -546,7 +546,7 @@ int do_mct(char *amode, # Fri Aug 30 04:07:22 PM ----------------------------*/ -int proc_file(char *rqfile, char *rspfile) +static int proc_file(char *rqfile, char *rspfile) { char afn[256], rfn[256]; FILE *afp = NULL, *rfp = NULL; diff --git a/fips/des/fips_desmovs.c b/fips/des/fips_desmovs.c index f1467602a2..f96a5cabd4 100644 --- a/fips/des/fips_desmovs.c +++ b/fips/des/fips_desmovs.c @@ -88,7 +88,7 @@ int main(int argc, char *argv[]) #define VERBOSE 0 -int DESTest(EVP_CIPHER_CTX *ctx, +static int DESTest(EVP_CIPHER_CTX *ctx, char *amode, int akeysz, unsigned char *aKey, unsigned char *iVec, int dir, /* 0 = decrypt, 1 = encrypt */ @@ -128,16 +128,16 @@ int DESTest(EVP_CIPHER_CTX *ctx, return 1; } - -void DebugValue(char *tag, unsigned char *val, int len) +#if 0 +static void DebugValue(char *tag, unsigned char *val, int len) { char obuf[2048]; int olen; olen = bin2hex(val, len, obuf); printf("%s = %.*s\n", tag, olen, obuf); } - -void shiftin(unsigned char *dst,unsigned char *src,int nbits) +#endif +static void shiftin(unsigned char *dst,unsigned char *src,int nbits) { int n; @@ -157,7 +157,7 @@ char *t_mode[6] = {"CBC","ECB","OFB","CFB1","CFB8","CFB64"}; enum Mode {CBC, ECB, OFB, CFB1, CFB8, CFB64}; int Sizes[6]={64,64,64,1,8,64}; -void do_mct(char *amode, +static void do_mct(char *amode, int akeysz, int numkeys, unsigned char *akey,unsigned char *ivec, int dir, unsigned char *text, int len, FILE *rfp) @@ -264,7 +264,7 @@ void do_mct(char *amode, } } -int proc_file(char *rqfile, char *rspfile) +static int proc_file(char *rqfile, char *rspfile) { char afn[256], rfn[256]; FILE *afp = NULL, *rfp = NULL; diff --git a/fips/dsa/fips_dssvs.c b/fips/dsa/fips_dssvs.c index 5cc4b97008..45f4e1ce47 100644 --- a/fips/dsa/fips_dssvs.c +++ b/fips/dsa/fips_dssvs.c @@ -40,7 +40,7 @@ static void pbn(const char *name, BIGNUM *bn) return; } -void primes() +static void primes() { char buf[10240]; char lbuf[10240]; @@ -63,7 +63,7 @@ void primes() } } -void pqg() +static void pqg() { char buf[1024]; char lbuf[1024]; @@ -112,7 +112,7 @@ void pqg() } } -void pqgver() +static void pqgver() { char buf[1024]; char lbuf[1024]; @@ -212,7 +212,7 @@ static int dss_paramcheck(int nmod, BIGNUM *p, BIGNUM *q, BIGNUM *g, return 1; } -void keyver() +static void keyver() { char buf[1024]; char lbuf[1024]; @@ -299,7 +299,7 @@ void keyver() BN_free(Y2); } -void keypair() +static void keypair() { char buf[1024]; char lbuf[1024]; @@ -348,7 +348,7 @@ void keypair() } } -void siggen() +static void siggen() { char buf[1024]; char lbuf[1024]; @@ -421,7 +421,7 @@ void siggen() FIPS_dsa_free(dsa); } -void sigver() +static void sigver() { DSA *dsa=NULL; char buf[1024]; diff --git a/fips/fips_utl.h b/fips/fips_utl.h index 02d4e44c82..85d9e12781 100644 --- a/fips/fips_utl.h +++ b/fips/fips_utl.h @@ -47,6 +47,22 @@ * */ +void do_print_errors(void); +int hex2bin(const char *in, unsigned char *out); +unsigned char *hex2bin_m(const char *in, long *plen); +int do_hex2bn(BIGNUM **pr, const char *in); +int do_bn_print(FILE *out, BIGNUM *bn); +int do_bn_print_name(FILE *out, const char *name, BIGNUM *bn); +int parse_line(char **pkw, char **pval, char *linebuf, char *olinebuf); +BIGNUM *hex2bn(const char *in); +int bin2hex(const unsigned char *in,int len,char *out); +void pv(const char *tag,const unsigned char *val,int len); +int tidy_line(char *linebuf, char *olinebuf); +int bint2bin(const char *in, int len, unsigned char *out); +int bin2bint(const unsigned char *in,int len,char *out); +void PrintValue(char *tag, unsigned char *val, int len); +void OutputValue(char *tag, unsigned char *val, int len, FILE *rfp,int bitmode); + void do_print_errors(void) { const char *file, *data; diff --git a/fips/rand/fips_rngvs.c b/fips/rand/fips_rngvs.c index cb904eaf0b..80a80170f8 100644 --- a/fips/rand/fips_rngvs.c +++ b/fips/rand/fips_rngvs.c @@ -31,7 +31,7 @@ int main(int argc, char **argv) #include "fips_utl.h" -void vst() +static void vst() { unsigned char *key = NULL; unsigned char *v = NULL; @@ -108,7 +108,7 @@ void vst() } } -void mct() +static void mct() { unsigned char *key = NULL; unsigned char *v = NULL; -- 2.25.1