Change type of various DES function arguments from des_cblock

(meaning pointer to char) to des_cblock * (meaning pointer to
array with 8 char elements), which allows the compiler to
do more typechecking.  (The changed argument types were of type
des_cblock * back in SSLeay, and a lot of ugly casts were
used then to turn them into pointers to elements; but it can be
done without those casts.)

Introduce new type const_des_cblock -- before, the pointers rather
than the elements pointed to were declared const, and for
some reason gcc did not complain about this (but some other
compilers did).
This commit is contained in:
Bodo Möller
1999-05-16 12:26:16 +00:00
parent e186bf96b4
commit edf0bfb52b
37 changed files with 323 additions and 259 deletions

View File

@@ -580,9 +580,9 @@ int MAIN(int argc, char **argv)
#endif
#ifndef NO_DES
des_set_key(key,sch);
des_set_key(key2,sch2);
des_set_key(key3,sch3);
des_set_key(&key,sch);
des_set_key(&key2,sch2);
des_set_key(&key3,sch3);
#endif
#ifndef NO_IDEA
idea_set_encrypt_key(key16,&idea_ks);
@@ -833,7 +833,7 @@ int MAIN(int argc, char **argv)
Time_F(START);
for (count=0,run=1; COND(c[D_CBC_DES][j]); count++)
des_ncbc_encrypt(buf,buf,lengths[j],sch,
&(iv[0]),DES_ENCRYPT);
&iv,DES_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_CBC_DES],d);
@@ -850,7 +850,7 @@ int MAIN(int argc, char **argv)
for (count=0,run=1; COND(c[D_EDE3_DES][j]); count++)
des_ede3_cbc_encrypt(buf,buf,lengths[j],
sch,sch2,sch3,
&(iv[0]),DES_ENCRYPT);
&iv,DES_ENCRYPT);
d=Time_F(STOP);
BIO_printf(bio_err,"%ld %s's in %.2fs\n",
count,names[D_EDE3_DES],d);