From: Ulf Möller Date: Tue, 8 Jun 1999 16:17:25 +0000 (+0000) Subject: Warnings and casts. X-Git-Tag: OpenSSL_0_9_4~215 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=f947eb318eede3bb0f85a4c61d074e8a1b41c237;p=oweals%2Fopenssl.git Warnings and casts. --- diff --git a/crypto/des/des.c b/crypto/des/des.c index 02c4828c5c..91d7967e31 100644 --- a/crypto/des/des.c +++ b/crypto/des/des.c @@ -374,7 +374,7 @@ void doencryption(void) register int i; des_key_schedule ks,ks2; - unsigned char iv[8],iv2[8]; + des_cblock iv,iv2; char *p; int num=0,j,k,l,rem,ll,len,last,ex=0; des_cblock kk,k2; @@ -387,8 +387,8 @@ void doencryption(void) if (buf == NULL) { - if ( (( buf=(unsigned char *)Malloc(BUFSIZE+8)) == NULL) || - ((obuf=(unsigned char *)Malloc(BUFSIZE+8)) == NULL)) + if ( (( buf=Malloc(BUFSIZE+8)) == NULL) || + ((obuf=Malloc(BUFSIZE+8)) == NULL)) { fputs("Not enough memory\n",stderr); Exit=10; @@ -435,19 +435,19 @@ void doencryption(void) else k2[i-8]=k; } - des_set_key((C_Block *)k2,ks2); + des_set_key(&k2,ks2); memset(k2,0,sizeof(k2)); } else if (longk || flag3) { if (flag3) { - des_string_to_2keys(key,(C_Block *)kk,(C_Block *)k2); - des_set_key((C_Block *)k2,ks2); + des_string_to_2keys(key,&kk,&k2); + des_set_key(&k2,ks2); memset(k2,0,sizeof(k2)); } else - des_string_to_key(key,(C_Block *)kk); + des_string_to_key(key,&kk); } else for (i=0; i= 8) memcpy(iv,&(obuf[l-8]),8); } if (rem) memcpy(buf,&(buf[l]),(unsigned int)rem); @@ -609,14 +609,14 @@ void doencryption(void) { des_3cbc_encrypt( (des_cblock *)buf,(des_cblock *)obuf, - (long)l,ks,ks2,(des_cblock *)iv, - (des_cblock *)iv2,do_encrypt); + (long)l,ks,ks2,&iv, + &iv2,do_encrypt); } else { des_cbc_encrypt( - (des_cblock *)buf,(des_cblock *)obuf, - (long)l,ks,(des_cblock *)iv,do_encrypt); + buf,obuf, + (long)l,ks,&iv,do_encrypt); if (l >= 8) memcpy(iv,&(buf[l-8]),8); } @@ -641,9 +641,9 @@ void doencryption(void) l=l-8+last; } i=0; - if (cflag) des_cbc_cksum((C_Block *)obuf, - (C_Block *)cksum,(long)l/8*8,ks, - (C_Block *)cksum); + if (cflag) des_cbc_cksum(obuf, + (des_cblock *)cksum,(long)l/8*8,ks, + (des_cblock *)cksum); while (i != l) { j=fwrite(obuf,1,(unsigned int)l-i,DES_OUT);