Commit 3ba5d1cf authored by Ben Laurie's avatar Ben Laurie
Browse files

Make EVPs allocate context memory, thus making them extensible. Rationalise

DES's keyschedules.

I know these two should be separate, and I'll back out the DES changes if they
are deemed to be an error.

Note that there is a memory leak lurking in SSL somewhere in this version.
parent be2e2c32
Loading
Loading
Loading
Loading
+20 −23
Original line number Diff line number Diff line
@@ -142,24 +142,24 @@ clean:
# DO NOT DELETE THIS LINE -- make depend depends on it.

cbc_cksm.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
cbc_cksm.o: ../../include/openssl/opensslconf.h cbc_cksm.c des_locl.h
cbc_cksm.o: ../../include/openssl/opensslconf.h des_locl.h
cbc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
cbc_enc.o: ../../include/openssl/opensslconf.h cbc_enc.c des_locl.h ncbc_enc.c
cbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h ncbc_enc.c
cfb64ede.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
cfb64ede.o: ../../include/openssl/opensslconf.h cfb64ede.c des_locl.h
cfb64ede.o: ../../include/openssl/opensslconf.h des_locl.h
cfb64enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
cfb64enc.o: ../../include/openssl/opensslconf.h cfb64enc.c des_locl.h
cfb64enc.o: ../../include/openssl/opensslconf.h des_locl.h
cfb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
cfb_enc.o: ../../include/openssl/opensslconf.h cfb_enc.c des_locl.h
cfb_enc.o: ../../include/openssl/opensslconf.h des_locl.h
des_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
des_enc.o: ../../include/openssl/opensslconf.h des_enc.c des_locl.h ncbc_enc.c
des_enc.o: ../../include/openssl/opensslconf.h des_locl.h des_locl.h ncbc_enc.c
ecb3_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
ecb3_enc.o: ../../include/openssl/opensslconf.h des_locl.h ecb3_enc.c
ecb3_enc.o: ../../include/openssl/opensslconf.h des_locl.h
ecb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
ecb_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
ecb_enc.o: des_locl.h ecb_enc.c spr.h
ecb_enc.o: des_locl.h spr.h
ede_cbcm_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
ede_cbcm_enc.o: ../../include/openssl/opensslconf.h des_locl.h ede_cbcm_enc.c
ede_cbcm_enc.o: ../../include/openssl/opensslconf.h des_locl.h
enc_read.o: ../../e_os.h ../../include/openssl/bio.h
enc_read.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
enc_read.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
@@ -167,7 +167,7 @@ enc_read.o: ../../include/openssl/err.h ../../include/openssl/lhash.h
enc_read.o: ../../include/openssl/opensslconf.h
enc_read.o: ../../include/openssl/opensslv.h ../../include/openssl/safestack.h
enc_read.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
enc_read.o: ../cryptlib.h des_locl.h enc_read.c
enc_read.o: ../cryptlib.h des_locl.h
enc_writ.o: ../../e_os.h ../../include/openssl/bio.h
enc_writ.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h
enc_writ.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
@@ -176,30 +176,27 @@ enc_writ.o: ../../include/openssl/opensslconf.h
enc_writ.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h
enc_writ.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h
enc_writ.o: ../../include/openssl/symhacks.h ../cryptlib.h des_locl.h
enc_writ.o: enc_writ.c
fcrypt.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
fcrypt.o: ../../include/openssl/opensslconf.h des_locl.h fcrypt.c
fcrypt.o: ../../include/openssl/opensslconf.h des_locl.h
fcrypt_b.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
fcrypt_b.o: ../../include/openssl/opensslconf.h des_locl.h fcrypt_b.c
fcrypt_b.o: ../../include/openssl/opensslconf.h des_locl.h
ofb64ede.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
ofb64ede.o: ../../include/openssl/opensslconf.h des_locl.h ofb64ede.c
ofb64ede.o: ../../include/openssl/opensslconf.h des_locl.h
ofb64enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
ofb64enc.o: ../../include/openssl/opensslconf.h des_locl.h ofb64enc.c
ofb64enc.o: ../../include/openssl/opensslconf.h des_locl.h
ofb_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
ofb_enc.o: ../../include/openssl/opensslconf.h des_locl.h ofb_enc.c
ofb_enc.o: ../../include/openssl/opensslconf.h des_locl.h
pcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
pcbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h pcbc_enc.c
pcbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h
qud_cksm.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
qud_cksm.o: ../../include/openssl/opensslconf.h des_locl.h qud_cksm.c
qud_cksm.o: ../../include/openssl/opensslconf.h des_locl.h
rand_key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
rand_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/rand.h
rand_key.o: rand_key.c
rpc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
rpc_enc.o: ../../include/openssl/opensslconf.h des_locl.h des_ver.h rpc_des.h
rpc_enc.o: rpc_enc.c
set_key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
set_key.o: ../../include/openssl/opensslconf.h des_locl.h set_key.c
set_key.o: ../../include/openssl/opensslconf.h des_locl.h
str2key.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
str2key.o: ../../include/openssl/opensslconf.h des_locl.h str2key.c
str2key.o: ../../include/openssl/opensslconf.h des_locl.h
xcbc_enc.o: ../../include/openssl/des.h ../../include/openssl/e_os2.h
xcbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h xcbc_enc.c
xcbc_enc.o: ../../include/openssl/opensslconf.h des_locl.h
+2 −2
Original line number Diff line number Diff line
@@ -59,8 +59,8 @@
#include "des_locl.h"

DES_LONG des_cbc_cksum(const unsigned char *in, des_cblock *output,
		long length,
		des_key_schedule schedule, const_des_cblock *ivec)
		       long length, des_key_schedule *schedule,
		       const_des_cblock *ivec)
	{
	register DES_LONG tout0,tout1,tin0,tin1;
	register long l=length;
+3 −2
Original line number Diff line number Diff line
@@ -64,8 +64,9 @@
 */

void des_ede3_cfb64_encrypt(const unsigned char *in, unsigned char *out,
	     long length, des_key_schedule ks1, des_key_schedule ks2,
	     des_key_schedule ks3, des_cblock *ivec, int *num, int enc)
			    long length, des_key_schedule *ks1,
			    des_key_schedule *ks2, des_key_schedule *ks3,
			    des_cblock *ivec, int *num, int enc)
	{
	register DES_LONG v0,v1;
	register long l=length;
+2 −2
Original line number Diff line number Diff line
@@ -64,8 +64,8 @@
 */

void des_cfb64_encrypt(const unsigned char *in, unsigned char *out,
	     long length, des_key_schedule schedule, des_cblock *ivec,
	     int *num, int enc)
		       long length, des_key_schedule *schedule,
		       des_cblock *ivec, int *num, int enc)
	{
	register DES_LONG v0,v1;
	register long l=length;
+1 −1
Original line number Diff line number Diff line
@@ -65,7 +65,7 @@
 * byte.
 */
void des_cfb_encrypt(const unsigned char *in, unsigned char *out, int numbits,
	     long length, des_key_schedule schedule, des_cblock *ivec, int enc)
		     long length, des_key_schedule *schedule, des_cblock *ivec, int enc)
	{
	register DES_LONG d0,d1,v0,v1,n=(numbits+7)/8;
	register DES_LONG mask0,mask1;
Loading