Fix ghastly DES declarations, and all consequential warnings.
[openssl.git] / crypto / mdc2 / mdc2dgst.c
index 3f3d11a1a28ad66cff0bcc49a9102a9cacd7be98..72a0c763248c17b8c7ad52c9a0394e3a0833d1da 100644 (file)
@@ -135,33 +135,35 @@ unsigned int len;
        register DES_LONG tin0,tin1;
        register DES_LONG ttin0,ttin1;
        DES_LONG d[2],dd[2];
-       des_cblock *h,*hh;
+       unsigned char *h,*hh;
        des_key_schedule k;
        unsigned char *p;
        unsigned int i;
 
-       h= (des_cblock *)&(c->h[0]);
-       hh= (des_cblock *)&(c->hh[0]);
+       h= c->h;
+       hh= c->hh;
 
        for (i=0; i<len; i+=8)
                {
                c2l(in,tin0); d[0]=dd[0]=tin0;
                c2l(in,tin1); d[1]=dd[1]=tin1;
-               (*h)[0]=((*h)[0]&0x9f)|0x40;
-               (*hh)[0]=((*hh)[0]&0x9f)|0x20;
+               h[0]=(h[0]&0x9f)|0x40;
+               hh[0]=(hh[0]&0x9f)|0x20;
 
+               des_set_odd_parity(h);
                des_set_key(h,k);
-               des_encrypt((DES_LONG *)d,k,1);
+               des_encrypt(d,k,1);
 
+               des_set_odd_parity(hh);
                des_set_key(hh,k);
-               des_encrypt((DES_LONG *)dd,k,1);
+               des_encrypt(dd,k,1);
 
                ttin0=tin0^dd[0];
                ttin1=tin1^dd[1];
                tin0^=d[0];
                tin1^=d[1];
 
-               p=(unsigned char *)h;
+               p=h;
                l2c(tin0,p);
                l2c(ttin1,p);
                p=(unsigned char *)hh;