diff options
author | Ulf Möller <ulf@openssl.org> | 1999-04-21 00:50:42 +0200 |
---|---|---|
committer | Ulf Möller <ulf@openssl.org> | 1999-04-21 00:50:42 +0200 |
commit | 95dc05bc6d0dfe0f3f3681f5e27afbc3f7a35eea (patch) | |
tree | 6bdbca71df2722da6b3c27c8cc2a0b00115edaa9 /crypto/des | |
parent | Fix some warnings. (diff) | |
download | openssl-95dc05bc6d0dfe0f3f3681f5e27afbc3f7a35eea.tar.xz openssl-95dc05bc6d0dfe0f3f3681f5e27afbc3f7a35eea.zip |
Fix lots of warnings.
Submitted by: Richard Levitte <levitte@stacken.kth.se>
Diffstat (limited to 'crypto/des')
-rw-r--r-- | crypto/des/destest.c | 2 | ||||
-rw-r--r-- | crypto/des/enc_read.c | 16 | ||||
-rw-r--r-- | crypto/des/enc_writ.c | 10 | ||||
-rw-r--r-- | crypto/des/str2key.c | 6 |
4 files changed, 17 insertions, 17 deletions
diff --git a/crypto/des/destest.c b/crypto/des/destest.c index fb69b123d5..61e8530465 100644 --- a/crypto/des/destest.c +++ b/crypto/des/destest.c @@ -229,7 +229,7 @@ static unsigned char cbc_iv [8]={0xfe,0xdc,0xba,0x98,0x76,0x54,0x32,0x10}; /* Changed the following text constant to binary so it will work on ebcdic * machines :-) */ /* static char cbc_data[40]="7654321 Now is the time for \0001"; */ -static char cbc_data[40]={ +static unsigned char cbc_data[40]={ 0x37,0x36,0x35,0x34,0x33,0x32,0x31,0x20, 0x4E,0x6F,0x77,0x20,0x69,0x73,0x20,0x74, 0x68,0x65,0x20,0x74,0x69,0x6D,0x65,0x20, diff --git a/crypto/des/enc_read.c b/crypto/des/enc_read.c index a33e2496b4..ed0f8f059d 100644 --- a/crypto/des/enc_read.c +++ b/crypto/des/enc_read.c @@ -93,17 +93,17 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, /* extra unencrypted data * for when a block of 100 comes in but is des_read one byte at * a time. */ - static char *unnet=NULL; + static unsigned char *unnet=NULL; static int unnet_start=0; static int unnet_left=0; - static char *tmpbuf=NULL; + static unsigned char *tmpbuf=NULL; int i; long num=0,rnum; unsigned char *p; if (tmpbuf == NULL) { - tmpbuf=(char *)Malloc(BSIZE); + tmpbuf=(unsigned char *)Malloc(BSIZE); if (tmpbuf == NULL) return(-1); } if (net == NULL) @@ -113,7 +113,7 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, } if (unnet == NULL) { - unnet=(char *)Malloc(BSIZE); + unnet=(unsigned char *)Malloc(BSIZE); if (unnet == NULL) return(-1); } /* left over data from last decrypt */ @@ -216,11 +216,11 @@ int des_enc_read(int fd, char *buf, int len, des_key_schedule sched, else { if (des_rw_mode & DES_PCBC_MODE) - des_pcbc_encrypt(net,buf,num,sched,iv, - DES_DECRYPT); + des_pcbc_encrypt(net,(unsigned char*)buf,num, + sched,iv,DES_DECRYPT); else - des_cbc_encrypt(net,buf,num,sched,iv, - DES_DECRYPT); + des_cbc_encrypt(net,(unsigned char*)buf,num, + sched,iv,DES_DECRYPT); } } return((int)num); diff --git a/crypto/des/enc_writ.c b/crypto/des/enc_writ.c index 238c0a9c09..6690ff61d7 100644 --- a/crypto/des/enc_writ.c +++ b/crypto/des/enc_writ.c @@ -88,15 +88,15 @@ int des_enc_write(int fd, const char *buf, int len, des_key_schedule sched, long rnum; int i,j,k,outnum; - static char *outbuf=NULL; - char shortbuf[8]; + static unsigned char *outbuf=NULL; + unsigned char shortbuf[8]; char *p; - const char *cp; + const unsigned char *cp; static int start=1; if (outbuf == NULL) { - outbuf=(char *)Malloc(BSIZE+HDRSIZE); + outbuf=(unsigned char *)Malloc(BSIZE+HDRSIZE); if (outbuf == NULL) return(-1); } /* If we are sending less than 8 bytes, the same char will look @@ -138,7 +138,7 @@ int des_enc_write(int fd, const char *buf, int len, des_key_schedule sched, } else { - cp=buf; + cp=(unsigned char*)buf; rnum=((len+7)/8*8); /* round up to nearest eight */ } diff --git a/crypto/des/str2key.c b/crypto/des/str2key.c index 40f706beb7..7130626c0f 100644 --- a/crypto/des/str2key.c +++ b/crypto/des/str2key.c @@ -92,7 +92,7 @@ void des_string_to_key(const char *str, des_cblock key) des_check_key=0; des_set_key(key,ks); des_check_key=i; - des_cbc_cksum(str,key,length,ks,key); + des_cbc_cksum((unsigned char*)str,key,length,ks,key); memset(ks,0,sizeof(ks)); des_set_odd_parity(key); } @@ -153,9 +153,9 @@ void des_string_to_2keys(const char *str, des_cblock key1, des_cblock key2) i=des_check_key; des_check_key=0; des_set_key(key1,ks); - des_cbc_cksum(str,key1,length,ks,key1); + des_cbc_cksum((unsigned char*)str,key1,length,ks,key1); des_set_key(key2,ks); - des_cbc_cksum(str,key2,length,ks,key2); + des_cbc_cksum((unsigned char*)str,key2,length,ks,key2); des_check_key=i; memset(ks,0,sizeof(ks)); des_set_odd_parity(key1); |