Loading crypto/des/Makefile.ssl +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ MAKE= make -f Makefile.ssl MAKEDEPEND= $(TOP)/util/domd $(TOP) MAKEFILE= Makefile.ssl AR= ar r RANLIB= ranlib DES_ENC= des_enc.o fcrypt_b.o # or use #DES_ENC= dx86-elf.o yx86-elf.o Loading crypto/des/cbc3_enc.c +13 −7 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ #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) Loading @@ -69,11 +69,14 @@ void des_3cbc_encrypt(des_cblock *input, des_cblock *output, long length, 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)); } Loading @@ -81,11 +84,14 @@ void des_3cbc_encrypt(des_cblock *input, des_cblock *output, long length, { 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)); Loading crypto/pkcs7/dec.c +4 −3 Original line number Diff line number Diff line Loading @@ -121,9 +121,10 @@ char *argv[]; } 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) Loading @@ -131,7 +132,7 @@ char *argv[]; /* 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; Loading crypto/pkcs7/enc.c +2 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,8 @@ char *argv[]; argc-=2; argv+=2; if (!(in=BIO_new_file(keyfile,"r"))) goto err; if (!(x509=PEM_read_bio_X509(in,NULL,NULL))) goto err; if (!(x509=PEM_read_bio_X509(in,NULL,NULL,NULL))) goto err; if(!recips) recips = sk_X509_new_null(); sk_X509_push(recips, x509); BIO_free(in); Loading crypto/pkcs7/sign.c +2 −2 Original line number Diff line number Diff line Loading @@ -97,9 +97,9 @@ again: BIO_set_fp(data,stdin,BIO_NOCLOSE); if ((in=BIO_new_file("server.pem","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); p7=PKCS7_new(); Loading Loading
crypto/des/Makefile.ssl +1 −0 Original line number Diff line number Diff line Loading @@ -15,6 +15,7 @@ MAKE= make -f Makefile.ssl MAKEDEPEND= $(TOP)/util/domd $(TOP) MAKEFILE= Makefile.ssl AR= ar r RANLIB= ranlib DES_ENC= des_enc.o fcrypt_b.o # or use #DES_ENC= dx86-elf.o yx86-elf.o Loading
crypto/des/cbc3_enc.c +13 −7 Original line number Diff line number Diff line Loading @@ -58,7 +58,7 @@ #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) Loading @@ -69,11 +69,14 @@ void des_3cbc_encrypt(des_cblock *input, des_cblock *output, long length, 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)); } Loading @@ -81,11 +84,14 @@ void des_3cbc_encrypt(des_cblock *input, des_cblock *output, long length, { 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)); Loading
crypto/pkcs7/dec.c +4 −3 Original line number Diff line number Diff line Loading @@ -121,9 +121,10 @@ char *argv[]; } 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) Loading @@ -131,7 +132,7 @@ char *argv[]; /* 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; Loading
crypto/pkcs7/enc.c +2 −1 Original line number Diff line number Diff line Loading @@ -98,7 +98,8 @@ char *argv[]; argc-=2; argv+=2; if (!(in=BIO_new_file(keyfile,"r"))) goto err; if (!(x509=PEM_read_bio_X509(in,NULL,NULL))) goto err; if (!(x509=PEM_read_bio_X509(in,NULL,NULL,NULL))) goto err; if(!recips) recips = sk_X509_new_null(); sk_X509_push(recips, x509); BIO_free(in); Loading
crypto/pkcs7/sign.c +2 −2 Original line number Diff line number Diff line Loading @@ -97,9 +97,9 @@ again: BIO_set_fp(data,stdin,BIO_NOCLOSE); if ((in=BIO_new_file("server.pem","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); p7=PKCS7_new(); Loading