summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/evp
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/evp')
-rw-r--r--src/lib/libcrypto/evp/Makefile.ssl1163
-rw-r--r--src/lib/libcrypto/evp/bio_b64.c37
-rw-r--r--src/lib/libcrypto/evp/bio_enc.c22
-rw-r--r--src/lib/libcrypto/evp/bio_md.c22
-rw-r--r--src/lib/libcrypto/evp/bio_ok.c18
-rw-r--r--src/lib/libcrypto/evp/c_alld.c3
-rw-r--r--src/lib/libcrypto/evp/e_bf.c80
-rw-r--r--src/lib/libcrypto/evp/e_cast.c82
-rw-r--r--src/lib/libcrypto/evp/e_cbc_3d.c151
-rw-r--r--src/lib/libcrypto/evp/e_cbc_bf.c106
-rw-r--r--src/lib/libcrypto/evp/e_cbc_c.c107
-rw-r--r--src/lib/libcrypto/evp/e_cbc_d.c106
-rw-r--r--src/lib/libcrypto/evp/e_cbc_i.c119
-rw-r--r--src/lib/libcrypto/evp/e_cbc_r2.c216
-rw-r--r--src/lib/libcrypto/evp/e_cbc_r5.c108
-rw-r--r--src/lib/libcrypto/evp/e_cfb_3d.c155
-rw-r--r--src/lib/libcrypto/evp/e_cfb_bf.c108
-rw-r--r--src/lib/libcrypto/evp/e_cfb_c.c109
-rw-r--r--src/lib/libcrypto/evp/e_cfb_d.c110
-rw-r--r--src/lib/libcrypto/evp/e_cfb_i.c109
-rw-r--r--src/lib/libcrypto/evp/e_cfb_r2.c110
-rw-r--r--src/lib/libcrypto/evp/e_cfb_r5.c110
-rw-r--r--src/lib/libcrypto/evp/e_des.c118
-rw-r--r--src/lib/libcrypto/evp/e_des3.c165
-rw-r--r--src/lib/libcrypto/evp/e_ecb_3d.c158
-rw-r--r--src/lib/libcrypto/evp/e_ecb_bf.c109
-rw-r--r--src/lib/libcrypto/evp/e_ecb_c.c110
-rw-r--r--src/lib/libcrypto/evp/e_ecb_d.c118
-rw-r--r--src/lib/libcrypto/evp/e_ecb_i.c121
-rw-r--r--src/lib/libcrypto/evp/e_ecb_r2.c111
-rw-r--r--src/lib/libcrypto/evp/e_ecb_r5.c111
-rw-r--r--src/lib/libcrypto/evp/e_idea.c112
-rw-r--r--src/lib/libcrypto/evp/e_null.c20
-rw-r--r--src/lib/libcrypto/evp/e_ofb_3d.c152
-rw-r--r--src/lib/libcrypto/evp/e_ofb_bf.c109
-rw-r--r--src/lib/libcrypto/evp/e_ofb_c.c110
-rw-r--r--src/lib/libcrypto/evp/e_ofb_d.c107
-rw-r--r--src/lib/libcrypto/evp/e_ofb_i.c109
-rw-r--r--src/lib/libcrypto/evp/e_ofb_r2.c111
-rw-r--r--src/lib/libcrypto/evp/e_ofb_r5.c111
-rw-r--r--src/lib/libcrypto/evp/e_rc2.c222
-rw-r--r--src/lib/libcrypto/evp/e_rc4.c30
-rw-r--r--src/lib/libcrypto/evp/e_rc5.c118
-rw-r--r--src/lib/libcrypto/evp/e_xcbc_d.c33
-rw-r--r--src/lib/libcrypto/evp/encode.c10
-rw-r--r--src/lib/libcrypto/evp/evp.h133
-rw-r--r--src/lib/libcrypto/evp/evp_enc.c149
-rw-r--r--src/lib/libcrypto/evp/evp_err.c10
-rw-r--r--src/lib/libcrypto/evp/evp_key.c2
-rw-r--r--src/lib/libcrypto/evp/evp_locl.h168
-rw-r--r--src/lib/libcrypto/evp/evp_pbe.c12
-rw-r--r--src/lib/libcrypto/evp/evp_pkey.c49
-rw-r--r--src/lib/libcrypto/evp/m_md4.c83
-rw-r--r--src/lib/libcrypto/evp/p5_crpt.c3
-rw-r--r--src/lib/libcrypto/evp/p5_crpt2.c3
-rw-r--r--src/lib/libcrypto/evp/p_lib.c4
-rw-r--r--src/lib/libcrypto/evp/p_open.c20
-rw-r--r--src/lib/libcrypto/evp/p_seal.c13
58 files changed, 2020 insertions, 4255 deletions
diff --git a/src/lib/libcrypto/evp/Makefile.ssl b/src/lib/libcrypto/evp/Makefile.ssl
index c763b5ccd6..ad39fcc9e7 100644
--- a/src/lib/libcrypto/evp/Makefile.ssl
+++ b/src/lib/libcrypto/evp/Makefile.ssl
@@ -23,32 +23,22 @@ APPS=
23 23
24LIB=$(TOP)/libcrypto.a 24LIB=$(TOP)/libcrypto.a
25LIBSRC= encode.c digest.c evp_enc.c evp_key.c \ 25LIBSRC= encode.c digest.c evp_enc.c evp_key.c \
26 e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c \ 26 e_des.c e_bf.c e_idea.c e_des3.c \
27 e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c \ 27 e_rc4.c names.c \
28 e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c \ 28 e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \
29 e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c \ 29 m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \
30 e_ecb_r2.c e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c \ 30 m_dss.c m_dss1.c m_mdc2.c m_ripemd.c \
31 e_ecb_bf.c e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c \
32 e_ecb_c.c e_cbc_c.c e_cfb_c.c e_ofb_c.c \
33 e_ecb_r5.c e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c \
34 m_null.c m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c m_dss1.c m_mdc2.c \
35 m_ripemd.c \
36 p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ 31 p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \
37 bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \ 32 bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \
38 c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \ 33 c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \
39 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c 34 evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c
40 35
41LIBOBJ= encode.o digest.o evp_enc.o evp_key.o \ 36LIBOBJ= encode.o digest.o evp_enc.o evp_key.o \
42 e_ecb_d.o e_cbc_d.o e_cfb_d.o e_ofb_d.o \ 37 e_des.o e_bf.o e_idea.o e_des3.o \
43 e_ecb_i.o e_cbc_i.o e_cfb_i.o e_ofb_i.o \ 38 e_rc4.o names.o \
44 e_ecb_3d.o e_cbc_3d.o e_rc4.o names.o \ 39 e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \
45 e_cfb_3d.o e_ofb_3d.o e_xcbc_d.o \ 40 m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \
46 e_ecb_r2.o e_cbc_r2.o e_cfb_r2.o e_ofb_r2.o \ 41 m_dss.o m_dss1.o m_mdc2.o m_ripemd.o \
47 e_ecb_bf.o e_cbc_bf.o e_cfb_bf.o e_ofb_bf.o \
48 e_ecb_c.o e_cbc_c.o e_cfb_c.o e_ofb_c.o \
49 e_ecb_r5.o e_cbc_r5.o e_cfb_r5.o e_ofb_r5.o \
50 m_null.o m_md2.o m_md5.o m_sha.o m_sha1.o m_dss.o m_dss1.o m_mdc2.o \
51 m_ripemd.o \
52 p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \ 42 p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \
53 bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \ 43 bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \
54 c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \ 44 c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \
@@ -114,14 +104,16 @@ bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
114bio_b64.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 104bio_b64.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
115bio_b64.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 105bio_b64.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
116bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h 106bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h
117bio_b64.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 107bio_b64.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
108bio_b64.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
118bio_b64.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 109bio_b64.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
119bio_b64.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 110bio_b64.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
120bio_b64.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 111bio_b64.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
121bio_b64.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 112bio_b64.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
122bio_b64.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 113bio_b64.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
123bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 114bio_b64.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
124bio_b64.o: ../../include/openssl/stack.h ../cryptlib.h 115bio_b64.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
116bio_b64.o: ../../include/openssl/symhacks.h ../cryptlib.h
125bio_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 117bio_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
126bio_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 118bio_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
127bio_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 119bio_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -129,14 +121,16 @@ bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
129bio_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 121bio_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
130bio_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 122bio_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
131bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 123bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
132bio_enc.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 124bio_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
125bio_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
133bio_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 126bio_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
134bio_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 127bio_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
135bio_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 128bio_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
136bio_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 129bio_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
137bio_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 130bio_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
138bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 131bio_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
139bio_enc.o: ../../include/openssl/stack.h ../cryptlib.h 132bio_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
133bio_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h
140bio_md.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 134bio_md.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
141bio_md.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 135bio_md.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
142bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 136bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -144,14 +138,16 @@ bio_md.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
144bio_md.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 138bio_md.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
145bio_md.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 139bio_md.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
146bio_md.o: ../../include/openssl/err.h ../../include/openssl/evp.h 140bio_md.o: ../../include/openssl/err.h ../../include/openssl/evp.h
147bio_md.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 141bio_md.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
142bio_md.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
148bio_md.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 143bio_md.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
149bio_md.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 144bio_md.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
150bio_md.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 145bio_md.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
151bio_md.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 146bio_md.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
152bio_md.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 147bio_md.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
153bio_md.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 148bio_md.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
154bio_md.o: ../../include/openssl/stack.h ../cryptlib.h 149bio_md.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
150bio_md.o: ../../include/openssl/symhacks.h ../cryptlib.h
155bio_ok.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 151bio_ok.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
156bio_ok.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 152bio_ok.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
157bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 153bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -159,14 +155,16 @@ bio_ok.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
159bio_ok.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 155bio_ok.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
160bio_ok.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 156bio_ok.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
161bio_ok.o: ../../include/openssl/err.h ../../include/openssl/evp.h 157bio_ok.o: ../../include/openssl/err.h ../../include/openssl/evp.h
162bio_ok.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 158bio_ok.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
159bio_ok.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
163bio_ok.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 160bio_ok.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
164bio_ok.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 161bio_ok.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
165bio_ok.o: ../../include/openssl/opensslv.h ../../include/openssl/rand.h 162bio_ok.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
166bio_ok.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 163bio_ok.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
167bio_ok.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 164bio_ok.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
168bio_ok.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 165bio_ok.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
169bio_ok.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 166bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
167bio_ok.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
170bio_ok.o: ../cryptlib.h 168bio_ok.o: ../cryptlib.h
171c_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 169c_all.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
172c_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 170c_all.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
@@ -175,14 +173,16 @@ c_all.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
175c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 173c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
176c_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 174c_all.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
177c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h 175c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h
178c_all.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 176c_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
177c_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
179c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 178c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
180c_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 179c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
181c_all.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 180c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
182c_all.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 181c_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
183c_all.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 182c_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
184c_all.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 183c_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
185c_all.o: ../../include/openssl/stack.h ../cryptlib.h 184c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
185c_all.o: ../../include/openssl/symhacks.h ../cryptlib.h
186c_allc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 186c_allc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
187c_allc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 187c_allc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
188c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 188c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -190,15 +190,17 @@ c_allc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
190c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 190c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
191c_allc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 191c_allc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
192c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 192c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
193c_allc.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 193c_allc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
194c_allc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
194c_allc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 195c_allc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
195c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 196c_allc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
196c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h 197c_allc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
197c_allc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h 198c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
198c_allc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 199c_allc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
199c_allc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 200c_allc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
200c_allc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 201c_allc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
201c_allc.o: ../../include/openssl/stack.h ../../include/openssl/x509.h 202c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
203c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
202c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h 204c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
203c_alld.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 205c_alld.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
204c_alld.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 206c_alld.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
@@ -207,15 +209,17 @@ c_alld.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
207c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 209c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
208c_alld.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 210c_alld.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
209c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h 211c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h
210c_alld.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 212c_alld.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
213c_alld.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
211c_alld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 214c_alld.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
212c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 215c_alld.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
213c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs12.h 216c_alld.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
214c_alld.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h 217c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h
215c_alld.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 218c_alld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
216c_alld.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 219c_alld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
217c_alld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 220c_alld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
218c_alld.o: ../../include/openssl/stack.h ../../include/openssl/x509.h 221c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
222c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
219c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h 223c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
220digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 224digest.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
221digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 225digest.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
@@ -224,329 +228,101 @@ digest.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
224digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 228digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
225digest.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 229digest.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
226digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h 230digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h
227digest.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 231digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
232digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
228digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 233digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
229digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 234digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
230digest.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 235digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
231digest.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 236digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
232digest.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 237digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
233digest.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 238digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
234digest.o: ../../include/openssl/stack.h ../cryptlib.h 239digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
235e_cbc_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 240digest.o: ../../include/openssl/symhacks.h ../cryptlib.h
236e_cbc_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 241e_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
237e_cbc_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 242e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
238e_cbc_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 243e_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
239e_cbc_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 244e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
240e_cbc_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 245e_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
241e_cbc_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h 246e_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
242e_cbc_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 247e_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
243e_cbc_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 248e_bf.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
244e_cbc_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 249e_bf.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
245e_cbc_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 250e_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
246e_cbc_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 251e_bf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
247e_cbc_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 252e_bf.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
248e_cbc_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 253e_bf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
249e_cbc_3d.o: ../../include/openssl/stack.h ../cryptlib.h 254e_bf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
250e_cbc_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 255e_bf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
251e_cbc_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 256e_bf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
252e_cbc_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 257e_bf.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h
253e_cbc_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 258e_cast.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
254e_cbc_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 259e_cast.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
255e_cbc_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 260e_cast.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
256e_cbc_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h 261e_cast.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
257e_cbc_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 262e_cast.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
258e_cbc_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 263e_cast.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
259e_cbc_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 264e_cast.o: ../../include/openssl/err.h ../../include/openssl/evp.h
260e_cbc_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 265e_cast.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
261e_cbc_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 266e_cast.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
262e_cbc_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 267e_cast.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
263e_cbc_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 268e_cast.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
264e_cbc_bf.o: ../../include/openssl/stack.h ../cryptlib.h 269e_cast.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
265e_cbc_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 270e_cast.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
266e_cbc_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 271e_cast.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
267e_cbc_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 272e_cast.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
268e_cbc_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 273e_cast.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
269e_cbc_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 274e_cast.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h
270e_cbc_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 275e_des.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
271e_cbc_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h 276e_des.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
272e_cbc_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 277e_des.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
273e_cbc_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 278e_des.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
274e_cbc_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 279e_des.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
275e_cbc_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 280e_des.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
276e_cbc_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 281e_des.o: ../../include/openssl/err.h ../../include/openssl/evp.h
277e_cbc_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 282e_des.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
278e_cbc_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 283e_des.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
279e_cbc_c.o: ../../include/openssl/stack.h ../cryptlib.h 284e_des.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
280e_cbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 285e_des.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
281e_cbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 286e_des.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
282e_cbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 287e_des.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
283e_cbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 288e_des.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
284e_cbc_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 289e_des.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
285e_cbc_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 290e_des.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
286e_cbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h 291e_des.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h
287e_cbc_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 292e_des3.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
288e_cbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 293e_des3.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
289e_cbc_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 294e_des3.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
290e_cbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 295e_des3.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
291e_cbc_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 296e_des3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
292e_cbc_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 297e_des3.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
293e_cbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 298e_des3.o: ../../include/openssl/err.h ../../include/openssl/evp.h
294e_cbc_d.o: ../../include/openssl/stack.h ../cryptlib.h 299e_des3.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
295e_cbc_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 300e_des3.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
296e_cbc_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 301e_des3.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
297e_cbc_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 302e_des3.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
298e_cbc_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 303e_des3.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
299e_cbc_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 304e_des3.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
300e_cbc_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 305e_des3.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
301e_cbc_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h 306e_des3.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
302e_cbc_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 307e_des3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
303e_cbc_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 308e_des3.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h
304e_cbc_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 309e_idea.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
305e_cbc_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 310e_idea.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
306e_cbc_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 311e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
307e_cbc_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 312e_idea.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
308e_cbc_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 313e_idea.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
309e_cbc_i.o: ../../include/openssl/stack.h ../cryptlib.h 314e_idea.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
310e_cbc_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 315e_idea.o: ../../include/openssl/err.h ../../include/openssl/evp.h
311e_cbc_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 316e_idea.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
312e_cbc_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 317e_idea.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
313e_cbc_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 318e_idea.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
314e_cbc_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 319e_idea.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
315e_cbc_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 320e_idea.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
316e_cbc_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h 321e_idea.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
317e_cbc_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 322e_idea.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
318e_cbc_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 323e_idea.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
319e_cbc_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 324e_idea.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
320e_cbc_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 325e_idea.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h
321e_cbc_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
322e_cbc_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
323e_cbc_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
324e_cbc_r2.o: ../../include/openssl/stack.h ../cryptlib.h
325e_cbc_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
326e_cbc_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
327e_cbc_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
328e_cbc_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
329e_cbc_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
330e_cbc_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
331e_cbc_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
332e_cbc_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
333e_cbc_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
334e_cbc_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
335e_cbc_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
336e_cbc_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
337e_cbc_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
338e_cbc_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
339e_cbc_r5.o: ../../include/openssl/stack.h ../cryptlib.h
340e_cfb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
341e_cfb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
342e_cfb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
343e_cfb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
344e_cfb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
345e_cfb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
346e_cfb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
347e_cfb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
348e_cfb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
349e_cfb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
350e_cfb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
351e_cfb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
352e_cfb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
353e_cfb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
354e_cfb_3d.o: ../../include/openssl/stack.h ../cryptlib.h
355e_cfb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
356e_cfb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
357e_cfb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
358e_cfb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
359e_cfb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
360e_cfb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
361e_cfb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
362e_cfb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
363e_cfb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
364e_cfb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
365e_cfb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
366e_cfb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
367e_cfb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
368e_cfb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
369e_cfb_bf.o: ../../include/openssl/stack.h ../cryptlib.h
370e_cfb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
371e_cfb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
372e_cfb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
373e_cfb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
374e_cfb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
375e_cfb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
376e_cfb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h
377e_cfb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
378e_cfb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
379e_cfb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
380e_cfb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
381e_cfb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
382e_cfb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
383e_cfb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
384e_cfb_c.o: ../../include/openssl/stack.h ../cryptlib.h
385e_cfb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
386e_cfb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
387e_cfb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
388e_cfb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
389e_cfb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
390e_cfb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
391e_cfb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
392e_cfb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
393e_cfb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
394e_cfb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
395e_cfb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
396e_cfb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
397e_cfb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
398e_cfb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
399e_cfb_d.o: ../../include/openssl/stack.h ../cryptlib.h
400e_cfb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
401e_cfb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
402e_cfb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
403e_cfb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
404e_cfb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
405e_cfb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
406e_cfb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h
407e_cfb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
408e_cfb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
409e_cfb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
410e_cfb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
411e_cfb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
412e_cfb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
413e_cfb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
414e_cfb_i.o: ../../include/openssl/stack.h ../cryptlib.h
415e_cfb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
416e_cfb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
417e_cfb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
418e_cfb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
419e_cfb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
420e_cfb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
421e_cfb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
422e_cfb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
423e_cfb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
424e_cfb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
425e_cfb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
426e_cfb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
427e_cfb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
428e_cfb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
429e_cfb_r2.o: ../../include/openssl/stack.h ../cryptlib.h
430e_cfb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
431e_cfb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
432e_cfb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
433e_cfb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
434e_cfb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
435e_cfb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
436e_cfb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
437e_cfb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
438e_cfb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
439e_cfb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
440e_cfb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
441e_cfb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
442e_cfb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
443e_cfb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
444e_cfb_r5.o: ../../include/openssl/stack.h ../cryptlib.h
445e_ecb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
446e_ecb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
447e_ecb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
448e_ecb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
449e_ecb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
450e_ecb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
451e_ecb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
452e_ecb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
453e_ecb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
454e_ecb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
455e_ecb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
456e_ecb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
457e_ecb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
458e_ecb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
459e_ecb_3d.o: ../../include/openssl/stack.h ../cryptlib.h
460e_ecb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
461e_ecb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
462e_ecb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
463e_ecb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
464e_ecb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
465e_ecb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
466e_ecb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
467e_ecb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
468e_ecb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
469e_ecb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
470e_ecb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
471e_ecb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
472e_ecb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
473e_ecb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
474e_ecb_bf.o: ../../include/openssl/stack.h ../cryptlib.h
475e_ecb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
476e_ecb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
477e_ecb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
478e_ecb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
479e_ecb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
480e_ecb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
481e_ecb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h
482e_ecb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
483e_ecb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
484e_ecb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
485e_ecb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
486e_ecb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
487e_ecb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
488e_ecb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
489e_ecb_c.o: ../../include/openssl/stack.h ../cryptlib.h
490e_ecb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
491e_ecb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
492e_ecb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
493e_ecb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
494e_ecb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
495e_ecb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
496e_ecb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
497e_ecb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
498e_ecb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
499e_ecb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
500e_ecb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
501e_ecb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
502e_ecb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
503e_ecb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
504e_ecb_d.o: ../../include/openssl/stack.h ../cryptlib.h
505e_ecb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
506e_ecb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
507e_ecb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
508e_ecb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
509e_ecb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
510e_ecb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
511e_ecb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h
512e_ecb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
513e_ecb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
514e_ecb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
515e_ecb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
516e_ecb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
517e_ecb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
518e_ecb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
519e_ecb_i.o: ../../include/openssl/stack.h ../cryptlib.h
520e_ecb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
521e_ecb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
522e_ecb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
523e_ecb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
524e_ecb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
525e_ecb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
526e_ecb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
527e_ecb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
528e_ecb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
529e_ecb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
530e_ecb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
531e_ecb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
532e_ecb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
533e_ecb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
534e_ecb_r2.o: ../../include/openssl/stack.h ../cryptlib.h
535e_ecb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
536e_ecb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
537e_ecb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
538e_ecb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
539e_ecb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
540e_ecb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
541e_ecb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
542e_ecb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
543e_ecb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
544e_ecb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
545e_ecb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
546e_ecb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
547e_ecb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
548e_ecb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
549e_ecb_r5.o: ../../include/openssl/stack.h ../cryptlib.h
550e_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 326e_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
551e_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 327e_null.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
552e_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 328e_null.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -554,119 +330,33 @@ e_null.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
554e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 330e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
555e_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 331e_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
556e_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h 332e_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h
557e_null.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 333e_null.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
334e_null.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
558e_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 335e_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
559e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 336e_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
560e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 337e_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
561e_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 338e_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
562e_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 339e_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
563e_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 340e_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
564e_null.o: ../../include/openssl/stack.h ../cryptlib.h 341e_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
565e_ofb_3d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 342e_null.o: ../../include/openssl/symhacks.h ../cryptlib.h
566e_ofb_3d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 343e_rc2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
567e_ofb_3d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 344e_rc2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
568e_ofb_3d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h 345e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
569e_ofb_3d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 346e_rc2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
570e_ofb_3d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 347e_rc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
571e_ofb_3d.o: ../../include/openssl/err.h ../../include/openssl/evp.h 348e_rc2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
572e_ofb_3d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 349e_rc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
573e_ofb_3d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 350e_rc2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
574e_ofb_3d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 351e_rc2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
575e_ofb_3d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 352e_rc2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
576e_ofb_3d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 353e_rc2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
577e_ofb_3d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 354e_rc2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
578e_ofb_3d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 355e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
579e_ofb_3d.o: ../../include/openssl/stack.h ../cryptlib.h 356e_rc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
580e_ofb_bf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 357e_rc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
581e_ofb_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 358e_rc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
582e_ofb_bf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 359e_rc2.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h
583e_ofb_bf.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
584e_ofb_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
585e_ofb_bf.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
586e_ofb_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h
587e_ofb_bf.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
588e_ofb_bf.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
589e_ofb_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
590e_ofb_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
591e_ofb_bf.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
592e_ofb_bf.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
593e_ofb_bf.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
594e_ofb_bf.o: ../../include/openssl/stack.h ../cryptlib.h
595e_ofb_c.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
596e_ofb_c.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
597e_ofb_c.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
598e_ofb_c.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
599e_ofb_c.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
600e_ofb_c.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
601e_ofb_c.o: ../../include/openssl/err.h ../../include/openssl/evp.h
602e_ofb_c.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
603e_ofb_c.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
604e_ofb_c.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
605e_ofb_c.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
606e_ofb_c.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
607e_ofb_c.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
608e_ofb_c.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
609e_ofb_c.o: ../../include/openssl/stack.h ../cryptlib.h
610e_ofb_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
611e_ofb_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
612e_ofb_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
613e_ofb_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
614e_ofb_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
615e_ofb_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
616e_ofb_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
617e_ofb_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
618e_ofb_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
619e_ofb_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
620e_ofb_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
621e_ofb_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
622e_ofb_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
623e_ofb_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
624e_ofb_d.o: ../../include/openssl/stack.h ../cryptlib.h
625e_ofb_i.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
626e_ofb_i.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
627e_ofb_i.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
628e_ofb_i.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
629e_ofb_i.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
630e_ofb_i.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
631e_ofb_i.o: ../../include/openssl/err.h ../../include/openssl/evp.h
632e_ofb_i.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
633e_ofb_i.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
634e_ofb_i.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
635e_ofb_i.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
636e_ofb_i.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
637e_ofb_i.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
638e_ofb_i.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
639e_ofb_i.o: ../../include/openssl/stack.h ../cryptlib.h
640e_ofb_r2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
641e_ofb_r2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
642e_ofb_r2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
643e_ofb_r2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
644e_ofb_r2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
645e_ofb_r2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
646e_ofb_r2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
647e_ofb_r2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
648e_ofb_r2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
649e_ofb_r2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
650e_ofb_r2.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
651e_ofb_r2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
652e_ofb_r2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
653e_ofb_r2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
654e_ofb_r2.o: ../../include/openssl/stack.h ../cryptlib.h
655e_ofb_r5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
656e_ofb_r5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
657e_ofb_r5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
658e_ofb_r5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
659e_ofb_r5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
660e_ofb_r5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
661e_ofb_r5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
662e_ofb_r5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h
663e_ofb_r5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
664e_ofb_r5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
665e_ofb_r5.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
666e_ofb_r5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
667e_ofb_r5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
668e_ofb_r5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
669e_ofb_r5.o: ../../include/openssl/stack.h ../cryptlib.h
670e_rc4.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 360e_rc4.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
671e_rc4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 361e_rc4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
672e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 362e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -674,14 +364,33 @@ e_rc4.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
674e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 364e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
675e_rc4.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 365e_rc4.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
676e_rc4.o: ../../include/openssl/err.h ../../include/openssl/evp.h 366e_rc4.o: ../../include/openssl/err.h ../../include/openssl/evp.h
677e_rc4.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 367e_rc4.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
368e_rc4.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
678e_rc4.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 369e_rc4.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
679e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 370e_rc4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
680e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 371e_rc4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
681e_rc4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 372e_rc4.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
682e_rc4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 373e_rc4.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
683e_rc4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 374e_rc4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
684e_rc4.o: ../../include/openssl/stack.h ../cryptlib.h 375e_rc4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
376e_rc4.o: ../../include/openssl/symhacks.h ../cryptlib.h
377e_rc5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
378e_rc5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
379e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
380e_rc5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
381e_rc5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
382e_rc5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
383e_rc5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
384e_rc5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
385e_rc5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
386e_rc5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
387e_rc5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
388e_rc5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
389e_rc5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
390e_rc5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
391e_rc5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
392e_rc5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
393e_rc5.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h
685e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 394e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
686e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 395e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
687e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 396e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -689,14 +398,17 @@ e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
689e_xcbc_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 398e_xcbc_d.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
690e_xcbc_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 399e_xcbc_d.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
691e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h 400e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h
692e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 401e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
402e_xcbc_d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
693e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 403e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
694e_xcbc_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 404e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
405e_xcbc_d.o: ../../include/openssl/opensslconf.h
695e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 406e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h
696e_xcbc_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 407e_xcbc_d.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
697e_xcbc_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 408e_xcbc_d.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
698e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 409e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
699e_xcbc_d.o: ../../include/openssl/stack.h ../cryptlib.h 410e_xcbc_d.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
411e_xcbc_d.o: ../cryptlib.h
700encode.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 412encode.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
701encode.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 413encode.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
702encode.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 414encode.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -704,14 +416,16 @@ encode.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
704encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 416encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
705encode.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 417encode.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
706encode.o: ../../include/openssl/err.h ../../include/openssl/evp.h 418encode.o: ../../include/openssl/err.h ../../include/openssl/evp.h
707encode.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 419encode.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
420encode.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
708encode.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 421encode.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
709encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 422encode.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
710encode.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 423encode.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
711encode.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 424encode.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
712encode.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 425encode.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
713encode.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 426encode.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
714encode.o: ../../include/openssl/stack.h ../cryptlib.h 427encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
428encode.o: ../../include/openssl/symhacks.h ../cryptlib.h
715evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 429evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
716evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 430evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
717evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 431evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -719,28 +433,32 @@ evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
719evp_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 433evp_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
720evp_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 434evp_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
721evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 435evp_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
722evp_enc.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 436evp_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
437evp_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
723evp_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 438evp_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
724evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 439evp_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
725evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 440evp_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
726evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 441evp_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
727evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 442evp_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
728evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 443evp_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
729evp_enc.o: ../../include/openssl/stack.h ../cryptlib.h 444evp_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
445evp_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_locl.h
730evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 446evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
731evp_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 447evp_err.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
732evp_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h 448evp_err.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h
733evp_err.o: ../../include/openssl/des.h ../../include/openssl/dh.h 449evp_err.o: ../../include/openssl/des.h ../../include/openssl/dh.h
734evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h 450evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h
735evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h 451evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h
736evp_err.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 452evp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
453evp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
737evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 454evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
738evp_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 455evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
739evp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 456evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
740evp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 457evp_err.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
741evp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 458evp_err.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
742evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 459evp_err.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
743evp_err.o: ../../include/openssl/stack.h 460evp_err.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
461evp_err.o: ../../include/openssl/symhacks.h
744evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 462evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
745evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 463evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
746evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 464evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -748,14 +466,16 @@ evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
748evp_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 466evp_key.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
749evp_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 467evp_key.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
750evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h 468evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h
751evp_key.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 469evp_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
470evp_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
752evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 471evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
753evp_key.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 472evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
754evp_key.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 473evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
755evp_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 474evp_key.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
756evp_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 475evp_key.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
757evp_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 476evp_key.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
758evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 477evp_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
478evp_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
759evp_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 479evp_key.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
760evp_key.o: ../cryptlib.h 480evp_key.o: ../cryptlib.h
761evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 481evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -765,14 +485,16 @@ evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
765evp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 485evp_lib.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
766evp_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 486evp_lib.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
767evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h 487evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h
768evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 488evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
489evp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
769evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 490evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
770evp_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 491evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
771evp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/rc2.h 492evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
772evp_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 493evp_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
773evp_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 494evp_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
774evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 495evp_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
775evp_lib.o: ../../include/openssl/stack.h ../cryptlib.h 496evp_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
497evp_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h
776evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 498evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
777evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 499evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
778evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 500evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -780,14 +502,16 @@ evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
780evp_pbe.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 502evp_pbe.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
781evp_pbe.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 503evp_pbe.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
782evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h 504evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h
783evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 505evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
506evp_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
784evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 507evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
785evp_pbe.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 508evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
786evp_pbe.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 509evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
787evp_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 510evp_pbe.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
788evp_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 511evp_pbe.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
789evp_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 512evp_pbe.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
790evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 513evp_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
514evp_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
791evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 515evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
792evp_pbe.o: ../cryptlib.h 516evp_pbe.o: ../cryptlib.h
793evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 517evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -797,16 +521,19 @@ evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
797evp_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 521evp_pkey.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
798evp_pkey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 522evp_pkey.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
799evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h 523evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h
800evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 524evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
525evp_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
801evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 526evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
802evp_pkey.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 527evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
528evp_pkey.o: ../../include/openssl/opensslconf.h
803evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 529evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
804evp_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h 530evp_pkey.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h
805evp_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 531evp_pkey.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
806evp_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 532evp_pkey.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
807evp_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 533evp_pkey.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
808evp_pkey.o: ../../include/openssl/stack.h ../../include/openssl/x509.h 534evp_pkey.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
809evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h 535evp_pkey.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
536evp_pkey.o: ../cryptlib.h
810m_dss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 537m_dss.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
811m_dss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 538m_dss.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
812m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 539m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -814,14 +541,16 @@ m_dss.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
814m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 541m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
815m_dss.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 542m_dss.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
816m_dss.o: ../../include/openssl/err.h ../../include/openssl/evp.h 543m_dss.o: ../../include/openssl/err.h ../../include/openssl/evp.h
817m_dss.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 544m_dss.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
545m_dss.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
818m_dss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 546m_dss.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
819m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 547m_dss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
820m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 548m_dss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
821m_dss.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 549m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
822m_dss.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 550m_dss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
823m_dss.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 551m_dss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
824m_dss.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 552m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
553m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
825m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 554m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
826m_dss.o: ../cryptlib.h 555m_dss.o: ../cryptlib.h
827m_dss1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 556m_dss1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -831,14 +560,16 @@ m_dss1.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
831m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 560m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
832m_dss1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 561m_dss1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
833m_dss1.o: ../../include/openssl/err.h ../../include/openssl/evp.h 562m_dss1.o: ../../include/openssl/err.h ../../include/openssl/evp.h
834m_dss1.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 563m_dss1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
564m_dss1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
835m_dss1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 565m_dss1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
836m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 566m_dss1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
837m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 567m_dss1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
838m_dss1.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 568m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
839m_dss1.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 569m_dss1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
840m_dss1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 570m_dss1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
841m_dss1.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 571m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
572m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
842m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 573m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
843m_dss1.o: ../cryptlib.h 574m_dss1.o: ../cryptlib.h
844m_md2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 575m_md2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -848,16 +579,37 @@ m_md2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
848m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 579m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
849m_md2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 580m_md2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
850m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h 581m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
851m_md2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 582m_md2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
583m_md2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
852m_md2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 584m_md2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
853m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 585m_md2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
854m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 586m_md2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
855m_md2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 587m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
856m_md2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 588m_md2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
857m_md2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 589m_md2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
858m_md2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 590m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
591m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
859m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 592m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
860m_md2.o: ../cryptlib.h 593m_md2.o: ../cryptlib.h
594m_md4.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
595m_md4.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
596m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
597m_md4.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
598m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
599m_md4.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
600m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h
601m_md4.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
602m_md4.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
603m_md4.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
604m_md4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
605m_md4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
606m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
607m_md4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
608m_md4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
609m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
610m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
611m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
612m_md4.o: ../cryptlib.h
861m_md5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 613m_md5.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
862m_md5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 614m_md5.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
863m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 615m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -865,14 +617,16 @@ m_md5.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
865m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 617m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
866m_md5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 618m_md5.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
867m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h 619m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h
868m_md5.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 620m_md5.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
621m_md5.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
869m_md5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 622m_md5.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
870m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 623m_md5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
871m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 624m_md5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
872m_md5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 625m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
873m_md5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 626m_md5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
874m_md5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 627m_md5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
875m_md5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 628m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
629m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
876m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 630m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
877m_md5.o: ../cryptlib.h 631m_md5.o: ../cryptlib.h
878m_mdc2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 632m_mdc2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -882,14 +636,16 @@ m_mdc2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
882m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 636m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
883m_mdc2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 637m_mdc2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
884m_mdc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h 638m_mdc2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
885m_mdc2.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 639m_mdc2.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
640m_mdc2.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
886m_mdc2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 641m_mdc2.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
887m_mdc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 642m_mdc2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
888m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 643m_mdc2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
889m_mdc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 644m_mdc2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
890m_mdc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 645m_mdc2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
891m_mdc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 646m_mdc2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
892m_mdc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 647m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
648m_mdc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
893m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 649m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
894m_mdc2.o: ../cryptlib.h 650m_mdc2.o: ../cryptlib.h
895m_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 651m_null.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -899,14 +655,16 @@ m_null.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
899m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 655m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
900m_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 656m_null.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
901m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h 657m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h
902m_null.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 658m_null.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
659m_null.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
903m_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 660m_null.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
904m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 661m_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
905m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 662m_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
906m_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 663m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
907m_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 664m_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
908m_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 665m_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
909m_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 666m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
667m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
910m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 668m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
911m_null.o: ../cryptlib.h 669m_null.o: ../cryptlib.h
912m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 670m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -916,16 +674,18 @@ m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
916m_ripemd.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 674m_ripemd.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
917m_ripemd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 675m_ripemd.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
918m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h 676m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h
919m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 677m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
678m_ripemd.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
920m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 679m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
921m_ripemd.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 680m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
681m_ripemd.o: ../../include/openssl/opensslconf.h
922m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 682m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
923m_ripemd.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 683m_ripemd.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
924m_ripemd.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 684m_ripemd.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
925m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 685m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
926m_ripemd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 686m_ripemd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
927m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 687m_ripemd.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
928m_ripemd.o: ../cryptlib.h 688m_ripemd.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
929m_sha.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 689m_sha.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
930m_sha.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 690m_sha.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
931m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 691m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -933,14 +693,16 @@ m_sha.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
933m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 693m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
934m_sha.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 694m_sha.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
935m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h 695m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h
936m_sha.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 696m_sha.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
697m_sha.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
937m_sha.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 698m_sha.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
938m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 699m_sha.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
939m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 700m_sha.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
940m_sha.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 701m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
941m_sha.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 702m_sha.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
942m_sha.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 703m_sha.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
943m_sha.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 704m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
705m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
944m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 706m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
945m_sha.o: ../cryptlib.h 707m_sha.o: ../cryptlib.h
946m_sha1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 708m_sha1.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -950,14 +712,16 @@ m_sha1.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
950m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 712m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
951m_sha1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 713m_sha1.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
952m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h 714m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h
953m_sha1.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 715m_sha1.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
716m_sha1.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
954m_sha1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 717m_sha1.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
955m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 718m_sha1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
956m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 719m_sha1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
957m_sha1.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 720m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
958m_sha1.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 721m_sha1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
959m_sha1.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 722m_sha1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
960m_sha1.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 723m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
724m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
961m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 725m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
962m_sha1.o: ../cryptlib.h 726m_sha1.o: ../cryptlib.h
963names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 727names.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -967,14 +731,16 @@ names.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
967names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 731names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
968names.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 732names.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
969names.o: ../../include/openssl/err.h ../../include/openssl/evp.h 733names.o: ../../include/openssl/err.h ../../include/openssl/evp.h
970names.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 734names.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
735names.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
971names.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 736names.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
972names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 737names.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
973names.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 738names.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
974names.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 739names.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
975names.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 740names.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
976names.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 741names.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
977names.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 742names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
743names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
978names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 744names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
979names.o: ../cryptlib.h 745names.o: ../cryptlib.h
980p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 746p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -984,14 +750,16 @@ p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
984p5_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 750p5_crpt.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
985p5_crpt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 751p5_crpt.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
986p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h 752p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h
987p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 753p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
754p5_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
988p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 755p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
989p5_crpt.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 756p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
990p5_crpt.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 757p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
991p5_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 758p5_crpt.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
992p5_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 759p5_crpt.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
993p5_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 760p5_crpt.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
994p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 761p5_crpt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
762p5_crpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
995p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 763p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
996p5_crpt.o: ../cryptlib.h 764p5_crpt.o: ../cryptlib.h
997p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 765p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -1002,16 +770,17 @@ p5_crpt2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1002p5_crpt2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 770p5_crpt2.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1003p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h 771p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1004p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h 772p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h
1005p5_crpt2.o: ../../include/openssl/md2.h ../../include/openssl/md5.h 773p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1006p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h 774p5_crpt2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1007p5_crpt2.o: ../../include/openssl/opensslconf.h 775p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
776p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1008p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 777p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
1009p5_crpt2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 778p5_crpt2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1010p5_crpt2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 779p5_crpt2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1011p5_crpt2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 780p5_crpt2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1012p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 781p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1013p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 782p5_crpt2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
1014p5_crpt2.o: ../cryptlib.h 783p5_crpt2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
1015p_dec.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 784p_dec.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
1016p_dec.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 785p_dec.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
1017p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h 786p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h
@@ -1019,15 +788,17 @@ p_dec.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1019p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 788p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1020p_dec.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 789p_dec.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1021p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h 790p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1022p_dec.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 791p_dec.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
792p_dec.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1023p_dec.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 793p_dec.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1024p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 794p_dec.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1025p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 795p_dec.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1026p_dec.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h 796p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
1027p_dec.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 797p_dec.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1028p_dec.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 798p_dec.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1029p_dec.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 799p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1030p_dec.o: ../../include/openssl/stack.h ../../include/openssl/x509.h 800p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
801p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
1031p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h 802p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
1032p_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 803p_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
1033p_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 804p_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
@@ -1036,15 +807,17 @@ p_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1036p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 807p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1037p_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 808p_enc.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1038p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h 809p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1039p_enc.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 810p_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
811p_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1040p_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 812p_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1041p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 813p_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1042p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 814p_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1043p_enc.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h 815p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
1044p_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 816p_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1045p_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 817p_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1046p_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 818p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1047p_enc.o: ../../include/openssl/stack.h ../../include/openssl/x509.h 819p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
820p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
1048p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h 821p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
1049p_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h 822p_lib.o: ../../include/openssl/asn1.h ../../include/openssl/asn1_mac.h
1050p_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h 823p_lib.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h
@@ -1054,14 +827,16 @@ p_lib.o: ../../include/openssl/des.h ../../include/openssl/dh.h
1054p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h 827p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os.h
1055p_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h 828p_lib.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h
1056p_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h 829p_lib.o: ../../include/openssl/evp.h ../../include/openssl/idea.h
1057p_lib.o: ../../include/openssl/md2.h ../../include/openssl/md5.h 830p_lib.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h
1058p_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/objects.h 831p_lib.o: ../../include/openssl/md4.h ../../include/openssl/md5.h
1059p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h 832p_lib.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h
1060p_lib.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h 833p_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h
1061p_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 834p_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
1062p_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 835p_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1063p_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 836p_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1064p_lib.o: ../../include/openssl/stack.h ../../include/openssl/x509.h 837p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
838p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
839p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
1065p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h 840p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
1066p_open.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 841p_open.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
1067p_open.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 842p_open.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
@@ -1070,14 +845,16 @@ p_open.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1070p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 845p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1071p_open.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 846p_open.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1072p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h 847p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1073p_open.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 848p_open.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
849p_open.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1074p_open.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 850p_open.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1075p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 851p_open.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1076p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 852p_open.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1077p_open.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 853p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1078p_open.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 854p_open.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1079p_open.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 855p_open.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1080p_open.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 856p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
857p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1081p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 858p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1082p_open.o: ../cryptlib.h 859p_open.o: ../cryptlib.h
1083p_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 860p_seal.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -1087,15 +864,17 @@ p_seal.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1087p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 864p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1088p_seal.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 865p_seal.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1089p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h 866p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1090p_seal.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 867p_seal.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
868p_seal.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1091p_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 869p_seal.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1092p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 870p_seal.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1093p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 871p_seal.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1094p_seal.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h 872p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h
1095p_seal.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h 873p_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1096p_seal.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h 874p_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1097p_seal.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h 875p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1098p_seal.o: ../../include/openssl/stack.h ../../include/openssl/x509.h 876p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
877p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
1099p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h 878p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
1100p_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 879p_sign.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
1101p_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h 880p_sign.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h
@@ -1104,14 +883,16 @@ p_sign.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1104p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 883p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1105p_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 884p_sign.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1106p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h 885p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1107p_sign.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 886p_sign.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
887p_sign.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1108p_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 888p_sign.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1109p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 889p_sign.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
1110p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 890p_sign.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h
1111p_sign.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 891p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h
1112p_sign.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 892p_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h
1113p_sign.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 893p_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h
1114p_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 894p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h
895p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h
1115p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 896p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h
1116p_sign.o: ../cryptlib.h 897p_sign.o: ../cryptlib.h
1117p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h 898p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h
@@ -1121,13 +902,15 @@ p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h
1121p_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h 902p_verify.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h
1122p_verify.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h 903p_verify.o: ../../include/openssl/e_os.h ../../include/openssl/e_os2.h
1123p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h 904p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h
1124p_verify.o: ../../include/openssl/idea.h ../../include/openssl/md2.h 905p_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h
906p_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h
1125p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h 907p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h
1126p_verify.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h 908p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h
909p_verify.o: ../../include/openssl/opensslconf.h
1127p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h 910p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/pkcs7.h
1128p_verify.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h 911p_verify.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h
1129p_verify.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h 912p_verify.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h
1130p_verify.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h 913p_verify.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h
1131p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h 914p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h
1132p_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h 915p_verify.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h
1133p_verify.o: ../cryptlib.h 916p_verify.o: ../../include/openssl/x509_vfy.h ../cryptlib.h
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c
index bd5e24f993..af6fa2ae8f 100644
--- a/src/lib/libcrypto/evp/bio_b64.c
+++ b/src/lib/libcrypto/evp/bio_b64.c
@@ -62,14 +62,14 @@
62#include <openssl/buffer.h> 62#include <openssl/buffer.h>
63#include <openssl/evp.h> 63#include <openssl/evp.h>
64 64
65static int b64_write(BIO *h,char *buf,int num); 65static int b64_write(BIO *h, const char *buf, int num);
66static int b64_read(BIO *h,char *buf,int size); 66static int b64_read(BIO *h, char *buf, int size);
67/*static int b64_puts(BIO *h,char *str); */ 67/*static int b64_puts(BIO *h, const char *str); */
68/*static int b64_gets(BIO *h,char *str,int size); */ 68/*static int b64_gets(BIO *h, char *str, int size); */
69static long b64_ctrl(BIO *h,int cmd,long arg1,char *arg2); 69static long b64_ctrl(BIO *h, int cmd, long arg1, void *arg2);
70static int b64_new(BIO *h); 70static int b64_new(BIO *h);
71static int b64_free(BIO *data); 71static int b64_free(BIO *data);
72static long b64_callback_ctrl(BIO *h,int cmd,void (*fp)()); 72static long b64_callback_ctrl(BIO *h,int cmd,bio_info_cb *fp);
73#define B64_BLOCK_SIZE 1024 73#define B64_BLOCK_SIZE 1024
74#define B64_BLOCK_SIZE2 768 74#define B64_BLOCK_SIZE2 768
75#define B64_NONE 0 75#define B64_NONE 0
@@ -113,7 +113,7 @@ static int b64_new(BIO *bi)
113 { 113 {
114 BIO_B64_CTX *ctx; 114 BIO_B64_CTX *ctx;
115 115
116 ctx=(BIO_B64_CTX *)Malloc(sizeof(BIO_B64_CTX)); 116 ctx=(BIO_B64_CTX *)OPENSSL_malloc(sizeof(BIO_B64_CTX));
117 if (ctx == NULL) return(0); 117 if (ctx == NULL) return(0);
118 118
119 ctx->buf_len=0; 119 ctx->buf_len=0;
@@ -133,7 +133,7 @@ static int b64_new(BIO *bi)
133static int b64_free(BIO *a) 133static int b64_free(BIO *a)
134 { 134 {
135 if (a == NULL) return(0); 135 if (a == NULL) return(0);
136 Free(a->ptr); 136 OPENSSL_free(a->ptr);
137 a->ptr=NULL; 137 a->ptr=NULL;
138 a->init=0; 138 a->init=0;
139 a->flags=0; 139 a->flags=0;
@@ -340,7 +340,7 @@ static int b64_read(BIO *b, char *out, int outl)
340 return((ret == 0)?ret_code:ret); 340 return((ret == 0)?ret_code:ret);
341 } 341 }
342 342
343static int b64_write(BIO *b, char *in, int inl) 343static int b64_write(BIO *b, const char *in, int inl)
344 { 344 {
345 int ret=inl,n,i; 345 int ret=inl,n,i;
346 BIO_B64_CTX *ctx; 346 BIO_B64_CTX *ctx;
@@ -370,10 +370,11 @@ static int b64_write(BIO *b, char *in, int inl)
370 n-=i; 370 n-=i;
371 } 371 }
372 /* at this point all pending data has been written */ 372 /* at this point all pending data has been written */
373 ctx->buf_off=0;
374 ctx->buf_len=0;
373 375
374 if ((in == NULL) || (inl <= 0)) return(0); 376 if ((in == NULL) || (inl <= 0)) return(0);
375 377
376 ctx->buf_off=0;
377 while (inl > 0) 378 while (inl > 0)
378 { 379 {
379 n=(inl > B64_BLOCK_SIZE)?B64_BLOCK_SIZE:inl; 380 n=(inl > B64_BLOCK_SIZE)?B64_BLOCK_SIZE:inl;
@@ -383,14 +384,20 @@ static int b64_write(BIO *b, char *in, int inl)
383 if (ctx->tmp_len > 0) 384 if (ctx->tmp_len > 0)
384 { 385 {
385 n=3-ctx->tmp_len; 386 n=3-ctx->tmp_len;
387 /* There's a teoretical possibility for this */
388 if (n > inl)
389 n=inl;
386 memcpy(&(ctx->tmp[ctx->tmp_len]),in,n); 390 memcpy(&(ctx->tmp[ctx->tmp_len]),in,n);
387 ctx->tmp_len+=n; 391 ctx->tmp_len+=n;
388 n=ctx->tmp_len; 392 if (ctx->tmp_len < 3)
389 if (n < 3)
390 break; 393 break;
391 ctx->buf_len=EVP_EncodeBlock( 394 ctx->buf_len=EVP_EncodeBlock(
392 (unsigned char *)ctx->buf, 395 (unsigned char *)ctx->buf,
393 (unsigned char *)ctx->tmp,n); 396 (unsigned char *)ctx->tmp,
397 ctx->tmp_len);
398 /* Since we're now done using the temporary
399 buffer, the length should be 0'd */
400 ctx->tmp_len=0;
394 } 401 }
395 else 402 else
396 { 403 {
@@ -434,7 +441,7 @@ static int b64_write(BIO *b, char *in, int inl)
434 return(ret); 441 return(ret);
435 } 442 }
436 443
437static long b64_ctrl(BIO *b, int cmd, long num, char *ptr) 444static long b64_ctrl(BIO *b, int cmd, long num, void *ptr)
438 { 445 {
439 BIO_B64_CTX *ctx; 446 BIO_B64_CTX *ctx;
440 long ret=1; 447 long ret=1;
@@ -524,7 +531,7 @@ again:
524 return(ret); 531 return(ret);
525 } 532 }
526 533
527static long b64_callback_ctrl(BIO *b, int cmd, void (*fp)()) 534static long b64_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
528 { 535 {
529 long ret=1; 536 long ret=1;
530 537
diff --git a/src/lib/libcrypto/evp/bio_enc.c b/src/lib/libcrypto/evp/bio_enc.c
index 629bf4b95d..831c71a2b5 100644
--- a/src/lib/libcrypto/evp/bio_enc.c
+++ b/src/lib/libcrypto/evp/bio_enc.c
@@ -62,14 +62,14 @@
62#include <openssl/buffer.h> 62#include <openssl/buffer.h>
63#include <openssl/evp.h> 63#include <openssl/evp.h>
64 64
65static int enc_write(BIO *h,char *buf,int num); 65static int enc_write(BIO *h, const char *buf, int num);
66static int enc_read(BIO *h,char *buf,int size); 66static int enc_read(BIO *h, char *buf, int size);
67/*static int enc_puts(BIO *h,char *str); */ 67/*static int enc_puts(BIO *h, const char *str); */
68/*static int enc_gets(BIO *h,char *str,int size); */ 68/*static int enc_gets(BIO *h, char *str, int size); */
69static long enc_ctrl(BIO *h,int cmd,long arg1,char *arg2); 69static long enc_ctrl(BIO *h, int cmd, long arg1, void *arg2);
70static int enc_new(BIO *h); 70static int enc_new(BIO *h);
71static int enc_free(BIO *data); 71static int enc_free(BIO *data);
72static long enc_callback_ctrl(BIO *h,int cmd,void (*fp)()); 72static long enc_callback_ctrl(BIO *h, int cmd, bio_info_cb *fps);
73#define ENC_BLOCK_SIZE (1024*4) 73#define ENC_BLOCK_SIZE (1024*4)
74 74
75typedef struct enc_struct 75typedef struct enc_struct
@@ -105,7 +105,7 @@ static int enc_new(BIO *bi)
105 { 105 {
106 BIO_ENC_CTX *ctx; 106 BIO_ENC_CTX *ctx;
107 107
108 ctx=(BIO_ENC_CTX *)Malloc(sizeof(BIO_ENC_CTX)); 108 ctx=(BIO_ENC_CTX *)OPENSSL_malloc(sizeof(BIO_ENC_CTX));
109 EVP_CIPHER_CTX_init(&ctx->cipher); 109 EVP_CIPHER_CTX_init(&ctx->cipher);
110 if (ctx == NULL) return(0); 110 if (ctx == NULL) return(0);
111 111
@@ -129,7 +129,7 @@ static int enc_free(BIO *a)
129 b=(BIO_ENC_CTX *)a->ptr; 129 b=(BIO_ENC_CTX *)a->ptr;
130 EVP_CIPHER_CTX_cleanup(&(b->cipher)); 130 EVP_CIPHER_CTX_cleanup(&(b->cipher));
131 memset(a->ptr,0,sizeof(BIO_ENC_CTX)); 131 memset(a->ptr,0,sizeof(BIO_ENC_CTX));
132 Free(a->ptr); 132 OPENSSL_free(a->ptr);
133 a->ptr=NULL; 133 a->ptr=NULL;
134 a->init=0; 134 a->init=0;
135 a->flags=0; 135 a->flags=0;
@@ -224,7 +224,7 @@ static int enc_read(BIO *b, char *out, int outl)
224 return((ret == 0)?ctx->cont:ret); 224 return((ret == 0)?ctx->cont:ret);
225 } 225 }
226 226
227static int enc_write(BIO *b, char *in, int inl) 227static int enc_write(BIO *b, const char *in, int inl)
228 { 228 {
229 int ret=0,n,i; 229 int ret=0,n,i;
230 BIO_ENC_CTX *ctx; 230 BIO_ENC_CTX *ctx;
@@ -279,7 +279,7 @@ static int enc_write(BIO *b, char *in, int inl)
279 return(ret); 279 return(ret);
280 } 280 }
281 281
282static long enc_ctrl(BIO *b, int cmd, long num, char *ptr) 282static long enc_ctrl(BIO *b, int cmd, long num, void *ptr)
283 { 283 {
284 BIO *dbio; 284 BIO *dbio;
285 BIO_ENC_CTX *ctx,*dctx; 285 BIO_ENC_CTX *ctx,*dctx;
@@ -370,7 +370,7 @@ again:
370 return(ret); 370 return(ret);
371 } 371 }
372 372
373static long enc_callback_ctrl(BIO *b, int cmd, void (*fp)()) 373static long enc_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
374 { 374 {
375 long ret=1; 375 long ret=1;
376 376
diff --git a/src/lib/libcrypto/evp/bio_md.c b/src/lib/libcrypto/evp/bio_md.c
index aef928dd8f..2373c247d8 100644
--- a/src/lib/libcrypto/evp/bio_md.c
+++ b/src/lib/libcrypto/evp/bio_md.c
@@ -65,14 +65,14 @@
65/* BIO_put and BIO_get both add to the digest, 65/* BIO_put and BIO_get both add to the digest,
66 * BIO_gets returns the digest */ 66 * BIO_gets returns the digest */
67 67
68static int md_write(BIO *h,char *buf,int num); 68static int md_write(BIO *h, char const *buf, int num);
69static int md_read(BIO *h,char *buf,int size); 69static int md_read(BIO *h, char *buf, int size);
70/*static int md_puts(BIO *h,char *str); */ 70/*static int md_puts(BIO *h, const char *str); */
71static int md_gets(BIO *h,char *str,int size); 71static int md_gets(BIO *h, char *str, int size);
72static long md_ctrl(BIO *h,int cmd,long arg1,char *arg2); 72static long md_ctrl(BIO *h, int cmd, long arg1, void *arg2);
73static int md_new(BIO *h); 73static int md_new(BIO *h);
74static int md_free(BIO *data); 74static int md_free(BIO *data);
75static long md_callback_ctrl(BIO *h,int cmd,void (*fp)()); 75static long md_callback_ctrl(BIO *h,int cmd,bio_info_cb *fp);
76 76
77static BIO_METHOD methods_md= 77static BIO_METHOD methods_md=
78 { 78 {
@@ -96,7 +96,7 @@ static int md_new(BIO *bi)
96 { 96 {
97 EVP_MD_CTX *ctx; 97 EVP_MD_CTX *ctx;
98 98
99 ctx=(EVP_MD_CTX *)Malloc(sizeof(EVP_MD_CTX)); 99 ctx=(EVP_MD_CTX *)OPENSSL_malloc(sizeof(EVP_MD_CTX));
100 if (ctx == NULL) return(0); 100 if (ctx == NULL) return(0);
101 101
102 bi->init=0; 102 bi->init=0;
@@ -108,7 +108,7 @@ static int md_new(BIO *bi)
108static int md_free(BIO *a) 108static int md_free(BIO *a)
109 { 109 {
110 if (a == NULL) return(0); 110 if (a == NULL) return(0);
111 Free(a->ptr); 111 OPENSSL_free(a->ptr);
112 a->ptr=NULL; 112 a->ptr=NULL;
113 a->init=0; 113 a->init=0;
114 a->flags=0; 114 a->flags=0;
@@ -139,7 +139,7 @@ static int md_read(BIO *b, char *out, int outl)
139 return(ret); 139 return(ret);
140 } 140 }
141 141
142static int md_write(BIO *b, char *in, int inl) 142static int md_write(BIO *b, const char *in, int inl)
143 { 143 {
144 int ret=0; 144 int ret=0;
145 EVP_MD_CTX *ctx; 145 EVP_MD_CTX *ctx;
@@ -162,7 +162,7 @@ static int md_write(BIO *b, char *in, int inl)
162 return(ret); 162 return(ret);
163 } 163 }
164 164
165static long md_ctrl(BIO *b, int cmd, long num, char *ptr) 165static long md_ctrl(BIO *b, int cmd, long num, void *ptr)
166 { 166 {
167 EVP_MD_CTX *ctx,*dctx,**pctx; 167 EVP_MD_CTX *ctx,*dctx,**pctx;
168 const EVP_MD **ppmd; 168 const EVP_MD **ppmd;
@@ -223,7 +223,7 @@ static long md_ctrl(BIO *b, int cmd, long num, char *ptr)
223 return(ret); 223 return(ret);
224 } 224 }
225 225
226static long md_callback_ctrl(BIO *b, int cmd, void (*fp)()) 226static long md_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
227 { 227 {
228 long ret=1; 228 long ret=1;
229 229
diff --git a/src/lib/libcrypto/evp/bio_ok.c b/src/lib/libcrypto/evp/bio_ok.c
index e6ff5f2cdb..e617ce1d43 100644
--- a/src/lib/libcrypto/evp/bio_ok.c
+++ b/src/lib/libcrypto/evp/bio_ok.c
@@ -125,12 +125,12 @@
125#include <openssl/evp.h> 125#include <openssl/evp.h>
126#include <openssl/rand.h> 126#include <openssl/rand.h>
127 127
128static int ok_write(BIO *h,char *buf,int num); 128static int ok_write(BIO *h, const char *buf, int num);
129static int ok_read(BIO *h,char *buf,int size); 129static int ok_read(BIO *h, char *buf, int size);
130static long ok_ctrl(BIO *h,int cmd,long arg1,char *arg2); 130static long ok_ctrl(BIO *h, int cmd, long arg1, void *arg2);
131static int ok_new(BIO *h); 131static int ok_new(BIO *h);
132static int ok_free(BIO *data); 132static int ok_free(BIO *data);
133static long ok_callback_ctrl(BIO *h,int cmd,void (*fp)()); 133static long ok_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp);
134 134
135static void sig_out(BIO* b); 135static void sig_out(BIO* b);
136static void sig_in(BIO* b); 136static void sig_in(BIO* b);
@@ -187,7 +187,7 @@ static int ok_new(BIO *bi)
187 { 187 {
188 BIO_OK_CTX *ctx; 188 BIO_OK_CTX *ctx;
189 189
190 ctx=(BIO_OK_CTX *)Malloc(sizeof(BIO_OK_CTX)); 190 ctx=(BIO_OK_CTX *)OPENSSL_malloc(sizeof(BIO_OK_CTX));
191 if (ctx == NULL) return(0); 191 if (ctx == NULL) return(0);
192 192
193 ctx->buf_len=0; 193 ctx->buf_len=0;
@@ -209,7 +209,7 @@ static int ok_free(BIO *a)
209 { 209 {
210 if (a == NULL) return(0); 210 if (a == NULL) return(0);
211 memset(a->ptr,0,sizeof(BIO_OK_CTX)); 211 memset(a->ptr,0,sizeof(BIO_OK_CTX));
212 Free(a->ptr); 212 OPENSSL_free(a->ptr);
213 a->ptr=NULL; 213 a->ptr=NULL;
214 a->init=0; 214 a->init=0;
215 a->flags=0; 215 a->flags=0;
@@ -287,7 +287,7 @@ static int ok_read(BIO *b, char *out, int outl)
287 return(ret); 287 return(ret);
288 } 288 }
289 289
290static int ok_write(BIO *b, char *in, int inl) 290static int ok_write(BIO *b, const char *in, int inl)
291 { 291 {
292 int ret=0,n,i; 292 int ret=0,n,i;
293 BIO_OK_CTX *ctx; 293 BIO_OK_CTX *ctx;
@@ -345,7 +345,7 @@ static int ok_write(BIO *b, char *in, int inl)
345 return(ret); 345 return(ret);
346 } 346 }
347 347
348static long ok_ctrl(BIO *b, int cmd, long num, char *ptr) 348static long ok_ctrl(BIO *b, int cmd, long num, void *ptr)
349 { 349 {
350 BIO_OK_CTX *ctx; 350 BIO_OK_CTX *ctx;
351 EVP_MD *md; 351 EVP_MD *md;
@@ -431,7 +431,7 @@ static long ok_ctrl(BIO *b, int cmd, long num, char *ptr)
431 return(ret); 431 return(ret);
432 } 432 }
433 433
434static long ok_callback_ctrl(BIO *b, int cmd, void (*fp)()) 434static long ok_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp)
435 { 435 {
436 long ret=1; 436 long ret=1;
437 437
diff --git a/src/lib/libcrypto/evp/c_alld.c b/src/lib/libcrypto/evp/c_alld.c
index febe51a3ee..bbf059eb85 100644
--- a/src/lib/libcrypto/evp/c_alld.c
+++ b/src/lib/libcrypto/evp/c_alld.c
@@ -67,6 +67,9 @@ void OpenSSL_add_all_digests(void)
67#ifndef NO_MD2 67#ifndef NO_MD2
68 EVP_add_digest(EVP_md2()); 68 EVP_add_digest(EVP_md2());
69#endif 69#endif
70#ifndef NO_MD4
71 EVP_add_digest(EVP_md4());
72#endif
70#ifndef NO_MD5 73#ifndef NO_MD5
71 EVP_add_digest(EVP_md5()); 74 EVP_add_digest(EVP_md5());
72 EVP_add_digest_alias(SN_md5,"ssl2-md5"); 75 EVP_add_digest_alias(SN_md5,"ssl2-md5");
diff --git a/src/lib/libcrypto/evp/e_bf.c b/src/lib/libcrypto/evp/e_bf.c
new file mode 100644
index 0000000000..72047f64da
--- /dev/null
+++ b/src/lib/libcrypto/evp/e_bf.c
@@ -0,0 +1,80 @@
1/* crypto/evp/e_bf.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_BF
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include "evp_locl.h"
64#include <openssl/objects.h>
65
66static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
67 const unsigned char *iv, int enc);
68
69IMPLEMENT_BLOCK_CIPHER(bf, bf_ks, BF, bf_ks, NID_bf, 8, 16, 8,
70 0, bf_init_key, NULL,
71 EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL)
72
73static int bf_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
74 const unsigned char *iv, int enc)
75 {
76 BF_set_key(&(ctx->c.bf_ks),EVP_CIPHER_CTX_key_length(ctx),key);
77 return 1;
78 }
79
80#endif
diff --git a/src/lib/libcrypto/evp/e_cast.c b/src/lib/libcrypto/evp/e_cast.c
new file mode 100644
index 0000000000..e5af7fb4ed
--- /dev/null
+++ b/src/lib/libcrypto/evp/e_cast.c
@@ -0,0 +1,82 @@
1/* crypto/evp/e_cast.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_CAST
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65#include "evp_locl.h"
66
67static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
68 const unsigned char *iv,int enc);
69
70IMPLEMENT_BLOCK_CIPHER(cast5, cast_ks, CAST, cast_ks,
71 NID_cast5, 8, EVP_CAST5_KEY_SIZE, 8,
72 EVP_CIPH_VARIABLE_LENGTH, cast_init_key, NULL,
73 EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL)
74
75static int cast_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
76 const unsigned char *iv, int enc)
77 {
78 CAST_set_key(&(ctx->c.cast_ks),EVP_CIPHER_CTX_key_length(ctx),key);
79 return 1;
80 }
81
82#endif
diff --git a/src/lib/libcrypto/evp/e_cbc_3d.c b/src/lib/libcrypto/evp/e_cbc_3d.c
index 5d16b865c5..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cbc_3d.c
+++ b/src/lib/libcrypto/evp/e_cbc_3d.c
@@ -1,151 +0,0 @@
1/* crypto/evp/e_cbc_3d.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void des_cbc_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void des_cbc_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
68 unsigned char *iv,int enc);
69static void des_cbc_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
70 unsigned char *in, unsigned int inl);
71static EVP_CIPHER d_cbc_ede_cipher2=
72 {
73 NID_des_ede_cbc,
74 8,16,8,
75 des_cbc_ede_init_key,
76 des_cbc_ede_cipher,
77 NULL,
78 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
79 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
80 EVP_CIPHER_set_asn1_iv,
81 EVP_CIPHER_get_asn1_iv,
82 };
83
84static EVP_CIPHER d_cbc_ede_cipher3=
85 {
86 NID_des_ede3_cbc,
87 8,24,8,
88 des_cbc_ede3_init_key,
89 des_cbc_ede_cipher,
90 NULL,
91 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
92 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
93 EVP_CIPHER_set_asn1_iv,
94 EVP_CIPHER_get_asn1_iv,
95 };
96
97EVP_CIPHER *EVP_des_ede_cbc(void)
98 {
99 return(&d_cbc_ede_cipher2);
100 }
101
102EVP_CIPHER *EVP_des_ede3_cbc(void)
103 {
104 return(&d_cbc_ede_cipher3);
105 }
106
107static void des_cbc_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
108 unsigned char *iv, int enc)
109 {
110 des_cblock *deskey = (des_cblock *)key;
111
112 if (iv != NULL)
113 memcpy(&(ctx->oiv[0]),iv,8);
114 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
115
116 if (deskey != NULL)
117 {
118 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
119 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
120 memcpy( (char *)ctx->c.des_ede.ks3,
121 (char *)ctx->c.des_ede.ks1,
122 sizeof(ctx->c.des_ede.ks1));
123 }
124 }
125
126static void des_cbc_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
127 unsigned char *iv, int enc)
128 {
129 des_cblock *deskey = (des_cblock *)key;
130
131 if (iv != NULL)
132 memcpy(&(ctx->oiv[0]),iv,8);
133 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
134
135 if (deskey != NULL)
136 {
137 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
138 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
139 des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
140 }
141 }
142
143static void des_cbc_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
144 unsigned char *in, unsigned int inl)
145 {
146 des_ede3_cbc_encrypt(in,out,inl, ctx->c.des_ede.ks1,
147 ctx->c.des_ede.ks2,ctx->c.des_ede.ks3,
148 (des_cblock *) &(ctx->iv[0]),
149 ctx->encrypt);
150 }
151#endif
diff --git a/src/lib/libcrypto/evp/e_cbc_bf.c b/src/lib/libcrypto/evp/e_cbc_bf.c
index 9bcba3c516..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cbc_bf.c
+++ b/src/lib/libcrypto/evp/e_cbc_bf.c
@@ -1,106 +0,0 @@
1/* crypto/evp/e_cbc_bf.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_BF
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl);
69static EVP_CIPHER bfish_cbc_cipher=
70 {
71 NID_bf_cbc,
72 8,EVP_BLOWFISH_KEY_SIZE,8,
73 bf_cbc_init_key,
74 bf_cbc_cipher,
75 NULL,
76 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
78 EVP_CIPHER_set_asn1_iv,
79 EVP_CIPHER_get_asn1_iv,
80 };
81
82EVP_CIPHER *EVP_bf_cbc(void)
83 {
84 return(&bfish_cbc_cipher);
85 }
86
87static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
88 unsigned char *iv, int enc)
89 {
90 if (iv != NULL)
91 memcpy(&(ctx->oiv[0]),iv,8);
92 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
93 if (key != NULL)
94 BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
95 }
96
97static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
98 unsigned char *in, unsigned int inl)
99 {
100 BF_cbc_encrypt(
101 in,out,(long)inl,
102 &(ctx->c.bf_ks),&(ctx->iv[0]),
103 ctx->encrypt);
104 }
105
106#endif
diff --git a/src/lib/libcrypto/evp/e_cbc_c.c b/src/lib/libcrypto/evp/e_cbc_c.c
index 6845b0b44c..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cbc_c.c
+++ b/src/lib/libcrypto/evp/e_cbc_c.c
@@ -1,107 +0,0 @@
1/* crypto/evp/e_cbc_c.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_CAST
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void cast_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void cast_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER cast5_cbc_cipher=
71 {
72 NID_cast5_cbc,
73 8,EVP_CAST5_KEY_SIZE,8,
74 cast_cbc_init_key,
75 cast_cbc_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_cast5_cbc(void)
84 {
85 return(&cast5_cbc_cipher);
86 }
87
88static void cast_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 if (iv != NULL)
92 memcpy(&(ctx->oiv[0]),iv,8);
93 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
94 if (key != NULL)
95 CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
96 }
97
98static void cast_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
99 unsigned char *in, unsigned int inl)
100 {
101 CAST_cbc_encrypt(
102 in,out,(long)inl,
103 &(ctx->c.cast_ks),&(ctx->iv[0]),
104 ctx->encrypt);
105 }
106
107#endif
diff --git a/src/lib/libcrypto/evp/e_cbc_d.c b/src/lib/libcrypto/evp/e_cbc_d.c
index 5b4e5b8601..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cbc_d.c
+++ b/src/lib/libcrypto/evp/e_cbc_d.c
@@ -1,106 +0,0 @@
1/* crypto/evp/e_cbc_d.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void des_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl);
69static EVP_CIPHER d_cbc_cipher=
70 {
71 NID_des_cbc,
72 8,8,8,
73 des_cbc_init_key,
74 des_cbc_cipher,
75 NULL,
76 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)),
78 EVP_CIPHER_set_asn1_iv,
79 EVP_CIPHER_get_asn1_iv,
80 };
81
82EVP_CIPHER *EVP_des_cbc(void)
83 {
84 return(&d_cbc_cipher);
85 }
86
87static void des_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
88 unsigned char *iv, int enc)
89 {
90 des_cblock *deskey = (des_cblock *)key;
91
92 if (iv != NULL)
93 memcpy(&(ctx->oiv[0]),iv,8);
94 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
95 if (deskey != NULL)
96 des_set_key_unchecked(deskey,ctx->c.des_ks);
97 }
98
99static void des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
100 unsigned char *in, unsigned int inl)
101 {
102 des_ncbc_encrypt(in,out,inl,ctx->c.des_ks,
103 (des_cblock *)&(ctx->iv[0]),
104 ctx->encrypt);
105 }
106#endif
diff --git a/src/lib/libcrypto/evp/e_cbc_i.c b/src/lib/libcrypto/evp/e_cbc_i.c
index 34b44aa21f..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cbc_i.c
+++ b/src/lib/libcrypto/evp/e_cbc_i.c
@@ -1,119 +0,0 @@
1/* crypto/evp/e_cbc_i.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_IDEA
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void idea_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER i_cbc_cipher=
71 {
72 NID_idea_cbc,
73 8,16,8,
74 idea_cbc_init_key,
75 idea_cbc_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_idea_cbc(void)
84 {
85 return(&i_cbc_cipher);
86 }
87
88static void idea_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 if (iv != NULL)
92 memcpy(&(ctx->oiv[0]),iv,8);
93 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
94 if (key != NULL)
95 {
96 if (enc)
97 idea_set_encrypt_key(key,&(ctx->c.idea_ks));
98 else
99 {
100 IDEA_KEY_SCHEDULE tmp;
101
102 idea_set_encrypt_key(key,&tmp);
103 idea_set_decrypt_key(&tmp,&(ctx->c.idea_ks));
104 memset((unsigned char *)&tmp,0,
105 sizeof(IDEA_KEY_SCHEDULE));
106 }
107 }
108 }
109
110static void idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
111 unsigned char *in, unsigned int inl)
112 {
113 idea_cbc_encrypt(
114 in,out,(long)inl,
115 &(ctx->c.idea_ks),&(ctx->iv[0]),
116 ctx->encrypt);
117 }
118
119#endif
diff --git a/src/lib/libcrypto/evp/e_cbc_r2.c b/src/lib/libcrypto/evp/e_cbc_r2.c
index 9dfada4ea6..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cbc_r2.c
+++ b/src/lib/libcrypto/evp/e_cbc_r2.c
@@ -1,216 +0,0 @@
1/* crypto/evp/e_cbc_r2.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC2
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static int rc2_meth_to_magic(const EVP_CIPHER *e);
71static EVP_CIPHER *rc2_magic_to_meth(int i);
72static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
73static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
74
75#define RC2_40_MAGIC 0xa0
76#define RC2_64_MAGIC 0x78
77#define RC2_128_MAGIC 0x3a
78
79static EVP_CIPHER r2_cbc_cipher=
80 {
81 NID_rc2_cbc,
82 8,EVP_RC2_KEY_SIZE,8,
83 rc2_cbc_init_key,
84 rc2_cbc_cipher,
85 NULL,
86 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
87 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
88 rc2_set_asn1_type_and_iv,
89 rc2_get_asn1_type_and_iv,
90 };
91
92static EVP_CIPHER r2_64_cbc_cipher=
93 {
94 NID_rc2_64_cbc,
95 8,8 /* 64 bit */,8,
96 rc2_cbc_init_key,
97 rc2_cbc_cipher,
98 NULL,
99 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
100 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
101 rc2_set_asn1_type_and_iv,
102 rc2_get_asn1_type_and_iv,
103 };
104
105static EVP_CIPHER r2_40_cbc_cipher=
106 {
107 NID_rc2_40_cbc,
108 8,5 /* 40 bit */,8,
109 rc2_cbc_init_key,
110 rc2_cbc_cipher,
111 NULL,
112 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
113 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
114 rc2_set_asn1_type_and_iv,
115 rc2_get_asn1_type_and_iv,
116 };
117
118EVP_CIPHER *EVP_rc2_cbc(void)
119 {
120 return(&r2_cbc_cipher);
121 }
122
123EVP_CIPHER *EVP_rc2_64_cbc(void)
124 {
125 return(&r2_64_cbc_cipher);
126 }
127
128EVP_CIPHER *EVP_rc2_40_cbc(void)
129 {
130 return(&r2_40_cbc_cipher);
131 }
132
133static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
134 unsigned char *iv, int enc)
135 {
136 if (iv != NULL)
137 memcpy(&(ctx->oiv[0]),iv,8);
138 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
139 if (key != NULL)
140 RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
141 key,EVP_CIPHER_CTX_key_length(ctx)*8);
142 }
143
144static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
145 unsigned char *in, unsigned int inl)
146 {
147 RC2_cbc_encrypt(
148 in,out,(long)inl,
149 &(ctx->c.rc2_ks),&(ctx->iv[0]),
150 ctx->encrypt);
151 }
152
153static int rc2_meth_to_magic(const EVP_CIPHER *e)
154 {
155 int i;
156
157 i=EVP_CIPHER_key_length(e);
158 if (i == 16) return(RC2_128_MAGIC);
159 else if (i == 8) return(RC2_64_MAGIC);
160 else if (i == 5) return(RC2_40_MAGIC);
161 else return(0);
162 }
163
164static EVP_CIPHER *rc2_magic_to_meth(int i)
165 {
166 if (i == RC2_128_MAGIC) return(EVP_rc2_cbc());
167 else if (i == RC2_64_MAGIC) return(EVP_rc2_64_cbc());
168 else if (i == RC2_40_MAGIC) return(EVP_rc2_40_cbc());
169 else
170 {
171 EVPerr(EVP_F_RC2_MAGIC_TO_METH,EVP_R_UNSUPPORTED_KEY_SIZE);
172 return(NULL);
173 }
174 }
175
176static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
177 {
178 long num=0;
179 int i=0,l;
180 EVP_CIPHER *e;
181
182 if (type != NULL)
183 {
184 l=EVP_CIPHER_CTX_iv_length(c);
185 i=ASN1_TYPE_get_int_octetstring(type,&num,c->oiv,l);
186 if (i != l)
187 return(-1);
188 else if (i > 0)
189 memcpy(c->iv,c->oiv,l);
190 e=rc2_magic_to_meth((int)num);
191 if (e == NULL)
192 return(-1);
193 if (e != EVP_CIPHER_CTX_cipher(c))
194 {
195 EVP_CIPHER_CTX_cipher(c)=e;
196 rc2_cbc_init_key(c,NULL,NULL,1);
197 }
198 }
199 return(i);
200 }
201
202static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
203 {
204 long num;
205 int i=0,j;
206
207 if (type != NULL)
208 {
209 num=rc2_meth_to_magic(EVP_CIPHER_CTX_cipher(c));
210 j=EVP_CIPHER_CTX_iv_length(c);
211 i=ASN1_TYPE_set_int_octetstring(type,num,c->oiv,j);
212 }
213 return(i);
214 }
215
216#endif
diff --git a/src/lib/libcrypto/evp/e_cbc_r5.c b/src/lib/libcrypto/evp/e_cbc_r5.c
index cea3fe333a..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cbc_r5.c
+++ b/src/lib/libcrypto/evp/e_cbc_r5.c
@@ -1,108 +0,0 @@
1/* crypto/evp/e_cbc_r5.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC5
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER rc5_32_12_16_cbc_cipher=
71 {
72 NID_rc5_cbc,
73 8,EVP_RC5_32_12_16_KEY_SIZE,8,
74 r_32_12_16_cbc_init_key,
75 r_32_12_16_cbc_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)),
79 NULL,
80 NULL,
81 };
82
83EVP_CIPHER *EVP_rc5_32_12_16_cbc(void)
84 {
85 return(&rc5_32_12_16_cbc_cipher);
86 }
87
88static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 if (iv != NULL)
92 memcpy(&(ctx->oiv[0]),iv,8);
93 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
94 if (key != NULL)
95 RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,
96 key,RC5_12_ROUNDS);
97 }
98
99static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
100 unsigned char *in, unsigned int inl)
101 {
102 RC5_32_cbc_encrypt(
103 in,out,(long)inl,
104 &(ctx->c.rc5_ks),&(ctx->iv[0]),
105 ctx->encrypt);
106 }
107
108#endif
diff --git a/src/lib/libcrypto/evp/e_cfb_3d.c b/src/lib/libcrypto/evp/e_cfb_3d.c
index b364bd4e31..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cfb_3d.c
+++ b/src/lib/libcrypto/evp/e_cfb_3d.c
@@ -1,155 +0,0 @@
1/* crypto/evp/e_cfb_3d.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void des_ede_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void des_ede3_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
68 unsigned char *iv,int enc);
69static void des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
70 unsigned char *in, unsigned int inl);
71static EVP_CIPHER d_ede_cfb_cipher2=
72 {
73 NID_des_ede_cfb64,
74 1,16,8,
75 des_ede_cfb_init_key,
76 des_ede_cfb_cipher,
77 NULL,
78 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
79 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
80 EVP_CIPHER_set_asn1_iv,
81 EVP_CIPHER_get_asn1_iv,
82 };
83
84static EVP_CIPHER d_ede3_cfb_cipher3=
85 {
86 NID_des_ede3_cfb64,
87 1,24,8,
88 des_ede3_cfb_init_key,
89 des_ede_cfb_cipher,
90 NULL,
91 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
92 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
93 EVP_CIPHER_set_asn1_iv,
94 EVP_CIPHER_get_asn1_iv,
95 };
96
97EVP_CIPHER *EVP_des_ede_cfb(void)
98 {
99 return(&d_ede_cfb_cipher2);
100 }
101
102EVP_CIPHER *EVP_des_ede3_cfb(void)
103 {
104 return(&d_ede3_cfb_cipher3);
105 }
106
107static void des_ede_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
108 unsigned char *iv, int enc)
109 {
110 des_cblock *deskey = (des_cblock *)key;
111
112 ctx->num=0;
113
114 if (iv != NULL)
115 memcpy(&(ctx->oiv[0]),iv,8);
116 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
117 if (deskey != NULL)
118 {
119 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
120 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
121 memcpy( (char *)ctx->c.des_ede.ks3,
122 (char *)ctx->c.des_ede.ks1,
123 sizeof(ctx->c.des_ede.ks1));
124 }
125 }
126
127static void des_ede3_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
128 unsigned char *iv, int enc)
129 {
130 des_cblock *deskey = (des_cblock *)key;
131
132 ctx->num=0;
133
134 if (iv != NULL)
135 memcpy(&(ctx->oiv[0]),iv,8);
136 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
137 if (deskey != NULL)
138 {
139 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
140 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
141 des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
142 }
143 }
144
145static void des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
146 unsigned char *in, unsigned int inl)
147 {
148 des_ede3_cfb64_encrypt(in,out,(long)inl,
149 ctx->c.des_ede.ks1,
150 ctx->c.des_ede.ks2,
151 ctx->c.des_ede.ks3,
152 (des_cblock*)&(ctx->iv[0]),
153 &ctx->num,ctx->encrypt);
154 }
155#endif
diff --git a/src/lib/libcrypto/evp/e_cfb_bf.c b/src/lib/libcrypto/evp/e_cfb_bf.c
index 63e1e624ea..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cfb_bf.c
+++ b/src/lib/libcrypto/evp/e_cfb_bf.c
@@ -1,108 +0,0 @@
1/* crypto/evp/e_cfb_bf.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_BF
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl);
69static EVP_CIPHER bfish_cfb_cipher=
70 {
71 NID_bf_cfb64,
72 1,EVP_BLOWFISH_KEY_SIZE,8,
73 bf_cfb_init_key,
74 bf_cfb_cipher,
75 NULL,
76 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
78 EVP_CIPHER_set_asn1_iv,
79 EVP_CIPHER_get_asn1_iv,
80 };
81
82EVP_CIPHER *EVP_bf_cfb(void)
83 {
84 return(&bfish_cfb_cipher);
85 }
86
87static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
88 unsigned char *iv, int enc)
89 {
90 ctx->num=0;
91
92 if (iv != NULL)
93 memcpy(&(ctx->oiv[0]),iv,8);
94 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
95 if (key != NULL)
96 BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
97 }
98
99static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
100 unsigned char *in, unsigned int inl)
101 {
102 BF_cfb64_encrypt(
103 in,out,
104 (long)inl, &(ctx->c.bf_ks),
105 &(ctx->iv[0]),
106 &ctx->num,ctx->encrypt);
107 }
108#endif
diff --git a/src/lib/libcrypto/evp/e_cfb_c.c b/src/lib/libcrypto/evp/e_cfb_c.c
index f04bac034b..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cfb_c.c
+++ b/src/lib/libcrypto/evp/e_cfb_c.c
@@ -1,109 +0,0 @@
1/* crypto/evp/e_cfb_c.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_CAST
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER cast5_cfb_cipher=
71 {
72 NID_cast5_cfb64,
73 1,EVP_CAST5_KEY_SIZE,8,
74 cast_cfb_init_key,
75 cast_cfb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_cast5_cfb(void)
84 {
85 return(&cast5_cfb_cipher);
86 }
87
88static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 ctx->num=0;
92
93 if (iv != NULL)
94 memcpy(&(ctx->oiv[0]),iv,8);
95 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
96 if (key != NULL)
97 CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
98 }
99
100static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
101 unsigned char *in, unsigned int inl)
102 {
103 CAST_cfb64_encrypt(
104 in,out,
105 (long)inl, &(ctx->c.cast_ks),
106 &(ctx->iv[0]),
107 &ctx->num,ctx->encrypt);
108 }
109#endif
diff --git a/src/lib/libcrypto/evp/e_cfb_d.c b/src/lib/libcrypto/evp/e_cfb_d.c
index 9e1714bd15..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cfb_d.c
+++ b/src/lib/libcrypto/evp/e_cfb_d.c
@@ -1,110 +0,0 @@
1/* crypto/evp/e_cfb_d.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#include <stdio.h>
60#include "cryptlib.h"
61#include <openssl/evp.h>
62#include <openssl/objects.h>
63
64#ifndef NO_DES
65static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl);
69static EVP_CIPHER d_cfb_cipher=
70 {
71 NID_des_cfb64,
72 1,8,8,
73 des_cfb_init_key,
74 des_cfb_cipher,
75 NULL,
76 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)),
78 EVP_CIPHER_set_asn1_iv,
79 EVP_CIPHER_get_asn1_iv,
80 };
81
82EVP_CIPHER *EVP_des_cfb(void)
83 {
84 return(&d_cfb_cipher);
85 }
86
87static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
88 unsigned char *iv, int enc)
89 {
90 des_cblock *deskey = (des_cblock *)key;
91
92 ctx->num=0;
93
94 if (iv != NULL)
95 memcpy(&(ctx->oiv[0]),iv,8);
96 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
97 if (deskey != NULL)
98 des_set_key_unchecked(deskey,ctx->c.des_ks);
99 }
100
101static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
102 unsigned char *in, unsigned int inl)
103 {
104 des_cfb64_encrypt(
105 in,out,
106 (long)inl, ctx->c.des_ks,
107 (des_cblock *)&(ctx->iv[0]),
108 &ctx->num,ctx->encrypt);
109 }
110#endif
diff --git a/src/lib/libcrypto/evp/e_cfb_i.c b/src/lib/libcrypto/evp/e_cfb_i.c
index 31c76c6dac..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cfb_i.c
+++ b/src/lib/libcrypto/evp/e_cfb_i.c
@@ -1,109 +0,0 @@
1/* crypto/evp/e_cfb_i.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_IDEA
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void idea_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void idea_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER i_cfb_cipher=
71 {
72 NID_idea_cfb64,
73 1,IDEA_KEY_LENGTH,IDEA_BLOCK,
74 idea_cfb_init_key,
75 idea_cfb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_idea_cfb(void)
84 {
85 return(&i_cfb_cipher);
86 }
87
88static void idea_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 ctx->num=0;
92
93 if (iv != NULL)
94 memcpy(&(ctx->oiv[0]),iv,8);
95 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
96 if (key != NULL)
97 idea_set_encrypt_key(key,&(ctx->c.idea_ks));
98 }
99
100static void idea_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
101 unsigned char *in, unsigned int inl)
102 {
103 idea_cfb64_encrypt(
104 in,out,(long)inl,
105 &(ctx->c.idea_ks),&(ctx->iv[0]),
106 &ctx->num,ctx->encrypt);
107 }
108
109#endif
diff --git a/src/lib/libcrypto/evp/e_cfb_r2.c b/src/lib/libcrypto/evp/e_cfb_r2.c
index 32dd77eb7c..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cfb_r2.c
+++ b/src/lib/libcrypto/evp/e_cfb_r2.c
@@ -1,110 +0,0 @@
1/* crypto/evp/e_cfb_r2.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC2
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void rc2_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void rc2_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER r2_cfb_cipher=
71 {
72 NID_rc2_cfb64,
73 1,EVP_RC2_KEY_SIZE,8,
74 rc2_cfb_init_key,
75 rc2_cfb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_rc2_cfb(void)
84 {
85 return(&r2_cfb_cipher);
86 }
87
88static void rc2_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 ctx->num=0;
92
93 if (iv != NULL)
94 memcpy(&(ctx->oiv[0]),iv,8);
95 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
96 if (key != NULL)
97 RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
98 key,EVP_CIPHER_CTX_key_length(ctx)*8);
99 }
100
101static void rc2_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
102 unsigned char *in, unsigned int inl)
103 {
104 RC2_cfb64_encrypt(
105 in,out,
106 (long)inl, &(ctx->c.rc2_ks),
107 &(ctx->iv[0]),
108 &ctx->num,ctx->encrypt);
109 }
110#endif
diff --git a/src/lib/libcrypto/evp/e_cfb_r5.c b/src/lib/libcrypto/evp/e_cfb_r5.c
index 8e79728946..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_cfb_r5.c
+++ b/src/lib/libcrypto/evp/e_cfb_r5.c
@@ -1,110 +0,0 @@
1/* crypto/evp/e_cfb_r5.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC5
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void rc5_32_12_16_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void rc5_32_12_16_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER rc5_cfb_cipher=
71 {
72 NID_rc5_cfb64,
73 1,EVP_RC5_32_12_16_KEY_SIZE,8,
74 rc5_32_12_16_cfb_init_key,
75 rc5_32_12_16_cfb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_rc5_32_12_16_cfb(void)
84 {
85 return(&rc5_cfb_cipher);
86 }
87
88static void rc5_32_12_16_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 ctx->num=0;
92
93 if (iv != NULL)
94 memcpy(&(ctx->oiv[0]),iv,8);
95 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
96 if (key != NULL)
97 RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key,
98 RC5_12_ROUNDS);
99 }
100
101static void rc5_32_12_16_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
102 unsigned char *in, unsigned int inl)
103 {
104 RC5_32_cfb64_encrypt(
105 in,out,
106 (long)inl, &(ctx->c.rc5_ks),
107 &(ctx->iv[0]),
108 &ctx->num,ctx->encrypt);
109 }
110#endif
diff --git a/src/lib/libcrypto/evp/e_des.c b/src/lib/libcrypto/evp/e_des.c
new file mode 100644
index 0000000000..f4e998b81c
--- /dev/null
+++ b/src/lib/libcrypto/evp/e_des.c
@@ -0,0 +1,118 @@
1/* crypto/evp/e_des.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64#include "evp_locl.h"
65
66static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
67 const unsigned char *iv, int enc);
68
69/* Because of various casts and different names can't use IMPLEMENT_BLOCK_CIPHER */
70
71static int des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
72 const unsigned char *in, unsigned int inl)
73{
74 BLOCK_CIPHER_ecb_loop()
75 des_ecb_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i), ctx->c.des_ks, ctx->encrypt);
76 return 1;
77}
78
79static int des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
80 const unsigned char *in, unsigned int inl)
81{
82 des_ofb64_encrypt(in, out, (long)inl, ctx->c.des_ks, (des_cblock *)ctx->iv, &ctx->num);
83 return 1;
84}
85
86static int des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
87 const unsigned char *in, unsigned int inl)
88{
89 des_ncbc_encrypt(in, out, (long)inl, ctx->c.des_ks,
90 (des_cblock *)ctx->iv, ctx->encrypt);
91 return 1;
92}
93
94static int des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
95 const unsigned char *in, unsigned int inl)
96{
97 des_cfb64_encrypt(in, out, (long)inl, ctx->c.des_ks,
98 (des_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
99 return 1;
100}
101
102BLOCK_CIPHER_defs(des, des_ks, NID_des, 8, 8, 8,
103 0, des_init_key, NULL,
104 EVP_CIPHER_set_asn1_iv,
105 EVP_CIPHER_get_asn1_iv,
106 NULL)
107
108
109static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
110 const unsigned char *iv, int enc)
111 {
112 des_cblock *deskey = (des_cblock *)key;
113
114 des_set_key_unchecked(deskey,ctx->c.des_ks);
115 return 1;
116 }
117
118#endif
diff --git a/src/lib/libcrypto/evp/e_des3.c b/src/lib/libcrypto/evp/e_des3.c
new file mode 100644
index 0000000000..a9aba4ae70
--- /dev/null
+++ b/src/lib/libcrypto/evp/e_des3.c
@@ -0,0 +1,165 @@
1/* crypto/evp/e_des3.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64#include "evp_locl.h"
65
66static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
67 const unsigned char *iv,int enc);
68
69static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
70 const unsigned char *iv,int enc);
71
72/* Because of various casts and different args can't use IMPLEMENT_BLOCK_CIPHER */
73
74static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
75 const unsigned char *in, unsigned int inl)
76{
77 BLOCK_CIPHER_ecb_loop()
78 des_ecb3_encrypt((des_cblock *)(in + i), (des_cblock *)(out + i),
79 ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
80 ctx->encrypt);
81 return 1;
82}
83
84static int des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
85 const unsigned char *in, unsigned int inl)
86{
87 des_ede3_ofb64_encrypt(in, out, (long)inl,
88 ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
89 (des_cblock *)ctx->iv, &ctx->num);
90 return 1;
91}
92
93static int des_ede_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
94 const unsigned char *in, unsigned int inl)
95{
96 des_ede3_cbc_encrypt(in, out, (long)inl,
97 ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
98 (des_cblock *)ctx->iv, ctx->encrypt);
99 return 1;
100}
101
102static int des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
103 const unsigned char *in, unsigned int inl)
104{
105 des_ede3_cfb64_encrypt(in, out, (long)inl,
106 ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
107 (des_cblock *)ctx->iv, &ctx->num, ctx->encrypt);
108 return 1;
109}
110
111#define NID_des_ede_ecb NID_des_ede
112
113BLOCK_CIPHER_defs(des_ede, des_ede, NID_des_ede, 8, 16, 8,
114 0, des_ede_init_key, NULL,
115 EVP_CIPHER_set_asn1_iv,
116 EVP_CIPHER_get_asn1_iv,
117 NULL)
118
119#define NID_des_ede3_ecb NID_des_ede3
120#define des_ede3_cfb_cipher des_ede_cfb_cipher
121#define des_ede3_ofb_cipher des_ede_ofb_cipher
122#define des_ede3_cbc_cipher des_ede_cbc_cipher
123#define des_ede3_ecb_cipher des_ede_ecb_cipher
124
125BLOCK_CIPHER_defs(des_ede3, des_ede, NID_des_ede3, 8, 24, 8,
126 0, des_ede3_init_key, NULL,
127 EVP_CIPHER_set_asn1_iv,
128 EVP_CIPHER_get_asn1_iv,
129 NULL)
130
131static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
132 const unsigned char *iv, int enc)
133 {
134 des_cblock *deskey = (des_cblock *)key;
135
136 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
137 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
138 memcpy( (char *)ctx->c.des_ede.ks3,
139 (char *)ctx->c.des_ede.ks1,
140 sizeof(ctx->c.des_ede.ks1));
141 return 1;
142 }
143
144static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
145 const unsigned char *iv, int enc)
146 {
147 des_cblock *deskey = (des_cblock *)key;
148
149 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
150 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
151 des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
152
153 return 1;
154 }
155
156EVP_CIPHER *EVP_des_ede(void)
157{
158 return &des_ede_ecb;
159}
160
161EVP_CIPHER *EVP_des_ede3(void)
162{
163 return &des_ede3_ecb;
164}
165#endif
diff --git a/src/lib/libcrypto/evp/e_ecb_3d.c b/src/lib/libcrypto/evp/e_ecb_3d.c
index 806e971d36..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ecb_3d.c
+++ b/src/lib/libcrypto/evp/e_ecb_3d.c
@@ -1,158 +0,0 @@
1/* crypto/evp/e_ecb_3d.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
68 unsigned char *iv,int enc);
69static void des_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
70 unsigned char *in, unsigned int inl);
71static EVP_CIPHER d_ede_cipher2=
72 {
73 NID_des_ede,
74 8,16,0,
75 des_ede_init_key,
76 des_ede_cipher,
77 NULL,
78 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
79 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
80 NULL,
81 NULL,
82 };
83
84static EVP_CIPHER d_ede3_cipher3=
85 {
86 NID_des_ede3,
87 8,24,0,
88 des_ede3_init_key,
89 des_ede_cipher,
90 NULL,
91 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
92 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
93 NULL,
94 };
95
96EVP_CIPHER *EVP_des_ede(void)
97 {
98 return(&d_ede_cipher2);
99 }
100
101EVP_CIPHER *EVP_des_ede3(void)
102 {
103 return(&d_ede3_cipher3);
104 }
105
106static void des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
107 unsigned char *iv, int enc)
108 {
109 des_cblock *deskey = (des_cblock *)key;
110
111 if (deskey != NULL)
112 {
113 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
114 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
115 memcpy( (char *)ctx->c.des_ede.ks3,
116 (char *)ctx->c.des_ede.ks1,
117 sizeof(ctx->c.des_ede.ks1));
118 }
119 }
120
121static void des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
122 unsigned char *iv, int enc)
123 {
124 des_cblock *deskey = (des_cblock *)key;
125
126 if (deskey != NULL)
127 {
128 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
129 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
130 des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
131 }
132 }
133
134static void des_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
135 unsigned char *in, unsigned int inl)
136 {
137 unsigned int i;
138 des_cblock *output /* = (des_cblock *)out */;
139 des_cblock *input /* = (des_cblock *)in */;
140
141 if (inl < 8) return;
142 inl-=8;
143 for (i=0; i<=inl; i+=8)
144 {
145 output = (des_cblock *)(out + i);
146 input = (des_cblock *)(in + i);
147
148 des_ecb3_encrypt(input,output,
149 ctx->c.des_ede.ks1,
150 ctx->c.des_ede.ks2,
151 ctx->c.des_ede.ks3,
152 ctx->encrypt);
153
154 /* output++; */
155 /* input++; */
156 }
157 }
158#endif
diff --git a/src/lib/libcrypto/evp/e_ecb_bf.c b/src/lib/libcrypto/evp/e_ecb_bf.c
index 334736d253..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ecb_bf.c
+++ b/src/lib/libcrypto/evp/e_ecb_bf.c
@@ -1,109 +0,0 @@
1/* crypto/evp/e_ecb_bf.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_BF
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl);
69static EVP_CIPHER bfish_ecb_cipher=
70 {
71 NID_bf_ecb,
72 8,EVP_BLOWFISH_KEY_SIZE,0,
73 bf_ecb_init_key,
74 bf_ecb_cipher,
75 NULL,
76 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
78 NULL,
79 NULL,
80 };
81
82EVP_CIPHER *EVP_bf_ecb(void)
83 {
84 return(&bfish_ecb_cipher);
85 }
86
87static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
88 unsigned char *iv, int enc)
89 {
90 if (key != NULL)
91 BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
92 }
93
94static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
95 unsigned char *in, unsigned int inl)
96 {
97 unsigned int i;
98
99 if (inl < 8) return;
100 inl-=8;
101 for (i=0; i<=inl; i+=8)
102 {
103 BF_ecb_encrypt(
104 &(in[i]),&(out[i]),
105 &(ctx->c.bf_ks),ctx->encrypt);
106 }
107 }
108
109#endif
diff --git a/src/lib/libcrypto/evp/e_ecb_c.c b/src/lib/libcrypto/evp/e_ecb_c.c
index ad14e203cb..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ecb_c.c
+++ b/src/lib/libcrypto/evp/e_ecb_c.c
@@ -1,110 +0,0 @@
1/* crypto/evp/e_ecb_c.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_CAST
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER cast5_ecb_cipher=
71 {
72 NID_cast5_ecb,
73 8,EVP_CAST5_KEY_SIZE,0,
74 cast_ecb_init_key,
75 cast_ecb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)),
79 NULL,
80 NULL,
81 };
82
83EVP_CIPHER *EVP_cast5_ecb(void)
84 {
85 return(&cast5_ecb_cipher);
86 }
87
88static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 if (key != NULL)
92 CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
93 }
94
95static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
96 unsigned char *in, unsigned int inl)
97 {
98 unsigned int i;
99
100 if (inl < 8) return;
101 inl-=8;
102 for (i=0; i<=inl; i+=8)
103 {
104 CAST_ecb_encrypt(
105 &(in[i]),&(out[i]),
106 &(ctx->c.cast_ks),ctx->encrypt);
107 }
108 }
109
110#endif
diff --git a/src/lib/libcrypto/evp/e_ecb_d.c b/src/lib/libcrypto/evp/e_ecb_d.c
index c11bef55ef..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ecb_d.c
+++ b/src/lib/libcrypto/evp/e_ecb_d.c
@@ -1,118 +0,0 @@
1/* crypto/evp/e_ecb_d.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void des_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl);
69static EVP_CIPHER d_ecb_cipher=
70 {
71 NID_des_ecb,
72 8,8,0,
73 des_ecb_init_key,
74 des_ecb_cipher,
75 NULL,
76 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)),
78 NULL,
79 NULL,
80 };
81
82EVP_CIPHER *EVP_des_ecb(void)
83 {
84 return(&d_ecb_cipher);
85 }
86
87static void des_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
88 unsigned char *iv, int enc)
89 {
90 des_cblock *deskey = (des_cblock *)key;
91
92 if (deskey != NULL)
93 des_set_key_unchecked(deskey,ctx->c.des_ks);
94 }
95
96static void des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
97 unsigned char *in, unsigned int inl)
98 {
99 unsigned int i;
100 des_cblock *output /* = (des_cblock *)out */;
101 des_cblock *input /* = (des_cblock *)in */;
102
103 if (inl < 8) return;
104 inl-=8;
105 for (i=0; i<=inl; i+=8)
106 {
107 /* Either this ... */
108 output = (des_cblock *)(out + i);
109 input = (des_cblock *)(in + i);
110
111 des_ecb_encrypt(input,output,ctx->c.des_ks,ctx->encrypt);
112
113 /* ... or this. */
114 /* output++; */
115 /* input++; */
116 }
117 }
118#endif
diff --git a/src/lib/libcrypto/evp/e_ecb_i.c b/src/lib/libcrypto/evp/e_ecb_i.c
index 50a3da1bba..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ecb_i.c
+++ b/src/lib/libcrypto/evp/e_ecb_i.c
@@ -1,121 +0,0 @@
1/* crypto/evp/e_ecb_i.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_IDEA
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void idea_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER i_ecb_cipher=
71 {
72 NID_idea_ecb,
73 8,16,0,
74 idea_ecb_init_key,
75 idea_ecb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)),
79 NULL,
80 NULL,
81 };
82
83EVP_CIPHER *EVP_idea_ecb(void)
84 {
85 return(&i_ecb_cipher);
86 }
87
88static void idea_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 if (key != NULL)
92 {
93 if (enc)
94 idea_set_encrypt_key(key,&(ctx->c.idea_ks));
95 else
96 {
97 IDEA_KEY_SCHEDULE tmp;
98
99 idea_set_encrypt_key(key,&tmp);
100 idea_set_decrypt_key(&tmp, &(ctx->c.idea_ks));
101 memset((unsigned char *)&tmp,0,
102 sizeof(IDEA_KEY_SCHEDULE));
103 }
104 }
105 }
106
107static void idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
108 unsigned char *in, unsigned int inl)
109 {
110 unsigned int i;
111
112 if (inl < 8) return;
113 inl-=8;
114 for (i=0; i<=inl; i+=8)
115 {
116 idea_ecb_encrypt(
117 &(in[i]),&(out[i]),&(ctx->c.idea_ks));
118 }
119 }
120
121#endif
diff --git a/src/lib/libcrypto/evp/e_ecb_r2.c b/src/lib/libcrypto/evp/e_ecb_r2.c
index 3c2330130d..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ecb_r2.c
+++ b/src/lib/libcrypto/evp/e_ecb_r2.c
@@ -1,111 +0,0 @@
1/* crypto/evp/e_ecb_r2.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC2
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void rc2_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER r2_ecb_cipher=
71 {
72 NID_rc2_ecb,
73 8,EVP_RC2_KEY_SIZE,0,
74 rc2_ecb_init_key,
75 rc2_ecb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
79 NULL,
80 NULL,
81 };
82
83EVP_CIPHER *EVP_rc2_ecb(void)
84 {
85 return(&r2_ecb_cipher);
86 }
87
88static void rc2_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 if (key != NULL)
92 RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
93 key,EVP_CIPHER_CTX_key_length(ctx)*8);
94 }
95
96static void rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
97 unsigned char *in, unsigned int inl)
98 {
99 unsigned int i;
100
101 if (inl < 8) return;
102 inl-=8;
103 for (i=0; i<=inl; i+=8)
104 {
105 RC2_ecb_encrypt(
106 &(in[i]),&(out[i]),
107 &(ctx->c.rc2_ks),ctx->encrypt);
108 }
109 }
110
111#endif
diff --git a/src/lib/libcrypto/evp/e_ecb_r5.c b/src/lib/libcrypto/evp/e_ecb_r5.c
index ef43ce34bf..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ecb_r5.c
+++ b/src/lib/libcrypto/evp/e_ecb_r5.c
@@ -1,111 +0,0 @@
1/* crypto/evp/e_ecb_r5.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC5
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void rc5_32_12_16_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void rc5_32_12_16_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER rc5_ecb_cipher=
71 {
72 NID_rc5_ecb,
73 8,EVP_RC5_32_12_16_KEY_SIZE,0,
74 rc5_32_12_16_ecb_init_key,
75 rc5_32_12_16_ecb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)),
79 NULL,
80 NULL,
81 };
82
83EVP_CIPHER *EVP_rc5_32_12_16_ecb(void)
84 {
85 return(&rc5_ecb_cipher);
86 }
87
88static void rc5_32_12_16_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 if (key != NULL)
92 RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key,
93 RC5_12_ROUNDS);
94 }
95
96static void rc5_32_12_16_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
97 unsigned char *in, unsigned int inl)
98 {
99 unsigned int i;
100
101 if (inl < 8) return;
102 inl-=8;
103 for (i=0; i<=inl; i+=8)
104 {
105 RC5_32_ecb_encrypt(
106 &(in[i]),&(out[i]),
107 &(ctx->c.rc5_ks),ctx->encrypt);
108 }
109 }
110
111#endif
diff --git a/src/lib/libcrypto/evp/e_idea.c b/src/lib/libcrypto/evp/e_idea.c
new file mode 100644
index 0000000000..8d3c88deb7
--- /dev/null
+++ b/src/lib/libcrypto/evp/e_idea.c
@@ -0,0 +1,112 @@
1/* crypto/evp/e_idea.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_IDEA
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65#include "evp_locl.h"
66
67static int idea_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
68 const unsigned char *iv,int enc);
69
70/* NB idea_ecb_encrypt doesn't take an 'encrypt' argument so we treat it as a special
71 * case
72 */
73
74static int idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
75 const unsigned char *in, unsigned int inl)
76{
77 BLOCK_CIPHER_ecb_loop()
78 idea_ecb_encrypt(in + i, out + i, &ctx->c.idea_ks);
79 return 1;
80}
81
82/* Can't use IMPLEMENT_BLOCK_CIPHER because idea_ecb_encrypt is different */
83
84BLOCK_CIPHER_func_cbc(idea, idea, idea_ks)
85BLOCK_CIPHER_func_ofb(idea, idea, idea_ks)
86BLOCK_CIPHER_func_cfb(idea, idea, idea_ks)
87
88BLOCK_CIPHER_defs(idea, idea_ks, NID_idea, 8, 16, 8,
89 0, idea_init_key, NULL,
90 EVP_CIPHER_set_asn1_iv, EVP_CIPHER_get_asn1_iv, NULL)
91
92static int idea_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
93 const unsigned char *iv, int enc)
94 {
95 if(!enc) {
96 if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_OFB_MODE) enc = 1;
97 else if (EVP_CIPHER_CTX_mode(ctx) == EVP_CIPH_CFB_MODE) enc = 1;
98 }
99 if (enc) idea_set_encrypt_key(key,&(ctx->c.idea_ks));
100 else
101 {
102 IDEA_KEY_SCHEDULE tmp;
103
104 idea_set_encrypt_key(key,&tmp);
105 idea_set_decrypt_key(&tmp,&(ctx->c.idea_ks));
106 memset((unsigned char *)&tmp,0,
107 sizeof(IDEA_KEY_SCHEDULE));
108 }
109 return 1;
110 }
111
112#endif
diff --git a/src/lib/libcrypto/evp/e_null.c b/src/lib/libcrypto/evp/e_null.c
index 0a62c10aa9..e0702cf818 100644
--- a/src/lib/libcrypto/evp/e_null.c
+++ b/src/lib/libcrypto/evp/e_null.c
@@ -61,20 +61,22 @@
61#include <openssl/evp.h> 61#include <openssl/evp.h>
62#include <openssl/objects.h> 62#include <openssl/objects.h>
63 63
64static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 64static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
65 unsigned char *iv,int enc); 65 const unsigned char *iv,int enc);
66static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 66static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
67 unsigned char *in, unsigned int inl); 67 const unsigned char *in, unsigned int inl);
68static EVP_CIPHER n_cipher= 68static EVP_CIPHER n_cipher=
69 { 69 {
70 NID_undef, 70 NID_undef,
71 1,0,0, 71 1,0,0,
72 0,
72 null_init_key, 73 null_init_key,
73 null_cipher, 74 null_cipher,
74 NULL, 75 NULL,
75 0, 76 0,
76 NULL, 77 NULL,
77 NULL, 78 NULL,
79 NULL
78 }; 80 };
79 81
80EVP_CIPHER *EVP_enc_null(void) 82EVP_CIPHER *EVP_enc_null(void)
@@ -82,16 +84,18 @@ EVP_CIPHER *EVP_enc_null(void)
82 return(&n_cipher); 84 return(&n_cipher);
83 } 85 }
84 86
85static void null_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 87static int null_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
86 unsigned char *iv, int enc) 88 const unsigned char *iv, int enc)
87 { 89 {
88 memset(&(ctx->c),0,sizeof(ctx->c)); 90 memset(&(ctx->c),0,sizeof(ctx->c));
91 return 1;
89 } 92 }
90 93
91static void null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 94static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
92 unsigned char *in, unsigned int inl) 95 const unsigned char *in, unsigned int inl)
93 { 96 {
94 if (in != out) 97 if (in != out)
95 memcpy((char *)out,(char *)in,(int)inl); 98 memcpy((char *)out,(char *)in,(int)inl);
99 return 1;
96 } 100 }
97 101
diff --git a/src/lib/libcrypto/evp/e_ofb_3d.c b/src/lib/libcrypto/evp/e_ofb_3d.c
index d1a33e2ecd..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ofb_3d.c
+++ b/src/lib/libcrypto/evp/e_ofb_3d.c
@@ -1,152 +0,0 @@
1/* crypto/evp/e_ofb_3d.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void des_ede_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void des_ede3_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
68 unsigned char *iv,int enc);
69static void des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
70 unsigned char *in, unsigned int inl);
71static EVP_CIPHER d_ede_ofb_cipher2=
72 {
73 NID_des_ede_ofb64,
74 1,16,8,
75 des_ede_ofb_init_key,
76 des_ede_ofb_cipher,
77 NULL,
78 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
79 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
80 EVP_CIPHER_set_asn1_iv,
81 EVP_CIPHER_get_asn1_iv,
82 };
83
84static EVP_CIPHER d_ede3_ofb_cipher3=
85 {
86 NID_des_ede3_ofb64,
87 1,24,8,
88 des_ede3_ofb_init_key,
89 des_ede_ofb_cipher,
90 NULL,
91 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
92 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)),
93 EVP_CIPHER_set_asn1_iv,
94 EVP_CIPHER_get_asn1_iv,
95 };
96
97EVP_CIPHER *EVP_des_ede_ofb(void)
98 {
99 return(&d_ede_ofb_cipher2);
100 }
101
102EVP_CIPHER *EVP_des_ede3_ofb(void)
103 {
104 return(&d_ede3_ofb_cipher3);
105 }
106
107static void des_ede_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
108 unsigned char *iv, int enc)
109 {
110 des_cblock *deskey = (des_cblock *)key;
111
112 ctx->num=0;
113
114 if (iv != NULL)
115 memcpy(&(ctx->oiv[0]),iv,8);
116 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
117 if (deskey != NULL)
118 {
119 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
120 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
121 memcpy( (char *)ctx->c.des_ede.ks3,
122 (char *)ctx->c.des_ede.ks1,
123 sizeof(ctx->c.des_ede.ks1));
124 }
125 }
126
127static void des_ede3_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
128 unsigned char *iv, int enc)
129 {
130 des_cblock *deskey = (des_cblock *)key;
131
132 ctx->num=0;
133
134 if (iv != NULL)
135 memcpy(&(ctx->oiv[0]),iv,8);
136 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
137 if (deskey != NULL)
138 {
139 des_set_key_unchecked(&deskey[0],ctx->c.des_ede.ks1);
140 des_set_key_unchecked(&deskey[1],ctx->c.des_ede.ks2);
141 des_set_key_unchecked(&deskey[2],ctx->c.des_ede.ks3);
142 }
143 }
144
145static void des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
146 unsigned char *in, unsigned int inl)
147 {
148 des_ede3_ofb64_encrypt(in,out,inl,ctx->c.des_ede.ks1,
149 ctx->c.des_ede.ks2, ctx->c.des_ede.ks3,
150 (des_cblock *)&(ctx->iv[0]),&ctx->num);
151 }
152#endif
diff --git a/src/lib/libcrypto/evp/e_ofb_bf.c b/src/lib/libcrypto/evp/e_ofb_bf.c
index c82154b549..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ofb_bf.c
+++ b/src/lib/libcrypto/evp/e_ofb_bf.c
@@ -1,109 +0,0 @@
1/* crypto/evp/e_ofb_bf.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_BF
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void bf_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl);
69static EVP_CIPHER bfish_ofb_cipher=
70 {
71 NID_bf_ofb64,
72 1,EVP_BLOWFISH_KEY_SIZE,8,
73 bf_ofb_init_key,
74 bf_ofb_cipher,
75 NULL,
76 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)),
78 EVP_CIPHER_set_asn1_iv,
79 EVP_CIPHER_get_asn1_iv,
80 };
81
82EVP_CIPHER *EVP_bf_ofb(void)
83 {
84 return(&bfish_ofb_cipher);
85 }
86
87static void bf_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
88 unsigned char *iv, int enc)
89 {
90 ctx->num=0;
91
92 if (iv != NULL)
93 memcpy(&(ctx->oiv[0]),iv,8);
94 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
95 if (key != NULL)
96 BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key);
97 }
98
99static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
100 unsigned char *in, unsigned int inl)
101 {
102 BF_ofb64_encrypt(
103 in,out,
104 (long)inl, &(ctx->c.bf_ks),
105 &(ctx->iv[0]),
106 &ctx->num);
107 }
108
109#endif
diff --git a/src/lib/libcrypto/evp/e_ofb_c.c b/src/lib/libcrypto/evp/e_ofb_c.c
index 971043de4c..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ofb_c.c
+++ b/src/lib/libcrypto/evp/e_ofb_c.c
@@ -1,110 +0,0 @@
1/* crypto/evp/e_ofb_c.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_CAST
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER cast5_ofb_cipher=
71 {
72 NID_cast5_ofb64,
73 1,EVP_CAST5_KEY_SIZE,8,
74 cast_ofb_init_key,
75 cast_ofb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_cast5_ofb(void)
84 {
85 return(&cast5_ofb_cipher);
86 }
87
88static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 ctx->num=0;
92
93 if (iv != NULL)
94 memcpy(&(ctx->oiv[0]),iv,8);
95 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
96 if (key != NULL)
97 CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key);
98 }
99
100static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
101 unsigned char *in, unsigned int inl)
102 {
103 CAST_ofb64_encrypt(
104 in,out,
105 (long)inl, &(ctx->c.cast_ks),
106 &(ctx->iv[0]),
107 &ctx->num);
108 }
109
110#endif
diff --git a/src/lib/libcrypto/evp/e_ofb_d.c b/src/lib/libcrypto/evp/e_ofb_d.c
index d51ce230f4..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ofb_d.c
+++ b/src/lib/libcrypto/evp/e_ofb_d.c
@@ -1,107 +0,0 @@
1/* crypto/evp/e_ofb_d.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_DES
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64
65static void des_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
66 unsigned char *iv,int enc);
67static void des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl);
69static EVP_CIPHER d_ofb_cipher=
70 {
71 NID_des_ofb64,
72 1,8,8,
73 des_ofb_init_key,
74 des_ofb_cipher,
75 NULL,
76 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)),
78 EVP_CIPHER_set_asn1_iv,
79 EVP_CIPHER_get_asn1_iv,
80 };
81
82EVP_CIPHER *EVP_des_ofb(void)
83 {
84 return(&d_ofb_cipher);
85 }
86
87static void des_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
88 unsigned char *iv, int enc)
89 {
90 des_cblock *deskey = (des_cblock *)key;
91
92 ctx->num=0;
93
94 if (iv != NULL)
95 memcpy(&(ctx->oiv[0]),iv,8);
96 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
97 if (deskey != NULL)
98 des_set_key_unchecked(deskey,ctx->c.des_ks);
99 }
100
101static void des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
102 unsigned char *in, unsigned int inl)
103 {
104 des_ofb64_encrypt(in,out,inl,ctx->c.des_ks,
105 (des_cblock *)&(ctx->iv[0]),&ctx->num);
106 }
107#endif
diff --git a/src/lib/libcrypto/evp/e_ofb_i.c b/src/lib/libcrypto/evp/e_ofb_i.c
index 389206ef36..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ofb_i.c
+++ b/src/lib/libcrypto/evp/e_ofb_i.c
@@ -1,109 +0,0 @@
1/* crypto/evp/e_ofb_i.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_IDEA
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER i_ofb_cipher=
71 {
72 NID_idea_ofb64,
73 1,IDEA_KEY_LENGTH,IDEA_BLOCK,
74 idea_ofb_init_key,
75 idea_ofb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_idea_ofb(void)
84 {
85 return(&i_ofb_cipher);
86 }
87
88static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 ctx->num=0;
92
93 if (iv != NULL)
94 memcpy(&(ctx->oiv[0]),iv,8);
95 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
96 if (key != NULL)
97 idea_set_encrypt_key(key,&(ctx->c.idea_ks));
98 }
99
100static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
101 unsigned char *in, unsigned int inl)
102 {
103 idea_ofb64_encrypt(
104 in,out,(long)inl,
105 &(ctx->c.idea_ks),&(ctx->iv[0]),
106 &ctx->num);
107 }
108
109#endif
diff --git a/src/lib/libcrypto/evp/e_ofb_r2.c b/src/lib/libcrypto/evp/e_ofb_r2.c
index 60ae3d4507..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ofb_r2.c
+++ b/src/lib/libcrypto/evp/e_ofb_r2.c
@@ -1,111 +0,0 @@
1/* crypto/evp/e_ofb_r2.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC2
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void rc2_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER r2_ofb_cipher=
71 {
72 NID_rc2_ofb64,
73 1,EVP_RC2_KEY_SIZE,8,
74 rc2_ofb_init_key,
75 rc2_ofb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_rc2_ofb(void)
84 {
85 return(&r2_ofb_cipher);
86 }
87
88static void rc2_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 ctx->num=0;
92
93 if (iv != NULL)
94 memcpy(&(ctx->oiv[0]),iv,8);
95 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
96 if (key != NULL)
97 RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx),
98 key,EVP_CIPHER_CTX_key_length(ctx)*8);
99 }
100
101static void rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
102 unsigned char *in, unsigned int inl)
103 {
104 RC2_ofb64_encrypt(
105 in,out,
106 (long)inl, &(ctx->c.rc2_ks),
107 &(ctx->iv[0]),
108 &ctx->num);
109 }
110
111#endif
diff --git a/src/lib/libcrypto/evp/e_ofb_r5.c b/src/lib/libcrypto/evp/e_ofb_r5.c
index 30136824eb..e69de29bb2 100644
--- a/src/lib/libcrypto/evp/e_ofb_r5.c
+++ b/src/lib/libcrypto/evp/e_ofb_r5.c
@@ -1,111 +0,0 @@
1/* crypto/evp/e_ofb_r5.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC5
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65
66static void rc5_32_12_16_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
67 unsigned char *iv,int enc);
68static void rc5_32_12_16_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl);
70static EVP_CIPHER rc5_ofb_cipher=
71 {
72 NID_rc5_ofb64,
73 1,EVP_RC5_32_12_16_KEY_SIZE,8,
74 rc5_32_12_16_ofb_init_key,
75 rc5_32_12_16_ofb_cipher,
76 NULL,
77 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)),
79 EVP_CIPHER_set_asn1_iv,
80 EVP_CIPHER_get_asn1_iv,
81 };
82
83EVP_CIPHER *EVP_rc5_32_12_16_ofb(void)
84 {
85 return(&rc5_ofb_cipher);
86 }
87
88static void rc5_32_12_16_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key,
89 unsigned char *iv, int enc)
90 {
91 ctx->num=0;
92
93 if (iv != NULL)
94 memcpy(&(ctx->oiv[0]),iv,8);
95 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8);
96 if (key != NULL)
97 RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key,
98 RC5_12_ROUNDS);
99 }
100
101static void rc5_32_12_16_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
102 unsigned char *in, unsigned int inl)
103 {
104 RC5_32_ofb64_encrypt(
105 in,out,
106 (long)inl, &(ctx->c.rc5_ks),
107 &(ctx->iv[0]),
108 &ctx->num);
109 }
110
111#endif
diff --git a/src/lib/libcrypto/evp/e_rc2.c b/src/lib/libcrypto/evp/e_rc2.c
new file mode 100644
index 0000000000..3955c3ef84
--- /dev/null
+++ b/src/lib/libcrypto/evp/e_rc2.c
@@ -0,0 +1,222 @@
1/* crypto/evp/e_rc2.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC2
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65#include "evp_locl.h"
66
67static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
68 const unsigned char *iv,int enc);
69static int rc2_meth_to_magic(EVP_CIPHER_CTX *ctx);
70static int rc2_magic_to_meth(int i);
71static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
72static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type);
73static int rc2_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr);
74
75IMPLEMENT_BLOCK_CIPHER(rc2, rc2.ks, RC2, rc2, NID_rc2,
76 8,
77 EVP_RC2_KEY_SIZE, 8,
78 EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT,
79 rc2_init_key, NULL,
80 rc2_set_asn1_type_and_iv, rc2_get_asn1_type_and_iv,
81 rc2_ctrl)
82
83#define RC2_40_MAGIC 0xa0
84#define RC2_64_MAGIC 0x78
85#define RC2_128_MAGIC 0x3a
86
87static EVP_CIPHER r2_64_cbc_cipher=
88 {
89 NID_rc2_64_cbc,
90 8,8 /* 64 bit */,8,
91 EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT,
92 rc2_init_key,
93 rc2_cbc_cipher,
94 NULL,
95 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
96 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2)),
97 rc2_set_asn1_type_and_iv,
98 rc2_get_asn1_type_and_iv,
99 rc2_ctrl,
100 NULL
101 };
102
103static EVP_CIPHER r2_40_cbc_cipher=
104 {
105 NID_rc2_40_cbc,
106 8,5 /* 40 bit */,8,
107 EVP_CIPH_CBC_MODE | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT,
108 rc2_init_key,
109 rc2_cbc_cipher,
110 NULL,
111 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
112 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2)),
113 rc2_set_asn1_type_and_iv,
114 rc2_get_asn1_type_and_iv,
115 rc2_ctrl,
116 NULL
117 };
118
119EVP_CIPHER *EVP_rc2_64_cbc(void)
120 {
121 return(&r2_64_cbc_cipher);
122 }
123
124EVP_CIPHER *EVP_rc2_40_cbc(void)
125 {
126 return(&r2_40_cbc_cipher);
127 }
128
129static int rc2_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
130 const unsigned char *iv, int enc)
131 {
132 RC2_set_key(&(ctx->c.rc2.ks),EVP_CIPHER_CTX_key_length(ctx),
133 key,ctx->c.rc2.key_bits);
134 return 1;
135 }
136
137static int rc2_meth_to_magic(EVP_CIPHER_CTX *e)
138 {
139 int i;
140
141 EVP_CIPHER_CTX_ctrl(e, EVP_CTRL_GET_RC2_KEY_BITS, 0, &i);
142 if (i == 128) return(RC2_128_MAGIC);
143 else if (i == 64) return(RC2_64_MAGIC);
144 else if (i == 40) return(RC2_40_MAGIC);
145 else return(0);
146 }
147
148static int rc2_magic_to_meth(int i)
149 {
150 if (i == RC2_128_MAGIC) return 128;
151 else if (i == RC2_64_MAGIC) return 64;
152 else if (i == RC2_40_MAGIC) return 40;
153 else
154 {
155 EVPerr(EVP_F_RC2_MAGIC_TO_METH,EVP_R_UNSUPPORTED_KEY_SIZE);
156 return(0);
157 }
158 }
159
160static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
161 {
162 long num=0;
163 int i=0,l;
164 int key_bits;
165 unsigned char iv[EVP_MAX_IV_LENGTH];
166
167 if (type != NULL)
168 {
169 l=EVP_CIPHER_CTX_iv_length(c);
170 i=ASN1_TYPE_get_int_octetstring(type,&num,iv,l);
171 if (i != l)
172 return(-1);
173 key_bits =rc2_magic_to_meth((int)num);
174 if (!key_bits)
175 return(-1);
176 if(i > 0) EVP_CipherInit(c, NULL, NULL, iv, -1);
177 EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_RC2_KEY_BITS, key_bits, NULL);
178 EVP_CIPHER_CTX_set_key_length(c, key_bits / 8);
179 }
180 return(i);
181 }
182
183static int rc2_set_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type)
184 {
185 long num;
186 int i=0,j;
187
188 if (type != NULL)
189 {
190 num=rc2_meth_to_magic(c);
191 j=EVP_CIPHER_CTX_iv_length(c);
192 i=ASN1_TYPE_set_int_octetstring(type,num,c->oiv,j);
193 }
194 return(i);
195 }
196
197static int rc2_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
198 {
199 switch(type) {
200
201 case EVP_CTRL_INIT:
202 c->c.rc2.key_bits = EVP_CIPHER_CTX_key_length(c) * 8;
203 return 1;
204
205 case EVP_CTRL_GET_RC2_KEY_BITS:
206 *(int *)ptr = c->c.rc2.key_bits;
207 return 1;
208
209
210 case EVP_CTRL_SET_RC2_KEY_BITS:
211 if(arg > 0) {
212 c->c.rc2.key_bits = arg;
213 return 1;
214 }
215 return 0;
216
217 default:
218 return -1;
219 }
220 }
221
222#endif
diff --git a/src/lib/libcrypto/evp/e_rc4.c b/src/lib/libcrypto/evp/e_rc4.c
index c7e58a75cc..1c1e3b3857 100644
--- a/src/lib/libcrypto/evp/e_rc4.c
+++ b/src/lib/libcrypto/evp/e_rc4.c
@@ -63,14 +63,15 @@
63#include <openssl/evp.h> 63#include <openssl/evp.h>
64#include <openssl/objects.h> 64#include <openssl/objects.h>
65 65
66static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 66static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
67 unsigned char *iv,int enc); 67 const unsigned char *iv,int enc);
68static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 68static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
69 unsigned char *in, unsigned int inl); 69 const unsigned char *in, unsigned int inl);
70static EVP_CIPHER r4_cipher= 70static EVP_CIPHER r4_cipher=
71 { 71 {
72 NID_rc4, 72 NID_rc4,
73 1,EVP_RC4_KEY_SIZE,0, 73 1,EVP_RC4_KEY_SIZE,0,
74 EVP_CIPH_VARIABLE_LENGTH,
74 rc4_init_key, 75 rc4_init_key,
75 rc4_cipher, 76 rc4_cipher,
76 NULL, 77 NULL,
@@ -78,14 +79,22 @@ static EVP_CIPHER r4_cipher=
78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)), 79 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)),
79 NULL, 80 NULL,
80 NULL, 81 NULL,
82 NULL
81 }; 83 };
82 84
83static EVP_CIPHER r4_40_cipher= 85static EVP_CIPHER r4_40_cipher=
84 { 86 {
85 NID_rc4_40, 87 NID_rc4_40,
86 1,5 /* 40 bit */,0, 88 1,5 /* 40 bit */,0,
89 EVP_CIPH_VARIABLE_LENGTH,
87 rc4_init_key, 90 rc4_init_key,
88 rc4_cipher, 91 rc4_cipher,
92 NULL,
93 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+
94 sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc4)),
95 NULL,
96 NULL,
97 NULL
89 }; 98 };
90 99
91EVP_CIPHER *EVP_rc4(void) 100EVP_CIPHER *EVP_rc4(void)
@@ -98,18 +107,19 @@ EVP_CIPHER *EVP_rc4_40(void)
98 return(&r4_40_cipher); 107 return(&r4_40_cipher);
99 } 108 }
100 109
101static void rc4_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 110static int rc4_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
102 unsigned char *iv, int enc) 111 const unsigned char *iv, int enc)
103 { 112 {
104 if (key != NULL) 113 memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx));
105 memcpy(&(ctx->c.rc4.key[0]),key,EVP_CIPHER_CTX_key_length(ctx));
106 RC4_set_key(&(ctx->c.rc4.ks),EVP_CIPHER_CTX_key_length(ctx), 114 RC4_set_key(&(ctx->c.rc4.ks),EVP_CIPHER_CTX_key_length(ctx),
107 ctx->c.rc4.key); 115 ctx->c.rc4.key);
116 return 1;
108 } 117 }
109 118
110static void rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 119static int rc4_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
111 unsigned char *in, unsigned int inl) 120 const unsigned char *in, unsigned int inl)
112 { 121 {
113 RC4(&(ctx->c.rc4.ks),inl,in,out); 122 RC4(&(ctx->c.rc4.ks),inl,in,out);
123 return 1;
114 } 124 }
115#endif 125#endif
diff --git a/src/lib/libcrypto/evp/e_rc5.c b/src/lib/libcrypto/evp/e_rc5.c
new file mode 100644
index 0000000000..5885f1826b
--- /dev/null
+++ b/src/lib/libcrypto/evp/e_rc5.c
@@ -0,0 +1,118 @@
1/* crypto/evp/e_rc5.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_RC5
60
61#include <stdio.h>
62#include "cryptlib.h"
63#include <openssl/evp.h>
64#include <openssl/objects.h>
65#include "evp_locl.h"
66
67static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
68 const unsigned char *iv,int enc);
69static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr);
70
71IMPLEMENT_BLOCK_CIPHER(rc5_32_12_16, rc5.ks, RC5_32, rc5, NID_rc5,
72 8, EVP_RC5_32_12_16_KEY_SIZE, 8,
73 EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT,
74 r_32_12_16_init_key, NULL,
75 NULL, NULL, rc5_ctrl)
76
77
78
79static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr)
80 {
81 switch(type) {
82
83 case EVP_CTRL_INIT:
84 c->c.rc5.rounds = RC5_12_ROUNDS;
85 return 1;
86
87 case EVP_CTRL_GET_RC5_ROUNDS:
88 *(int *)ptr = c->c.rc5.rounds;
89 return 1;
90
91
92 case EVP_CTRL_SET_RC5_ROUNDS:
93 switch(arg) {
94 case RC5_8_ROUNDS:
95 case RC5_12_ROUNDS:
96 case RC5_16_ROUNDS:
97 c->c.rc5.rounds = arg;
98 return 1;
99
100 default:
101 EVPerr(EVP_F_RC5_CTRL, EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS);
102 return 0;
103 }
104
105 default:
106 return -1;
107 }
108 }
109
110static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
111 const unsigned char *iv, int enc)
112 {
113 RC5_32_set_key(&(ctx->c.rc5.ks),EVP_CIPHER_CTX_key_length(ctx),
114 key,ctx->c.rc5.rounds);
115 return 1;
116 }
117
118#endif
diff --git a/src/lib/libcrypto/evp/e_xcbc_d.c b/src/lib/libcrypto/evp/e_xcbc_d.c
index 7568fad4ff..e5b15acc7d 100644
--- a/src/lib/libcrypto/evp/e_xcbc_d.c
+++ b/src/lib/libcrypto/evp/e_xcbc_d.c
@@ -62,14 +62,15 @@
62#include <openssl/evp.h> 62#include <openssl/evp.h>
63#include <openssl/objects.h> 63#include <openssl/objects.h>
64 64
65static void desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 65static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
66 unsigned char *iv,int enc); 66 const unsigned char *iv,int enc);
67static void desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 67static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
68 unsigned char *in, unsigned int inl); 68 const unsigned char *in, unsigned int inl);
69static EVP_CIPHER d_xcbc_cipher= 69static EVP_CIPHER d_xcbc_cipher=
70 { 70 {
71 NID_desx_cbc, 71 NID_desx_cbc,
72 8,24,8, 72 8,24,8,
73 EVP_CIPH_CBC_MODE,
73 desx_cbc_init_key, 74 desx_cbc_init_key,
74 desx_cbc_cipher, 75 desx_cbc_cipher,
75 NULL, 76 NULL,
@@ -77,6 +78,7 @@ static EVP_CIPHER d_xcbc_cipher=
77 sizeof((((EVP_CIPHER_CTX *)NULL)->c.desx_cbc)), 78 sizeof((((EVP_CIPHER_CTX *)NULL)->c.desx_cbc)),
78 EVP_CIPHER_set_asn1_iv, 79 EVP_CIPHER_set_asn1_iv,
79 EVP_CIPHER_get_asn1_iv, 80 EVP_CIPHER_get_asn1_iv,
81 NULL
80 }; 82 };
81 83
82EVP_CIPHER *EVP_desx_cbc(void) 84EVP_CIPHER *EVP_desx_cbc(void)
@@ -84,29 +86,26 @@ EVP_CIPHER *EVP_desx_cbc(void)
84 return(&d_xcbc_cipher); 86 return(&d_xcbc_cipher);
85 } 87 }
86 88
87static void desx_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, 89static int desx_cbc_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key,
88 unsigned char *iv, int enc) 90 const unsigned char *iv, int enc)
89 { 91 {
90 des_cblock *deskey = (des_cblock *)key; 92 des_cblock *deskey = (des_cblock *)key;
91 93
92 if (iv != NULL) 94 des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks);
93 memcpy(&(ctx->oiv[0]),iv,8); 95 memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8);
94 memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); 96 memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8);
95 if (deskey != NULL) 97
96 { 98 return 1;
97 des_set_key_unchecked(deskey,ctx->c.desx_cbc.ks);
98 memcpy(&(ctx->c.desx_cbc.inw[0]),&(key[8]),8);
99 memcpy(&(ctx->c.desx_cbc.outw[0]),&(key[16]),8);
100 }
101 } 99 }
102 100
103static void desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, 101static int desx_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out,
104 unsigned char *in, unsigned int inl) 102 const unsigned char *in, unsigned int inl)
105 { 103 {
106 des_xcbc_encrypt(in,out,inl,ctx->c.desx_cbc.ks, 104 des_xcbc_encrypt(in,out,inl,ctx->c.desx_cbc.ks,
107 (des_cblock *)&(ctx->iv[0]), 105 (des_cblock *)&(ctx->iv[0]),
108 &ctx->c.desx_cbc.inw, 106 &ctx->c.desx_cbc.inw,
109 &ctx->c.desx_cbc.outw, 107 &ctx->c.desx_cbc.outw,
110 ctx->encrypt); 108 ctx->encrypt);
109 return 1;
111 } 110 }
112#endif 111#endif
diff --git a/src/lib/libcrypto/evp/encode.c b/src/lib/libcrypto/evp/encode.c
index 14a4cb11f6..6ff9c1783c 100644
--- a/src/lib/libcrypto/evp/encode.c
+++ b/src/lib/libcrypto/evp/encode.c
@@ -292,7 +292,17 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl,
292 /* If we are at the end of input and it looks like a 292 /* If we are at the end of input and it looks like a
293 * line, process it. */ 293 * line, process it. */
294 if (((i+1) == inl) && (((n&3) == 0) || eof)) 294 if (((i+1) == inl) && (((n&3) == 0) || eof))
295 {
295 v=B64_EOF; 296 v=B64_EOF;
297 /* In case things were given us in really small
298 records (so two '=' were given in separate
299 updates), eof may contain the incorrect number
300 of ending bytes to skip, so let's redo the count */
301 eof = 0;
302 if (d[n-1] == '=') eof++;
303 if (d[n-2] == '=') eof++;
304 /* There will never be more than two '=' */
305 }
296 306
297 if ((v == B64_EOF) || (n >= 64)) 307 if ((v == B64_EOF) || (n >= 64))
298 { 308 {
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h
index 54215b0905..f5b938d2f8 100644
--- a/src/lib/libcrypto/evp/evp.h
+++ b/src/lib/libcrypto/evp/evp.h
@@ -59,13 +59,23 @@
59#ifndef HEADER_ENVELOPE_H 59#ifndef HEADER_ENVELOPE_H
60#define HEADER_ENVELOPE_H 60#define HEADER_ENVELOPE_H
61 61
62#ifdef __cplusplus 62#ifdef OPENSSL_ALGORITHM_DEFINES
63extern "C" { 63# include <openssl/opensslconf.h>
64#else
65# define OPENSSL_ALGORITHM_DEFINES
66# include <openssl/opensslconf.h>
67# undef OPENSSL_ALGORITHM_DEFINES
64#endif 68#endif
65 69
70#ifndef NO_BIO
71#include <openssl/bio.h>
72#endif
66#ifndef NO_MD2 73#ifndef NO_MD2
67#include <openssl/md2.h> 74#include <openssl/md2.h>
68#endif 75#endif
76#ifndef NO_MD4
77#include <openssl/md4.h>
78#endif
69#ifndef NO_MD5 79#ifndef NO_MD5
70#include <openssl/md5.h> 80#include <openssl/md5.h>
71#endif 81#endif
@@ -147,6 +157,10 @@ extern "C" {
147#define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 157#define EVP_PKEY_DSA4 NID_dsaWithSHA1_2
148#define EVP_PKEY_DH NID_dhKeyAgreement 158#define EVP_PKEY_DH NID_dhKeyAgreement
149 159
160#ifdef __cplusplus
161extern "C" {
162#endif
163
150/* Type needs to be a bit field 164/* Type needs to be a bit field
151 * Sub-type needs to be for variations on the method, as in, can it do 165 * Sub-type needs to be for variations on the method, as in, can it do
152 * arbitrary encryption.... */ 166 * arbitrary encryption.... */
@@ -168,7 +182,7 @@ typedef struct evp_pkey_st
168#endif 182#endif
169 } pkey; 183 } pkey;
170 int save_parameters; 184 int save_parameters;
171 STACK /*X509_ATTRIBUTE*/ *attributes; /* [ 0 ] */ 185 STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */
172 } EVP_PKEY; 186 } EVP_PKEY;
173 187
174#define EVP_PKEY_MO_SIGN 0x0001 188#define EVP_PKEY_MO_SIGN 0x0001
@@ -298,6 +312,9 @@ typedef struct env_md_ctx_st
298#ifndef NO_MD5 312#ifndef NO_MD5
299 MD5_CTX md5; 313 MD5_CTX md5;
300#endif 314#endif
315#ifndef NO_MD4
316 MD4_CTX md4;
317#endif
301#ifndef NO_RIPEMD 318#ifndef NO_RIPEMD
302 RIPEMD160_CTX ripemd160; 319 RIPEMD160_CTX ripemd160;
303#endif 320#endif
@@ -310,21 +327,57 @@ typedef struct env_md_ctx_st
310 } md; 327 } md;
311 } EVP_MD_CTX; 328 } EVP_MD_CTX;
312 329
313typedef struct evp_cipher_st 330typedef struct evp_cipher_st EVP_CIPHER;
331typedef struct evp_cipher_ctx_st EVP_CIPHER_CTX;
332
333struct evp_cipher_st
314 { 334 {
315 int nid; 335 int nid;
316 int block_size; 336 int block_size;
317 int key_len; 337 int key_len; /* Default value for variable length ciphers */
318 int iv_len; 338 int iv_len;
319 void (*init)(); /* init for encryption */ 339 unsigned long flags; /* Various flags */
320 void (*do_cipher)(); /* encrypt data */ 340 int (*init)(EVP_CIPHER_CTX *ctx, const unsigned char *key,
321 void (*cleanup)(); /* used by cipher method */ 341 const unsigned char *iv, int enc); /* init key */
342 int (*do_cipher)(EVP_CIPHER_CTX *ctx, unsigned char *out,
343 const unsigned char *in, unsigned int inl);/* encrypt/decrypt data */
344 int (*cleanup)(EVP_CIPHER_CTX *); /* cleanup ctx */
322 int ctx_size; /* how big the ctx needs to be */ 345 int ctx_size; /* how big the ctx needs to be */
323 /* int set_asn1_parameters(EVP_CIPHER_CTX,ASN1_TYPE *); */ 346 int (*set_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Populate a ASN1_TYPE with parameters */
324 int (*set_asn1_parameters)(); /* Populate a ASN1_TYPE with parameters */ 347 int (*get_asn1_parameters)(EVP_CIPHER_CTX *, ASN1_TYPE *); /* Get parameters from a ASN1_TYPE */
325 /* int get_asn1_parameters(EVP_CIPHER_CTX,ASN1_TYPE *); */ 348 int (*ctrl)(EVP_CIPHER_CTX *, int type, int arg, void *ptr); /* Miscellaneous operations */
326 int (*get_asn1_parameters)(); /* Get parameters from a ASN1_TYPE */ 349 void *app_data; /* Application data */
327 } EVP_CIPHER; 350 };
351
352/* Values for cipher flags */
353
354/* Modes for ciphers */
355
356#define EVP_CIPH_STREAM_CIPHER 0x0
357#define EVP_CIPH_ECB_MODE 0x1
358#define EVP_CIPH_CBC_MODE 0x2
359#define EVP_CIPH_CFB_MODE 0x3
360#define EVP_CIPH_OFB_MODE 0x4
361#define EVP_CIPH_MODE 0x7
362/* Set if variable length cipher */
363#define EVP_CIPH_VARIABLE_LENGTH 0x8
364/* Set if the iv handling should be done by the cipher itself */
365#define EVP_CIPH_CUSTOM_IV 0x10
366/* Set if the cipher's init() function should be called if key is NULL */
367#define EVP_CIPH_ALWAYS_CALL_INIT 0x20
368/* Call ctrl() to init cipher parameters */
369#define EVP_CIPH_CTRL_INIT 0x40
370/* Don't use standard key length function */
371#define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80
372
373/* ctrl() values */
374
375#define EVP_CTRL_INIT 0x0
376#define EVP_CTRL_SET_KEY_LENGTH 0x1
377#define EVP_CTRL_GET_RC2_KEY_BITS 0x2
378#define EVP_CTRL_SET_RC2_KEY_BITS 0x3
379#define EVP_CTRL_GET_RC5_ROUNDS 0x4
380#define EVP_CTRL_SET_RC5_ROUNDS 0x5
328 381
329typedef struct evp_cipher_info_st 382typedef struct evp_cipher_info_st
330 { 383 {
@@ -332,7 +385,7 @@ typedef struct evp_cipher_info_st
332 unsigned char iv[EVP_MAX_IV_LENGTH]; 385 unsigned char iv[EVP_MAX_IV_LENGTH];
333 } EVP_CIPHER_INFO; 386 } EVP_CIPHER_INFO;
334 387
335typedef struct evp_cipher_ctx_st 388struct evp_cipher_ctx_st
336 { 389 {
337 const EVP_CIPHER *cipher; 390 const EVP_CIPHER *cipher;
338 int encrypt; /* encrypt or decrypt */ 391 int encrypt; /* encrypt or decrypt */
@@ -343,7 +396,8 @@ typedef struct evp_cipher_ctx_st
343 unsigned char buf[EVP_MAX_IV_LENGTH]; /* saved partial block */ 396 unsigned char buf[EVP_MAX_IV_LENGTH]; /* saved partial block */
344 int num; /* used by cfb/ofb mode */ 397 int num; /* used by cfb/ofb mode */
345 398
346 char *app_data; /* application stuff */ 399 void *app_data; /* application stuff */
400 int key_len; /* May change for variable length cipher */
347 union { 401 union {
348#ifndef NO_RC4 402#ifndef NO_RC4
349 struct 403 struct
@@ -371,10 +425,16 @@ typedef struct evp_cipher_ctx_st
371 IDEA_KEY_SCHEDULE idea_ks;/* key schedule */ 425 IDEA_KEY_SCHEDULE idea_ks;/* key schedule */
372#endif 426#endif
373#ifndef NO_RC2 427#ifndef NO_RC2
374 RC2_KEY rc2_ks;/* key schedule */ 428 struct {
429 int key_bits; /* effective key bits */
430 RC2_KEY ks;/* key schedule */
431 } rc2;
375#endif 432#endif
376#ifndef NO_RC5 433#ifndef NO_RC5
377 RC5_32_KEY rc5_ks;/* key schedule */ 434 struct {
435 int rounds; /* number of rounds */
436 RC5_32_KEY ks;/* key schedule */
437 } rc5;
378#endif 438#endif
379#ifndef NO_BF 439#ifndef NO_BF
380 BF_KEY bf_ks;/* key schedule */ 440 BF_KEY bf_ks;/* key schedule */
@@ -383,7 +443,7 @@ typedef struct evp_cipher_ctx_st
383 CAST_KEY cast_ks;/* key schedule */ 443 CAST_KEY cast_ks;/* key schedule */
384#endif 444#endif
385 } c; 445 } c;
386 } EVP_CIPHER_CTX; 446 };
387 447
388typedef struct evp_Encode_Ctx_st 448typedef struct evp_Encode_Ctx_st
389 { 449 {
@@ -430,15 +490,19 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen,
430#define EVP_CIPHER_block_size(e) ((e)->block_size) 490#define EVP_CIPHER_block_size(e) ((e)->block_size)
431#define EVP_CIPHER_key_length(e) ((e)->key_len) 491#define EVP_CIPHER_key_length(e) ((e)->key_len)
432#define EVP_CIPHER_iv_length(e) ((e)->iv_len) 492#define EVP_CIPHER_iv_length(e) ((e)->iv_len)
493#define EVP_CIPHER_flags(e) ((e)->flags)
494#define EVP_CIPHER_mode(e) ((e)->flags) & EVP_CIPH_MODE)
433 495
434#define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) 496#define EVP_CIPHER_CTX_cipher(e) ((e)->cipher)
435#define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) 497#define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid)
436#define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size) 498#define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size)
437#define EVP_CIPHER_CTX_key_length(e) ((e)->cipher->key_len) 499#define EVP_CIPHER_CTX_key_length(e) ((e)->key_len)
438#define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len) 500#define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len)
439#define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) 501#define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data)
440#define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d)) 502#define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d))
441#define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) 503#define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c))
504#define EVP_CIPHER_CTX_flags(e) ((e)->cipher->flags)
505#define EVP_CIPHER_CTX_mode(e) ((e)->cipher->flags & EVP_CIPH_MODE)
442 506
443#define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) 507#define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80)
444#define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) 508#define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80)
@@ -486,21 +550,21 @@ int EVP_BytesToKey(const EVP_CIPHER *type,EVP_MD *md,unsigned char *salt,
486 unsigned char *data, int datal, int count, 550 unsigned char *data, int datal, int count,
487 unsigned char *key,unsigned char *iv); 551 unsigned char *key,unsigned char *iv);
488 552
489void EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, 553int EVP_EncryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
490 unsigned char *key, unsigned char *iv); 554 unsigned char *key, unsigned char *iv);
491void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 555int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
492 int *outl, unsigned char *in, int inl); 556 int *outl, unsigned char *in, int inl);
493void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); 557int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
494 558
495void EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, 559int EVP_DecryptInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
496 unsigned char *key, unsigned char *iv); 560 unsigned char *key, unsigned char *iv);
497void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 561int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
498 int *outl, unsigned char *in, int inl); 562 int *outl, unsigned char *in, int inl);
499int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); 563int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
500 564
501void EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, 565int EVP_CipherInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,
502 unsigned char *key,unsigned char *iv,int enc); 566 unsigned char *key,unsigned char *iv,int enc);
503void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, 567int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out,
504 int *outl, unsigned char *in, int inl); 568 int *outl, unsigned char *in, int inl);
505int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); 569int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl);
506 570
@@ -534,9 +598,11 @@ int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n);
534void ERR_load_EVP_strings(void ); 598void ERR_load_EVP_strings(void );
535 599
536void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); 600void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a);
537void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); 601int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a);
602int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
603int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr);
538 604
539#ifdef HEADER_BIO_H 605#ifndef NO_BIO
540BIO_METHOD *BIO_f_md(void); 606BIO_METHOD *BIO_f_md(void);
541BIO_METHOD *BIO_f_base64(void); 607BIO_METHOD *BIO_f_base64(void);
542BIO_METHOD *BIO_f_cipher(void); 608BIO_METHOD *BIO_f_cipher(void);
@@ -547,6 +613,7 @@ void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,unsigned char *k,
547 613
548EVP_MD *EVP_md_null(void); 614EVP_MD *EVP_md_null(void);
549EVP_MD *EVP_md2(void); 615EVP_MD *EVP_md2(void);
616EVP_MD *EVP_md4(void);
550EVP_MD *EVP_md5(void); 617EVP_MD *EVP_md5(void);
551EVP_MD *EVP_sha(void); 618EVP_MD *EVP_sha(void);
552EVP_MD *EVP_sha1(void); 619EVP_MD *EVP_sha1(void);
@@ -683,6 +750,9 @@ void EVP_PBE_cleanup(void);
683 750
684/* Function codes. */ 751/* Function codes. */
685#define EVP_F_D2I_PKEY 100 752#define EVP_F_D2I_PKEY 100
753#define EVP_F_EVP_CIPHERINIT 123
754#define EVP_F_EVP_CIPHER_CTX_CTRL 124
755#define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122
686#define EVP_F_EVP_DECRYPTFINAL 101 756#define EVP_F_EVP_DECRYPTFINAL 101
687#define EVP_F_EVP_MD_CTX_COPY 110 757#define EVP_F_EVP_MD_CTX_COPY 110
688#define EVP_F_EVP_OPENINIT 102 758#define EVP_F_EVP_OPENINIT 102
@@ -703,12 +773,15 @@ void EVP_PBE_cleanup(void);
703#define EVP_F_PKCS5_PBE_KEYIVGEN 117 773#define EVP_F_PKCS5_PBE_KEYIVGEN 117
704#define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 774#define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118
705#define EVP_F_RC2_MAGIC_TO_METH 109 775#define EVP_F_RC2_MAGIC_TO_METH 109
776#define EVP_F_RC5_CTRL 125
706 777
707/* Reason codes. */ 778/* Reason codes. */
708#define EVP_R_BAD_DECRYPT 100 779#define EVP_R_BAD_DECRYPT 100
709#define EVP_R_BN_DECODE_ERROR 112 780#define EVP_R_BN_DECODE_ERROR 112
710#define EVP_R_BN_PUBKEY_ERROR 113 781#define EVP_R_BN_PUBKEY_ERROR 113
711#define EVP_R_CIPHER_PARAMETER_ERROR 122 782#define EVP_R_CIPHER_PARAMETER_ERROR 122
783#define EVP_R_CTRL_NOT_IMPLEMENTED 132
784#define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133
712#define EVP_R_DECODE_ERROR 114 785#define EVP_R_DECODE_ERROR 114
713#define EVP_R_DIFFERENT_KEY_TYPES 101 786#define EVP_R_DIFFERENT_KEY_TYPES 101
714#define EVP_R_ENCODE_ERROR 115 787#define EVP_R_ENCODE_ERROR 115
@@ -716,16 +789,20 @@ void EVP_PBE_cleanup(void);
716#define EVP_R_EXPECTING_AN_RSA_KEY 127 789#define EVP_R_EXPECTING_AN_RSA_KEY 127
717#define EVP_R_EXPECTING_A_DH_KEY 128 790#define EVP_R_EXPECTING_A_DH_KEY 128
718#define EVP_R_EXPECTING_A_DSA_KEY 129 791#define EVP_R_EXPECTING_A_DSA_KEY 129
792#define EVP_R_INITIALIZATION_ERROR 134
719#define EVP_R_INPUT_NOT_INITIALIZED 111 793#define EVP_R_INPUT_NOT_INITIALIZED 111
794#define EVP_R_INVALID_KEY_LENGTH 130
720#define EVP_R_IV_TOO_LARGE 102 795#define EVP_R_IV_TOO_LARGE 102
721#define EVP_R_KEYGEN_FAILURE 120 796#define EVP_R_KEYGEN_FAILURE 120
722#define EVP_R_MISSING_PARAMETERS 103 797#define EVP_R_MISSING_PARAMETERS 103
798#define EVP_R_NO_CIPHER_SET 131
723#define EVP_R_NO_DSA_PARAMETERS 116 799#define EVP_R_NO_DSA_PARAMETERS 116
724#define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104 800#define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104
725#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 801#define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105
726#define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117 802#define EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE 117
727#define EVP_R_PUBLIC_KEY_NOT_RSA 106 803#define EVP_R_PUBLIC_KEY_NOT_RSA 106
728#define EVP_R_UNKNOWN_PBE_ALGORITHM 121 804#define EVP_R_UNKNOWN_PBE_ALGORITHM 121
805#define EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS 135
729#define EVP_R_UNSUPPORTED_CIPHER 107 806#define EVP_R_UNSUPPORTED_CIPHER 107
730#define EVP_R_UNSUPPORTED_KEYLENGTH 123 807#define EVP_R_UNSUPPORTED_KEYLENGTH 123
731#define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124 808#define EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION 124
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c
index 5299a65b6a..e2687f9879 100644
--- a/src/lib/libcrypto/evp/evp_enc.c
+++ b/src/lib/libcrypto/evp/evp_enc.c
@@ -59,6 +59,8 @@
59#include <stdio.h> 59#include <stdio.h>
60#include "cryptlib.h" 60#include "cryptlib.h"
61#include <openssl/evp.h> 61#include <openssl/evp.h>
62#include <openssl/err.h>
63#include "evp_locl.h"
62 64
63const char *EVP_version="EVP" OPENSSL_VERSION_PTEXT; 65const char *EVP_version="EVP" OPENSSL_VERSION_PTEXT;
64 66
@@ -68,55 +70,84 @@ void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx)
68 /* ctx->cipher=NULL; */ 70 /* ctx->cipher=NULL; */
69 } 71 }
70 72
71void EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *data, 73int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
72 unsigned char *key, unsigned char *iv, int enc) 74 unsigned char *key, unsigned char *iv, int enc)
73 { 75 {
74 if (enc) 76 if(enc && (enc != -1)) enc = 1;
75 EVP_EncryptInit(ctx,data,key,iv); 77 if (cipher) {
76 else 78 ctx->cipher=cipher;
77 EVP_DecryptInit(ctx,data,key,iv); 79 ctx->key_len = cipher->key_len;
80 if(ctx->cipher->flags & EVP_CIPH_CTRL_INIT) {
81 if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL)) {
82 EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_INITIALIZATION_ERROR);
83 return 0;
84 }
85 }
86 } else if(!ctx->cipher) {
87 EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_NO_CIPHER_SET);
88 return 0;
78 } 89 }
90 if(!(EVP_CIPHER_CTX_flags(ctx) & EVP_CIPH_CUSTOM_IV)) {
91 switch(EVP_CIPHER_CTX_mode(ctx)) {
92
93 case EVP_CIPH_STREAM_CIPHER:
94 case EVP_CIPH_ECB_MODE:
95 break;
96
97 case EVP_CIPH_CFB_MODE:
98 case EVP_CIPH_OFB_MODE:
79 99
80void EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, 100 ctx->num = 0;
101
102 case EVP_CIPH_CBC_MODE:
103
104 if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx));
105 memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx));
106 break;
107
108 default:
109 return 0;
110 break;
111 }
112 }
113
114 if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) {
115 if(!ctx->cipher->init(ctx,key,iv,enc)) return 0;
116 }
117 if(enc != -1) ctx->encrypt=enc;
118 ctx->buf_len=0;
119 return 1;
120 }
121
122int EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
81 unsigned char *in, int inl) 123 unsigned char *in, int inl)
82 { 124 {
83 if (ctx->encrypt) 125 if (ctx->encrypt)
84 EVP_EncryptUpdate(ctx,out,outl,in,inl); 126 return EVP_EncryptUpdate(ctx,out,outl,in,inl);
85 else EVP_DecryptUpdate(ctx,out,outl,in,inl); 127 else return EVP_DecryptUpdate(ctx,out,outl,in,inl);
86 } 128 }
87 129
88int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) 130int EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
89 { 131 {
90 if (ctx->encrypt) 132 if (ctx->encrypt)
91 { 133 return EVP_EncryptFinal(ctx,out,outl);
92 EVP_EncryptFinal(ctx,out,outl);
93 return(1);
94 }
95 else return(EVP_DecryptFinal(ctx,out,outl)); 134 else return(EVP_DecryptFinal(ctx,out,outl));
96 } 135 }
97 136
98void EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, 137int EVP_EncryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
99 unsigned char *key, unsigned char *iv) 138 unsigned char *key, unsigned char *iv)
100 { 139 {
101 if (cipher != NULL) 140 return EVP_CipherInit(ctx, cipher, key, iv, 1);
102 ctx->cipher=cipher;
103 ctx->cipher->init(ctx,key,iv,1);
104 ctx->encrypt=1;
105 ctx->buf_len=0;
106 } 141 }
107 142
108void EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, 143int EVP_DecryptInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
109 unsigned char *key, unsigned char *iv) 144 unsigned char *key, unsigned char *iv)
110 { 145 {
111 if (cipher != NULL) 146 return EVP_CipherInit(ctx, cipher, key, iv, 0);
112 ctx->cipher=cipher;
113 ctx->cipher->init(ctx,key,iv,0);
114 ctx->encrypt=0;
115 ctx->buf_len=0;
116 } 147 }
117 148
118 149
119void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, 150int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
120 unsigned char *in, int inl) 151 unsigned char *in, int inl)
121 { 152 {
122 int i,j,bl; 153 int i,j,bl;
@@ -124,20 +155,20 @@ void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
124 i=ctx->buf_len; 155 i=ctx->buf_len;
125 bl=ctx->cipher->block_size; 156 bl=ctx->cipher->block_size;
126 *outl=0; 157 *outl=0;
127 if ((inl == 0) && (i != bl)) return; 158 if ((inl == 0) && (i != bl)) return 1;
128 if (i != 0) 159 if (i != 0)
129 { 160 {
130 if (i+inl < bl) 161 if (i+inl < bl)
131 { 162 {
132 memcpy(&(ctx->buf[i]),in,inl); 163 memcpy(&(ctx->buf[i]),in,inl);
133 ctx->buf_len+=inl; 164 ctx->buf_len+=inl;
134 return; 165 return 1;
135 } 166 }
136 else 167 else
137 { 168 {
138 j=bl-i; 169 j=bl-i;
139 if (j != 0) memcpy(&(ctx->buf[i]),in,j); 170 if (j != 0) memcpy(&(ctx->buf[i]),in,j);
140 ctx->cipher->do_cipher(ctx,out,ctx->buf,bl); 171 if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,bl)) return 0;
141 inl-=j; 172 inl-=j;
142 in+=j; 173 in+=j;
143 out+=bl; 174 out+=bl;
@@ -148,16 +179,17 @@ void EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
148 inl-=i; 179 inl-=i;
149 if (inl > 0) 180 if (inl > 0)
150 { 181 {
151 ctx->cipher->do_cipher(ctx,out,in,inl); 182 if(!ctx->cipher->do_cipher(ctx,out,in,inl)) return 0;
152 *outl+=inl; 183 *outl+=inl;
153 } 184 }
154 185
155 if (i != 0) 186 if (i != 0)
156 memcpy(ctx->buf,&(in[inl]),i); 187 memcpy(ctx->buf,&(in[inl]),i);
157 ctx->buf_len=i; 188 ctx->buf_len=i;
189 return 1;
158 } 190 }
159 191
160void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) 192int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
161 { 193 {
162 int i,n,b,bl; 194 int i,n,b,bl;
163 195
@@ -165,24 +197,25 @@ void EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
165 if (b == 1) 197 if (b == 1)
166 { 198 {
167 *outl=0; 199 *outl=0;
168 return; 200 return 1;
169 } 201 }
170 bl=ctx->buf_len; 202 bl=ctx->buf_len;
171 n=b-bl; 203 n=b-bl;
172 for (i=bl; i<b; i++) 204 for (i=bl; i<b; i++)
173 ctx->buf[i]=n; 205 ctx->buf[i]=n;
174 ctx->cipher->do_cipher(ctx,out,ctx->buf,b); 206 if(!ctx->cipher->do_cipher(ctx,out,ctx->buf,b)) return 0;
175 *outl=b; 207 *outl=b;
208 return 1;
176 } 209 }
177 210
178void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, 211int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
179 unsigned char *in, int inl) 212 unsigned char *in, int inl)
180 { 213 {
181 int b,bl,n; 214 int b,bl,n;
182 int keep_last=0; 215 int keep_last=0;
183 216
184 *outl=0; 217 *outl=0;
185 if (inl == 0) return; 218 if (inl == 0) return 1;
186 219
187 b=ctx->cipher->block_size; 220 b=ctx->cipher->block_size;
188 if (b > 1) 221 if (b > 1)
@@ -197,13 +230,13 @@ void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
197 memcpy(&(ctx->buf[bl]),in,inl); 230 memcpy(&(ctx->buf[bl]),in,inl);
198 ctx->buf_len=b; 231 ctx->buf_len=b;
199 *outl=0; 232 *outl=0;
200 return; 233 return 1;
201 } 234 }
202 keep_last=1; 235 keep_last=1;
203 inl-=b; /* don't do the last block */ 236 inl-=b; /* don't do the last block */
204 } 237 }
205 } 238 }
206 EVP_EncryptUpdate(ctx,out,outl,in,inl); 239 if(!EVP_EncryptUpdate(ctx,out,outl,in,inl)) return 0;
207 240
208 /* if we have 'decrypted' a multiple of block size, make sure 241 /* if we have 'decrypted' a multiple of block size, make sure
209 * we have a copy of this last block */ 242 * we have a copy of this last block */
@@ -218,6 +251,7 @@ void EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl,
218#endif 251#endif
219 ctx->buf_len=b; 252 ctx->buf_len=b;
220 } 253 }
254 return 1;
221 } 255 }
222 256
223int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) 257int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
@@ -234,7 +268,7 @@ int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
234 EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_WRONG_FINAL_BLOCK_LENGTH); 268 EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_WRONG_FINAL_BLOCK_LENGTH);
235 return(0); 269 return(0);
236 } 270 }
237 EVP_EncryptUpdate(ctx,ctx->buf,&n,ctx->buf,0); 271 if(!EVP_EncryptUpdate(ctx,ctx->buf,&n,ctx->buf,0)) return 0;
238 if (n != b) 272 if (n != b)
239 return(0); 273 return(0);
240 n=ctx->buf[b-1]; 274 n=ctx->buf[b-1];
@@ -261,10 +295,47 @@ int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl)
261 return(1); 295 return(1);
262 } 296 }
263 297
264void EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) 298int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c)
265 { 299 {
266 if ((c->cipher != NULL) && (c->cipher->cleanup != NULL)) 300 if ((c->cipher != NULL) && (c->cipher->cleanup != NULL))
267 c->cipher->cleanup(c); 301 {
302 if(!c->cipher->cleanup(c)) return 0;
303 }
268 memset(c,0,sizeof(EVP_CIPHER_CTX)); 304 memset(c,0,sizeof(EVP_CIPHER_CTX));
305 return 1;
306 }
307
308int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *c, int keylen)
309 {
310 if(c->cipher->flags & EVP_CIPH_CUSTOM_KEY_LENGTH)
311 return EVP_CIPHER_CTX_ctrl(c, EVP_CTRL_SET_KEY_LENGTH, keylen, NULL);
312 if(c->key_len == keylen) return 1;
313 if((keylen > 0) && (c->cipher->flags & EVP_CIPH_VARIABLE_LENGTH))
314 {
315 c->key_len = keylen;
316 return 1;
317 }
318 EVPerr(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,EVP_R_INVALID_KEY_LENGTH);
319 return 0;
320 }
321
322int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr)
323{
324 int ret;
325 if(!ctx->cipher) {
326 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_NO_CIPHER_SET);
327 return 0;
328 }
329
330 if(!ctx->cipher->ctrl) {
331 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_CTRL_NOT_IMPLEMENTED);
332 return 0;
269 } 333 }
270 334
335 ret = ctx->cipher->ctrl(ctx, type, arg, ptr);
336 if(ret == -1) {
337 EVPerr(EVP_F_EVP_CIPHER_CTX_CTRL, EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED);
338 return 0;
339 }
340 return ret;
341}
diff --git a/src/lib/libcrypto/evp/evp_err.c b/src/lib/libcrypto/evp/evp_err.c
index fc149cbb1a..a01412a07c 100644
--- a/src/lib/libcrypto/evp/evp_err.c
+++ b/src/lib/libcrypto/evp/evp_err.c
@@ -67,6 +67,9 @@
67static ERR_STRING_DATA EVP_str_functs[]= 67static ERR_STRING_DATA EVP_str_functs[]=
68 { 68 {
69{ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"}, 69{ERR_PACK(0,EVP_F_D2I_PKEY,0), "D2I_PKEY"},
70{ERR_PACK(0,EVP_F_EVP_CIPHERINIT,0), "EVP_CipherInit"},
71{ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_CTRL,0), "EVP_CIPHER_CTX_ctrl"},
72{ERR_PACK(0,EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH,0), "EVP_CIPHER_CTX_set_key_length"},
70{ERR_PACK(0,EVP_F_EVP_DECRYPTFINAL,0), "EVP_DecryptFinal"}, 73{ERR_PACK(0,EVP_F_EVP_DECRYPTFINAL,0), "EVP_DecryptFinal"},
71{ERR_PACK(0,EVP_F_EVP_MD_CTX_COPY,0), "EVP_MD_CTX_copy"}, 74{ERR_PACK(0,EVP_F_EVP_MD_CTX_COPY,0), "EVP_MD_CTX_copy"},
72{ERR_PACK(0,EVP_F_EVP_OPENINIT,0), "EVP_OpenInit"}, 75{ERR_PACK(0,EVP_F_EVP_OPENINIT,0), "EVP_OpenInit"},
@@ -87,6 +90,7 @@ static ERR_STRING_DATA EVP_str_functs[]=
87{ERR_PACK(0,EVP_F_PKCS5_PBE_KEYIVGEN,0), "PKCS5_PBE_keyivgen"}, 90{ERR_PACK(0,EVP_F_PKCS5_PBE_KEYIVGEN,0), "PKCS5_PBE_keyivgen"},
88{ERR_PACK(0,EVP_F_PKCS5_V2_PBE_KEYIVGEN,0), "PKCS5_v2_PBE_keyivgen"}, 91{ERR_PACK(0,EVP_F_PKCS5_V2_PBE_KEYIVGEN,0), "PKCS5_v2_PBE_keyivgen"},
89{ERR_PACK(0,EVP_F_RC2_MAGIC_TO_METH,0), "RC2_MAGIC_TO_METH"}, 92{ERR_PACK(0,EVP_F_RC2_MAGIC_TO_METH,0), "RC2_MAGIC_TO_METH"},
93{ERR_PACK(0,EVP_F_RC5_CTRL,0), "RC5_CTRL"},
90{0,NULL} 94{0,NULL}
91 }; 95 };
92 96
@@ -96,6 +100,8 @@ static ERR_STRING_DATA EVP_str_reasons[]=
96{EVP_R_BN_DECODE_ERROR ,"bn decode error"}, 100{EVP_R_BN_DECODE_ERROR ,"bn decode error"},
97{EVP_R_BN_PUBKEY_ERROR ,"bn pubkey error"}, 101{EVP_R_BN_PUBKEY_ERROR ,"bn pubkey error"},
98{EVP_R_CIPHER_PARAMETER_ERROR ,"cipher parameter error"}, 102{EVP_R_CIPHER_PARAMETER_ERROR ,"cipher parameter error"},
103{EVP_R_CTRL_NOT_IMPLEMENTED ,"ctrl not implemented"},
104{EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED ,"ctrl operation not implemented"},
99{EVP_R_DECODE_ERROR ,"decode error"}, 105{EVP_R_DECODE_ERROR ,"decode error"},
100{EVP_R_DIFFERENT_KEY_TYPES ,"different key types"}, 106{EVP_R_DIFFERENT_KEY_TYPES ,"different key types"},
101{EVP_R_ENCODE_ERROR ,"encode error"}, 107{EVP_R_ENCODE_ERROR ,"encode error"},
@@ -103,16 +109,20 @@ static ERR_STRING_DATA EVP_str_reasons[]=
103{EVP_R_EXPECTING_AN_RSA_KEY ,"expecting an rsa key"}, 109{EVP_R_EXPECTING_AN_RSA_KEY ,"expecting an rsa key"},
104{EVP_R_EXPECTING_A_DH_KEY ,"expecting a dh key"}, 110{EVP_R_EXPECTING_A_DH_KEY ,"expecting a dh key"},
105{EVP_R_EXPECTING_A_DSA_KEY ,"expecting a dsa key"}, 111{EVP_R_EXPECTING_A_DSA_KEY ,"expecting a dsa key"},
112{EVP_R_INITIALIZATION_ERROR ,"initialization error"},
106{EVP_R_INPUT_NOT_INITIALIZED ,"input not initialized"}, 113{EVP_R_INPUT_NOT_INITIALIZED ,"input not initialized"},
114{EVP_R_INVALID_KEY_LENGTH ,"invalid key length"},
107{EVP_R_IV_TOO_LARGE ,"iv too large"}, 115{EVP_R_IV_TOO_LARGE ,"iv too large"},
108{EVP_R_KEYGEN_FAILURE ,"keygen failure"}, 116{EVP_R_KEYGEN_FAILURE ,"keygen failure"},
109{EVP_R_MISSING_PARAMETERS ,"missing parameters"}, 117{EVP_R_MISSING_PARAMETERS ,"missing parameters"},
118{EVP_R_NO_CIPHER_SET ,"no cipher set"},
110{EVP_R_NO_DSA_PARAMETERS ,"no dsa parameters"}, 119{EVP_R_NO_DSA_PARAMETERS ,"no dsa parameters"},
111{EVP_R_NO_SIGN_FUNCTION_CONFIGURED ,"no sign function configured"}, 120{EVP_R_NO_SIGN_FUNCTION_CONFIGURED ,"no sign function configured"},
112{EVP_R_NO_VERIFY_FUNCTION_CONFIGURED ,"no verify function configured"}, 121{EVP_R_NO_VERIFY_FUNCTION_CONFIGURED ,"no verify function configured"},
113{EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE ,"pkcs8 unknown broken type"}, 122{EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE ,"pkcs8 unknown broken type"},
114{EVP_R_PUBLIC_KEY_NOT_RSA ,"public key not rsa"}, 123{EVP_R_PUBLIC_KEY_NOT_RSA ,"public key not rsa"},
115{EVP_R_UNKNOWN_PBE_ALGORITHM ,"unknown pbe algorithm"}, 124{EVP_R_UNKNOWN_PBE_ALGORITHM ,"unknown pbe algorithm"},
125{EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS ,"unsuported number of rounds"},
116{EVP_R_UNSUPPORTED_CIPHER ,"unsupported cipher"}, 126{EVP_R_UNSUPPORTED_CIPHER ,"unsupported cipher"},
117{EVP_R_UNSUPPORTED_KEYLENGTH ,"unsupported keylength"}, 127{EVP_R_UNSUPPORTED_KEYLENGTH ,"unsupported keylength"},
118{EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION,"unsupported key derivation function"}, 128{EVP_R_UNSUPPORTED_KEY_DERIVATION_FUNCTION,"unsupported key derivation function"},
diff --git a/src/lib/libcrypto/evp/evp_key.c b/src/lib/libcrypto/evp/evp_key.c
index 667c21cca8..09b72bf4bd 100644
--- a/src/lib/libcrypto/evp/evp_key.c
+++ b/src/lib/libcrypto/evp/evp_key.c
@@ -116,7 +116,7 @@ int EVP_BytesToKey(const EVP_CIPHER *type, EVP_MD *md, unsigned char *salt,
116 EVP_DigestUpdate(&c,&(md_buf[0]),mds); 116 EVP_DigestUpdate(&c,&(md_buf[0]),mds);
117 EVP_DigestUpdate(&c,data,datal); 117 EVP_DigestUpdate(&c,data,datal);
118 if (salt != NULL) 118 if (salt != NULL)
119 EVP_DigestUpdate(&c,salt,8); 119 EVP_DigestUpdate(&c,salt,PKCS5_SALT_LEN);
120 EVP_DigestFinal(&c,&(md_buf[0]),&mds); 120 EVP_DigestFinal(&c,&(md_buf[0]),&mds);
121 121
122 for (i=1; i<(unsigned int)count; i++) 122 for (i=1; i<(unsigned int)count; i++)
diff --git a/src/lib/libcrypto/evp/evp_locl.h b/src/lib/libcrypto/evp/evp_locl.h
new file mode 100644
index 0000000000..ce49d5b7d8
--- /dev/null
+++ b/src/lib/libcrypto/evp/evp_locl.h
@@ -0,0 +1,168 @@
1/* evp_locl.h */
2/* Written by Dr Stephen N Henson (shenson@bigfoot.com) for the OpenSSL
3 * project 2000.
4 */
5/* ====================================================================
6 * Copyright (c) 1999 The OpenSSL Project. All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 *
15 * 2. Redistributions in binary form must reproduce the above copyright
16 * notice, this list of conditions and the following disclaimer in
17 * the documentation and/or other materials provided with the
18 * distribution.
19 *
20 * 3. All advertising materials mentioning features or use of this
21 * software must display the following acknowledgment:
22 * "This product includes software developed by the OpenSSL Project
23 * for use in the OpenSSL Toolkit. (http://www.OpenSSL.org/)"
24 *
25 * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to
26 * endorse or promote products derived from this software without
27 * prior written permission. For written permission, please contact
28 * licensing@OpenSSL.org.
29 *
30 * 5. Products derived from this software may not be called "OpenSSL"
31 * nor may "OpenSSL" appear in their names without prior written
32 * permission of the OpenSSL Project.
33 *
34 * 6. Redistributions of any form whatsoever must retain the following
35 * acknowledgment:
36 * "This product includes software developed by the OpenSSL Project
37 * for use in the OpenSSL Toolkit (http://www.OpenSSL.org/)"
38 *
39 * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY
40 * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
41 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
42 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR
43 * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
44 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
45 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
46 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
47 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
48 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
49 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
50 * OF THE POSSIBILITY OF SUCH DAMAGE.
51 * ====================================================================
52 *
53 * This product includes cryptographic software written by Eric Young
54 * (eay@cryptsoft.com). This product includes software written by Tim
55 * Hudson (tjh@cryptsoft.com).
56 *
57 */
58
59/* Macros to code block cipher wrappers */
60
61/* Wrapper functions for each cipher mode */
62
63#define BLOCK_CIPHER_ecb_loop() \
64 unsigned int i; \
65 if(inl < 8) return 1;\
66 inl -= 8; \
67 for(i=0; i <= inl; i+=8) \
68
69#define BLOCK_CIPHER_func_ecb(cname, cprefix, kname) \
70static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
71{\
72 BLOCK_CIPHER_ecb_loop() \
73 cprefix##_ecb_encrypt(in + i, out + i, &ctx->c.kname, ctx->encrypt);\
74 return 1;\
75}
76
77#define BLOCK_CIPHER_func_ofb(cname, cprefix, kname) \
78static int cname##_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
79{\
80 cprefix##_ofb64_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, &ctx->num);\
81 return 1;\
82}
83
84#define BLOCK_CIPHER_func_cbc(cname, cprefix, kname) \
85static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
86{\
87 cprefix##_cbc_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, ctx->encrypt);\
88 return 1;\
89}
90
91#define BLOCK_CIPHER_func_cfb(cname, cprefix, kname) \
92static int cname##_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \
93{\
94 cprefix##_cfb64_encrypt(in, out, (long)inl, &ctx->c.kname, ctx->iv, &ctx->num, ctx->encrypt);\
95 return 1;\
96}
97
98#define BLOCK_CIPHER_all_funcs(cname, cprefix, kname) \
99 BLOCK_CIPHER_func_cbc(cname, cprefix, kname) \
100 BLOCK_CIPHER_func_cfb(cname, cprefix, kname) \
101 BLOCK_CIPHER_func_ecb(cname, cprefix, kname) \
102 BLOCK_CIPHER_func_ofb(cname, cprefix, kname)
103
104#define BLOCK_CIPHER_defs(cname, kstruct, \
105 nid, block_size, key_len, iv_len, flags,\
106 init_key, cleanup, set_asn1, get_asn1, ctrl)\
107static EVP_CIPHER cname##_cbc = {\
108 nid##_cbc, block_size, key_len, iv_len, \
109 flags | EVP_CIPH_CBC_MODE,\
110 init_key,\
111 cname##_cbc_cipher,\
112 cleanup,\
113 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
114 sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
115 set_asn1, get_asn1,\
116 ctrl, \
117 NULL \
118};\
119EVP_CIPHER *EVP_##cname##_cbc(void) { return &cname##_cbc; }\
120static EVP_CIPHER cname##_cfb = {\
121 nid##_cfb64, 1, key_len, iv_len, \
122 flags | EVP_CIPH_CFB_MODE,\
123 init_key,\
124 cname##_cfb_cipher,\
125 cleanup,\
126 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
127 sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
128 set_asn1, get_asn1,\
129 ctrl,\
130 NULL \
131};\
132EVP_CIPHER *EVP_##cname##_cfb(void) { return &cname##_cfb; }\
133static EVP_CIPHER cname##_ofb = {\
134 nid##_ofb64, 1, key_len, iv_len, \
135 flags | EVP_CIPH_OFB_MODE,\
136 init_key,\
137 cname##_ofb_cipher,\
138 cleanup,\
139 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
140 sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
141 set_asn1, get_asn1,\
142 ctrl,\
143 NULL \
144};\
145EVP_CIPHER *EVP_##cname##_ofb(void) { return &cname##_ofb; }\
146static EVP_CIPHER cname##_ecb = {\
147 nid##_ecb, block_size, key_len, iv_len, \
148 flags | EVP_CIPH_ECB_MODE,\
149 init_key,\
150 cname##_ecb_cipher,\
151 cleanup,\
152 sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+\
153 sizeof((((EVP_CIPHER_CTX *)NULL)->c.kstruct)),\
154 set_asn1, get_asn1,\
155 ctrl,\
156 NULL \
157};\
158EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; }
159
160
161
162#define IMPLEMENT_BLOCK_CIPHER(cname, kname, cprefix, kstruct, \
163 nid, block_size, key_len, iv_len, flags, \
164 init_key, cleanup, set_asn1, get_asn1, ctrl) \
165 BLOCK_CIPHER_all_funcs(cname, cprefix, kname) \
166 BLOCK_CIPHER_defs(cname, kstruct, nid, block_size, key_len, iv_len, flags,\
167 init_key, cleanup, set_asn1, get_asn1, ctrl)
168
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c
index 353c3ad667..224a422b12 100644
--- a/src/lib/libcrypto/evp/evp_pbe.c
+++ b/src/lib/libcrypto/evp/evp_pbe.c
@@ -92,7 +92,8 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
92 ERR_add_error_data(2, "TYPE=", obj_tmp); 92 ERR_add_error_data(2, "TYPE=", obj_tmp);
93 return 0; 93 return 0;
94 } 94 }
95 if (passlen == -1) passlen = strlen(pass); 95 if(!pass) passlen = 0;
96 else if (passlen == -1) passlen = strlen(pass);
96 pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i); 97 pbetmp = (EVP_PBE_CTL *)sk_value (pbe_algs, i);
97 i = (*pbetmp->keygen)(ctx, pass, passlen, param, pbetmp->cipher, 98 i = (*pbetmp->keygen)(ctx, pass, passlen, param, pbetmp->cipher,
98 pbetmp->md, en_de); 99 pbetmp->md, en_de);
@@ -103,8 +104,9 @@ int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen,
103 return 1; 104 return 1;
104} 105}
105 106
106static int pbe_cmp (EVP_PBE_CTL **pbe1, EVP_PBE_CTL **pbe2) 107static int pbe_cmp(const char * const *a, const char * const *b)
107{ 108{
109 EVP_PBE_CTL **pbe1 = (EVP_PBE_CTL **) a, **pbe2 = (EVP_PBE_CTL **)b;
108 return ((*pbe1)->pbe_nid - (*pbe2)->pbe_nid); 110 return ((*pbe1)->pbe_nid - (*pbe2)->pbe_nid);
109} 111}
110 112
@@ -114,8 +116,8 @@ int EVP_PBE_alg_add (int nid, EVP_CIPHER *cipher, EVP_MD *md,
114 EVP_PBE_KEYGEN *keygen) 116 EVP_PBE_KEYGEN *keygen)
115{ 117{
116 EVP_PBE_CTL *pbe_tmp; 118 EVP_PBE_CTL *pbe_tmp;
117 if (!pbe_algs) pbe_algs = sk_new (pbe_cmp); 119 if (!pbe_algs) pbe_algs = sk_new(pbe_cmp);
118 if (!(pbe_tmp = (EVP_PBE_CTL*) Malloc (sizeof(EVP_PBE_CTL)))) { 120 if (!(pbe_tmp = (EVP_PBE_CTL*) OPENSSL_malloc (sizeof(EVP_PBE_CTL)))) {
119 EVPerr(EVP_F_EVP_PBE_ALG_ADD,ERR_R_MALLOC_FAILURE); 121 EVPerr(EVP_F_EVP_PBE_ALG_ADD,ERR_R_MALLOC_FAILURE);
120 return 0; 122 return 0;
121 } 123 }
@@ -129,6 +131,6 @@ int EVP_PBE_alg_add (int nid, EVP_CIPHER *cipher, EVP_MD *md,
129 131
130void EVP_PBE_cleanup(void) 132void EVP_PBE_cleanup(void)
131{ 133{
132 sk_pop_free(pbe_algs, FreeFunc); 134 sk_pop_free(pbe_algs, OPENSSL_freeFunc);
133 pbe_algs = NULL; 135 pbe_algs = NULL;
134} 136}
diff --git a/src/lib/libcrypto/evp/evp_pkey.c b/src/lib/libcrypto/evp/evp_pkey.c
index 4ab091fa56..8df2874f3c 100644
--- a/src/lib/libcrypto/evp/evp_pkey.c
+++ b/src/lib/libcrypto/evp/evp_pkey.c
@@ -76,7 +76,7 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
76 DSA *dsa = NULL; 76 DSA *dsa = NULL;
77 ASN1_INTEGER *privkey; 77 ASN1_INTEGER *privkey;
78 ASN1_TYPE *t1, *t2, *param = NULL; 78 ASN1_TYPE *t1, *t2, *param = NULL;
79 STACK *ndsa = NULL; 79 STACK_OF(ASN1_TYPE) *ndsa = NULL;
80 BN_CTX *ctx = NULL; 80 BN_CTX *ctx = NULL;
81 int plen; 81 int plen;
82#endif 82#endif
@@ -119,13 +119,13 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
119 119
120 /* Check for broken DSA PKCS#8, UGH! */ 120 /* Check for broken DSA PKCS#8, UGH! */
121 if(*p == (V_ASN1_SEQUENCE|V_ASN1_CONSTRUCTED)) { 121 if(*p == (V_ASN1_SEQUENCE|V_ASN1_CONSTRUCTED)) {
122 if(!(ndsa = ASN1_seq_unpack(p, pkeylen, 122 if(!(ndsa = ASN1_seq_unpack_ASN1_TYPE(p, pkeylen,
123 (char *(*)())d2i_ASN1_TYPE, 123 d2i_ASN1_TYPE,
124 ASN1_TYPE_free))) { 124 ASN1_TYPE_free))) {
125 EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); 125 EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR);
126 goto dsaerr; 126 goto dsaerr;
127 } 127 }
128 if(sk_num(ndsa) != 2 ) { 128 if(sk_ASN1_TYPE_num(ndsa) != 2 ) {
129 EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); 129 EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR);
130 goto dsaerr; 130 goto dsaerr;
131 } 131 }
@@ -134,8 +134,8 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
134 * SEQUENCE {pub_key, priv_key} 134 * SEQUENCE {pub_key, priv_key}
135 */ 135 */
136 136
137 t1 = (ASN1_TYPE *)sk_value(ndsa, 0); 137 t1 = sk_ASN1_TYPE_value(ndsa, 0);
138 t2 = (ASN1_TYPE *)sk_value(ndsa, 1); 138 t2 = sk_ASN1_TYPE_value(ndsa, 1);
139 if(t1->type == V_ASN1_SEQUENCE) { 139 if(t1->type == V_ASN1_SEQUENCE) {
140 p8->broken = PKCS8_EMBEDDED_PARAM; 140 p8->broken = PKCS8_EMBEDDED_PARAM;
141 param = t1; 141 param = t1;
@@ -193,12 +193,12 @@ EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8)
193 193
194 EVP_PKEY_assign_DSA(pkey, dsa); 194 EVP_PKEY_assign_DSA(pkey, dsa);
195 BN_CTX_free (ctx); 195 BN_CTX_free (ctx);
196 if(ndsa) sk_pop_free(ndsa, ASN1_TYPE_free); 196 if(ndsa) sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
197 else ASN1_INTEGER_free(privkey); 197 else ASN1_INTEGER_free(privkey);
198 break; 198 break;
199 dsaerr: 199 dsaerr:
200 BN_CTX_free (ctx); 200 BN_CTX_free (ctx);
201 sk_pop_free(ndsa, ASN1_TYPE_free); 201 sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
202 DSA_free(dsa); 202 DSA_free(dsa);
203 EVP_PKEY_free(pkey); 203 EVP_PKEY_free(pkey);
204 return NULL; 204 return NULL;
@@ -302,12 +302,13 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
302 ASN1_STRING *params; 302 ASN1_STRING *params;
303 ASN1_INTEGER *prkey; 303 ASN1_INTEGER *prkey;
304 ASN1_TYPE *ttmp; 304 ASN1_TYPE *ttmp;
305 STACK *ndsa; 305 STACK_OF(ASN1_TYPE) *ndsa;
306 unsigned char *p, *q; 306 unsigned char *p, *q;
307 int len; 307 int len;
308
308 p8->pkeyalg->algorithm = OBJ_nid2obj(NID_dsa); 309 p8->pkeyalg->algorithm = OBJ_nid2obj(NID_dsa);
309 len = i2d_DSAparams (pkey->pkey.dsa, NULL); 310 len = i2d_DSAparams (pkey->pkey.dsa, NULL);
310 if (!(p = Malloc(len))) { 311 if (!(p = OPENSSL_malloc(len))) {
311 EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); 312 EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
312 PKCS8_PRIV_KEY_INFO_free (p8); 313 PKCS8_PRIV_KEY_INFO_free (p8);
313 return 0; 314 return 0;
@@ -316,7 +317,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
316 i2d_DSAparams (pkey->pkey.dsa, &q); 317 i2d_DSAparams (pkey->pkey.dsa, &q);
317 params = ASN1_STRING_new(); 318 params = ASN1_STRING_new();
318 ASN1_STRING_set(params, p, len); 319 ASN1_STRING_set(params, p, len);
319 Free(p); 320 OPENSSL_free(p);
320 /* Get private key into integer */ 321 /* Get private key into integer */
321 if (!(prkey = BN_to_ASN1_INTEGER (pkey->pkey.dsa->priv_key, NULL))) { 322 if (!(prkey = BN_to_ASN1_INTEGER (pkey->pkey.dsa->priv_key, NULL))) {
322 EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); 323 EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR);
@@ -345,7 +346,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
345 346
346 p8->pkeyalg->parameter->value.sequence = params; 347 p8->pkeyalg->parameter->value.sequence = params;
347 p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; 348 p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE;
348 ndsa = sk_new_null(); 349 ndsa = sk_ASN1_TYPE_new_null();
349 ttmp = ASN1_TYPE_new(); 350 ttmp = ASN1_TYPE_new();
350 if (!(ttmp->value.integer = BN_to_ASN1_INTEGER (pkey->pkey.dsa->pub_key, NULL))) { 351 if (!(ttmp->value.integer = BN_to_ASN1_INTEGER (pkey->pkey.dsa->pub_key, NULL))) {
351 EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); 352 EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR);
@@ -353,53 +354,53 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey)
353 return 0; 354 return 0;
354 } 355 }
355 ttmp->type = V_ASN1_INTEGER; 356 ttmp->type = V_ASN1_INTEGER;
356 sk_push(ndsa, (char *)ttmp); 357 sk_ASN1_TYPE_push(ndsa, ttmp);
357 358
358 ttmp = ASN1_TYPE_new(); 359 ttmp = ASN1_TYPE_new();
359 ttmp->value.integer = prkey; 360 ttmp->value.integer = prkey;
360 ttmp->type = V_ASN1_INTEGER; 361 ttmp->type = V_ASN1_INTEGER;
361 sk_push(ndsa, (char *)ttmp); 362 sk_ASN1_TYPE_push(ndsa, ttmp);
362 363
363 p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); 364 p8->pkey->value.octet_string = ASN1_OCTET_STRING_new();
364 365
365 if (!ASN1_seq_pack(ndsa, i2d_ASN1_TYPE, 366 if (!ASN1_seq_pack_ASN1_TYPE(ndsa, i2d_ASN1_TYPE,
366 &p8->pkey->value.octet_string->data, 367 &p8->pkey->value.octet_string->data,
367 &p8->pkey->value.octet_string->length)) { 368 &p8->pkey->value.octet_string->length)) {
368 369
369 EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); 370 EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
370 sk_pop_free(ndsa, ASN1_TYPE_free); 371 sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
371 M_ASN1_INTEGER_free(prkey); 372 M_ASN1_INTEGER_free(prkey);
372 return 0; 373 return 0;
373 } 374 }
374 sk_pop_free(ndsa, ASN1_TYPE_free); 375 sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
375 break; 376 break;
376 377
377 case PKCS8_EMBEDDED_PARAM: 378 case PKCS8_EMBEDDED_PARAM:
378 379
379 p8->pkeyalg->parameter->type = V_ASN1_NULL; 380 p8->pkeyalg->parameter->type = V_ASN1_NULL;
380 ndsa = sk_new_null(); 381 ndsa = sk_ASN1_TYPE_new_null();
381 ttmp = ASN1_TYPE_new(); 382 ttmp = ASN1_TYPE_new();
382 ttmp->value.sequence = params; 383 ttmp->value.sequence = params;
383 ttmp->type = V_ASN1_SEQUENCE; 384 ttmp->type = V_ASN1_SEQUENCE;
384 sk_push(ndsa, (char *)ttmp); 385 sk_ASN1_TYPE_push(ndsa, ttmp);
385 386
386 ttmp = ASN1_TYPE_new(); 387 ttmp = ASN1_TYPE_new();
387 ttmp->value.integer = prkey; 388 ttmp->value.integer = prkey;
388 ttmp->type = V_ASN1_INTEGER; 389 ttmp->type = V_ASN1_INTEGER;
389 sk_push(ndsa, (char *)ttmp); 390 sk_ASN1_TYPE_push(ndsa, ttmp);
390 391
391 p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); 392 p8->pkey->value.octet_string = ASN1_OCTET_STRING_new();
392 393
393 if (!ASN1_seq_pack(ndsa, i2d_ASN1_TYPE, 394 if (!ASN1_seq_pack_ASN1_TYPE(ndsa, i2d_ASN1_TYPE,
394 &p8->pkey->value.octet_string->data, 395 &p8->pkey->value.octet_string->data,
395 &p8->pkey->value.octet_string->length)) { 396 &p8->pkey->value.octet_string->length)) {
396 397
397 EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); 398 EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE);
398 sk_pop_free(ndsa, ASN1_TYPE_free); 399 sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
399 M_ASN1_INTEGER_free (prkey); 400 M_ASN1_INTEGER_free (prkey);
400 return 0; 401 return 0;
401 } 402 }
402 sk_pop_free(ndsa, ASN1_TYPE_free); 403 sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free);
403 break; 404 break;
404 } 405 }
405 return 1; 406 return 1;
diff --git a/src/lib/libcrypto/evp/m_md4.c b/src/lib/libcrypto/evp/m_md4.c
new file mode 100644
index 0000000000..6a24ceb86d
--- /dev/null
+++ b/src/lib/libcrypto/evp/m_md4.c
@@ -0,0 +1,83 @@
1/* crypto/evp/m_md4.c */
2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
3 * All rights reserved.
4 *
5 * This package is an SSL implementation written
6 * by Eric Young (eay@cryptsoft.com).
7 * The implementation was written so as to conform with Netscapes SSL.
8 *
9 * This library is free for commercial and non-commercial use as long as
10 * the following conditions are aheared to. The following conditions
11 * apply to all code found in this distribution, be it the RC4, RSA,
12 * lhash, DES, etc., code; not just the SSL code. The SSL documentation
13 * included with this distribution is covered by the same copyright terms
14 * except that the holder is Tim Hudson (tjh@cryptsoft.com).
15 *
16 * Copyright remains Eric Young's, and as such any Copyright notices in
17 * the code are not to be removed.
18 * If this package is used in a product, Eric Young should be given attribution
19 * as the author of the parts of the library used.
20 * This can be in the form of a textual message at program startup or
21 * in documentation (online or textual) provided with the package.
22 *
23 * Redistribution and use in source and binary forms, with or without
24 * modification, are permitted provided that the following conditions
25 * are met:
26 * 1. Redistributions of source code must retain the copyright
27 * notice, this list of conditions and the following disclaimer.
28 * 2. Redistributions in binary form must reproduce the above copyright
29 * notice, this list of conditions and the following disclaimer in the
30 * documentation and/or other materials provided with the distribution.
31 * 3. All advertising materials mentioning features or use of this software
32 * must display the following acknowledgement:
33 * "This product includes cryptographic software written by
34 * Eric Young (eay@cryptsoft.com)"
35 * The word 'cryptographic' can be left out if the rouines from the library
36 * being used are not cryptographic related :-).
37 * 4. If you include any Windows specific code (or a derivative thereof) from
38 * the apps directory (application code) you must include an acknowledgement:
39 * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)"
40 *
41 * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND
42 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
43 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
44 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
45 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
46 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
47 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
48 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
49 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
50 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
51 * SUCH DAMAGE.
52 *
53 * The licence and distribution terms for any publically available version or
54 * derivative of this code cannot be changed. i.e. this code cannot simply be
55 * copied and put under another distribution licence
56 * [including the GNU Public Licence.]
57 */
58
59#ifndef NO_MD4
60#include <stdio.h>
61#include "cryptlib.h"
62#include <openssl/evp.h>
63#include <openssl/objects.h>
64#include <openssl/x509.h>
65
66static EVP_MD md4_md=
67 {
68 NID_md4,
69 0,
70 MD4_DIGEST_LENGTH,
71 MD4_Init,
72 MD4_Update,
73 MD4_Final,
74 EVP_PKEY_RSA_method,
75 MD4_CBLOCK,
76 sizeof(EVP_MD *)+sizeof(MD4_CTX),
77 };
78
79EVP_MD *EVP_md4(void)
80 {
81 return(&md4_md);
82 }
83#endif
diff --git a/src/lib/libcrypto/evp/p5_crpt.c b/src/lib/libcrypto/evp/p5_crpt.c
index e3dae52d4d..6bfa2c5acb 100644
--- a/src/lib/libcrypto/evp/p5_crpt.c
+++ b/src/lib/libcrypto/evp/p5_crpt.c
@@ -125,6 +125,9 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen,
125 salt = pbe->salt->data; 125 salt = pbe->salt->data;
126 saltlen = pbe->salt->length; 126 saltlen = pbe->salt->length;
127 127
128 if(!pass) passlen = 0;
129 else if(passlen == -1) passlen = strlen(pass);
130
128 EVP_DigestInit (&ctx, md); 131 EVP_DigestInit (&ctx, md);
129 EVP_DigestUpdate (&ctx, pass, passlen); 132 EVP_DigestUpdate (&ctx, pass, passlen);
130 EVP_DigestUpdate (&ctx, salt, saltlen); 133 EVP_DigestUpdate (&ctx, salt, saltlen);
diff --git a/src/lib/libcrypto/evp/p5_crpt2.c b/src/lib/libcrypto/evp/p5_crpt2.c
index 27a2c518be..717fad68ca 100644
--- a/src/lib/libcrypto/evp/p5_crpt2.c
+++ b/src/lib/libcrypto/evp/p5_crpt2.c
@@ -86,7 +86,8 @@ int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen,
86 HMAC_CTX hctx; 86 HMAC_CTX hctx;
87 p = out; 87 p = out;
88 tkeylen = keylen; 88 tkeylen = keylen;
89 if(passlen == -1) passlen = strlen(pass); 89 if(!pass) passlen = 0;
90 else if(passlen == -1) passlen = strlen(pass);
90 while(tkeylen) { 91 while(tkeylen) {
91 if(tkeylen > SHA_DIGEST_LENGTH) cplen = SHA_DIGEST_LENGTH; 92 if(tkeylen > SHA_DIGEST_LENGTH) cplen = SHA_DIGEST_LENGTH;
92 else cplen = tkeylen; 93 else cplen = tkeylen;
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c
index 4cb387f8de..62398ed74d 100644
--- a/src/lib/libcrypto/evp/p_lib.c
+++ b/src/lib/libcrypto/evp/p_lib.c
@@ -180,7 +180,7 @@ EVP_PKEY *EVP_PKEY_new(void)
180 { 180 {
181 EVP_PKEY *ret; 181 EVP_PKEY *ret;
182 182
183 ret=(EVP_PKEY *)Malloc(sizeof(EVP_PKEY)); 183 ret=(EVP_PKEY *)OPENSSL_malloc(sizeof(EVP_PKEY));
184 if (ret == NULL) 184 if (ret == NULL)
185 { 185 {
186 EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE); 186 EVPerr(EVP_F_EVP_PKEY_NEW,ERR_R_MALLOC_FAILURE);
@@ -302,7 +302,7 @@ void EVP_PKEY_free(EVP_PKEY *x)
302 } 302 }
303#endif 303#endif
304 EVP_PKEY_free_it(x); 304 EVP_PKEY_free_it(x);
305 Free(x); 305 OPENSSL_free(x);
306 } 306 }
307 307
308static void EVP_PKEY_free_it(EVP_PKEY *x) 308static void EVP_PKEY_free_it(EVP_PKEY *x)
diff --git a/src/lib/libcrypto/evp/p_open.c b/src/lib/libcrypto/evp/p_open.c
index b9ca7892c2..2760c00fec 100644
--- a/src/lib/libcrypto/evp/p_open.c
+++ b/src/lib/libcrypto/evp/p_open.c
@@ -68,37 +68,41 @@ int EVP_OpenInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char *ek,
68 { 68 {
69 unsigned char *key=NULL; 69 unsigned char *key=NULL;
70 int i,size=0,ret=0; 70 int i,size=0,ret=0;
71 71
72 if(type) {
73 EVP_CIPHER_CTX_init(ctx);
74 if(!EVP_DecryptInit(ctx,type,NULL,NULL)) return 0;
75 }
76
77 if(!priv) return 1;
78
72 if (priv->type != EVP_PKEY_RSA) 79 if (priv->type != EVP_PKEY_RSA)
73 { 80 {
74 EVPerr(EVP_F_EVP_OPENINIT,EVP_R_PUBLIC_KEY_NOT_RSA); 81 EVPerr(EVP_F_EVP_OPENINIT,EVP_R_PUBLIC_KEY_NOT_RSA);
75 ret= -1;
76 goto err; 82 goto err;
77 } 83 }
78 84
79 size=RSA_size(priv->pkey.rsa); 85 size=RSA_size(priv->pkey.rsa);
80 key=(unsigned char *)Malloc(size+2); 86 key=(unsigned char *)OPENSSL_malloc(size+2);
81 if (key == NULL) 87 if (key == NULL)
82 { 88 {
83 /* ERROR */ 89 /* ERROR */
84 EVPerr(EVP_F_EVP_OPENINIT,ERR_R_MALLOC_FAILURE); 90 EVPerr(EVP_F_EVP_OPENINIT,ERR_R_MALLOC_FAILURE);
85 ret= -1;
86 goto err; 91 goto err;
87 } 92 }
88 93
89 i=EVP_PKEY_decrypt(key,ek,ekl,priv); 94 i=EVP_PKEY_decrypt(key,ek,ekl,priv);
90 if (i != type->key_len) 95 if ((i <= 0) || !EVP_CIPHER_CTX_set_key_length(ctx, i))
91 { 96 {
92 /* ERROR */ 97 /* ERROR */
93 goto err; 98 goto err;
94 } 99 }
100 if(!EVP_DecryptInit(ctx,NULL,key,iv)) goto err;
95 101
96 EVP_CIPHER_CTX_init(ctx);
97 EVP_DecryptInit(ctx,type,key,iv);
98 ret=1; 102 ret=1;
99err: 103err:
100 if (key != NULL) memset(key,0,size); 104 if (key != NULL) memset(key,0,size);
101 Free(key); 105 OPENSSL_free(key);
102 return(ret); 106 return(ret);
103 } 107 }
104 108
diff --git a/src/lib/libcrypto/evp/p_seal.c b/src/lib/libcrypto/evp/p_seal.c
index d449e892bf..2fd1d7e0c2 100644
--- a/src/lib/libcrypto/evp/p_seal.c
+++ b/src/lib/libcrypto/evp/p_seal.c
@@ -72,18 +72,21 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek,
72 unsigned char key[EVP_MAX_KEY_LENGTH]; 72 unsigned char key[EVP_MAX_KEY_LENGTH];
73 int i; 73 int i;
74 74
75 if(type) {
76 EVP_CIPHER_CTX_init(ctx);
77 if(!EVP_EncryptInit(ctx,type,NULL,NULL)) return 0;
78 }
75 if (npubk <= 0) return(0); 79 if (npubk <= 0) return(0);
76 if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) <= 0) 80 if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) <= 0)
77 return(0); 81 return(0);
78 if (type->iv_len > 0) 82 if (EVP_CIPHER_CTX_iv_length(ctx))
79 RAND_pseudo_bytes(iv,type->iv_len); 83 RAND_pseudo_bytes(iv,EVP_CIPHER_CTX_iv_length(ctx));
80 84
81 EVP_CIPHER_CTX_init(ctx); 85 if(!EVP_EncryptInit(ctx,NULL,key,iv)) return 0;
82 EVP_EncryptInit(ctx,type,key,iv);
83 86
84 for (i=0; i<npubk; i++) 87 for (i=0; i<npubk; i++)
85 { 88 {
86 ekl[i]=EVP_PKEY_encrypt(ek[i],key,EVP_CIPHER_key_length(type), 89 ekl[i]=EVP_PKEY_encrypt(ek[i],key,EVP_CIPHER_CTX_key_length(ctx),
87 pubk[i]); 90 pubk[i]);
88 if (ekl[i] <= 0) return(-1); 91 if (ekl[i] <= 0) return(-1);
89 } 92 }