stop missing prototype warnings

This commit is contained in:
Dr. Stephen Henson 2010-01-27 13:32:31 +00:00
parent b3fb2492d5
commit 371b262f96
5 changed files with 35 additions and 19 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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];

View File

@ -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;

View File

@ -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;