Index: bin2hex.c =================================================================== --- bin2hex.c (revision 2118) +++ bin2hex.c (revision 2119) @@ -41,6 +41,7 @@ #include #include +#include "bin2hex.h" #include "dstring.h" static char HEXSTR[]="0123456789ABCDEF"; @@ -96,9 +97,9 @@ * 2) Do a straight left-to-right hex to decimal conversion! */ -unsigned char *unhexify_block(unsigned char *str, int length) { - unsigned char *source; - unsigned char *result; +char *unhexify_block(char *str, int length) { + char *source; + char *result; int hexlen=length*2; int len=strlen(str); Index: dorandom.c =================================================================== --- dorandom.c (revision 2118) +++ dorandom.c (revision 2119) @@ -36,12 +36,13 @@ #include #include +#include "rijndael.h" #include "dorandom.h" static int infile; int urand_seed(char *filename) { - char *name; + const char *name; if (filename) { name=filename; @@ -56,11 +57,11 @@ return 0; /* all okay! */ } -char *urand_get(int numbytes) { - char *retval; +BYTE *urand_get(int numbytes) { + BYTE *retval; int n, result; - retval=(char *)malloc(numbytes); + retval=(BYTE *)malloc(numbytes); if (!retval) { fprintf(stderr,"dorandom:urand_get:error:out of memory."); exit(1); /* sorry :-(. */ Index: bin2hex.h =================================================================== --- bin2hex.h (revision 2118) +++ bin2hex.h (revision 2119) @@ -27,6 +27,6 @@ unsigned int unhexnib(unsigned char hexchar); unsigned char *hexify_block( unsigned char *resultbuf, int length ); -unsigned char *unhexify_block(unsigned char *str, int length); +char *unhexify_block(char *str, int length); Index: aescmdline.c =================================================================== --- aescmdline.c (revision 2118) +++ aescmdline.c (revision 2119) @@ -36,7 +36,7 @@ ssize_t n, result; for (n = result = 0; result < count; result += n) { - n = write(outfile, buf + result, count - result); + n = write(outfile, (char *)buf + result, count - result); if (n <= 0) { fprintf(stderr,"%s:error:could not write data.\n",progname); perror(progname); @@ -81,7 +81,7 @@ * null-terminated string: */ void read_key_from_stdin(int infile, int keysize) { - unsigned char keybuf[65]; + char keybuf[65]; int n, result, hexkeysize; hexkeysize = keysize / 4; Index: aesget.c =================================================================== --- aesget.c (revision 2118) +++ aesget.c (revision 2119) @@ -23,8 +23,8 @@ static int cfb128_idx=-1; -static char cfb_blk[16]; -static char cfb_crypt[16]; +static BYTE cfb_blk[16]; +static BYTE cfb_crypt[16]; static void decryptblock(char *src, int srclen) { int i,ch; Index: dorandom.h =================================================================== --- dorandom.h (revision 2118) +++ dorandom.h (revision 2119) @@ -26,6 +26,6 @@ #define URAND_NAME "/dev/urandom" int urand_seed(char * filename); /* NULL for /dev/urandom */ -char *urand_get(int numbytes); +BYTE *urand_get(int numbytes); #endif Index: dstring.c =================================================================== --- dstring.c (revision 2118) +++ dstring.c (revision 2119) @@ -52,6 +52,9 @@ #include "dstring.h" +static char *d_ltrim(char *src); +static char *d_rtrim(char *src); + /* Returns a line of EXACTLY the length of input. Does have a limit, so we * don't exhaust all virtual memory. Does use more CPU time alloc'ing and * un-alloc'ing our temporary buffer, but so it goes :-(. @@ -166,7 +169,7 @@ * str. */ -char *d_ltrim(char *src) { +static char *d_ltrim(char *src) { char *dest; char *walkptr; @@ -187,7 +190,7 @@ * str. Actually returns a pointer to same amount of malloc'ed space, * I don't think that's going to be a problem... */ -char *d_rtrim(char *src) { +static char *d_rtrim(char *src) { int i,j,len; char *dest; Index: aescrypt.c =================================================================== --- aescrypt.c (revision 2118) +++ aescrypt.c (revision 2119) @@ -27,8 +27,8 @@ static int cfb128_idx=-1; -static char *cfb_blk; -static char cfb_crypt[16]; +static BYTE *cfb_blk; +static BYTE cfb_crypt[16]; static void cryptblock(char *src, int srclen) { int i,ch; @@ -54,7 +54,7 @@ static void cryptfile(int infile,int outfile) { - char *salt; + BYTE *salt; int result; #define CRYPTBUF_SIZE 8192