#include "des_locl.h"
-/* HAS BUGS? DON'T USE - this is only present for use in des.c */
+/* HAS BUGS! DON'T USE - this is only present for use in des.c */
void des_3cbc_encrypt(des_cblock *input, des_cblock *output, long length,
des_key_schedule ks1, des_key_schedule ks2, des_cblock *iv1,
des_cblock *iv2, int enc)
if (enc == DES_ENCRYPT)
{
- des_cbc_encrypt(input,output,length,ks1,iv1,enc);
+ des_cbc_encrypt((unsigned char*)input,
+ (unsigned char*)output,length,ks1,iv1,enc);
if (length >= sizeof(des_cblock))
memcpy(niv1,output[off],sizeof(des_cblock));
- des_cbc_encrypt(output,output,l8,ks2,iv1,!enc);
- des_cbc_encrypt(output,output,l8,ks1,iv2, enc);
+ des_cbc_encrypt((unsigned char*)output,
+ (unsigned char*)output,l8,ks2,iv1,!enc);
+ des_cbc_encrypt((unsigned char*)output,
+ (unsigned char*)output,l8,ks1,iv2,enc);
if (length >= sizeof(des_cblock))
memcpy(niv2,output[off],sizeof(des_cblock));
}
{
if (length >= sizeof(des_cblock))
memcpy(niv2,input[off],sizeof(des_cblock));
- des_cbc_encrypt(input,output,l8,ks1,iv2,enc);
- des_cbc_encrypt(output,output,l8,ks2,iv1,!enc);
+ des_cbc_encrypt((unsigned char*)input,
+ (unsigned char*)output,l8,ks1,iv2,enc);
+ des_cbc_encrypt((unsigned char*)output,
+ (unsigned char*)output,l8,ks2,iv1,!enc);
if (length >= sizeof(des_cblock))
memcpy(niv1,output[off],sizeof(des_cblock));
- des_cbc_encrypt(output,output,length,ks1,iv1, enc);
+ des_cbc_encrypt((unsigned char*)output,
+ (unsigned char*)output,length,ks1,iv1,enc);
}
memcpy(*iv1,niv1,sizeof(des_cblock));
memcpy(*iv2,niv2,sizeof(des_cblock));
}
if ((in=BIO_new_file(keyfile,"r")) == NULL) goto err;
- if ((x509=PEM_read_bio_X509(in,NULL,NULL)) == NULL) goto err;
+ if ((x509=PEM_read_bio_X509(in,NULL,NULL,NULL)) == NULL) goto err;
BIO_reset(in);
- if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL)) == NULL) goto err;
+ if ((pkey=PEM_read_bio_PrivateKey(in,NULL,NULL,NULL)) == NULL)
+ goto err;
BIO_free(in);
if (pp == NULL)
/* Load the PKCS7 object from a file */
- if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL)) == NULL) goto err;
+ if ((p7=PEM_read_bio_PKCS7(data,NULL,NULL,NULL)) == NULL) goto err;