diff options
Diffstat (limited to 'src/lib/libcrypto/evp')
56 files changed, 4912 insertions, 1131 deletions
diff --git a/src/lib/libcrypto/evp/Makefile b/src/lib/libcrypto/evp/Makefile new file mode 100644 index 0000000000..8f2555c7e5 --- /dev/null +++ b/src/lib/libcrypto/evp/Makefile | |||
| @@ -0,0 +1,646 @@ | |||
| 1 | # | ||
| 2 | # OpenSSL/crypto/evp/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= evp | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I$(TOP) -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | MAKEFILE= Makefile | ||
| 11 | AR= ar r | ||
| 12 | |||
| 13 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 14 | |||
| 15 | GENERAL=Makefile | ||
| 16 | TEST=evp_test.c | ||
| 17 | TESTDATA=evptests.txt | ||
| 18 | APPS= | ||
| 19 | |||
| 20 | LIB=$(TOP)/libcrypto.a | ||
| 21 | LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \ | ||
| 22 | e_des.c e_bf.c e_idea.c e_des3.c e_camellia.c\ | ||
| 23 | e_rc4.c e_aes.c names.c e_seed.c \ | ||
| 24 | e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ | ||
| 25 | m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \ | ||
| 26 | m_dss.c m_dss1.c m_mdc2.c m_ripemd.c m_ecdsa.c\ | ||
| 27 | p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ | ||
| 28 | bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \ | ||
| 29 | c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \ | ||
| 30 | evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c \ | ||
| 31 | e_old.c | ||
| 32 | |||
| 33 | LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \ | ||
| 34 | e_des.o e_bf.o e_idea.o e_des3.o e_camellia.o\ | ||
| 35 | e_rc4.o e_aes.o names.o e_seed.o \ | ||
| 36 | e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \ | ||
| 37 | m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \ | ||
| 38 | m_dss.o m_dss1.o m_mdc2.o m_ripemd.o m_ecdsa.o\ | ||
| 39 | p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \ | ||
| 40 | bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \ | ||
| 41 | c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \ | ||
| 42 | evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o \ | ||
| 43 | e_old.o | ||
| 44 | |||
| 45 | SRC= $(LIBSRC) | ||
| 46 | |||
| 47 | EXHEADER= evp.h | ||
| 48 | HEADER= $(EXHEADER) | ||
| 49 | |||
| 50 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 51 | |||
| 52 | top: | ||
| 53 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 54 | |||
| 55 | all: lib | ||
| 56 | |||
| 57 | lib: $(LIBOBJ) | ||
| 58 | $(AR) $(LIB) $(LIBOBJ) | ||
| 59 | $(RANLIB) $(LIB) || echo Never mind. | ||
| 60 | @touch lib | ||
| 61 | |||
| 62 | files: | ||
| 63 | $(PERL) $(TOP)/util/files.pl Makefile >> $(TOP)/MINFO | ||
| 64 | |||
| 65 | links: | ||
| 66 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
| 67 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
| 68 | cp $(TESTDATA) ../../test | ||
| 69 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
| 70 | |||
| 71 | install: | ||
| 72 | @[ -n "$(INSTALLTOP)" ] # should be set by top Makefile... | ||
| 73 | @headerlist="$(EXHEADER)"; for i in $$headerlist ; \ | ||
| 74 | do \ | ||
| 75 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 76 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 77 | done; | ||
| 78 | |||
| 79 | tags: | ||
| 80 | ctags $(SRC) | ||
| 81 | |||
| 82 | tests: | ||
| 83 | |||
| 84 | lint: | ||
| 85 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 86 | |||
| 87 | depend: | ||
| 88 | @[ -n "$(MAKEDEPEND)" ] # should be set by upper Makefile... | ||
| 89 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) | ||
| 90 | |||
| 91 | dclean: | ||
| 92 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 93 | mv -f Makefile.new $(MAKEFILE) | ||
| 94 | |||
| 95 | clean: | ||
| 96 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 97 | |||
| 98 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 99 | |||
| 100 | bio_b64.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 101 | bio_b64.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 102 | bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 103 | bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 104 | bio_b64.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 105 | bio_b64.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 106 | bio_b64.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 107 | bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 108 | bio_b64.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_b64.c | ||
| 109 | bio_enc.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 110 | bio_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 111 | bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 112 | bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 113 | bio_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 114 | bio_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 115 | bio_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 116 | bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 117 | bio_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_enc.c | ||
| 118 | bio_md.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 119 | bio_md.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 120 | bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 121 | bio_md.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 122 | bio_md.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 123 | bio_md.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 124 | bio_md.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | ||
| 125 | bio_md.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 126 | bio_md.o: ../cryptlib.h bio_md.c | ||
| 127 | bio_ok.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 128 | bio_ok.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 129 | bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 130 | bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 131 | bio_ok.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 132 | bio_ok.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 133 | bio_ok.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
| 134 | bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 135 | bio_ok.o: ../../include/openssl/symhacks.h ../cryptlib.h bio_ok.c | ||
| 136 | c_all.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 137 | c_all.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 138 | c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
| 139 | c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 140 | c_all.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 141 | c_all.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 142 | c_all.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 143 | c_all.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 144 | c_all.o: ../../include/openssl/symhacks.h ../cryptlib.h c_all.c | ||
| 145 | c_allc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 146 | c_allc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 147 | c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 148 | c_allc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 149 | c_allc.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 150 | c_allc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 151 | c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 152 | c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 153 | c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | ||
| 154 | c_allc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 155 | c_allc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 156 | c_allc.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 157 | c_allc.o: ../cryptlib.h c_allc.c | ||
| 158 | c_alld.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 159 | c_alld.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 160 | c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 161 | c_alld.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 162 | c_alld.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 163 | c_alld.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 164 | c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 165 | c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 166 | c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | ||
| 167 | c_alld.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 168 | c_alld.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 169 | c_alld.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 170 | c_alld.o: ../cryptlib.h c_alld.c | ||
| 171 | digest.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 172 | digest.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 173 | digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
| 174 | digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 175 | digest.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 176 | digest.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 177 | digest.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 178 | digest.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 179 | digest.o: ../../include/openssl/symhacks.h ../cryptlib.h digest.c | ||
| 180 | e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 181 | e_aes.o: ../../include/openssl/bio.h ../../include/openssl/crypto.h | ||
| 182 | e_aes.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 183 | e_aes.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 184 | e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 185 | e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 186 | e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | ||
| 187 | e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h e_aes.c | ||
| 188 | e_aes.o: evp_locl.h | ||
| 189 | e_bf.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 190 | e_bf.o: ../../include/openssl/blowfish.h ../../include/openssl/buffer.h | ||
| 191 | e_bf.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 192 | e_bf.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 193 | e_bf.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 194 | e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 195 | e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 196 | e_bf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 197 | e_bf.o: ../../include/openssl/symhacks.h ../cryptlib.h e_bf.c evp_locl.h | ||
| 198 | e_camellia.o: ../../include/openssl/opensslconf.h e_camellia.c | ||
| 199 | e_cast.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 200 | e_cast.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 201 | e_cast.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 202 | e_cast.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 203 | e_cast.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 204 | e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 205 | e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 206 | e_cast.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 207 | e_cast.o: ../../include/openssl/symhacks.h ../cryptlib.h e_cast.c evp_locl.h | ||
| 208 | e_des.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 209 | e_des.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 210 | e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 211 | e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 212 | e_des.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 213 | e_des.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 214 | e_des.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 215 | e_des.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
| 216 | e_des.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 217 | e_des.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 218 | e_des.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des.c evp_locl.h | ||
| 219 | e_des3.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 220 | e_des3.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 221 | e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 222 | e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 223 | e_des3.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 224 | e_des3.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 225 | e_des3.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 226 | e_des3.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
| 227 | e_des3.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 228 | e_des3.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 229 | e_des3.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des3.c evp_locl.h | ||
| 230 | e_idea.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 231 | e_idea.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 232 | e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 233 | e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 234 | e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 235 | e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 236 | e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 237 | e_idea.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 238 | e_idea.o: ../../include/openssl/symhacks.h ../cryptlib.h e_idea.c evp_locl.h | ||
| 239 | e_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 240 | e_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 241 | e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 242 | e_null.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 243 | e_null.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 244 | e_null.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 245 | e_null.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | ||
| 246 | e_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 247 | e_null.o: ../cryptlib.h e_null.c | ||
| 248 | e_old.o: e_old.c | ||
| 249 | e_rc2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 250 | e_rc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 251 | e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 252 | e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 253 | e_rc2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 254 | e_rc2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 255 | e_rc2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h | ||
| 256 | e_rc2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 257 | e_rc2.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc2.c evp_locl.h | ||
| 258 | e_rc4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 259 | e_rc4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 260 | e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 261 | e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 262 | e_rc4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 263 | e_rc4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 264 | e_rc4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc4.h | ||
| 265 | e_rc4.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 266 | e_rc4.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc4.c | ||
| 267 | e_rc5.o: ../../e_os.h ../../include/openssl/bio.h | ||
| 268 | e_rc5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 269 | e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 270 | e_rc5.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 271 | e_rc5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 272 | e_rc5.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 273 | e_rc5.o: ../../include/openssl/symhacks.h ../cryptlib.h e_rc5.c | ||
| 274 | e_seed.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 275 | e_seed.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 276 | e_seed.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 277 | e_seed.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 278 | e_seed.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 279 | e_seed.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 280 | e_seed.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 281 | e_seed.o: ../../include/openssl/symhacks.h e_seed.c | ||
| 282 | e_xcbc_d.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 283 | e_xcbc_d.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 284 | e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 285 | e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/e_os2.h | ||
| 286 | e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 287 | e_xcbc_d.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 288 | e_xcbc_d.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 289 | e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 290 | e_xcbc_d.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 291 | e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 292 | e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c | ||
| 293 | encode.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 294 | encode.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 295 | encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 296 | encode.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 297 | encode.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 298 | encode.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 299 | encode.o: ../../include/openssl/ossl_typ.h ../../include/openssl/safestack.h | ||
| 300 | encode.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 301 | encode.o: ../cryptlib.h encode.c | ||
| 302 | evp_acnf.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 303 | evp_acnf.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 304 | evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
| 305 | evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 306 | evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 307 | evp_acnf.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 308 | evp_acnf.o: ../../include/openssl/opensslconf.h | ||
| 309 | evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 310 | evp_acnf.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 311 | evp_acnf.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_acnf.c | ||
| 312 | evp_enc.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 313 | evp_enc.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 314 | evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 315 | evp_enc.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
| 316 | evp_enc.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 317 | evp_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 318 | evp_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 319 | evp_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
| 320 | evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 321 | evp_enc.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_enc.c evp_locl.h | ||
| 322 | evp_err.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 323 | evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 324 | evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 325 | evp_err.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 326 | evp_err.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 327 | evp_err.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 328 | evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 329 | evp_err.o: ../../include/openssl/symhacks.h evp_err.c | ||
| 330 | evp_key.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 331 | evp_key.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 332 | evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 333 | evp_key.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 334 | evp_key.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 335 | evp_key.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 336 | evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 337 | evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 338 | evp_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 339 | evp_key.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 340 | evp_key.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 341 | evp_key.o: ../../include/openssl/ui.h ../../include/openssl/x509.h | ||
| 342 | evp_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_key.c | ||
| 343 | evp_lib.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 344 | evp_lib.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 345 | evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 346 | evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 347 | evp_lib.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 348 | evp_lib.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 349 | evp_lib.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 350 | evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 351 | evp_lib.o: ../../include/openssl/symhacks.h ../cryptlib.h evp_lib.c | ||
| 352 | evp_pbe.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 353 | evp_pbe.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 354 | evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 355 | evp_pbe.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 356 | evp_pbe.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 357 | evp_pbe.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 358 | evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 359 | evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 360 | evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 361 | evp_pbe.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 362 | evp_pbe.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 363 | evp_pbe.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 364 | evp_pbe.o: ../cryptlib.h evp_pbe.c | ||
| 365 | evp_pkey.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 366 | evp_pkey.o: ../../include/openssl/bio.h ../../include/openssl/bn.h | ||
| 367 | evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 368 | evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 369 | evp_pkey.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 370 | evp_pkey.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 371 | evp_pkey.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 372 | evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 373 | evp_pkey.o: ../../include/openssl/opensslconf.h | ||
| 374 | evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 375 | evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
| 376 | evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 377 | evp_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 378 | evp_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 379 | evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pkey.c | ||
| 380 | m_dss.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 381 | m_dss.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 382 | m_dss.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 383 | m_dss.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 384 | m_dss.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 385 | m_dss.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 386 | m_dss.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 387 | m_dss.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 388 | m_dss.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 389 | m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 390 | m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 391 | m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 392 | m_dss.o: ../cryptlib.h m_dss.c | ||
| 393 | m_dss1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 394 | m_dss1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 395 | m_dss1.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 396 | m_dss1.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 397 | m_dss1.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 398 | m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 399 | m_dss1.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 400 | m_dss1.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 401 | m_dss1.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 402 | m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 403 | m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 404 | m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 405 | m_dss1.o: ../cryptlib.h m_dss1.c | ||
| 406 | m_ecdsa.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 407 | m_ecdsa.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 408 | m_ecdsa.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 409 | m_ecdsa.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 410 | m_ecdsa.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 411 | m_ecdsa.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 412 | m_ecdsa.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 413 | m_ecdsa.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 414 | m_ecdsa.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 415 | m_ecdsa.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 416 | m_ecdsa.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 417 | m_ecdsa.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 418 | m_ecdsa.o: ../cryptlib.h m_ecdsa.c | ||
| 419 | m_md2.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 420 | m_md2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 421 | m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 422 | m_md2.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 423 | m_md2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 424 | m_md2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 425 | m_md2.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 426 | m_md2.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 427 | m_md2.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 428 | m_md2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 429 | m_md2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 430 | m_md2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 431 | m_md2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md2.c | ||
| 432 | m_md4.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 433 | m_md4.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 434 | m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 435 | m_md4.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 436 | m_md4.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 437 | m_md4.o: ../../include/openssl/lhash.h ../../include/openssl/md4.h | ||
| 438 | m_md4.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 439 | m_md4.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 440 | m_md4.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 441 | m_md4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 442 | m_md4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 443 | m_md4.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 444 | m_md4.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md4.c | ||
| 445 | m_md5.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 446 | m_md5.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 447 | m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 448 | m_md5.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 449 | m_md5.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 450 | m_md5.o: ../../include/openssl/lhash.h ../../include/openssl/md5.h | ||
| 451 | m_md5.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 452 | m_md5.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 453 | m_md5.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 454 | m_md5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 455 | m_md5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 456 | m_md5.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 457 | m_md5.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_md5.c | ||
| 458 | m_mdc2.o: ../../e_os.h ../../include/openssl/bio.h | ||
| 459 | m_mdc2.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 460 | m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 461 | m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/opensslconf.h | ||
| 462 | m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 463 | m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/stack.h | ||
| 464 | m_mdc2.o: ../../include/openssl/symhacks.h ../cryptlib.h m_mdc2.c | ||
| 465 | m_null.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 466 | m_null.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 467 | m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 468 | m_null.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 469 | m_null.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 470 | m_null.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 471 | m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 472 | m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 473 | m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 474 | m_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 475 | m_null.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 476 | m_null.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_null.c | ||
| 477 | m_ripemd.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 478 | m_ripemd.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 479 | m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 480 | m_ripemd.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 481 | m_ripemd.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 482 | m_ripemd.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 483 | m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 484 | m_ripemd.o: ../../include/openssl/opensslconf.h | ||
| 485 | m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 486 | m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/ripemd.h | ||
| 487 | m_ripemd.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 488 | m_ripemd.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 489 | m_ripemd.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 490 | m_ripemd.o: ../../include/openssl/x509_vfy.h ../cryptlib.h m_ripemd.c | ||
| 491 | m_sha.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 492 | m_sha.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 493 | m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 494 | m_sha.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 495 | m_sha.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 496 | m_sha.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 497 | m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 498 | m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 499 | m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h | ||
| 500 | m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 501 | m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 502 | m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 503 | m_sha.o: ../cryptlib.h m_sha.c | ||
| 504 | m_sha1.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 505 | m_sha1.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 506 | m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 507 | m_sha1.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 508 | m_sha1.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 509 | m_sha1.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 510 | m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 511 | m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 512 | m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h | ||
| 513 | m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 514 | m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 515 | m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 516 | m_sha1.o: ../cryptlib.h m_sha1.c | ||
| 517 | names.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 518 | names.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 519 | names.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 520 | names.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 521 | names.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 522 | names.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 523 | names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 524 | names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 525 | names.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 526 | names.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 527 | names.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 528 | names.o: ../../include/openssl/x509_vfy.h ../cryptlib.h names.c | ||
| 529 | p5_crpt.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 530 | p5_crpt.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 531 | p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 532 | p5_crpt.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 533 | p5_crpt.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 534 | p5_crpt.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 535 | p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 536 | p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 537 | p5_crpt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 538 | p5_crpt.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 539 | p5_crpt.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 540 | p5_crpt.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 541 | p5_crpt.o: ../cryptlib.h p5_crpt.c | ||
| 542 | p5_crpt2.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 543 | p5_crpt2.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 544 | p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 545 | p5_crpt2.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 546 | p5_crpt2.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 547 | p5_crpt2.o: ../../include/openssl/evp.h ../../include/openssl/hmac.h | ||
| 548 | p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 549 | p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 550 | p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 551 | p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 552 | p5_crpt2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 553 | p5_crpt2.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 554 | p5_crpt2.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt2.c | ||
| 555 | p_dec.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 556 | p_dec.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 557 | p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 558 | p_dec.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 559 | p_dec.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 560 | p_dec.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 561 | p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 562 | p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 563 | p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
| 564 | p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 565 | p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 566 | p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 567 | p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_dec.c | ||
| 568 | p_enc.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 569 | p_enc.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 570 | p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 571 | p_enc.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 572 | p_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 573 | p_enc.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 574 | p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 575 | p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 576 | p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
| 577 | p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 578 | p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 579 | p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 580 | p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_enc.c | ||
| 581 | p_lib.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 582 | p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h | ||
| 583 | p_lib.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 584 | p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/dh.h | ||
| 585 | p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 586 | p_lib.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 587 | p_lib.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 588 | p_lib.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 589 | p_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 590 | p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 591 | p_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 592 | p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 593 | p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 594 | p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 595 | p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_lib.c | ||
| 596 | p_open.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 597 | p_open.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 598 | p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 599 | p_open.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 600 | p_open.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 601 | p_open.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 602 | p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 603 | p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 604 | p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rsa.h | ||
| 605 | p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 606 | p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 607 | p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 608 | p_open.o: ../cryptlib.h p_open.c | ||
| 609 | p_seal.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 610 | p_seal.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 611 | p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 612 | p_seal.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 613 | p_seal.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 614 | p_seal.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 615 | p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 616 | p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 617 | p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
| 618 | p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 619 | p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 620 | p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 621 | p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_seal.c | ||
| 622 | p_sign.o: ../../e_os.h ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 623 | p_sign.o: ../../include/openssl/buffer.h ../../include/openssl/crypto.h | ||
| 624 | p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/ec.h | ||
| 625 | p_sign.o: ../../include/openssl/ecdh.h ../../include/openssl/ecdsa.h | ||
| 626 | p_sign.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 627 | p_sign.o: ../../include/openssl/lhash.h ../../include/openssl/obj_mac.h | ||
| 628 | p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 629 | p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 630 | p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 631 | p_sign.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 632 | p_sign.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 633 | p_sign.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_sign.c | ||
| 634 | p_verify.o: ../../e_os.h ../../include/openssl/asn1.h | ||
| 635 | p_verify.o: ../../include/openssl/bio.h ../../include/openssl/buffer.h | ||
| 636 | p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/e_os2.h | ||
| 637 | p_verify.o: ../../include/openssl/ec.h ../../include/openssl/ecdh.h | ||
| 638 | p_verify.o: ../../include/openssl/ecdsa.h ../../include/openssl/err.h | ||
| 639 | p_verify.o: ../../include/openssl/evp.h ../../include/openssl/lhash.h | ||
| 640 | p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 641 | p_verify.o: ../../include/openssl/opensslconf.h | ||
| 642 | p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 643 | p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/safestack.h | ||
| 644 | p_verify.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 645 | p_verify.o: ../../include/openssl/symhacks.h ../../include/openssl/x509.h | ||
| 646 | p_verify.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_verify.c | ||
diff --git a/src/lib/libcrypto/evp/Makefile.ssl b/src/lib/libcrypto/evp/Makefile.ssl new file mode 100644 index 0000000000..f33aebd33a --- /dev/null +++ b/src/lib/libcrypto/evp/Makefile.ssl | |||
| @@ -0,0 +1,1059 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/evp/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= evp | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I$(TOP) -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALL_PREFIX= | ||
| 11 | OPENSSLDIR= /usr/local/ssl | ||
| 12 | INSTALLTOP=/usr/local/ssl | ||
| 13 | MAKE= make -f Makefile.ssl | ||
| 14 | MAKEDEPPROG= makedepend | ||
| 15 | MAKEDEPEND= $(TOP)/util/domd $(TOP) -MD $(MAKEDEPPROG) | ||
| 16 | MAKEFILE= Makefile.ssl | ||
| 17 | AR= ar r | ||
| 18 | |||
| 19 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 20 | |||
| 21 | GENERAL=Makefile | ||
| 22 | TEST=evp_test.c | ||
| 23 | TESTDATA=evptests.txt | ||
| 24 | APPS= | ||
| 25 | |||
| 26 | LIB=$(TOP)/libcrypto.a | ||
| 27 | LIBSRC= encode.c digest.c evp_enc.c evp_key.c evp_acnf.c \ | ||
| 28 | e_des.c e_bf.c e_idea.c e_des3.c \ | ||
| 29 | e_rc4.c e_aes.c names.c \ | ||
| 30 | e_xcbc_d.c e_rc2.c e_cast.c e_rc5.c \ | ||
| 31 | m_null.c m_md2.c m_md4.c m_md5.c m_sha.c m_sha1.c \ | ||
| 32 | m_dss.c m_dss1.c m_mdc2.c m_ripemd.c \ | ||
| 33 | p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ | ||
| 34 | bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c \ | ||
| 35 | c_all.c c_allc.c c_alld.c evp_lib.c bio_ok.c \ | ||
| 36 | evp_pkey.c evp_pbe.c p5_crpt.c p5_crpt2.c | ||
| 37 | |||
| 38 | LIBOBJ= encode.o digest.o evp_enc.o evp_key.o evp_acnf.o \ | ||
| 39 | e_des.o e_bf.o e_idea.o e_des3.o \ | ||
| 40 | e_rc4.o e_aes.o names.o \ | ||
| 41 | e_xcbc_d.o e_rc2.o e_cast.o e_rc5.o \ | ||
| 42 | m_null.o m_md2.o m_md4.o m_md5.o m_sha.o m_sha1.o \ | ||
| 43 | m_dss.o m_dss1.o m_mdc2.o m_ripemd.o \ | ||
| 44 | p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \ | ||
| 45 | bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o \ | ||
| 46 | c_all.o c_allc.o c_alld.o evp_lib.o bio_ok.o \ | ||
| 47 | evp_pkey.o evp_pbe.o p5_crpt.o p5_crpt2.o | ||
| 48 | |||
| 49 | SRC= $(LIBSRC) | ||
| 50 | |||
| 51 | EXHEADER= evp.h | ||
| 52 | HEADER= $(EXHEADER) | ||
| 53 | |||
| 54 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 55 | |||
| 56 | top: | ||
| 57 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 58 | |||
| 59 | all: lib | ||
| 60 | |||
| 61 | lib: $(LIBOBJ) | ||
| 62 | $(AR) $(LIB) $(LIBOBJ) | ||
| 63 | $(RANLIB) $(LIB) || echo Never mind. | ||
| 64 | @touch lib | ||
| 65 | |||
| 66 | files: | ||
| 67 | $(PERL) $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 68 | |||
| 69 | links: | ||
| 70 | @sh $(TOP)/util/point.sh Makefile.ssl Makefile | ||
| 71 | @$(PERL) $(TOP)/util/mklink.pl ../../include/openssl $(EXHEADER) | ||
| 72 | @$(PERL) $(TOP)/util/mklink.pl ../../test $(TEST) | ||
| 73 | cp $(TESTDATA) ../../test | ||
| 74 | @$(PERL) $(TOP)/util/mklink.pl ../../apps $(APPS) | ||
| 75 | |||
| 76 | install: | ||
| 77 | @for i in $(EXHEADER) ; \ | ||
| 78 | do \ | ||
| 79 | (cp $$i $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i; \ | ||
| 80 | chmod 644 $(INSTALL_PREFIX)$(INSTALLTOP)/include/openssl/$$i ); \ | ||
| 81 | done; | ||
| 82 | |||
| 83 | tags: | ||
| 84 | ctags $(SRC) | ||
| 85 | |||
| 86 | tests: | ||
| 87 | |||
| 88 | lint: | ||
| 89 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 90 | |||
| 91 | depend: | ||
| 92 | $(MAKEDEPEND) -- $(CFLAG) $(INCLUDES) $(DEPFLAG) -- $(LIBSRC) | ||
| 93 | |||
| 94 | dclean: | ||
| 95 | $(PERL) -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 96 | mv -f Makefile.new $(MAKEFILE) | ||
| 97 | |||
| 98 | clean: | ||
| 99 | rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 100 | |||
| 101 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
| 102 | |||
| 103 | bio_b64.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 104 | bio_b64.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 105 | bio_b64.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 106 | bio_b64.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 107 | bio_b64.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 108 | bio_b64.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 109 | bio_b64.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 110 | bio_b64.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 111 | bio_b64.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 112 | bio_b64.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 113 | bio_b64.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 114 | bio_b64.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 115 | bio_b64.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 116 | bio_b64.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h | ||
| 117 | bio_b64.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 118 | bio_b64.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 119 | bio_b64.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 120 | bio_b64.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 121 | bio_b64.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 122 | bio_b64.o: ../cryptlib.h bio_b64.c | ||
| 123 | bio_enc.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 124 | bio_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 125 | bio_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 126 | bio_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 127 | bio_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 128 | bio_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 129 | bio_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 130 | bio_enc.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 131 | bio_enc.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 132 | bio_enc.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 133 | bio_enc.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 134 | bio_enc.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 135 | bio_enc.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 136 | bio_enc.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h | ||
| 137 | bio_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 138 | bio_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 139 | bio_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 140 | bio_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 141 | bio_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 142 | bio_enc.o: ../cryptlib.h bio_enc.c | ||
| 143 | bio_md.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 144 | bio_md.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 145 | bio_md.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 146 | bio_md.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 147 | bio_md.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 148 | bio_md.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 149 | bio_md.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 150 | bio_md.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 151 | bio_md.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 152 | bio_md.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 153 | bio_md.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 154 | bio_md.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 155 | bio_md.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 156 | bio_md.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 157 | bio_md.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 158 | bio_md.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 159 | bio_md.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 160 | bio_md.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 161 | bio_md.o: ../../include/openssl/ui_compat.h ../cryptlib.h bio_md.c | ||
| 162 | bio_ok.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 163 | bio_ok.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 164 | bio_ok.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 165 | bio_ok.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 166 | bio_ok.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 167 | bio_ok.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 168 | bio_ok.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 169 | bio_ok.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 170 | bio_ok.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 171 | bio_ok.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 172 | bio_ok.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 173 | bio_ok.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 174 | bio_ok.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 175 | bio_ok.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
| 176 | bio_ok.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 177 | bio_ok.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 178 | bio_ok.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 179 | bio_ok.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 180 | bio_ok.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 181 | bio_ok.o: ../cryptlib.h bio_ok.c | ||
| 182 | c_all.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 183 | c_all.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 184 | c_all.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 185 | c_all.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 186 | c_all.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 187 | c_all.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 188 | c_all.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
| 189 | c_all.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 190 | c_all.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 191 | c_all.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 192 | c_all.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 193 | c_all.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 194 | c_all.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 195 | c_all.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
| 196 | c_all.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 197 | c_all.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 198 | c_all.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 199 | c_all.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 200 | c_all.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 201 | c_all.o: ../../include/openssl/ui_compat.h ../cryptlib.h c_all.c | ||
| 202 | c_allc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 203 | c_allc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 204 | c_allc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 205 | c_allc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 206 | c_allc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 207 | c_allc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 208 | c_allc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 209 | c_allc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 210 | c_allc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 211 | c_allc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 212 | c_allc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 213 | c_allc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 214 | c_allc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 215 | c_allc.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | ||
| 216 | c_allc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 217 | c_allc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 218 | c_allc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 219 | c_allc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 220 | c_allc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 221 | c_allc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 222 | c_allc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_allc.c | ||
| 223 | c_alld.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 224 | c_alld.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 225 | c_alld.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 226 | c_alld.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 227 | c_alld.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 228 | c_alld.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 229 | c_alld.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 230 | c_alld.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 231 | c_alld.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 232 | c_alld.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 233 | c_alld.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 234 | c_alld.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 235 | c_alld.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 236 | c_alld.o: ../../include/openssl/pkcs12.h ../../include/openssl/pkcs7.h | ||
| 237 | c_alld.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 238 | c_alld.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 239 | c_alld.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 240 | c_alld.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 241 | c_alld.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 242 | c_alld.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 243 | c_alld.o: ../../include/openssl/x509_vfy.h ../cryptlib.h c_alld.c | ||
| 244 | digest.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 245 | digest.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 246 | digest.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 247 | digest.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 248 | digest.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 249 | digest.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 250 | digest.o: ../../include/openssl/e_os2.h ../../include/openssl/engine.h | ||
| 251 | digest.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 252 | digest.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 253 | digest.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 254 | digest.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 255 | digest.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 256 | digest.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 257 | digest.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rand.h | ||
| 258 | digest.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 259 | digest.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 260 | digest.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 261 | digest.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 262 | digest.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 263 | digest.o: ../../include/openssl/ui_compat.h ../cryptlib.h digest.c | ||
| 264 | e_aes.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 265 | e_aes.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 266 | e_aes.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | ||
| 267 | e_aes.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 268 | e_aes.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 269 | e_aes.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 270 | e_aes.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 271 | e_aes.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 272 | e_aes.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 273 | e_aes.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 274 | e_aes.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 275 | e_aes.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 276 | e_aes.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h | ||
| 277 | e_aes.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 278 | e_aes.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 279 | e_aes.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 280 | e_aes.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 281 | e_aes.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h e_aes.c | ||
| 282 | e_aes.o: evp_locl.h | ||
| 283 | e_bf.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 284 | e_bf.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 285 | e_bf.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 286 | e_bf.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 287 | e_bf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 288 | e_bf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 289 | e_bf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 290 | e_bf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 291 | e_bf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 292 | e_bf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 293 | e_bf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 294 | e_bf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 295 | e_bf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 296 | e_bf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 297 | e_bf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 298 | e_bf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 299 | e_bf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 300 | e_bf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 301 | e_bf.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_bf.c evp_locl.h | ||
| 302 | e_cast.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 303 | e_cast.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 304 | e_cast.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 305 | e_cast.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 306 | e_cast.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 307 | e_cast.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 308 | e_cast.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 309 | e_cast.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 310 | e_cast.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 311 | e_cast.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 312 | e_cast.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 313 | e_cast.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 314 | e_cast.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 315 | e_cast.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 316 | e_cast.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 317 | e_cast.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 318 | e_cast.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 319 | e_cast.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 320 | e_cast.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_cast.c evp_locl.h | ||
| 321 | e_des.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 322 | e_des.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 323 | e_des.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 324 | e_des.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 325 | e_des.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 326 | e_des.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 327 | e_des.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 328 | e_des.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 329 | e_des.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 330 | e_des.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 331 | e_des.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 332 | e_des.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 333 | e_des.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 334 | e_des.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 335 | e_des.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 336 | e_des.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 337 | e_des.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 338 | e_des.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 339 | e_des.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des.c evp_locl.h | ||
| 340 | e_des3.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 341 | e_des3.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 342 | e_des3.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 343 | e_des3.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 344 | e_des3.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 345 | e_des3.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 346 | e_des3.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 347 | e_des3.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 348 | e_des3.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 349 | e_des3.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 350 | e_des3.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 351 | e_des3.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 352 | e_des3.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 353 | e_des3.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 354 | e_des3.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 355 | e_des3.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 356 | e_des3.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 357 | e_des3.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 358 | e_des3.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_des3.c evp_locl.h | ||
| 359 | e_idea.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 360 | e_idea.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 361 | e_idea.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 362 | e_idea.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 363 | e_idea.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 364 | e_idea.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 365 | e_idea.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 366 | e_idea.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 367 | e_idea.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 368 | e_idea.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 369 | e_idea.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 370 | e_idea.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 371 | e_idea.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 372 | e_idea.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 373 | e_idea.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 374 | e_idea.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 375 | e_idea.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 376 | e_idea.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 377 | e_idea.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_idea.c evp_locl.h | ||
| 378 | e_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 379 | e_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 380 | e_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 381 | e_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 382 | e_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 383 | e_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 384 | e_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 385 | e_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 386 | e_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 387 | e_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 388 | e_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 389 | e_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 390 | e_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 391 | e_null.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 392 | e_null.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 393 | e_null.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 394 | e_null.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 395 | e_null.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 396 | e_null.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_null.c | ||
| 397 | e_rc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 398 | e_rc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 399 | e_rc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 400 | e_rc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 401 | e_rc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 402 | e_rc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 403 | e_rc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 404 | e_rc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 405 | e_rc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 406 | e_rc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 407 | e_rc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 408 | e_rc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 409 | e_rc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 410 | e_rc2.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 411 | e_rc2.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 412 | e_rc2.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 413 | e_rc2.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 414 | e_rc2.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 415 | e_rc2.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc2.c evp_locl.h | ||
| 416 | e_rc4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 417 | e_rc4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 418 | e_rc4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 419 | e_rc4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 420 | e_rc4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 421 | e_rc4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 422 | e_rc4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 423 | e_rc4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 424 | e_rc4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 425 | e_rc4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 426 | e_rc4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 427 | e_rc4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 428 | e_rc4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 429 | e_rc4.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 430 | e_rc4.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 431 | e_rc4.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 432 | e_rc4.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 433 | e_rc4.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 434 | e_rc4.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc4.c | ||
| 435 | e_rc5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 436 | e_rc5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 437 | e_rc5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 438 | e_rc5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 439 | e_rc5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 440 | e_rc5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 441 | e_rc5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 442 | e_rc5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 443 | e_rc5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 444 | e_rc5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 445 | e_rc5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 446 | e_rc5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 447 | e_rc5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 448 | e_rc5.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 449 | e_rc5.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 450 | e_rc5.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 451 | e_rc5.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 452 | e_rc5.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 453 | e_rc5.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_rc5.c evp_locl.h | ||
| 454 | e_xcbc_d.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 455 | e_xcbc_d.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 456 | e_xcbc_d.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 457 | e_xcbc_d.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 458 | e_xcbc_d.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 459 | e_xcbc_d.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 460 | e_xcbc_d.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 461 | e_xcbc_d.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 462 | e_xcbc_d.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 463 | e_xcbc_d.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 464 | e_xcbc_d.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 465 | e_xcbc_d.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 466 | e_xcbc_d.o: ../../include/openssl/opensslconf.h | ||
| 467 | e_xcbc_d.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 468 | e_xcbc_d.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 469 | e_xcbc_d.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 470 | e_xcbc_d.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 471 | e_xcbc_d.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 472 | e_xcbc_d.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 473 | e_xcbc_d.o: ../../include/openssl/ui_compat.h ../cryptlib.h e_xcbc_d.c | ||
| 474 | encode.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 475 | encode.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 476 | encode.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 477 | encode.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 478 | encode.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 479 | encode.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 480 | encode.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 481 | encode.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 482 | encode.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 483 | encode.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 484 | encode.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 485 | encode.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 486 | encode.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 487 | encode.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 488 | encode.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 489 | encode.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 490 | encode.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 491 | encode.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 492 | encode.o: ../../include/openssl/ui_compat.h ../cryptlib.h encode.c | ||
| 493 | evp_acnf.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 494 | evp_acnf.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 495 | evp_acnf.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 496 | evp_acnf.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 497 | evp_acnf.o: ../../include/openssl/conf.h ../../include/openssl/crypto.h | ||
| 498 | evp_acnf.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 499 | evp_acnf.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 500 | evp_acnf.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 501 | evp_acnf.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 502 | evp_acnf.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 503 | evp_acnf.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 504 | evp_acnf.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 505 | evp_acnf.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 506 | evp_acnf.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 507 | evp_acnf.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 508 | evp_acnf.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 509 | evp_acnf.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 510 | evp_acnf.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 511 | evp_acnf.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 512 | evp_acnf.o: ../../include/openssl/ui_compat.h ../cryptlib.h evp_acnf.c | ||
| 513 | evp_enc.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 514 | evp_enc.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 515 | evp_enc.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 516 | evp_enc.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 517 | evp_enc.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 518 | evp_enc.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 519 | evp_enc.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 520 | evp_enc.o: ../../include/openssl/engine.h ../../include/openssl/err.h | ||
| 521 | evp_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 522 | evp_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 523 | evp_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 524 | evp_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 525 | evp_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 526 | evp_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 527 | evp_enc.o: ../../include/openssl/rand.h ../../include/openssl/rc2.h | ||
| 528 | evp_enc.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 529 | evp_enc.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 530 | evp_enc.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 531 | evp_enc.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 532 | evp_enc.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 533 | evp_enc.o: ../cryptlib.h evp_enc.c evp_locl.h | ||
| 534 | evp_err.o: ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 535 | evp_err.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 536 | evp_err.o: ../../include/openssl/bn.h ../../include/openssl/cast.h | ||
| 537 | evp_err.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 538 | evp_err.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 539 | evp_err.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 540 | evp_err.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 541 | evp_err.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 542 | evp_err.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 543 | evp_err.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 544 | evp_err.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 545 | evp_err.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 546 | evp_err.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h | ||
| 547 | evp_err.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 548 | evp_err.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 549 | evp_err.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 550 | evp_err.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 551 | evp_err.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 552 | evp_err.o: evp_err.c | ||
| 553 | evp_key.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 554 | evp_key.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 555 | evp_key.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 556 | evp_key.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 557 | evp_key.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 558 | evp_key.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 559 | evp_key.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 560 | evp_key.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 561 | evp_key.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 562 | evp_key.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 563 | evp_key.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 564 | evp_key.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 565 | evp_key.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 566 | evp_key.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 567 | evp_key.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 568 | evp_key.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 569 | evp_key.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 570 | evp_key.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 571 | evp_key.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 572 | evp_key.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 573 | evp_key.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_key.c | ||
| 574 | evp_lib.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 575 | evp_lib.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 576 | evp_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 577 | evp_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 578 | evp_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 579 | evp_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 580 | evp_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 581 | evp_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 582 | evp_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 583 | evp_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 584 | evp_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 585 | evp_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 586 | evp_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 587 | evp_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/rc2.h | ||
| 588 | evp_lib.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 589 | evp_lib.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 590 | evp_lib.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 591 | evp_lib.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 592 | evp_lib.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 593 | evp_lib.o: ../cryptlib.h evp_lib.c | ||
| 594 | evp_pbe.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 595 | evp_pbe.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 596 | evp_pbe.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 597 | evp_pbe.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 598 | evp_pbe.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 599 | evp_pbe.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 600 | evp_pbe.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 601 | evp_pbe.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 602 | evp_pbe.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 603 | evp_pbe.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 604 | evp_pbe.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 605 | evp_pbe.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 606 | evp_pbe.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 607 | evp_pbe.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 608 | evp_pbe.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 609 | evp_pbe.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 610 | evp_pbe.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 611 | evp_pbe.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 612 | evp_pbe.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 613 | evp_pbe.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 614 | evp_pbe.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pbe.c | ||
| 615 | evp_pkey.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 616 | evp_pkey.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 617 | evp_pkey.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 618 | evp_pkey.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 619 | evp_pkey.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 620 | evp_pkey.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 621 | evp_pkey.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 622 | evp_pkey.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 623 | evp_pkey.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 624 | evp_pkey.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 625 | evp_pkey.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 626 | evp_pkey.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 627 | evp_pkey.o: ../../include/openssl/opensslconf.h | ||
| 628 | evp_pkey.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 629 | evp_pkey.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
| 630 | evp_pkey.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 631 | evp_pkey.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 632 | evp_pkey.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 633 | evp_pkey.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 634 | evp_pkey.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 635 | evp_pkey.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 636 | evp_pkey.o: ../../include/openssl/x509_vfy.h ../cryptlib.h evp_pkey.c | ||
| 637 | m_dss.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 638 | m_dss.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 639 | m_dss.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 640 | m_dss.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 641 | m_dss.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 642 | m_dss.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 643 | m_dss.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 644 | m_dss.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 645 | m_dss.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 646 | m_dss.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 647 | m_dss.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 648 | m_dss.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 649 | m_dss.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 650 | m_dss.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 651 | m_dss.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 652 | m_dss.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 653 | m_dss.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 654 | m_dss.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 655 | m_dss.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 656 | m_dss.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 657 | m_dss.o: ../cryptlib.h m_dss.c | ||
| 658 | m_dss1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 659 | m_dss1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 660 | m_dss1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 661 | m_dss1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 662 | m_dss1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 663 | m_dss1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 664 | m_dss1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 665 | m_dss1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 666 | m_dss1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 667 | m_dss1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 668 | m_dss1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 669 | m_dss1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 670 | m_dss1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 671 | m_dss1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 672 | m_dss1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 673 | m_dss1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 674 | m_dss1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 675 | m_dss1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 676 | m_dss1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 677 | m_dss1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 678 | m_dss1.o: ../cryptlib.h m_dss1.c | ||
| 679 | m_md2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 680 | m_md2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 681 | m_md2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 682 | m_md2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 683 | m_md2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 684 | m_md2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 685 | m_md2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 686 | m_md2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 687 | m_md2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 688 | m_md2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 689 | m_md2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 690 | m_md2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 691 | m_md2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 692 | m_md2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 693 | m_md2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 694 | m_md2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 695 | m_md2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 696 | m_md2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 697 | m_md2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 698 | m_md2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 699 | m_md2.o: ../cryptlib.h m_md2.c | ||
| 700 | m_md4.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 701 | m_md4.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 702 | m_md4.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 703 | m_md4.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 704 | m_md4.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 705 | m_md4.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 706 | m_md4.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 707 | m_md4.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 708 | m_md4.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 709 | m_md4.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 710 | m_md4.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 711 | m_md4.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 712 | m_md4.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 713 | m_md4.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 714 | m_md4.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 715 | m_md4.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 716 | m_md4.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 717 | m_md4.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 718 | m_md4.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 719 | m_md4.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 720 | m_md4.o: ../cryptlib.h m_md4.c | ||
| 721 | m_md5.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 722 | m_md5.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 723 | m_md5.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 724 | m_md5.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 725 | m_md5.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 726 | m_md5.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 727 | m_md5.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 728 | m_md5.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 729 | m_md5.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 730 | m_md5.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 731 | m_md5.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 732 | m_md5.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 733 | m_md5.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 734 | m_md5.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 735 | m_md5.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 736 | m_md5.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 737 | m_md5.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 738 | m_md5.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 739 | m_md5.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 740 | m_md5.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 741 | m_md5.o: ../cryptlib.h m_md5.c | ||
| 742 | m_mdc2.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 743 | m_mdc2.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 744 | m_mdc2.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 745 | m_mdc2.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 746 | m_mdc2.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 747 | m_mdc2.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 748 | m_mdc2.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 749 | m_mdc2.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 750 | m_mdc2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 751 | m_mdc2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 752 | m_mdc2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 753 | m_mdc2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 754 | m_mdc2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 755 | m_mdc2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 756 | m_mdc2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 757 | m_mdc2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 758 | m_mdc2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 759 | m_mdc2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 760 | m_mdc2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 761 | m_mdc2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 762 | m_mdc2.o: ../cryptlib.h m_mdc2.c | ||
| 763 | m_null.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 764 | m_null.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 765 | m_null.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 766 | m_null.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 767 | m_null.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 768 | m_null.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 769 | m_null.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 770 | m_null.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 771 | m_null.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 772 | m_null.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 773 | m_null.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 774 | m_null.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 775 | m_null.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 776 | m_null.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 777 | m_null.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 778 | m_null.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 779 | m_null.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 780 | m_null.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 781 | m_null.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 782 | m_null.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 783 | m_null.o: ../cryptlib.h m_null.c | ||
| 784 | m_ripemd.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 785 | m_ripemd.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 786 | m_ripemd.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 787 | m_ripemd.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 788 | m_ripemd.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 789 | m_ripemd.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 790 | m_ripemd.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 791 | m_ripemd.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 792 | m_ripemd.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 793 | m_ripemd.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 794 | m_ripemd.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 795 | m_ripemd.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 796 | m_ripemd.o: ../../include/openssl/opensslconf.h | ||
| 797 | m_ripemd.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 798 | m_ripemd.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 799 | m_ripemd.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 800 | m_ripemd.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 801 | m_ripemd.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 802 | m_ripemd.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 803 | m_ripemd.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 804 | m_ripemd.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 805 | m_ripemd.o: ../cryptlib.h m_ripemd.c | ||
| 806 | m_sha.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 807 | m_sha.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 808 | m_sha.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 809 | m_sha.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 810 | m_sha.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 811 | m_sha.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 812 | m_sha.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 813 | m_sha.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 814 | m_sha.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 815 | m_sha.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 816 | m_sha.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 817 | m_sha.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 818 | m_sha.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 819 | m_sha.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 820 | m_sha.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 821 | m_sha.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 822 | m_sha.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 823 | m_sha.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 824 | m_sha.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 825 | m_sha.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 826 | m_sha.o: ../cryptlib.h m_sha.c | ||
| 827 | m_sha1.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 828 | m_sha1.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 829 | m_sha1.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 830 | m_sha1.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 831 | m_sha1.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 832 | m_sha1.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 833 | m_sha1.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 834 | m_sha1.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 835 | m_sha1.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 836 | m_sha1.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 837 | m_sha1.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 838 | m_sha1.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 839 | m_sha1.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 840 | m_sha1.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 841 | m_sha1.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 842 | m_sha1.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 843 | m_sha1.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 844 | m_sha1.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 845 | m_sha1.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 846 | m_sha1.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 847 | m_sha1.o: ../cryptlib.h m_sha1.c | ||
| 848 | names.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 849 | names.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 850 | names.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 851 | names.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 852 | names.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 853 | names.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 854 | names.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 855 | names.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 856 | names.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 857 | names.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 858 | names.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 859 | names.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 860 | names.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 861 | names.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 862 | names.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 863 | names.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 864 | names.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 865 | names.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 866 | names.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 867 | names.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 868 | names.o: ../cryptlib.h names.c | ||
| 869 | p5_crpt.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 870 | p5_crpt.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 871 | p5_crpt.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 872 | p5_crpt.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 873 | p5_crpt.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 874 | p5_crpt.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 875 | p5_crpt.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 876 | p5_crpt.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 877 | p5_crpt.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 878 | p5_crpt.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 879 | p5_crpt.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 880 | p5_crpt.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 881 | p5_crpt.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 882 | p5_crpt.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 883 | p5_crpt.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 884 | p5_crpt.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 885 | p5_crpt.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 886 | p5_crpt.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 887 | p5_crpt.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 888 | p5_crpt.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 889 | p5_crpt.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p5_crpt.c | ||
| 890 | p5_crpt2.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 891 | p5_crpt2.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 892 | p5_crpt2.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 893 | p5_crpt2.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 894 | p5_crpt2.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 895 | p5_crpt2.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 896 | p5_crpt2.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 897 | p5_crpt2.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 898 | p5_crpt2.o: ../../include/openssl/hmac.h ../../include/openssl/idea.h | ||
| 899 | p5_crpt2.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 900 | p5_crpt2.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 901 | p5_crpt2.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 902 | p5_crpt2.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 903 | p5_crpt2.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 904 | p5_crpt2.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 905 | p5_crpt2.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 906 | p5_crpt2.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 907 | p5_crpt2.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 908 | p5_crpt2.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 909 | p5_crpt2.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 910 | p5_crpt2.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 911 | p5_crpt2.o: ../cryptlib.h p5_crpt2.c | ||
| 912 | p_dec.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 913 | p_dec.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 914 | p_dec.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 915 | p_dec.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 916 | p_dec.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 917 | p_dec.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 918 | p_dec.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 919 | p_dec.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 920 | p_dec.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 921 | p_dec.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 922 | p_dec.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 923 | p_dec.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 924 | p_dec.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 925 | p_dec.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
| 926 | p_dec.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 927 | p_dec.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 928 | p_dec.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 929 | p_dec.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 930 | p_dec.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 931 | p_dec.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 932 | p_dec.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_dec.c | ||
| 933 | p_enc.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 934 | p_enc.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 935 | p_enc.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 936 | p_enc.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 937 | p_enc.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 938 | p_enc.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 939 | p_enc.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 940 | p_enc.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 941 | p_enc.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 942 | p_enc.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 943 | p_enc.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 944 | p_enc.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 945 | p_enc.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 946 | p_enc.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
| 947 | p_enc.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 948 | p_enc.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 949 | p_enc.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 950 | p_enc.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 951 | p_enc.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 952 | p_enc.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 953 | p_enc.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_enc.c | ||
| 954 | p_lib.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 955 | p_lib.o: ../../include/openssl/asn1_mac.h ../../include/openssl/bio.h | ||
| 956 | p_lib.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 957 | p_lib.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 958 | p_lib.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 959 | p_lib.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 960 | p_lib.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 961 | p_lib.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 962 | p_lib.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 963 | p_lib.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 964 | p_lib.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 965 | p_lib.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 966 | p_lib.o: ../../include/openssl/opensslconf.h ../../include/openssl/opensslv.h | ||
| 967 | p_lib.o: ../../include/openssl/ossl_typ.h ../../include/openssl/pkcs7.h | ||
| 968 | p_lib.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 969 | p_lib.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 970 | p_lib.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 971 | p_lib.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 972 | p_lib.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 973 | p_lib.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 974 | p_lib.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_lib.c | ||
| 975 | p_open.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 976 | p_open.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 977 | p_open.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 978 | p_open.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 979 | p_open.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 980 | p_open.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 981 | p_open.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 982 | p_open.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 983 | p_open.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 984 | p_open.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 985 | p_open.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 986 | p_open.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 987 | p_open.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 988 | p_open.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 989 | p_open.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 990 | p_open.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 991 | p_open.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 992 | p_open.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 993 | p_open.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 994 | p_open.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 995 | p_open.o: ../cryptlib.h p_open.c | ||
| 996 | p_seal.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 997 | p_seal.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 998 | p_seal.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 999 | p_seal.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 1000 | p_seal.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 1001 | p_seal.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 1002 | p_seal.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 1003 | p_seal.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 1004 | p_seal.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 1005 | p_seal.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 1006 | p_seal.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 1007 | p_seal.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 1008 | p_seal.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 1009 | p_seal.o: ../../include/openssl/pkcs7.h ../../include/openssl/rand.h | ||
| 1010 | p_seal.o: ../../include/openssl/rc2.h ../../include/openssl/rc4.h | ||
| 1011 | p_seal.o: ../../include/openssl/rc5.h ../../include/openssl/ripemd.h | ||
| 1012 | p_seal.o: ../../include/openssl/rsa.h ../../include/openssl/safestack.h | ||
| 1013 | p_seal.o: ../../include/openssl/sha.h ../../include/openssl/stack.h | ||
| 1014 | p_seal.o: ../../include/openssl/symhacks.h ../../include/openssl/ui.h | ||
| 1015 | p_seal.o: ../../include/openssl/ui_compat.h ../../include/openssl/x509.h | ||
| 1016 | p_seal.o: ../../include/openssl/x509_vfy.h ../cryptlib.h p_seal.c | ||
| 1017 | p_sign.o: ../../e_os.h ../../include/openssl/aes.h ../../include/openssl/asn1.h | ||
| 1018 | p_sign.o: ../../include/openssl/bio.h ../../include/openssl/blowfish.h | ||
| 1019 | p_sign.o: ../../include/openssl/bn.h ../../include/openssl/buffer.h | ||
| 1020 | p_sign.o: ../../include/openssl/cast.h ../../include/openssl/crypto.h | ||
| 1021 | p_sign.o: ../../include/openssl/des.h ../../include/openssl/des_old.h | ||
| 1022 | p_sign.o: ../../include/openssl/dh.h ../../include/openssl/dsa.h | ||
| 1023 | p_sign.o: ../../include/openssl/e_os2.h ../../include/openssl/err.h | ||
| 1024 | p_sign.o: ../../include/openssl/evp.h ../../include/openssl/idea.h | ||
| 1025 | p_sign.o: ../../include/openssl/lhash.h ../../include/openssl/md2.h | ||
| 1026 | p_sign.o: ../../include/openssl/md4.h ../../include/openssl/md5.h | ||
| 1027 | p_sign.o: ../../include/openssl/mdc2.h ../../include/openssl/obj_mac.h | ||
| 1028 | p_sign.o: ../../include/openssl/objects.h ../../include/openssl/opensslconf.h | ||
| 1029 | p_sign.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 1030 | p_sign.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 1031 | p_sign.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 1032 | p_sign.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 1033 | p_sign.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 1034 | p_sign.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 1035 | p_sign.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 1036 | p_sign.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 1037 | p_sign.o: ../cryptlib.h p_sign.c | ||
| 1038 | p_verify.o: ../../e_os.h ../../include/openssl/aes.h | ||
| 1039 | p_verify.o: ../../include/openssl/asn1.h ../../include/openssl/bio.h | ||
| 1040 | p_verify.o: ../../include/openssl/blowfish.h ../../include/openssl/bn.h | ||
| 1041 | p_verify.o: ../../include/openssl/buffer.h ../../include/openssl/cast.h | ||
| 1042 | p_verify.o: ../../include/openssl/crypto.h ../../include/openssl/des.h | ||
| 1043 | p_verify.o: ../../include/openssl/des_old.h ../../include/openssl/dh.h | ||
| 1044 | p_verify.o: ../../include/openssl/dsa.h ../../include/openssl/e_os2.h | ||
| 1045 | p_verify.o: ../../include/openssl/err.h ../../include/openssl/evp.h | ||
| 1046 | p_verify.o: ../../include/openssl/idea.h ../../include/openssl/lhash.h | ||
| 1047 | p_verify.o: ../../include/openssl/md2.h ../../include/openssl/md4.h | ||
| 1048 | p_verify.o: ../../include/openssl/md5.h ../../include/openssl/mdc2.h | ||
| 1049 | p_verify.o: ../../include/openssl/obj_mac.h ../../include/openssl/objects.h | ||
| 1050 | p_verify.o: ../../include/openssl/opensslconf.h | ||
| 1051 | p_verify.o: ../../include/openssl/opensslv.h ../../include/openssl/ossl_typ.h | ||
| 1052 | p_verify.o: ../../include/openssl/pkcs7.h ../../include/openssl/rc2.h | ||
| 1053 | p_verify.o: ../../include/openssl/rc4.h ../../include/openssl/rc5.h | ||
| 1054 | p_verify.o: ../../include/openssl/ripemd.h ../../include/openssl/rsa.h | ||
| 1055 | p_verify.o: ../../include/openssl/safestack.h ../../include/openssl/sha.h | ||
| 1056 | p_verify.o: ../../include/openssl/stack.h ../../include/openssl/symhacks.h | ||
| 1057 | p_verify.o: ../../include/openssl/ui.h ../../include/openssl/ui_compat.h | ||
| 1058 | p_verify.o: ../../include/openssl/x509.h ../../include/openssl/x509_vfy.h | ||
| 1059 | p_verify.o: ../cryptlib.h p_verify.c | ||
diff --git a/src/lib/libcrypto/evp/bio_b64.c b/src/lib/libcrypto/evp/bio_b64.c index fa5cbc7eb1..33349c2f98 100644 --- a/src/lib/libcrypto/evp/bio_b64.c +++ b/src/lib/libcrypto/evp/bio_b64.c | |||
| @@ -165,7 +165,7 @@ static int b64_read(BIO *b, char *out, int outl) | |||
| 165 | { | 165 | { |
| 166 | i=ctx->buf_len-ctx->buf_off; | 166 | i=ctx->buf_len-ctx->buf_off; |
| 167 | if (i > outl) i=outl; | 167 | if (i > outl) i=outl; |
| 168 | OPENSSL_assert(ctx->buf_off+i < (int)sizeof(ctx->buf)); | 168 | OPENSSL_assert(ctx->buf_off+i < sizeof ctx->buf); |
| 169 | memcpy(out,&(ctx->buf[ctx->buf_off]),i); | 169 | memcpy(out,&(ctx->buf[ctx->buf_off]),i); |
| 170 | ret=i; | 170 | ret=i; |
| 171 | out+=i; | 171 | out+=i; |
diff --git a/src/lib/libcrypto/evp/bio_enc.c b/src/lib/libcrypto/evp/bio_enc.c index f6ac94c6e1..b8cda1a9f0 100644 --- a/src/lib/libcrypto/evp/bio_enc.c +++ b/src/lib/libcrypto/evp/bio_enc.c | |||
| @@ -405,8 +405,8 @@ EVP_CIPHER_ctx *c; | |||
| 405 | } | 405 | } |
| 406 | */ | 406 | */ |
| 407 | 407 | ||
| 408 | void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, const unsigned char *k, | 408 | void BIO_set_cipher(BIO *b, const EVP_CIPHER *c, unsigned char *k, |
| 409 | const unsigned char *i, int e) | 409 | unsigned char *i, int e) |
| 410 | { | 410 | { |
| 411 | BIO_ENC_CTX *ctx; | 411 | BIO_ENC_CTX *ctx; |
| 412 | 412 | ||
diff --git a/src/lib/libcrypto/evp/bio_md.c b/src/lib/libcrypto/evp/bio_md.c index d648ac6da6..f4aa41ac4b 100644 --- a/src/lib/libcrypto/evp/bio_md.c +++ b/src/lib/libcrypto/evp/bio_md.c | |||
| @@ -153,7 +153,7 @@ static int md_write(BIO *b, const char *in, int inl) | |||
| 153 | { | 153 | { |
| 154 | if (ret > 0) | 154 | if (ret > 0) |
| 155 | { | 155 | { |
| 156 | EVP_DigestUpdate(ctx,(const unsigned char *)in, | 156 | EVP_DigestUpdate(ctx,(unsigned char *)in, |
| 157 | (unsigned int)ret); | 157 | (unsigned int)ret); |
| 158 | } | 158 | } |
| 159 | } | 159 | } |
| @@ -192,13 +192,8 @@ static long md_ctrl(BIO *b, int cmd, long num, void *ptr) | |||
| 192 | ret=0; | 192 | ret=0; |
| 193 | break; | 193 | break; |
| 194 | case BIO_C_GET_MD_CTX: | 194 | case BIO_C_GET_MD_CTX: |
| 195 | if (b->init) | 195 | pctx=ptr; |
| 196 | { | 196 | *pctx=ctx; |
| 197 | pctx=ptr; | ||
| 198 | *pctx=ctx; | ||
| 199 | } | ||
| 200 | else | ||
| 201 | ret=0; | ||
| 202 | break; | 197 | break; |
| 203 | case BIO_C_SET_MD_CTX: | 198 | case BIO_C_SET_MD_CTX: |
| 204 | if (b->init) | 199 | if (b->init) |
diff --git a/src/lib/libcrypto/evp/bio_ok.c b/src/lib/libcrypto/evp/bio_ok.c new file mode 100644 index 0000000000..4e3f10141b --- /dev/null +++ b/src/lib/libcrypto/evp/bio_ok.c | |||
| @@ -0,0 +1,575 @@ | |||
| 1 | /* crypto/evp/bio_ok.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 | /* | ||
| 60 | From: Arne Ansper <arne@cyber.ee> | ||
| 61 | |||
| 62 | Why BIO_f_reliable? | ||
| 63 | |||
| 64 | I wrote function which took BIO* as argument, read data from it | ||
| 65 | and processed it. Then I wanted to store the input file in | ||
| 66 | encrypted form. OK I pushed BIO_f_cipher to the BIO stack | ||
| 67 | and everything was OK. BUT if user types wrong password | ||
| 68 | BIO_f_cipher outputs only garbage and my function crashes. Yes | ||
| 69 | I can and I should fix my function, but BIO_f_cipher is | ||
| 70 | easy way to add encryption support to many existing applications | ||
| 71 | and it's hard to debug and fix them all. | ||
| 72 | |||
| 73 | So I wanted another BIO which would catch the incorrect passwords and | ||
| 74 | file damages which cause garbage on BIO_f_cipher's output. | ||
| 75 | |||
| 76 | The easy way is to push the BIO_f_md and save the checksum at | ||
| 77 | the end of the file. However there are several problems with this | ||
| 78 | approach: | ||
| 79 | |||
| 80 | 1) you must somehow separate checksum from actual data. | ||
| 81 | 2) you need lot's of memory when reading the file, because you | ||
| 82 | must read to the end of the file and verify the checksum before | ||
| 83 | letting the application to read the data. | ||
| 84 | |||
| 85 | BIO_f_reliable tries to solve both problems, so that you can | ||
| 86 | read and write arbitrary long streams using only fixed amount | ||
| 87 | of memory. | ||
| 88 | |||
| 89 | BIO_f_reliable splits data stream into blocks. Each block is prefixed | ||
| 90 | with it's length and suffixed with it's digest. So you need only | ||
| 91 | several Kbytes of memory to buffer single block before verifying | ||
| 92 | it's digest. | ||
| 93 | |||
| 94 | BIO_f_reliable goes further and adds several important capabilities: | ||
| 95 | |||
| 96 | 1) the digest of the block is computed over the whole stream | ||
| 97 | -- so nobody can rearrange the blocks or remove or replace them. | ||
| 98 | |||
| 99 | 2) to detect invalid passwords right at the start BIO_f_reliable | ||
| 100 | adds special prefix to the stream. In order to avoid known plain-text | ||
| 101 | attacks this prefix is generated as follows: | ||
| 102 | |||
| 103 | *) digest is initialized with random seed instead of | ||
| 104 | standardized one. | ||
| 105 | *) same seed is written to output | ||
| 106 | *) well-known text is then hashed and the output | ||
| 107 | of the digest is also written to output. | ||
| 108 | |||
| 109 | reader can now read the seed from stream, hash the same string | ||
| 110 | and then compare the digest output. | ||
| 111 | |||
| 112 | Bad things: BIO_f_reliable knows what's going on in EVP_Digest. I | ||
| 113 | initially wrote and tested this code on x86 machine and wrote the | ||
| 114 | digests out in machine-dependent order :( There are people using | ||
| 115 | this code and I cannot change this easily without making existing | ||
| 116 | data files unreadable. | ||
| 117 | |||
| 118 | */ | ||
| 119 | |||
| 120 | #include <stdio.h> | ||
| 121 | #include <errno.h> | ||
| 122 | #include "cryptlib.h" | ||
| 123 | #include <openssl/buffer.h> | ||
| 124 | #include <openssl/bio.h> | ||
| 125 | #include <openssl/evp.h> | ||
| 126 | #include <openssl/rand.h> | ||
| 127 | |||
| 128 | static int ok_write(BIO *h, const char *buf, int num); | ||
| 129 | static int ok_read(BIO *h, char *buf, int size); | ||
| 130 | static long ok_ctrl(BIO *h, int cmd, long arg1, void *arg2); | ||
| 131 | static int ok_new(BIO *h); | ||
| 132 | static int ok_free(BIO *data); | ||
| 133 | static long ok_callback_ctrl(BIO *h, int cmd, bio_info_cb *fp); | ||
| 134 | |||
| 135 | static void sig_out(BIO* b); | ||
| 136 | static void sig_in(BIO* b); | ||
| 137 | static void block_out(BIO* b); | ||
| 138 | static void block_in(BIO* b); | ||
| 139 | #define OK_BLOCK_SIZE (1024*4) | ||
| 140 | #define OK_BLOCK_BLOCK 4 | ||
| 141 | #define IOBS (OK_BLOCK_SIZE+ OK_BLOCK_BLOCK+ 3*EVP_MAX_MD_SIZE) | ||
| 142 | #define WELLKNOWN "The quick brown fox jumped over the lazy dog's back." | ||
| 143 | |||
| 144 | #ifndef L_ENDIAN | ||
| 145 | #define swapem(x) \ | ||
| 146 | ((unsigned long int)((((unsigned long int)(x) & 0x000000ffU) << 24) | \ | ||
| 147 | (((unsigned long int)(x) & 0x0000ff00U) << 8) | \ | ||
| 148 | (((unsigned long int)(x) & 0x00ff0000U) >> 8) | \ | ||
| 149 | (((unsigned long int)(x) & 0xff000000U) >> 24))) | ||
| 150 | #else | ||
| 151 | #define swapem(x) (x) | ||
| 152 | #endif | ||
| 153 | |||
| 154 | typedef struct ok_struct | ||
| 155 | { | ||
| 156 | int buf_len; | ||
| 157 | int buf_off; | ||
| 158 | int buf_len_save; | ||
| 159 | int buf_off_save; | ||
| 160 | int cont; /* <= 0 when finished */ | ||
| 161 | int finished; | ||
| 162 | EVP_MD_CTX md; | ||
| 163 | int blockout; /* output block is ready */ | ||
| 164 | int sigio; /* must process signature */ | ||
| 165 | unsigned char buf[IOBS]; | ||
| 166 | } BIO_OK_CTX; | ||
| 167 | |||
| 168 | static BIO_METHOD methods_ok= | ||
| 169 | { | ||
| 170 | BIO_TYPE_CIPHER,"reliable", | ||
| 171 | ok_write, | ||
| 172 | ok_read, | ||
| 173 | NULL, /* ok_puts, */ | ||
| 174 | NULL, /* ok_gets, */ | ||
| 175 | ok_ctrl, | ||
| 176 | ok_new, | ||
| 177 | ok_free, | ||
| 178 | ok_callback_ctrl, | ||
| 179 | }; | ||
| 180 | |||
| 181 | BIO_METHOD *BIO_f_reliable(void) | ||
| 182 | { | ||
| 183 | return(&methods_ok); | ||
| 184 | } | ||
| 185 | |||
| 186 | static int ok_new(BIO *bi) | ||
| 187 | { | ||
| 188 | BIO_OK_CTX *ctx; | ||
| 189 | |||
| 190 | ctx=(BIO_OK_CTX *)OPENSSL_malloc(sizeof(BIO_OK_CTX)); | ||
| 191 | if (ctx == NULL) return(0); | ||
| 192 | |||
| 193 | ctx->buf_len=0; | ||
| 194 | ctx->buf_off=0; | ||
| 195 | ctx->buf_len_save=0; | ||
| 196 | ctx->buf_off_save=0; | ||
| 197 | ctx->cont=1; | ||
| 198 | ctx->finished=0; | ||
| 199 | ctx->blockout= 0; | ||
| 200 | ctx->sigio=1; | ||
| 201 | |||
| 202 | EVP_MD_CTX_init(&ctx->md); | ||
| 203 | |||
| 204 | bi->init=0; | ||
| 205 | bi->ptr=(char *)ctx; | ||
| 206 | bi->flags=0; | ||
| 207 | return(1); | ||
| 208 | } | ||
| 209 | |||
| 210 | static int ok_free(BIO *a) | ||
| 211 | { | ||
| 212 | if (a == NULL) return(0); | ||
| 213 | EVP_MD_CTX_cleanup(&((BIO_OK_CTX *)a->ptr)->md); | ||
| 214 | OPENSSL_cleanse(a->ptr,sizeof(BIO_OK_CTX)); | ||
| 215 | OPENSSL_free(a->ptr); | ||
| 216 | a->ptr=NULL; | ||
| 217 | a->init=0; | ||
| 218 | a->flags=0; | ||
| 219 | return(1); | ||
| 220 | } | ||
| 221 | |||
| 222 | static int ok_read(BIO *b, char *out, int outl) | ||
| 223 | { | ||
| 224 | int ret=0,i,n; | ||
| 225 | BIO_OK_CTX *ctx; | ||
| 226 | |||
| 227 | if (out == NULL) return(0); | ||
| 228 | ctx=(BIO_OK_CTX *)b->ptr; | ||
| 229 | |||
| 230 | if ((ctx == NULL) || (b->next_bio == NULL) || (b->init == 0)) return(0); | ||
| 231 | |||
| 232 | while(outl > 0) | ||
| 233 | { | ||
| 234 | |||
| 235 | /* copy clean bytes to output buffer */ | ||
| 236 | if (ctx->blockout) | ||
| 237 | { | ||
| 238 | i=ctx->buf_len-ctx->buf_off; | ||
| 239 | if (i > outl) i=outl; | ||
| 240 | memcpy(out,&(ctx->buf[ctx->buf_off]),i); | ||
| 241 | ret+=i; | ||
| 242 | out+=i; | ||
| 243 | outl-=i; | ||
| 244 | ctx->buf_off+=i; | ||
| 245 | |||
| 246 | /* all clean bytes are out */ | ||
| 247 | if (ctx->buf_len == ctx->buf_off) | ||
| 248 | { | ||
| 249 | ctx->buf_off=0; | ||
| 250 | |||
| 251 | /* copy start of the next block into proper place */ | ||
| 252 | if(ctx->buf_len_save- ctx->buf_off_save > 0) | ||
| 253 | { | ||
| 254 | ctx->buf_len= ctx->buf_len_save- ctx->buf_off_save; | ||
| 255 | memmove(ctx->buf, &(ctx->buf[ctx->buf_off_save]), | ||
| 256 | ctx->buf_len); | ||
| 257 | } | ||
| 258 | else | ||
| 259 | { | ||
| 260 | ctx->buf_len=0; | ||
| 261 | } | ||
| 262 | ctx->blockout= 0; | ||
| 263 | } | ||
| 264 | } | ||
| 265 | |||
| 266 | /* output buffer full -- cancel */ | ||
| 267 | if (outl == 0) break; | ||
| 268 | |||
| 269 | /* no clean bytes in buffer -- fill it */ | ||
| 270 | n=IOBS- ctx->buf_len; | ||
| 271 | i=BIO_read(b->next_bio,&(ctx->buf[ctx->buf_len]),n); | ||
| 272 | |||
| 273 | if (i <= 0) break; /* nothing new */ | ||
| 274 | |||
| 275 | ctx->buf_len+= i; | ||
| 276 | |||
| 277 | /* no signature yet -- check if we got one */ | ||
| 278 | if (ctx->sigio == 1) sig_in(b); | ||
| 279 | |||
| 280 | /* signature ok -- check if we got block */ | ||
| 281 | if (ctx->sigio == 0) block_in(b); | ||
| 282 | |||
| 283 | /* invalid block -- cancel */ | ||
| 284 | if (ctx->cont <= 0) break; | ||
| 285 | |||
| 286 | } | ||
| 287 | |||
| 288 | BIO_clear_retry_flags(b); | ||
| 289 | BIO_copy_next_retry(b); | ||
| 290 | return(ret); | ||
| 291 | } | ||
| 292 | |||
| 293 | static int ok_write(BIO *b, const char *in, int inl) | ||
| 294 | { | ||
| 295 | int ret=0,n,i; | ||
| 296 | BIO_OK_CTX *ctx; | ||
| 297 | |||
| 298 | ctx=(BIO_OK_CTX *)b->ptr; | ||
| 299 | ret=inl; | ||
| 300 | |||
| 301 | if ((ctx == NULL) || (b->next_bio == NULL) || (b->init == 0)) return(0); | ||
| 302 | |||
| 303 | if(ctx->sigio) sig_out(b); | ||
| 304 | |||
| 305 | do{ | ||
| 306 | BIO_clear_retry_flags(b); | ||
| 307 | n=ctx->buf_len-ctx->buf_off; | ||
| 308 | while (ctx->blockout && n > 0) | ||
| 309 | { | ||
| 310 | i=BIO_write(b->next_bio,&(ctx->buf[ctx->buf_off]),n); | ||
| 311 | if (i <= 0) | ||
| 312 | { | ||
| 313 | BIO_copy_next_retry(b); | ||
| 314 | if(!BIO_should_retry(b)) | ||
| 315 | ctx->cont= 0; | ||
| 316 | return(i); | ||
| 317 | } | ||
| 318 | ctx->buf_off+=i; | ||
| 319 | n-=i; | ||
| 320 | } | ||
| 321 | |||
| 322 | /* at this point all pending data has been written */ | ||
| 323 | ctx->blockout= 0; | ||
| 324 | if (ctx->buf_len == ctx->buf_off) | ||
| 325 | { | ||
| 326 | ctx->buf_len=OK_BLOCK_BLOCK; | ||
| 327 | ctx->buf_off=0; | ||
| 328 | } | ||
| 329 | |||
| 330 | if ((in == NULL) || (inl <= 0)) return(0); | ||
| 331 | |||
| 332 | n= (inl+ ctx->buf_len > OK_BLOCK_SIZE+ OK_BLOCK_BLOCK) ? | ||
| 333 | OK_BLOCK_SIZE+ OK_BLOCK_BLOCK- ctx->buf_len : inl; | ||
| 334 | |||
| 335 | memcpy((unsigned char *)(&(ctx->buf[ctx->buf_len])),(unsigned char *)in,n); | ||
| 336 | ctx->buf_len+= n; | ||
| 337 | inl-=n; | ||
| 338 | in+=n; | ||
| 339 | |||
| 340 | if(ctx->buf_len >= OK_BLOCK_SIZE+ OK_BLOCK_BLOCK) | ||
| 341 | { | ||
| 342 | block_out(b); | ||
| 343 | } | ||
| 344 | }while(inl > 0); | ||
| 345 | |||
| 346 | BIO_clear_retry_flags(b); | ||
| 347 | BIO_copy_next_retry(b); | ||
| 348 | return(ret); | ||
| 349 | } | ||
| 350 | |||
| 351 | static long ok_ctrl(BIO *b, int cmd, long num, void *ptr) | ||
| 352 | { | ||
| 353 | BIO_OK_CTX *ctx; | ||
| 354 | EVP_MD *md; | ||
| 355 | const EVP_MD **ppmd; | ||
| 356 | long ret=1; | ||
| 357 | int i; | ||
| 358 | |||
| 359 | ctx=b->ptr; | ||
| 360 | |||
| 361 | switch (cmd) | ||
| 362 | { | ||
| 363 | case BIO_CTRL_RESET: | ||
| 364 | ctx->buf_len=0; | ||
| 365 | ctx->buf_off=0; | ||
| 366 | ctx->buf_len_save=0; | ||
| 367 | ctx->buf_off_save=0; | ||
| 368 | ctx->cont=1; | ||
| 369 | ctx->finished=0; | ||
| 370 | ctx->blockout= 0; | ||
| 371 | ctx->sigio=1; | ||
| 372 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 373 | break; | ||
| 374 | case BIO_CTRL_EOF: /* More to read */ | ||
| 375 | if (ctx->cont <= 0) | ||
| 376 | ret=1; | ||
| 377 | else | ||
| 378 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 379 | break; | ||
| 380 | case BIO_CTRL_PENDING: /* More to read in buffer */ | ||
| 381 | case BIO_CTRL_WPENDING: /* More to read in buffer */ | ||
| 382 | ret=ctx->blockout ? ctx->buf_len-ctx->buf_off : 0; | ||
| 383 | if (ret <= 0) | ||
| 384 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 385 | break; | ||
| 386 | case BIO_CTRL_FLUSH: | ||
| 387 | /* do a final write */ | ||
| 388 | if(ctx->blockout == 0) | ||
| 389 | block_out(b); | ||
| 390 | |||
| 391 | while (ctx->blockout) | ||
| 392 | { | ||
| 393 | i=ok_write(b,NULL,0); | ||
| 394 | if (i < 0) | ||
| 395 | { | ||
| 396 | ret=i; | ||
| 397 | break; | ||
| 398 | } | ||
| 399 | } | ||
| 400 | |||
| 401 | ctx->finished=1; | ||
| 402 | ctx->buf_off=ctx->buf_len=0; | ||
| 403 | ctx->cont=(int)ret; | ||
| 404 | |||
| 405 | /* Finally flush the underlying BIO */ | ||
| 406 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 407 | break; | ||
| 408 | case BIO_C_DO_STATE_MACHINE: | ||
| 409 | BIO_clear_retry_flags(b); | ||
| 410 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 411 | BIO_copy_next_retry(b); | ||
| 412 | break; | ||
| 413 | case BIO_CTRL_INFO: | ||
| 414 | ret=(long)ctx->cont; | ||
| 415 | break; | ||
| 416 | case BIO_C_SET_MD: | ||
| 417 | md=ptr; | ||
| 418 | EVP_DigestInit_ex(&ctx->md, md, NULL); | ||
| 419 | b->init=1; | ||
| 420 | break; | ||
| 421 | case BIO_C_GET_MD: | ||
| 422 | if (b->init) | ||
| 423 | { | ||
| 424 | ppmd=ptr; | ||
| 425 | *ppmd=ctx->md.digest; | ||
| 426 | } | ||
| 427 | else | ||
| 428 | ret=0; | ||
| 429 | break; | ||
| 430 | default: | ||
| 431 | ret=BIO_ctrl(b->next_bio,cmd,num,ptr); | ||
| 432 | break; | ||
| 433 | } | ||
| 434 | return(ret); | ||
| 435 | } | ||
| 436 | |||
| 437 | static long ok_callback_ctrl(BIO *b, int cmd, bio_info_cb *fp) | ||
| 438 | { | ||
| 439 | long ret=1; | ||
| 440 | |||
| 441 | if (b->next_bio == NULL) return(0); | ||
| 442 | switch (cmd) | ||
| 443 | { | ||
| 444 | default: | ||
| 445 | ret=BIO_callback_ctrl(b->next_bio,cmd,fp); | ||
| 446 | break; | ||
| 447 | } | ||
| 448 | return(ret); | ||
| 449 | } | ||
| 450 | |||
| 451 | static void longswap(void *_ptr, int len) | ||
| 452 | { | ||
| 453 | #ifndef L_ENDIAN | ||
| 454 | int i; | ||
| 455 | char *ptr=_ptr; | ||
| 456 | |||
| 457 | for(i= 0;i < len;i+= 4){ | ||
| 458 | *((unsigned long *)&(ptr[i]))= swapem(*((unsigned long *)&(ptr[i]))); | ||
| 459 | } | ||
| 460 | #endif | ||
| 461 | } | ||
| 462 | |||
| 463 | static void sig_out(BIO* b) | ||
| 464 | { | ||
| 465 | BIO_OK_CTX *ctx; | ||
| 466 | EVP_MD_CTX *md; | ||
| 467 | |||
| 468 | ctx=b->ptr; | ||
| 469 | md=&ctx->md; | ||
| 470 | |||
| 471 | if(ctx->buf_len+ 2* md->digest->md_size > OK_BLOCK_SIZE) return; | ||
| 472 | |||
| 473 | EVP_DigestInit_ex(md, md->digest, NULL); | ||
| 474 | /* FIXME: there's absolutely no guarantee this makes any sense at all, | ||
| 475 | * particularly now EVP_MD_CTX has been restructured. | ||
| 476 | */ | ||
| 477 | RAND_pseudo_bytes(md->md_data, md->digest->md_size); | ||
| 478 | memcpy(&(ctx->buf[ctx->buf_len]), md->md_data, md->digest->md_size); | ||
| 479 | longswap(&(ctx->buf[ctx->buf_len]), md->digest->md_size); | ||
| 480 | ctx->buf_len+= md->digest->md_size; | ||
| 481 | |||
| 482 | EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN)); | ||
| 483 | EVP_DigestFinal_ex(md, &(ctx->buf[ctx->buf_len]), NULL); | ||
| 484 | ctx->buf_len+= md->digest->md_size; | ||
| 485 | ctx->blockout= 1; | ||
| 486 | ctx->sigio= 0; | ||
| 487 | } | ||
| 488 | |||
| 489 | static void sig_in(BIO* b) | ||
| 490 | { | ||
| 491 | BIO_OK_CTX *ctx; | ||
| 492 | EVP_MD_CTX *md; | ||
| 493 | unsigned char tmp[EVP_MAX_MD_SIZE]; | ||
| 494 | int ret= 0; | ||
| 495 | |||
| 496 | ctx=b->ptr; | ||
| 497 | md=&ctx->md; | ||
| 498 | |||
| 499 | if(ctx->buf_len- ctx->buf_off < 2* md->digest->md_size) return; | ||
| 500 | |||
| 501 | EVP_DigestInit_ex(md, md->digest, NULL); | ||
| 502 | memcpy(md->md_data, &(ctx->buf[ctx->buf_off]), md->digest->md_size); | ||
| 503 | longswap(md->md_data, md->digest->md_size); | ||
| 504 | ctx->buf_off+= md->digest->md_size; | ||
| 505 | |||
| 506 | EVP_DigestUpdate(md, WELLKNOWN, strlen(WELLKNOWN)); | ||
| 507 | EVP_DigestFinal_ex(md, tmp, NULL); | ||
| 508 | ret= memcmp(&(ctx->buf[ctx->buf_off]), tmp, md->digest->md_size) == 0; | ||
| 509 | ctx->buf_off+= md->digest->md_size; | ||
| 510 | if(ret == 1) | ||
| 511 | { | ||
| 512 | ctx->sigio= 0; | ||
| 513 | if(ctx->buf_len != ctx->buf_off) | ||
| 514 | { | ||
| 515 | memmove(ctx->buf, &(ctx->buf[ctx->buf_off]), ctx->buf_len- ctx->buf_off); | ||
| 516 | } | ||
| 517 | ctx->buf_len-= ctx->buf_off; | ||
| 518 | ctx->buf_off= 0; | ||
| 519 | } | ||
| 520 | else | ||
| 521 | { | ||
| 522 | ctx->cont= 0; | ||
| 523 | } | ||
| 524 | } | ||
| 525 | |||
| 526 | static void block_out(BIO* b) | ||
| 527 | { | ||
| 528 | BIO_OK_CTX *ctx; | ||
| 529 | EVP_MD_CTX *md; | ||
| 530 | unsigned long tl; | ||
| 531 | |||
| 532 | ctx=b->ptr; | ||
| 533 | md=&ctx->md; | ||
| 534 | |||
| 535 | tl= ctx->buf_len- OK_BLOCK_BLOCK; | ||
| 536 | tl= swapem(tl); | ||
| 537 | memcpy(ctx->buf, &tl, OK_BLOCK_BLOCK); | ||
| 538 | tl= swapem(tl); | ||
| 539 | EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl); | ||
| 540 | EVP_DigestFinal_ex(md, &(ctx->buf[ctx->buf_len]), NULL); | ||
| 541 | ctx->buf_len+= md->digest->md_size; | ||
| 542 | ctx->blockout= 1; | ||
| 543 | } | ||
| 544 | |||
| 545 | static void block_in(BIO* b) | ||
| 546 | { | ||
| 547 | BIO_OK_CTX *ctx; | ||
| 548 | EVP_MD_CTX *md; | ||
| 549 | long tl= 0; | ||
| 550 | unsigned char tmp[EVP_MAX_MD_SIZE]; | ||
| 551 | |||
| 552 | ctx=b->ptr; | ||
| 553 | md=&ctx->md; | ||
| 554 | |||
| 555 | memcpy(&tl, ctx->buf, OK_BLOCK_BLOCK); | ||
| 556 | tl= swapem(tl); | ||
| 557 | if (ctx->buf_len < tl+ OK_BLOCK_BLOCK+ md->digest->md_size) return; | ||
| 558 | |||
| 559 | EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl); | ||
| 560 | EVP_DigestFinal_ex(md, tmp, NULL); | ||
| 561 | if(memcmp(&(ctx->buf[tl+ OK_BLOCK_BLOCK]), tmp, md->digest->md_size) == 0) | ||
| 562 | { | ||
| 563 | /* there might be parts from next block lurking around ! */ | ||
| 564 | ctx->buf_off_save= tl+ OK_BLOCK_BLOCK+ md->digest->md_size; | ||
| 565 | ctx->buf_len_save= ctx->buf_len; | ||
| 566 | ctx->buf_off= OK_BLOCK_BLOCK; | ||
| 567 | ctx->buf_len= tl+ OK_BLOCK_BLOCK; | ||
| 568 | ctx->blockout= 1; | ||
| 569 | } | ||
| 570 | else | ||
| 571 | { | ||
| 572 | ctx->cont= 0; | ||
| 573 | } | ||
| 574 | } | ||
| 575 | |||
diff --git a/src/lib/libcrypto/evp/c_all.c b/src/lib/libcrypto/evp/c_all.c index a5da52e62d..fa60a73ead 100644 --- a/src/lib/libcrypto/evp/c_all.c +++ b/src/lib/libcrypto/evp/c_all.c | |||
| @@ -74,12 +74,6 @@ void OpenSSL_add_all_algorithms(void) | |||
| 74 | 74 | ||
| 75 | void OPENSSL_add_all_algorithms_noconf(void) | 75 | void OPENSSL_add_all_algorithms_noconf(void) |
| 76 | { | 76 | { |
| 77 | /* | ||
| 78 | * For the moment OPENSSL_cpuid_setup does something | ||
| 79 | * only on IA-32, but we reserve the option for all | ||
| 80 | * platforms... | ||
| 81 | */ | ||
| 82 | OPENSSL_cpuid_setup(); | ||
| 83 | OpenSSL_add_all_ciphers(); | 77 | OpenSSL_add_all_ciphers(); |
| 84 | OpenSSL_add_all_digests(); | 78 | OpenSSL_add_all_digests(); |
| 85 | #ifndef OPENSSL_NO_ENGINE | 79 | #ifndef OPENSSL_NO_ENGINE |
diff --git a/src/lib/libcrypto/evp/c_allc.c b/src/lib/libcrypto/evp/c_allc.c new file mode 100644 index 0000000000..fc96812365 --- /dev/null +++ b/src/lib/libcrypto/evp/c_allc.c | |||
| @@ -0,0 +1,188 @@ | |||
| 1 | /* crypto/evp/c_allc.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/pkcs12.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | void OpenSSL_add_all_ciphers(void) | ||
| 66 | { | ||
| 67 | |||
| 68 | #ifndef OPENSSL_NO_DES | ||
| 69 | EVP_add_cipher(EVP_des_cfb()); | ||
| 70 | EVP_add_cipher(EVP_des_cfb1()); | ||
| 71 | EVP_add_cipher(EVP_des_cfb8()); | ||
| 72 | EVP_add_cipher(EVP_des_ede_cfb()); | ||
| 73 | EVP_add_cipher(EVP_des_ede3_cfb()); | ||
| 74 | |||
| 75 | EVP_add_cipher(EVP_des_ofb()); | ||
| 76 | EVP_add_cipher(EVP_des_ede_ofb()); | ||
| 77 | EVP_add_cipher(EVP_des_ede3_ofb()); | ||
| 78 | |||
| 79 | EVP_add_cipher(EVP_desx_cbc()); | ||
| 80 | EVP_add_cipher_alias(SN_desx_cbc,"DESX"); | ||
| 81 | EVP_add_cipher_alias(SN_desx_cbc,"desx"); | ||
| 82 | |||
| 83 | EVP_add_cipher(EVP_des_cbc()); | ||
| 84 | EVP_add_cipher_alias(SN_des_cbc,"DES"); | ||
| 85 | EVP_add_cipher_alias(SN_des_cbc,"des"); | ||
| 86 | EVP_add_cipher(EVP_des_ede_cbc()); | ||
| 87 | EVP_add_cipher(EVP_des_ede3_cbc()); | ||
| 88 | EVP_add_cipher_alias(SN_des_ede3_cbc,"DES3"); | ||
| 89 | EVP_add_cipher_alias(SN_des_ede3_cbc,"des3"); | ||
| 90 | |||
| 91 | EVP_add_cipher(EVP_des_ecb()); | ||
| 92 | EVP_add_cipher(EVP_des_ede()); | ||
| 93 | EVP_add_cipher(EVP_des_ede3()); | ||
| 94 | #endif | ||
| 95 | |||
| 96 | #ifndef OPENSSL_NO_RC4 | ||
| 97 | EVP_add_cipher(EVP_rc4()); | ||
| 98 | EVP_add_cipher(EVP_rc4_40()); | ||
| 99 | #endif | ||
| 100 | |||
| 101 | #ifndef OPENSSL_NO_IDEA | ||
| 102 | EVP_add_cipher(EVP_idea_ecb()); | ||
| 103 | EVP_add_cipher(EVP_idea_cfb()); | ||
| 104 | EVP_add_cipher(EVP_idea_ofb()); | ||
| 105 | EVP_add_cipher(EVP_idea_cbc()); | ||
| 106 | EVP_add_cipher_alias(SN_idea_cbc,"IDEA"); | ||
| 107 | EVP_add_cipher_alias(SN_idea_cbc,"idea"); | ||
| 108 | #endif | ||
| 109 | |||
| 110 | #ifndef OPENSSL_NO_RC2 | ||
| 111 | EVP_add_cipher(EVP_rc2_ecb()); | ||
| 112 | EVP_add_cipher(EVP_rc2_cfb()); | ||
| 113 | EVP_add_cipher(EVP_rc2_ofb()); | ||
| 114 | EVP_add_cipher(EVP_rc2_cbc()); | ||
| 115 | EVP_add_cipher(EVP_rc2_40_cbc()); | ||
| 116 | EVP_add_cipher(EVP_rc2_64_cbc()); | ||
| 117 | EVP_add_cipher_alias(SN_rc2_cbc,"RC2"); | ||
| 118 | EVP_add_cipher_alias(SN_rc2_cbc,"rc2"); | ||
| 119 | #endif | ||
| 120 | |||
| 121 | #ifndef OPENSSL_NO_BF | ||
| 122 | EVP_add_cipher(EVP_bf_ecb()); | ||
| 123 | EVP_add_cipher(EVP_bf_cfb()); | ||
| 124 | EVP_add_cipher(EVP_bf_ofb()); | ||
| 125 | EVP_add_cipher(EVP_bf_cbc()); | ||
| 126 | EVP_add_cipher_alias(SN_bf_cbc,"BF"); | ||
| 127 | EVP_add_cipher_alias(SN_bf_cbc,"bf"); | ||
| 128 | EVP_add_cipher_alias(SN_bf_cbc,"blowfish"); | ||
| 129 | #endif | ||
| 130 | |||
| 131 | #ifndef OPENSSL_NO_CAST | ||
| 132 | EVP_add_cipher(EVP_cast5_ecb()); | ||
| 133 | EVP_add_cipher(EVP_cast5_cfb()); | ||
| 134 | EVP_add_cipher(EVP_cast5_ofb()); | ||
| 135 | EVP_add_cipher(EVP_cast5_cbc()); | ||
| 136 | EVP_add_cipher_alias(SN_cast5_cbc,"CAST"); | ||
| 137 | EVP_add_cipher_alias(SN_cast5_cbc,"cast"); | ||
| 138 | EVP_add_cipher_alias(SN_cast5_cbc,"CAST-cbc"); | ||
| 139 | EVP_add_cipher_alias(SN_cast5_cbc,"cast-cbc"); | ||
| 140 | #endif | ||
| 141 | |||
| 142 | #ifndef OPENSSL_NO_RC5 | ||
| 143 | EVP_add_cipher(EVP_rc5_32_12_16_ecb()); | ||
| 144 | EVP_add_cipher(EVP_rc5_32_12_16_cfb()); | ||
| 145 | EVP_add_cipher(EVP_rc5_32_12_16_ofb()); | ||
| 146 | EVP_add_cipher(EVP_rc5_32_12_16_cbc()); | ||
| 147 | EVP_add_cipher_alias(SN_rc5_cbc,"rc5"); | ||
| 148 | EVP_add_cipher_alias(SN_rc5_cbc,"RC5"); | ||
| 149 | #endif | ||
| 150 | |||
| 151 | #ifndef OPENSSL_NO_AES | ||
| 152 | EVP_add_cipher(EVP_aes_128_ecb()); | ||
| 153 | EVP_add_cipher(EVP_aes_128_cbc()); | ||
| 154 | EVP_add_cipher(EVP_aes_128_cfb()); | ||
| 155 | EVP_add_cipher(EVP_aes_128_cfb1()); | ||
| 156 | EVP_add_cipher(EVP_aes_128_cfb8()); | ||
| 157 | EVP_add_cipher(EVP_aes_128_ofb()); | ||
| 158 | #if 0 | ||
| 159 | EVP_add_cipher(EVP_aes_128_ctr()); | ||
| 160 | #endif | ||
| 161 | EVP_add_cipher_alias(SN_aes_128_cbc,"AES128"); | ||
| 162 | EVP_add_cipher_alias(SN_aes_128_cbc,"aes128"); | ||
| 163 | EVP_add_cipher(EVP_aes_192_ecb()); | ||
| 164 | EVP_add_cipher(EVP_aes_192_cbc()); | ||
| 165 | EVP_add_cipher(EVP_aes_192_cfb()); | ||
| 166 | EVP_add_cipher(EVP_aes_192_cfb1()); | ||
| 167 | EVP_add_cipher(EVP_aes_192_cfb8()); | ||
| 168 | EVP_add_cipher(EVP_aes_192_ofb()); | ||
| 169 | #if 0 | ||
| 170 | EVP_add_cipher(EVP_aes_192_ctr()); | ||
| 171 | #endif | ||
| 172 | EVP_add_cipher_alias(SN_aes_192_cbc,"AES192"); | ||
| 173 | EVP_add_cipher_alias(SN_aes_192_cbc,"aes192"); | ||
| 174 | EVP_add_cipher(EVP_aes_256_ecb()); | ||
| 175 | EVP_add_cipher(EVP_aes_256_cbc()); | ||
| 176 | EVP_add_cipher(EVP_aes_256_cfb()); | ||
| 177 | EVP_add_cipher(EVP_aes_256_cfb1()); | ||
| 178 | EVP_add_cipher(EVP_aes_256_cfb8()); | ||
| 179 | EVP_add_cipher(EVP_aes_256_ofb()); | ||
| 180 | #if 0 | ||
| 181 | EVP_add_cipher(EVP_aes_256_ctr()); | ||
| 182 | #endif | ||
| 183 | EVP_add_cipher_alias(SN_aes_256_cbc,"AES256"); | ||
| 184 | EVP_add_cipher_alias(SN_aes_256_cbc,"aes256"); | ||
| 185 | #endif | ||
| 186 | PKCS12_PBE_add(); | ||
| 187 | PKCS5_PBE_add(); | ||
| 188 | } | ||
diff --git a/src/lib/libcrypto/evp/c_alld.c b/src/lib/libcrypto/evp/c_alld.c new file mode 100644 index 0000000000..929ea56a3e --- /dev/null +++ b/src/lib/libcrypto/evp/c_alld.c | |||
| @@ -0,0 +1,113 @@ | |||
| 1 | /* crypto/evp/c_alld.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/pkcs12.h> | ||
| 63 | #include <openssl/objects.h> | ||
| 64 | |||
| 65 | void OpenSSL_add_all_digests(void) | ||
| 66 | { | ||
| 67 | #ifndef OPENSSL_NO_MD2 | ||
| 68 | EVP_add_digest(EVP_md2()); | ||
| 69 | #endif | ||
| 70 | #ifndef OPENSSL_NO_MD4 | ||
| 71 | EVP_add_digest(EVP_md4()); | ||
| 72 | #endif | ||
| 73 | #ifndef OPENSSL_NO_MD5 | ||
| 74 | EVP_add_digest(EVP_md5()); | ||
| 75 | EVP_add_digest_alias(SN_md5,"ssl2-md5"); | ||
| 76 | EVP_add_digest_alias(SN_md5,"ssl3-md5"); | ||
| 77 | #endif | ||
| 78 | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) | ||
| 79 | EVP_add_digest(EVP_sha()); | ||
| 80 | #ifndef OPENSSL_NO_DSA | ||
| 81 | EVP_add_digest(EVP_dss()); | ||
| 82 | #endif | ||
| 83 | #endif | ||
| 84 | #ifndef OPENSSL_NO_SHA | ||
| 85 | EVP_add_digest(EVP_sha1()); | ||
| 86 | EVP_add_digest_alias(SN_sha1,"ssl3-sha1"); | ||
| 87 | EVP_add_digest_alias(SN_sha1WithRSAEncryption,SN_sha1WithRSA); | ||
| 88 | #ifndef OPENSSL_NO_DSA | ||
| 89 | EVP_add_digest(EVP_dss1()); | ||
| 90 | EVP_add_digest_alias(SN_dsaWithSHA1,SN_dsaWithSHA1_2); | ||
| 91 | EVP_add_digest_alias(SN_dsaWithSHA1,"DSS1"); | ||
| 92 | EVP_add_digest_alias(SN_dsaWithSHA1,"dss1"); | ||
| 93 | #endif | ||
| 94 | #endif | ||
| 95 | #if !defined(OPENSSL_NO_MDC2) && !defined(OPENSSL_NO_DES) | ||
| 96 | EVP_add_digest(EVP_mdc2()); | ||
| 97 | #endif | ||
| 98 | #ifndef OPENSSL_NO_RIPEMD | ||
| 99 | EVP_add_digest(EVP_ripemd160()); | ||
| 100 | EVP_add_digest_alias(SN_ripemd160,"ripemd"); | ||
| 101 | EVP_add_digest_alias(SN_ripemd160,"rmd160"); | ||
| 102 | #endif | ||
| 103 | #ifdef OPENSSL_FIPS | ||
| 104 | #ifndef OPENSSL_NO_SHA256 | ||
| 105 | EVP_add_digest(EVP_sha224()); | ||
| 106 | EVP_add_digest(EVP_sha256()); | ||
| 107 | #endif | ||
| 108 | #ifndef OPENSSL_NO_SHA512 | ||
| 109 | EVP_add_digest(EVP_sha384()); | ||
| 110 | EVP_add_digest(EVP_sha512()); | ||
| 111 | #endif | ||
| 112 | #endif | ||
| 113 | } | ||
diff --git a/src/lib/libcrypto/evp/digest.c b/src/lib/libcrypto/evp/digest.c index 762e6d3450..f21c63842c 100644 --- a/src/lib/libcrypto/evp/digest.c +++ b/src/lib/libcrypto/evp/digest.c | |||
| @@ -137,6 +137,39 @@ int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) | |||
| 137 | return EVP_DigestInit_ex(ctx, type, NULL); | 137 | return EVP_DigestInit_ex(ctx, type, NULL); |
| 138 | } | 138 | } |
| 139 | 139 | ||
| 140 | #ifdef OPENSSL_FIPS | ||
| 141 | |||
| 142 | /* The purpose of these is to trap programs that attempt to use non FIPS | ||
| 143 | * algorithms in FIPS mode and ignore the errors. | ||
| 144 | */ | ||
| 145 | |||
| 146 | static int bad_init(EVP_MD_CTX *ctx) | ||
| 147 | { FIPS_ERROR_IGNORED("Digest init"); return 0;} | ||
| 148 | |||
| 149 | static int bad_update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
| 150 | { FIPS_ERROR_IGNORED("Digest update"); return 0;} | ||
| 151 | |||
| 152 | static int bad_final(EVP_MD_CTX *ctx,unsigned char *md) | ||
| 153 | { FIPS_ERROR_IGNORED("Digest Final"); return 0;} | ||
| 154 | |||
| 155 | static const EVP_MD bad_md = | ||
| 156 | { | ||
| 157 | 0, | ||
| 158 | 0, | ||
| 159 | 0, | ||
| 160 | 0, | ||
| 161 | bad_init, | ||
| 162 | bad_update, | ||
| 163 | bad_final, | ||
| 164 | NULL, | ||
| 165 | NULL, | ||
| 166 | NULL, | ||
| 167 | 0, | ||
| 168 | {0,0,0,0}, | ||
| 169 | }; | ||
| 170 | |||
| 171 | #endif | ||
| 172 | |||
| 140 | int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) | 173 | int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) |
| 141 | { | 174 | { |
| 142 | EVP_MD_CTX_clear_flags(ctx,EVP_MD_CTX_FLAG_CLEANED); | 175 | EVP_MD_CTX_clear_flags(ctx,EVP_MD_CTX_FLAG_CLEANED); |
| @@ -159,7 +192,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) | |||
| 159 | { | 192 | { |
| 160 | if (!ENGINE_init(impl)) | 193 | if (!ENGINE_init(impl)) |
| 161 | { | 194 | { |
| 162 | EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR); | 195 | EVPerr(EVP_F_EVP_DIGESTINIT, EVP_R_INITIALIZATION_ERROR); |
| 163 | return 0; | 196 | return 0; |
| 164 | } | 197 | } |
| 165 | } | 198 | } |
| @@ -173,7 +206,7 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) | |||
| 173 | if(!d) | 206 | if(!d) |
| 174 | { | 207 | { |
| 175 | /* Same comment from evp_enc.c */ | 208 | /* Same comment from evp_enc.c */ |
| 176 | EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_INITIALIZATION_ERROR); | 209 | EVPerr(EVP_F_EVP_DIGESTINIT, EVP_R_INITIALIZATION_ERROR); |
| 177 | return 0; | 210 | return 0; |
| 178 | } | 211 | } |
| 179 | /* We'll use the ENGINE's private digest definition */ | 212 | /* We'll use the ENGINE's private digest definition */ |
| @@ -189,12 +222,24 @@ int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) | |||
| 189 | else | 222 | else |
| 190 | if(!ctx->digest) | 223 | if(!ctx->digest) |
| 191 | { | 224 | { |
| 192 | EVPerr(EVP_F_EVP_DIGESTINIT_EX,EVP_R_NO_DIGEST_SET); | 225 | EVPerr(EVP_F_EVP_DIGESTINIT, EVP_R_NO_DIGEST_SET); |
| 193 | return 0; | 226 | return 0; |
| 194 | } | 227 | } |
| 195 | #endif | 228 | #endif |
| 196 | if (ctx->digest != type) | 229 | if (ctx->digest != type) |
| 197 | { | 230 | { |
| 231 | #ifdef OPENSSL_FIPS | ||
| 232 | if (FIPS_mode()) | ||
| 233 | { | ||
| 234 | if (!(type->flags & EVP_MD_FLAG_FIPS) | ||
| 235 | && !(ctx->flags & EVP_MD_CTX_FLAG_NON_FIPS_ALLOW)) | ||
| 236 | { | ||
| 237 | EVPerr(EVP_F_EVP_DIGESTINIT, EVP_R_DISABLED_FOR_FIPS); | ||
| 238 | ctx->digest = &bad_md; | ||
| 239 | return 0; | ||
| 240 | } | ||
| 241 | } | ||
| 242 | #endif | ||
| 198 | if (ctx->digest && ctx->digest->ctx_size) | 243 | if (ctx->digest && ctx->digest->ctx_size) |
| 199 | OPENSSL_free(ctx->md_data); | 244 | OPENSSL_free(ctx->md_data); |
| 200 | ctx->digest=type; | 245 | ctx->digest=type; |
| @@ -208,9 +253,9 @@ skip_to_init: | |||
| 208 | } | 253 | } |
| 209 | 254 | ||
| 210 | int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, | 255 | int EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, |
| 211 | size_t count) | 256 | unsigned int count) |
| 212 | { | 257 | { |
| 213 | return ctx->digest->update(ctx,data,count); | 258 | return ctx->digest->update(ctx,data,(unsigned long)count); |
| 214 | } | 259 | } |
| 215 | 260 | ||
| 216 | /* The caller can assume that this removes any secret data from the context */ | 261 | /* The caller can assume that this removes any secret data from the context */ |
| @@ -251,14 +296,14 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) | |||
| 251 | unsigned char *tmp_buf; | 296 | unsigned char *tmp_buf; |
| 252 | if ((in == NULL) || (in->digest == NULL)) | 297 | if ((in == NULL) || (in->digest == NULL)) |
| 253 | { | 298 | { |
| 254 | EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,EVP_R_INPUT_NOT_INITIALIZED); | 299 | EVPerr(EVP_F_EVP_MD_CTX_COPY,EVP_R_INPUT_NOT_INITIALIZED); |
| 255 | return 0; | 300 | return 0; |
| 256 | } | 301 | } |
| 257 | #ifndef OPENSSL_NO_ENGINE | 302 | #ifndef OPENSSL_NO_ENGINE |
| 258 | /* Make sure it's safe to copy a digest context using an ENGINE */ | 303 | /* Make sure it's safe to copy a digest context using an ENGINE */ |
| 259 | if (in->engine && !ENGINE_init(in->engine)) | 304 | if (in->engine && !ENGINE_init(in->engine)) |
| 260 | { | 305 | { |
| 261 | EVPerr(EVP_F_EVP_MD_CTX_COPY_EX,ERR_R_ENGINE_LIB); | 306 | EVPerr(EVP_F_EVP_MD_CTX_COPY,ERR_R_ENGINE_LIB); |
| 262 | return 0; | 307 | return 0; |
| 263 | } | 308 | } |
| 264 | #endif | 309 | #endif |
| @@ -285,7 +330,7 @@ int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) | |||
| 285 | return 1; | 330 | return 1; |
| 286 | } | 331 | } |
| 287 | 332 | ||
| 288 | int EVP_Digest(const void *data, size_t count, | 333 | int EVP_Digest(void *data, unsigned int count, |
| 289 | unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl) | 334 | unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl) |
| 290 | { | 335 | { |
| 291 | EVP_MD_CTX ctx; | 336 | EVP_MD_CTX ctx; |
diff --git a/src/lib/libcrypto/evp/e_acss.c b/src/lib/libcrypto/evp/e_acss.c new file mode 100644 index 0000000000..a16b85c627 --- /dev/null +++ b/src/lib/libcrypto/evp/e_acss.c | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | /* $Id: e_acss.c,v 1.2 2004/02/13 10:05:44 hshoexer Exp $ */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2004 The OpenBSD project | ||
| 4 | * | ||
| 5 | * Permission to use, copy, modify, and distribute this software for any | ||
| 6 | * purpose with or without fee is hereby granted, provided that the above | ||
| 7 | * copyright notice and this permission notice appear in all copies. | ||
| 8 | * | ||
| 9 | * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| 10 | * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| 11 | * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| 12 | * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| 13 | * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| 14 | * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| 15 | * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | ||
| 16 | */ | ||
| 17 | |||
| 18 | #ifndef OPENSSL_NO_ACSS | ||
| 19 | |||
| 20 | #include "cryptlib.h" | ||
| 21 | #include <openssl/evp.h> | ||
| 22 | #include <openssl/objects.h> | ||
| 23 | #include "evp_locl.h" | ||
| 24 | #include <openssl/acss.h> | ||
| 25 | |||
| 26 | typedef struct { | ||
| 27 | ACSS_KEY ks; | ||
| 28 | } EVP_ACSS_KEY; | ||
| 29 | |||
| 30 | #define data(ctx) EVP_C_DATA(EVP_ACSS_KEY,ctx) | ||
| 31 | |||
| 32 | static int acss_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 33 | const unsigned char *iv, int enc); | ||
| 34 | static int acss_ciph(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 35 | const unsigned char *in, unsigned int inl); | ||
| 36 | static int acss_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); | ||
| 37 | static const EVP_CIPHER acss_cipher = { | ||
| 38 | NID_undef, | ||
| 39 | 1,5,0, | ||
| 40 | 0, | ||
| 41 | acss_init_key, | ||
| 42 | acss_ciph, | ||
| 43 | NULL, | ||
| 44 | sizeof(EVP_ACSS_KEY), | ||
| 45 | NULL, | ||
| 46 | NULL, | ||
| 47 | acss_ctrl, | ||
| 48 | NULL | ||
| 49 | }; | ||
| 50 | |||
| 51 | const | ||
| 52 | EVP_CIPHER *EVP_acss(void) | ||
| 53 | { | ||
| 54 | return(&acss_cipher); | ||
| 55 | } | ||
| 56 | |||
| 57 | static int | ||
| 58 | acss_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 59 | const unsigned char *iv, int enc) | ||
| 60 | { | ||
| 61 | acss_setkey(&data(ctx)->ks,key,enc,ACSS_MODE1); | ||
| 62 | return 1; | ||
| 63 | } | ||
| 64 | |||
| 65 | static int | ||
| 66 | acss_ciph(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, | ||
| 67 | unsigned int inl) | ||
| 68 | { | ||
| 69 | acss(&data(ctx)->ks,inl,in,out); | ||
| 70 | return 1; | ||
| 71 | } | ||
| 72 | |||
| 73 | static int | ||
| 74 | acss_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) | ||
| 75 | { | ||
| 76 | switch(type) { | ||
| 77 | case EVP_CTRL_SET_ACSS_MODE: | ||
| 78 | data(ctx)->ks.mode = arg; | ||
| 79 | return 1; | ||
| 80 | |||
| 81 | default: | ||
| 82 | return -1; | ||
| 83 | } | ||
| 84 | } | ||
| 85 | #endif | ||
diff --git a/src/lib/libcrypto/evp/e_aes.c b/src/lib/libcrypto/evp/e_aes.c index bd6c0a3a62..7b67984fa1 100644 --- a/src/lib/libcrypto/evp/e_aes.c +++ b/src/lib/libcrypto/evp/e_aes.c | |||
| @@ -48,12 +48,10 @@ | |||
| 48 | * | 48 | * |
| 49 | */ | 49 | */ |
| 50 | 50 | ||
| 51 | #include <openssl/opensslconf.h> | ||
| 52 | #ifndef OPENSSL_NO_AES | 51 | #ifndef OPENSSL_NO_AES |
| 53 | #include <openssl/evp.h> | 52 | #include <openssl/evp.h> |
| 54 | #include <openssl/err.h> | 53 | #include <openssl/err.h> |
| 55 | #include <string.h> | 54 | #include <string.h> |
| 56 | #include <assert.h> | ||
| 57 | #include <openssl/aes.h> | 55 | #include <openssl/aes.h> |
| 58 | #include "evp_locl.h" | 56 | #include "evp_locl.h" |
| 59 | 57 | ||
| @@ -69,32 +67,32 @@ typedef struct | |||
| 69 | 67 | ||
| 70 | IMPLEMENT_BLOCK_CIPHER(aes_128, ks, AES, EVP_AES_KEY, | 68 | IMPLEMENT_BLOCK_CIPHER(aes_128, ks, AES, EVP_AES_KEY, |
| 71 | NID_aes_128, 16, 16, 16, 128, | 69 | NID_aes_128, 16, 16, 16, 128, |
| 72 | 0, aes_init_key, NULL, | 70 | EVP_CIPH_FLAG_FIPS, aes_init_key, NULL, |
| 73 | EVP_CIPHER_set_asn1_iv, | 71 | EVP_CIPHER_set_asn1_iv, |
| 74 | EVP_CIPHER_get_asn1_iv, | 72 | EVP_CIPHER_get_asn1_iv, |
| 75 | NULL) | 73 | NULL) |
| 76 | IMPLEMENT_BLOCK_CIPHER(aes_192, ks, AES, EVP_AES_KEY, | 74 | IMPLEMENT_BLOCK_CIPHER(aes_192, ks, AES, EVP_AES_KEY, |
| 77 | NID_aes_192, 16, 24, 16, 128, | 75 | NID_aes_192, 16, 24, 16, 128, |
| 78 | 0, aes_init_key, NULL, | 76 | EVP_CIPH_FLAG_FIPS, aes_init_key, NULL, |
| 79 | EVP_CIPHER_set_asn1_iv, | 77 | EVP_CIPHER_set_asn1_iv, |
| 80 | EVP_CIPHER_get_asn1_iv, | 78 | EVP_CIPHER_get_asn1_iv, |
| 81 | NULL) | 79 | NULL) |
| 82 | IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY, | 80 | IMPLEMENT_BLOCK_CIPHER(aes_256, ks, AES, EVP_AES_KEY, |
| 83 | NID_aes_256, 16, 32, 16, 128, | 81 | NID_aes_256, 16, 32, 16, 128, |
| 84 | 0, aes_init_key, NULL, | 82 | EVP_CIPH_FLAG_FIPS, aes_init_key, NULL, |
| 85 | EVP_CIPHER_set_asn1_iv, | 83 | EVP_CIPHER_set_asn1_iv, |
| 86 | EVP_CIPHER_get_asn1_iv, | 84 | EVP_CIPHER_get_asn1_iv, |
| 87 | NULL) | 85 | NULL) |
| 88 | 86 | ||
| 89 | #define IMPLEMENT_AES_CFBR(ksize,cbits) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16) | 87 | #define IMPLEMENT_AES_CFBR(ksize,cbits,flags) IMPLEMENT_CFBR(aes,AES,EVP_AES_KEY,ks,ksize,cbits,16,flags) |
| 90 | 88 | ||
| 91 | IMPLEMENT_AES_CFBR(128,1) | 89 | IMPLEMENT_AES_CFBR(128,1,EVP_CIPH_FLAG_FIPS) |
| 92 | IMPLEMENT_AES_CFBR(192,1) | 90 | IMPLEMENT_AES_CFBR(192,1,EVP_CIPH_FLAG_FIPS) |
| 93 | IMPLEMENT_AES_CFBR(256,1) | 91 | IMPLEMENT_AES_CFBR(256,1,EVP_CIPH_FLAG_FIPS) |
| 94 | 92 | ||
| 95 | IMPLEMENT_AES_CFBR(128,8) | 93 | IMPLEMENT_AES_CFBR(128,8,EVP_CIPH_FLAG_FIPS) |
| 96 | IMPLEMENT_AES_CFBR(192,8) | 94 | IMPLEMENT_AES_CFBR(192,8,EVP_CIPH_FLAG_FIPS) |
| 97 | IMPLEMENT_AES_CFBR(256,8) | 95 | IMPLEMENT_AES_CFBR(256,8,EVP_CIPH_FLAG_FIPS) |
| 98 | 96 | ||
| 99 | static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 97 | static int aes_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 100 | const unsigned char *iv, int enc) | 98 | const unsigned char *iv, int enc) |
diff --git a/src/lib/libcrypto/evp/e_bf.c b/src/lib/libcrypto/evp/e_bf.c index cc224e5363..e74337567b 100644 --- a/src/lib/libcrypto/evp/e_bf.c +++ b/src/lib/libcrypto/evp/e_bf.c | |||
| @@ -56,9 +56,9 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_BF | ||
| 59 | #include <stdio.h> | 60 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | #ifndef OPENSSL_NO_BF | ||
| 62 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 63 | #include "evp_locl.h" | 63 | #include "evp_locl.h" |
| 64 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
diff --git a/src/lib/libcrypto/evp/e_cast.c b/src/lib/libcrypto/evp/e_cast.c index d77bcd9298..3400fef187 100644 --- a/src/lib/libcrypto/evp/e_cast.c +++ b/src/lib/libcrypto/evp/e_cast.c | |||
| @@ -56,10 +56,10 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_CAST | ||
| 60 | |||
| 59 | #include <stdio.h> | 61 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_CAST | ||
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 65 | #include "evp_locl.h" | 65 | #include "evp_locl.h" |
diff --git a/src/lib/libcrypto/evp/e_des.c b/src/lib/libcrypto/evp/e_des.c index 856323648c..46e2899825 100644 --- a/src/lib/libcrypto/evp/e_des.c +++ b/src/lib/libcrypto/evp/e_des.c | |||
| @@ -63,11 +63,9 @@ | |||
| 63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 64 | #include "evp_locl.h" | 64 | #include "evp_locl.h" |
| 65 | #include <openssl/des.h> | 65 | #include <openssl/des.h> |
| 66 | #include <openssl/rand.h> | ||
| 67 | 66 | ||
| 68 | static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 67 | static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 69 | const unsigned char *iv, int enc); | 68 | const unsigned char *iv, int enc); |
| 70 | static int des_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr); | ||
| 71 | 69 | ||
| 72 | /* Because of various casts and different names can't use IMPLEMENT_BLOCK_CIPHER */ | 70 | /* Because of various casts and different names can't use IMPLEMENT_BLOCK_CIPHER */ |
| 73 | 71 | ||
| @@ -129,48 +127,28 @@ static int des_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
| 129 | } | 127 | } |
| 130 | 128 | ||
| 131 | BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64, | 129 | BLOCK_CIPHER_defs(des, DES_key_schedule, NID_des, 8, 8, 8, 64, |
| 132 | EVP_CIPH_RAND_KEY, des_init_key, NULL, | 130 | EVP_CIPH_FLAG_FIPS, des_init_key, NULL, |
| 133 | EVP_CIPHER_set_asn1_iv, | 131 | EVP_CIPHER_set_asn1_iv, |
| 134 | EVP_CIPHER_get_asn1_iv, | 132 | EVP_CIPHER_get_asn1_iv, |
| 135 | des_ctrl) | 133 | NULL) |
| 136 | 134 | ||
| 137 | BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1, | 135 | BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,1, |
| 138 | EVP_CIPH_RAND_KEY, des_init_key,NULL, | 136 | EVP_CIPH_FLAG_FIPS,des_init_key,NULL, |
| 139 | EVP_CIPHER_set_asn1_iv, | 137 | EVP_CIPHER_set_asn1_iv, |
| 140 | EVP_CIPHER_get_asn1_iv,des_ctrl) | 138 | EVP_CIPHER_get_asn1_iv,NULL) |
| 141 | 139 | ||
| 142 | BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8, | 140 | BLOCK_CIPHER_def_cfb(des,DES_key_schedule,NID_des,8,8,8, |
| 143 | EVP_CIPH_RAND_KEY,des_init_key,NULL, | 141 | EVP_CIPH_FLAG_FIPS,des_init_key,NULL, |
| 144 | EVP_CIPHER_set_asn1_iv, | 142 | EVP_CIPHER_set_asn1_iv, |
| 145 | EVP_CIPHER_get_asn1_iv,des_ctrl) | 143 | EVP_CIPHER_get_asn1_iv,NULL) |
| 146 | 144 | ||
| 147 | static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 145 | static int des_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 148 | const unsigned char *iv, int enc) | 146 | const unsigned char *iv, int enc) |
| 149 | { | 147 | { |
| 150 | DES_cblock *deskey = (DES_cblock *)key; | 148 | DES_cblock *deskey = (DES_cblock *)key; |
| 151 | #ifdef EVP_CHECK_DES_KEY | 149 | |
| 152 | if(DES_set_key_checked(deskey,ctx->cipher_data) != 0) | ||
| 153 | return 0; | ||
| 154 | #else | ||
| 155 | DES_set_key_unchecked(deskey,ctx->cipher_data); | 150 | DES_set_key_unchecked(deskey,ctx->cipher_data); |
| 156 | #endif | ||
| 157 | return 1; | 151 | return 1; |
| 158 | } | 152 | } |
| 159 | 153 | ||
| 160 | static int des_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | ||
| 161 | { | ||
| 162 | |||
| 163 | switch(type) | ||
| 164 | { | ||
| 165 | case EVP_CTRL_RAND_KEY: | ||
| 166 | if (RAND_bytes(ptr, 8) <= 0) | ||
| 167 | return 0; | ||
| 168 | DES_set_odd_parity((DES_cblock *)ptr); | ||
| 169 | return 1; | ||
| 170 | |||
| 171 | default: | ||
| 172 | return -1; | ||
| 173 | } | ||
| 174 | } | ||
| 175 | |||
| 176 | #endif | 154 | #endif |
diff --git a/src/lib/libcrypto/evp/e_des3.c b/src/lib/libcrypto/evp/e_des3.c index ac148efab2..677322bf02 100644 --- a/src/lib/libcrypto/evp/e_des3.c +++ b/src/lib/libcrypto/evp/e_des3.c | |||
| @@ -63,7 +63,6 @@ | |||
| 63 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 64 | #include "evp_locl.h" | 64 | #include "evp_locl.h" |
| 65 | #include <openssl/des.h> | 65 | #include <openssl/des.h> |
| 66 | #include <openssl/rand.h> | ||
| 67 | 66 | ||
| 68 | static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 67 | static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 69 | const unsigned char *iv,int enc); | 68 | const unsigned char *iv,int enc); |
| @@ -71,8 +70,6 @@ static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
| 71 | static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 70 | static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 72 | const unsigned char *iv,int enc); | 71 | const unsigned char *iv,int enc); |
| 73 | 72 | ||
| 74 | static int des3_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr); | ||
| 75 | |||
| 76 | typedef struct | 73 | typedef struct |
| 77 | { | 74 | { |
| 78 | DES_key_schedule ks1;/* key schedule */ | 75 | DES_key_schedule ks1;/* key schedule */ |
| @@ -88,8 +85,7 @@ static int des_ede_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
| 88 | const unsigned char *in, unsigned int inl) | 85 | const unsigned char *in, unsigned int inl) |
| 89 | { | 86 | { |
| 90 | BLOCK_CIPHER_ecb_loop() | 87 | BLOCK_CIPHER_ecb_loop() |
| 91 | DES_ecb3_encrypt((const_DES_cblock *)(in + i), | 88 | DES_ecb3_encrypt(in + i,out + i, |
| 92 | (DES_cblock *)(out + i), | ||
| 93 | &data(ctx)->ks1, &data(ctx)->ks2, | 89 | &data(ctx)->ks1, &data(ctx)->ks2, |
| 94 | &data(ctx)->ks3, | 90 | &data(ctx)->ks3, |
| 95 | ctx->encrypt); | 91 | ctx->encrypt); |
| @@ -164,10 +160,10 @@ static int des_ede3_cfb8_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
| 164 | } | 160 | } |
| 165 | 161 | ||
| 166 | BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64, | 162 | BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64, |
| 167 | EVP_CIPH_RAND_KEY, des_ede_init_key, NULL, | 163 | EVP_CIPH_FLAG_FIPS, des_ede_init_key, NULL, |
| 168 | EVP_CIPHER_set_asn1_iv, | 164 | EVP_CIPHER_set_asn1_iv, |
| 169 | EVP_CIPHER_get_asn1_iv, | 165 | EVP_CIPHER_get_asn1_iv, |
| 170 | des3_ctrl) | 166 | NULL) |
| 171 | 167 | ||
| 172 | #define des_ede3_cfb64_cipher des_ede_cfb64_cipher | 168 | #define des_ede3_cfb64_cipher des_ede_cfb64_cipher |
| 173 | #define des_ede3_ofb_cipher des_ede_ofb_cipher | 169 | #define des_ede3_ofb_cipher des_ede_ofb_cipher |
| @@ -175,35 +171,28 @@ BLOCK_CIPHER_defs(des_ede, DES_EDE_KEY, NID_des_ede, 8, 16, 8, 64, | |||
| 175 | #define des_ede3_ecb_cipher des_ede_ecb_cipher | 171 | #define des_ede3_ecb_cipher des_ede_ecb_cipher |
| 176 | 172 | ||
| 177 | BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64, | 173 | BLOCK_CIPHER_defs(des_ede3, DES_EDE_KEY, NID_des_ede3, 8, 24, 8, 64, |
| 178 | EVP_CIPH_RAND_KEY, des_ede3_init_key, NULL, | 174 | EVP_CIPH_FLAG_FIPS, des_ede3_init_key, NULL, |
| 179 | EVP_CIPHER_set_asn1_iv, | 175 | EVP_CIPHER_set_asn1_iv, |
| 180 | EVP_CIPHER_get_asn1_iv, | 176 | EVP_CIPHER_get_asn1_iv, |
| 181 | des3_ctrl) | 177 | NULL) |
| 182 | 178 | ||
| 183 | BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1, | 179 | BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,1, |
| 184 | EVP_CIPH_RAND_KEY, des_ede3_init_key,NULL, | 180 | EVP_CIPH_FLAG_FIPS, des_ede3_init_key,NULL, |
| 185 | EVP_CIPHER_set_asn1_iv, | 181 | EVP_CIPHER_set_asn1_iv, |
| 186 | EVP_CIPHER_get_asn1_iv, | 182 | EVP_CIPHER_get_asn1_iv,NULL) |
| 187 | des3_ctrl) | ||
| 188 | 183 | ||
| 189 | BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8, | 184 | BLOCK_CIPHER_def_cfb(des_ede3,DES_EDE_KEY,NID_des_ede3,24,8,8, |
| 190 | EVP_CIPH_RAND_KEY, des_ede3_init_key,NULL, | 185 | EVP_CIPH_FLAG_FIPS, des_ede3_init_key,NULL, |
| 191 | EVP_CIPHER_set_asn1_iv, | 186 | EVP_CIPHER_set_asn1_iv, |
| 192 | EVP_CIPHER_get_asn1_iv, | 187 | EVP_CIPHER_get_asn1_iv,NULL) |
| 193 | des3_ctrl) | ||
| 194 | 188 | ||
| 195 | static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | 189 | static int des_ede_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, |
| 196 | const unsigned char *iv, int enc) | 190 | const unsigned char *iv, int enc) |
| 197 | { | 191 | { |
| 198 | DES_cblock *deskey = (DES_cblock *)key; | 192 | DES_cblock *deskey = (DES_cblock *)key; |
| 199 | #ifdef EVP_CHECK_DES_KEY | 193 | |
| 200 | if (DES_set_key_checked(&deskey[0],&data(ctx)->ks1) | ||
| 201 | !! DES_set_key_checked(&deskey[1],&data(ctx)->ks2)) | ||
| 202 | return 0; | ||
| 203 | #else | ||
| 204 | DES_set_key_unchecked(&deskey[0],&data(ctx)->ks1); | 194 | DES_set_key_unchecked(&deskey[0],&data(ctx)->ks1); |
| 205 | DES_set_key_unchecked(&deskey[1],&data(ctx)->ks2); | 195 | DES_set_key_unchecked(&deskey[1],&data(ctx)->ks2); |
| 206 | #endif | ||
| 207 | memcpy(&data(ctx)->ks3,&data(ctx)->ks1, | 196 | memcpy(&data(ctx)->ks3,&data(ctx)->ks1, |
| 208 | sizeof(data(ctx)->ks1)); | 197 | sizeof(data(ctx)->ks1)); |
| 209 | return 1; | 198 | return 1; |
| @@ -224,39 +213,11 @@ static int des_ede3_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | |||
| 224 | } | 213 | } |
| 225 | #endif /* KSSL_DEBUG */ | 214 | #endif /* KSSL_DEBUG */ |
| 226 | 215 | ||
| 227 | #ifdef EVP_CHECK_DES_KEY | ||
| 228 | if (DES_set_key_checked(&deskey[0],&data(ctx)->ks1) | ||
| 229 | || DES_set_key_checked(&deskey[1],&data(ctx)->ks2) | ||
| 230 | || DES_set_key_checked(&deskey[2],&data(ctx)->ks3)) | ||
| 231 | return 0; | ||
| 232 | #else | ||
| 233 | DES_set_key_unchecked(&deskey[0],&data(ctx)->ks1); | 216 | DES_set_key_unchecked(&deskey[0],&data(ctx)->ks1); |
| 234 | DES_set_key_unchecked(&deskey[1],&data(ctx)->ks2); | 217 | DES_set_key_unchecked(&deskey[1],&data(ctx)->ks2); |
| 235 | DES_set_key_unchecked(&deskey[2],&data(ctx)->ks3); | 218 | DES_set_key_unchecked(&deskey[2],&data(ctx)->ks3); |
| 236 | #endif | ||
| 237 | return 1; | ||
| 238 | } | ||
| 239 | 219 | ||
| 240 | static int des3_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | 220 | return 1; |
| 241 | { | ||
| 242 | |||
| 243 | DES_cblock *deskey = ptr; | ||
| 244 | |||
| 245 | switch(type) | ||
| 246 | { | ||
| 247 | case EVP_CTRL_RAND_KEY: | ||
| 248 | if (RAND_bytes(ptr, c->key_len) <= 0) | ||
| 249 | return 0; | ||
| 250 | DES_set_odd_parity(deskey); | ||
| 251 | if (c->key_len >= 16) | ||
| 252 | DES_set_odd_parity(deskey + 1); | ||
| 253 | if (c->key_len >= 24) | ||
| 254 | DES_set_odd_parity(deskey + 2); | ||
| 255 | return 1; | ||
| 256 | |||
| 257 | default: | ||
| 258 | return -1; | ||
| 259 | } | ||
| 260 | } | 221 | } |
| 261 | 222 | ||
| 262 | const EVP_CIPHER *EVP_des_ede(void) | 223 | const EVP_CIPHER *EVP_des_ede(void) |
diff --git a/src/lib/libcrypto/evp/e_dsa.c b/src/lib/libcrypto/evp/e_dsa.c new file mode 100644 index 0000000000..b96f2738b3 --- /dev/null +++ b/src/lib/libcrypto/evp/e_dsa.c | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | /* crypto/evp/e_dsa.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 | #include <openssl/x509.h> | ||
| 64 | |||
| 65 | static EVP_PKEY_METHOD dss_method= | ||
| 66 | { | ||
| 67 | DSA_sign, | ||
| 68 | DSA_verify, | ||
| 69 | {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3,NULL}, | ||
| 70 | }; | ||
| 71 | |||
diff --git a/src/lib/libcrypto/evp/e_idea.c b/src/lib/libcrypto/evp/e_idea.c index 48c33a774a..b9efa75ae7 100644 --- a/src/lib/libcrypto/evp/e_idea.c +++ b/src/lib/libcrypto/evp/e_idea.c | |||
| @@ -56,10 +56,10 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_IDEA | ||
| 60 | |||
| 59 | #include <stdio.h> | 61 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 62 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_IDEA | ||
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 65 | #include "evp_locl.h" | 65 | #include "evp_locl.h" |
diff --git a/src/lib/libcrypto/evp/e_null.c b/src/lib/libcrypto/evp/e_null.c index 5205259f18..a84b0f14b1 100644 --- a/src/lib/libcrypto/evp/e_null.c +++ b/src/lib/libcrypto/evp/e_null.c | |||
| @@ -69,14 +69,13 @@ static const EVP_CIPHER n_cipher= | |||
| 69 | { | 69 | { |
| 70 | NID_undef, | 70 | NID_undef, |
| 71 | 1,0,0, | 71 | 1,0,0, |
| 72 | 0, | 72 | EVP_CIPH_FLAG_FIPS, |
| 73 | null_init_key, | 73 | null_init_key, |
| 74 | null_cipher, | 74 | null_cipher, |
| 75 | NULL, | 75 | NULL, |
| 76 | 0, | 76 | 0, |
| 77 | NULL, | 77 | NULL, |
| 78 | NULL, | 78 | NULL, |
| 79 | NULL, | ||
| 80 | NULL | 79 | NULL |
| 81 | }; | 80 | }; |
| 82 | 81 | ||
| @@ -96,7 +95,7 @@ static int null_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | |||
| 96 | const unsigned char *in, unsigned int inl) | 95 | const unsigned char *in, unsigned int inl) |
| 97 | { | 96 | { |
| 98 | if (in != out) | 97 | if (in != out) |
| 99 | memcpy((char *)out,(const char *)in,(size_t)inl); | 98 | memcpy((char *)out,(char *)in,(int)inl); |
| 100 | return 1; | 99 | return 1; |
| 101 | } | 100 | } |
| 102 | 101 | ||
diff --git a/src/lib/libcrypto/evp/e_rc2.c b/src/lib/libcrypto/evp/e_rc2.c index d37726ffae..d42cbfd17e 100644 --- a/src/lib/libcrypto/evp/e_rc2.c +++ b/src/lib/libcrypto/evp/e_rc2.c | |||
| @@ -56,11 +56,10 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | |||
| 62 | #ifndef OPENSSL_NO_RC2 | 59 | #ifndef OPENSSL_NO_RC2 |
| 63 | 60 | ||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 64 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 65 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 66 | #include "evp_locl.h" | 65 | #include "evp_locl.h" |
| @@ -168,17 +167,16 @@ static int rc2_magic_to_meth(int i) | |||
| 168 | static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | 167 | static int rc2_get_asn1_type_and_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) |
| 169 | { | 168 | { |
| 170 | long num=0; | 169 | long num=0; |
| 171 | int i=0; | 170 | int i=0,l; |
| 172 | int key_bits; | 171 | int key_bits; |
| 173 | unsigned int l; | ||
| 174 | unsigned char iv[EVP_MAX_IV_LENGTH]; | 172 | unsigned char iv[EVP_MAX_IV_LENGTH]; |
| 175 | 173 | ||
| 176 | if (type != NULL) | 174 | if (type != NULL) |
| 177 | { | 175 | { |
| 178 | l=EVP_CIPHER_CTX_iv_length(c); | 176 | l=EVP_CIPHER_CTX_iv_length(c); |
| 179 | OPENSSL_assert(l <= sizeof(iv)); | 177 | OPENSSL_assert(l <= sizeof iv); |
| 180 | i=ASN1_TYPE_get_int_octetstring(type,&num,iv,l); | 178 | i=ASN1_TYPE_get_int_octetstring(type,&num,iv,l); |
| 181 | if (i != (int)l) | 179 | if (i != l) |
| 182 | return(-1); | 180 | return(-1); |
| 183 | key_bits =rc2_magic_to_meth((int)num); | 181 | key_bits =rc2_magic_to_meth((int)num); |
| 184 | if (!key_bits) | 182 | if (!key_bits) |
diff --git a/src/lib/libcrypto/evp/e_rc4.c b/src/lib/libcrypto/evp/e_rc4.c index 67af850bea..8aa70585b9 100644 --- a/src/lib/libcrypto/evp/e_rc4.c +++ b/src/lib/libcrypto/evp/e_rc4.c | |||
| @@ -56,13 +56,13 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | |||
| 62 | #ifndef OPENSSL_NO_RC4 | 59 | #ifndef OPENSSL_NO_RC4 |
| 63 | 60 | ||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 64 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 65 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 65 | #include "evp_locl.h" | ||
| 66 | #include <openssl/rc4.h> | 66 | #include <openssl/rc4.h> |
| 67 | 67 | ||
| 68 | /* FIXME: surely this is available elsewhere? */ | 68 | /* FIXME: surely this is available elsewhere? */ |
| @@ -90,7 +90,6 @@ static const EVP_CIPHER r4_cipher= | |||
| 90 | sizeof(EVP_RC4_KEY), | 90 | sizeof(EVP_RC4_KEY), |
| 91 | NULL, | 91 | NULL, |
| 92 | NULL, | 92 | NULL, |
| 93 | NULL, | ||
| 94 | NULL | 93 | NULL |
| 95 | }; | 94 | }; |
| 96 | 95 | ||
| @@ -105,7 +104,6 @@ static const EVP_CIPHER r4_40_cipher= | |||
| 105 | sizeof(EVP_RC4_KEY), | 104 | sizeof(EVP_RC4_KEY), |
| 106 | NULL, | 105 | NULL, |
| 107 | NULL, | 106 | NULL, |
| 108 | NULL, | ||
| 109 | NULL | 107 | NULL |
| 110 | }; | 108 | }; |
| 111 | 109 | ||
diff --git a/src/lib/libcrypto/evp/e_rc5.c b/src/lib/libcrypto/evp/e_rc5.c new file mode 100644 index 0000000000..3c7713b181 --- /dev/null +++ b/src/lib/libcrypto/evp/e_rc5.c | |||
| @@ -0,0 +1,125 @@ | |||
| 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 OPENSSL_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 | #include <openssl/rc5.h> | ||
| 67 | |||
| 68 | static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 69 | const unsigned char *iv,int enc); | ||
| 70 | static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr); | ||
| 71 | |||
| 72 | typedef struct | ||
| 73 | { | ||
| 74 | int rounds; /* number of rounds */ | ||
| 75 | RC5_32_KEY ks; /* key schedule */ | ||
| 76 | } EVP_RC5_KEY; | ||
| 77 | |||
| 78 | #define data(ctx) EVP_C_DATA(EVP_RC5_KEY,ctx) | ||
| 79 | |||
| 80 | IMPLEMENT_BLOCK_CIPHER(rc5_32_12_16, ks, RC5_32, EVP_RC5_KEY, NID_rc5, | ||
| 81 | 8, RC5_32_KEY_LENGTH, 8, 64, | ||
| 82 | EVP_CIPH_VARIABLE_LENGTH | EVP_CIPH_CTRL_INIT, | ||
| 83 | r_32_12_16_init_key, NULL, | ||
| 84 | NULL, NULL, rc5_ctrl) | ||
| 85 | |||
| 86 | static int rc5_ctrl(EVP_CIPHER_CTX *c, int type, int arg, void *ptr) | ||
| 87 | { | ||
| 88 | switch(type) | ||
| 89 | { | ||
| 90 | case EVP_CTRL_INIT: | ||
| 91 | data(c)->rounds = RC5_12_ROUNDS; | ||
| 92 | return 1; | ||
| 93 | |||
| 94 | case EVP_CTRL_GET_RC5_ROUNDS: | ||
| 95 | *(int *)ptr = data(c)->rounds; | ||
| 96 | return 1; | ||
| 97 | |||
| 98 | case EVP_CTRL_SET_RC5_ROUNDS: | ||
| 99 | switch(arg) | ||
| 100 | { | ||
| 101 | case RC5_8_ROUNDS: | ||
| 102 | case RC5_12_ROUNDS: | ||
| 103 | case RC5_16_ROUNDS: | ||
| 104 | data(c)->rounds = arg; | ||
| 105 | return 1; | ||
| 106 | |||
| 107 | default: | ||
| 108 | EVPerr(EVP_F_RC5_CTRL, EVP_R_UNSUPORTED_NUMBER_OF_ROUNDS); | ||
| 109 | return 0; | ||
| 110 | } | ||
| 111 | |||
| 112 | default: | ||
| 113 | return -1; | ||
| 114 | } | ||
| 115 | } | ||
| 116 | |||
| 117 | static int r_32_12_16_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 118 | const unsigned char *iv, int enc) | ||
| 119 | { | ||
| 120 | RC5_32_set_key(&data(ctx)->ks,EVP_CIPHER_CTX_key_length(ctx), | ||
| 121 | key,data(ctx)->rounds); | ||
| 122 | return 1; | ||
| 123 | } | ||
| 124 | |||
| 125 | #endif | ||
diff --git a/src/lib/libcrypto/evp/e_seed.c b/src/lib/libcrypto/evp/e_seed.c new file mode 100644 index 0000000000..8c1ec0d43a --- /dev/null +++ b/src/lib/libcrypto/evp/e_seed.c | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | /* crypto/evp/e_seed.c -*- mode:C; c-file-style: "eay" -*- */ | ||
| 2 | /* ==================================================================== | ||
| 3 | * Copyright (c) 2007 The OpenSSL Project. All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * | ||
| 9 | * 1. Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * | ||
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer in | ||
| 14 | * the documentation and/or other materials provided with the | ||
| 15 | * distribution. | ||
| 16 | * | ||
| 17 | * 3. All advertising materials mentioning features or use of this | ||
| 18 | * software must display the following acknowledgment: | ||
| 19 | * "This product includes software developed by the OpenSSL Project | ||
| 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 21 | * | ||
| 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 23 | * endorse or promote products derived from this software without | ||
| 24 | * prior written permission. For written permission, please contact | ||
| 25 | * openssl-core@openssl.org. | ||
| 26 | * | ||
| 27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 28 | * nor may "OpenSSL" appear in their names without prior written | ||
| 29 | * permission of the OpenSSL Project. | ||
| 30 | * | ||
| 31 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 32 | * acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 35 | * | ||
| 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 48 | * ==================================================================== | ||
| 49 | * | ||
| 50 | * This product includes cryptographic software written by Eric Young | ||
| 51 | * (eay@cryptsoft.com). This product includes software written by Tim | ||
| 52 | * Hudson (tjh@cryptsoft.com). | ||
| 53 | * | ||
| 54 | */ | ||
| 55 | |||
| 56 | #include <openssl/opensslconf.h> | ||
| 57 | #include <openssl/evp.h> | ||
| 58 | #include <openssl/err.h> | ||
| 59 | #include <string.h> | ||
| 60 | #include <assert.h> | ||
| 61 | #ifndef OPENSSL_NO_SEED | ||
| 62 | #include <openssl/seed.h> | ||
| 63 | #include "evp_locl.h" | ||
| 64 | |||
| 65 | static int seed_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, const unsigned char *iv, int enc); | ||
| 66 | |||
| 67 | typedef struct | ||
| 68 | { | ||
| 69 | SEED_KEY_SCHEDULE ks; | ||
| 70 | } EVP_SEED_KEY; | ||
| 71 | |||
| 72 | IMPLEMENT_BLOCK_CIPHER(seed, ks, SEED, EVP_SEED_KEY, NID_seed, | ||
| 73 | 16, 16, 16, 128, | ||
| 74 | 0, seed_init_key, 0, 0, 0, 0) | ||
| 75 | |||
| 76 | static int seed_init_key(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 77 | const unsigned char *iv, int enc) | ||
| 78 | { | ||
| 79 | SEED_set_key(key, ctx->cipher_data); | ||
| 80 | return 1; | ||
| 81 | } | ||
| 82 | |||
| 83 | #endif | ||
diff --git a/src/lib/libcrypto/evp/e_xcbc_d.c b/src/lib/libcrypto/evp/e_xcbc_d.c index 8832da2433..a6f849e93d 100644 --- a/src/lib/libcrypto/evp/e_xcbc_d.c +++ b/src/lib/libcrypto/evp/e_xcbc_d.c | |||
| @@ -56,11 +56,9 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_DES | ||
| 59 | #include <stdio.h> | 60 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_DES | ||
| 63 | |||
| 64 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 65 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 66 | #include <openssl/des.h> | 64 | #include <openssl/des.h> |
| @@ -91,7 +89,6 @@ static const EVP_CIPHER d_xcbc_cipher= | |||
| 91 | sizeof(DESX_CBC_KEY), | 89 | sizeof(DESX_CBC_KEY), |
| 92 | EVP_CIPHER_set_asn1_iv, | 90 | EVP_CIPHER_set_asn1_iv, |
| 93 | EVP_CIPHER_get_asn1_iv, | 91 | EVP_CIPHER_get_asn1_iv, |
| 94 | NULL, | ||
| 95 | NULL | 92 | NULL |
| 96 | }; | 93 | }; |
| 97 | 94 | ||
diff --git a/src/lib/libcrypto/evp/encode.c b/src/lib/libcrypto/evp/encode.c index 5921f0d710..33e540087d 100644 --- a/src/lib/libcrypto/evp/encode.c +++ b/src/lib/libcrypto/evp/encode.c | |||
| @@ -129,14 +129,14 @@ void EVP_EncodeInit(EVP_ENCODE_CTX *ctx) | |||
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | 131 | void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, |
| 132 | const unsigned char *in, int inl) | 132 | unsigned char *in, int inl) |
| 133 | { | 133 | { |
| 134 | int i,j; | 134 | int i,j; |
| 135 | unsigned int total=0; | 135 | unsigned int total=0; |
| 136 | 136 | ||
| 137 | *outl=0; | 137 | *outl=0; |
| 138 | if (inl == 0) return; | 138 | if (inl == 0) return; |
| 139 | OPENSSL_assert(ctx->length <= (int)sizeof(ctx->enc_data)); | 139 | OPENSSL_assert(ctx->length <= sizeof ctx->enc_data); |
| 140 | if ((ctx->num+inl) < ctx->length) | 140 | if ((ctx->num+inl) < ctx->length) |
| 141 | { | 141 | { |
| 142 | memcpy(&(ctx->enc_data[ctx->num]),in,inl); | 142 | memcpy(&(ctx->enc_data[ctx->num]),in,inl); |
| @@ -233,7 +233,7 @@ void EVP_DecodeInit(EVP_ENCODE_CTX *ctx) | |||
| 233 | * 1 for full line | 233 | * 1 for full line |
| 234 | */ | 234 | */ |
| 235 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | 235 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, |
| 236 | const unsigned char *in, int inl) | 236 | unsigned char *in, int inl) |
| 237 | { | 237 | { |
| 238 | int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,tmp2,exp_nl; | 238 | int seof= -1,eof=0,rv= -1,ret=0,i,v,tmp,n,ln,tmp2,exp_nl; |
| 239 | unsigned char *d; | 239 | unsigned char *d; |
| @@ -259,7 +259,7 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
| 259 | /* only save the good data :-) */ | 259 | /* only save the good data :-) */ |
| 260 | if (!B64_NOT_BASE64(v)) | 260 | if (!B64_NOT_BASE64(v)) |
| 261 | { | 261 | { |
| 262 | OPENSSL_assert(n < (int)sizeof(ctx->enc_data)); | 262 | OPENSSL_assert(n < sizeof ctx->enc_data); |
| 263 | d[n++]=tmp; | 263 | d[n++]=tmp; |
| 264 | ln++; | 264 | ln++; |
| 265 | } | 265 | } |
| @@ -323,8 +323,8 @@ int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx, unsigned char *out, int *outl, | |||
| 323 | if (n > 0) | 323 | if (n > 0) |
| 324 | { | 324 | { |
| 325 | v=EVP_DecodeBlock(out,d,n); | 325 | v=EVP_DecodeBlock(out,d,n); |
| 326 | n=0; | ||
| 327 | if (v < 0) { rv=0; goto end; } | 326 | if (v < 0) { rv=0; goto end; } |
| 327 | n=0; | ||
| 328 | ret+=(v-eof); | 328 | ret+=(v-eof); |
| 329 | } | 329 | } |
| 330 | else | 330 | else |
diff --git a/src/lib/libcrypto/evp/evp.h b/src/lib/libcrypto/evp/evp.h index bdd3b7ecaa..f29e0ba8f0 100644 --- a/src/lib/libcrypto/evp/evp.h +++ b/src/lib/libcrypto/evp/evp.h | |||
| @@ -75,6 +75,10 @@ | |||
| 75 | #include <openssl/bio.h> | 75 | #include <openssl/bio.h> |
| 76 | #endif | 76 | #endif |
| 77 | 77 | ||
| 78 | #ifdef OPENSSL_FIPS | ||
| 79 | #include <openssl/fips.h> | ||
| 80 | #endif | ||
| 81 | |||
| 78 | /* | 82 | /* |
| 79 | #define EVP_RC2_KEY_SIZE 16 | 83 | #define EVP_RC2_KEY_SIZE 16 |
| 80 | #define EVP_RC4_KEY_SIZE 16 | 84 | #define EVP_RC4_KEY_SIZE 16 |
| @@ -82,7 +86,7 @@ | |||
| 82 | #define EVP_CAST5_KEY_SIZE 16 | 86 | #define EVP_CAST5_KEY_SIZE 16 |
| 83 | #define EVP_RC5_32_12_16_KEY_SIZE 16 | 87 | #define EVP_RC5_32_12_16_KEY_SIZE 16 |
| 84 | */ | 88 | */ |
| 85 | #define EVP_MAX_MD_SIZE 64 /* longest known is SHA512 */ | 89 | #define EVP_MAX_MD_SIZE 64 /* longest known SHA512 */ |
| 86 | #define EVP_MAX_KEY_LENGTH 32 | 90 | #define EVP_MAX_KEY_LENGTH 32 |
| 87 | #define EVP_MAX_IV_LENGTH 16 | 91 | #define EVP_MAX_IV_LENGTH 16 |
| 88 | #define EVP_MAX_BLOCK_LENGTH 32 | 92 | #define EVP_MAX_BLOCK_LENGTH 32 |
| @@ -96,13 +100,11 @@ | |||
| 96 | #define EVP_PK_RSA 0x0001 | 100 | #define EVP_PK_RSA 0x0001 |
| 97 | #define EVP_PK_DSA 0x0002 | 101 | #define EVP_PK_DSA 0x0002 |
| 98 | #define EVP_PK_DH 0x0004 | 102 | #define EVP_PK_DH 0x0004 |
| 99 | #define EVP_PK_EC 0x0008 | ||
| 100 | #define EVP_PKT_SIGN 0x0010 | 103 | #define EVP_PKT_SIGN 0x0010 |
| 101 | #define EVP_PKT_ENC 0x0020 | 104 | #define EVP_PKT_ENC 0x0020 |
| 102 | #define EVP_PKT_EXCH 0x0040 | 105 | #define EVP_PKT_EXCH 0x0040 |
| 103 | #define EVP_PKS_RSA 0x0100 | 106 | #define EVP_PKS_RSA 0x0100 |
| 104 | #define EVP_PKS_DSA 0x0200 | 107 | #define EVP_PKS_DSA 0x0200 |
| 105 | #define EVP_PKS_EC 0x0400 | ||
| 106 | #define EVP_PKT_EXP 0x1000 /* <= 512 bit key */ | 108 | #define EVP_PKT_EXP 0x1000 /* <= 512 bit key */ |
| 107 | 109 | ||
| 108 | #define EVP_PKEY_NONE NID_undef | 110 | #define EVP_PKEY_NONE NID_undef |
| @@ -114,7 +116,6 @@ | |||
| 114 | #define EVP_PKEY_DSA3 NID_dsaWithSHA1 | 116 | #define EVP_PKEY_DSA3 NID_dsaWithSHA1 |
| 115 | #define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 | 117 | #define EVP_PKEY_DSA4 NID_dsaWithSHA1_2 |
| 116 | #define EVP_PKEY_DH NID_dhKeyAgreement | 118 | #define EVP_PKEY_DH NID_dhKeyAgreement |
| 117 | #define EVP_PKEY_EC NID_X9_62_id_ecPublicKey | ||
| 118 | 119 | ||
| 119 | #ifdef __cplusplus | 120 | #ifdef __cplusplus |
| 120 | extern "C" { | 121 | extern "C" { |
| @@ -139,9 +140,6 @@ struct evp_pkey_st | |||
| 139 | #ifndef OPENSSL_NO_DH | 140 | #ifndef OPENSSL_NO_DH |
| 140 | struct dh_st *dh; /* DH */ | 141 | struct dh_st *dh; /* DH */ |
| 141 | #endif | 142 | #endif |
| 142 | #ifndef OPENSSL_NO_EC | ||
| 143 | struct ec_key_st *ec; /* ECC */ | ||
| 144 | #endif | ||
| 145 | } pkey; | 143 | } pkey; |
| 146 | int save_parameters; | 144 | int save_parameters; |
| 147 | STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ | 145 | STACK_OF(X509_ATTRIBUTE) *attributes; /* [ 0 ] */ |
| @@ -227,58 +225,39 @@ struct env_md_st | |||
| 227 | int md_size; | 225 | int md_size; |
| 228 | unsigned long flags; | 226 | unsigned long flags; |
| 229 | int (*init)(EVP_MD_CTX *ctx); | 227 | int (*init)(EVP_MD_CTX *ctx); |
| 230 | int (*update)(EVP_MD_CTX *ctx,const void *data,size_t count); | 228 | int (*update)(EVP_MD_CTX *ctx,const void *data,unsigned long count); |
| 231 | int (*final)(EVP_MD_CTX *ctx,unsigned char *md); | 229 | int (*final)(EVP_MD_CTX *ctx,unsigned char *md); |
| 232 | int (*copy)(EVP_MD_CTX *to,const EVP_MD_CTX *from); | 230 | int (*copy)(EVP_MD_CTX *to,const EVP_MD_CTX *from); |
| 233 | int (*cleanup)(EVP_MD_CTX *ctx); | 231 | int (*cleanup)(EVP_MD_CTX *ctx); |
| 234 | 232 | ||
| 235 | /* FIXME: prototype these some day */ | 233 | /* FIXME: prototype these some day */ |
| 236 | int (*sign)(int type, const unsigned char *m, unsigned int m_length, | 234 | int (*sign)(); |
| 237 | unsigned char *sigret, unsigned int *siglen, void *key); | 235 | int (*verify)(); |
| 238 | int (*verify)(int type, const unsigned char *m, unsigned int m_length, | ||
| 239 | const unsigned char *sigbuf, unsigned int siglen, | ||
| 240 | void *key); | ||
| 241 | int required_pkey_type[5]; /*EVP_PKEY_xxx */ | 236 | int required_pkey_type[5]; /*EVP_PKEY_xxx */ |
| 242 | int block_size; | 237 | int block_size; |
| 243 | int ctx_size; /* how big does the ctx->md_data need to be */ | 238 | int ctx_size; /* how big does the ctx->md_data need to be */ |
| 244 | } /* EVP_MD */; | 239 | } /* EVP_MD */; |
| 245 | 240 | ||
| 246 | typedef int evp_sign_method(int type,const unsigned char *m, | ||
| 247 | unsigned int m_length,unsigned char *sigret, | ||
| 248 | unsigned int *siglen, void *key); | ||
| 249 | typedef int evp_verify_method(int type,const unsigned char *m, | ||
| 250 | unsigned int m_length,const unsigned char *sigbuf, | ||
| 251 | unsigned int siglen, void *key); | ||
| 252 | |||
| 253 | #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single | 241 | #define EVP_MD_FLAG_ONESHOT 0x0001 /* digest can only handle a single |
| 254 | * block */ | 242 | * block */ |
| 243 | #define EVP_MD_FLAG_FIPS 0x0400 /* Note if suitable for use in FIPS mode */ | ||
| 255 | 244 | ||
| 256 | #define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} | 245 | #define EVP_PKEY_NULL_method NULL,NULL,{0,0,0,0} |
| 257 | 246 | ||
| 258 | #ifndef OPENSSL_NO_DSA | 247 | #ifndef OPENSSL_NO_DSA |
| 259 | #define EVP_PKEY_DSA_method (evp_sign_method *)DSA_sign, \ | 248 | #define EVP_PKEY_DSA_method DSA_sign,DSA_verify, \ |
| 260 | (evp_verify_method *)DSA_verify, \ | ||
| 261 | {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \ | 249 | {EVP_PKEY_DSA,EVP_PKEY_DSA2,EVP_PKEY_DSA3, \ |
| 262 | EVP_PKEY_DSA4,0} | 250 | EVP_PKEY_DSA4,0} |
| 263 | #else | 251 | #else |
| 264 | #define EVP_PKEY_DSA_method EVP_PKEY_NULL_method | 252 | #define EVP_PKEY_DSA_method EVP_PKEY_NULL_method |
| 265 | #endif | 253 | #endif |
| 266 | 254 | ||
| 267 | #ifndef OPENSSL_NO_ECDSA | ||
| 268 | #define EVP_PKEY_ECDSA_method (evp_sign_method *)ECDSA_sign, \ | ||
| 269 | (evp_verify_method *)ECDSA_verify, \ | ||
| 270 | {EVP_PKEY_EC,0,0,0} | ||
| 271 | #else | ||
| 272 | #define EVP_PKEY_ECDSA_method EVP_PKEY_NULL_method | ||
| 273 | #endif | ||
| 274 | |||
| 275 | #ifndef OPENSSL_NO_RSA | 255 | #ifndef OPENSSL_NO_RSA |
| 276 | #define EVP_PKEY_RSA_method (evp_sign_method *)RSA_sign, \ | 256 | #define EVP_PKEY_RSA_method RSA_sign,RSA_verify, \ |
| 277 | (evp_verify_method *)RSA_verify, \ | ||
| 278 | {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} | 257 | {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} |
| 279 | #define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \ | 258 | #define EVP_PKEY_RSA_ASN1_OCTET_STRING_method \ |
| 280 | (evp_sign_method *)RSA_sign_ASN1_OCTET_STRING, \ | 259 | RSA_sign_ASN1_OCTET_STRING, \ |
| 281 | (evp_verify_method *)RSA_verify_ASN1_OCTET_STRING, \ | 260 | RSA_verify_ASN1_OCTET_STRING, \ |
| 282 | {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} | 261 | {EVP_PKEY_RSA,EVP_PKEY_RSA2,0,0} |
| 283 | #else | 262 | #else |
| 284 | #define EVP_PKEY_RSA_method EVP_PKEY_NULL_method | 263 | #define EVP_PKEY_RSA_method EVP_PKEY_NULL_method |
| @@ -304,6 +283,9 @@ struct env_md_ctx_st | |||
| 304 | #define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data | 283 | #define EVP_MD_CTX_FLAG_REUSE 0x0004 /* Don't free up ctx->md_data |
| 305 | * in EVP_MD_CTX_cleanup */ | 284 | * in EVP_MD_CTX_cleanup */ |
| 306 | 285 | ||
| 286 | #define EVP_MD_CTX_FLAG_NON_FIPS_ALLOW 0x0008 /* Allow use of non FIPS digest | ||
| 287 | * in FIPS mode */ | ||
| 288 | |||
| 307 | struct evp_cipher_st | 289 | struct evp_cipher_st |
| 308 | { | 290 | { |
| 309 | int nid; | 291 | int nid; |
| @@ -345,8 +327,10 @@ struct evp_cipher_st | |||
| 345 | #define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 | 327 | #define EVP_CIPH_CUSTOM_KEY_LENGTH 0x80 |
| 346 | /* Don't use standard block padding */ | 328 | /* Don't use standard block padding */ |
| 347 | #define EVP_CIPH_NO_PADDING 0x100 | 329 | #define EVP_CIPH_NO_PADDING 0x100 |
| 348 | /* cipher handles random key generation */ | 330 | /* Note if suitable for use in FIPS mode */ |
| 349 | #define EVP_CIPH_RAND_KEY 0x200 | 331 | #define EVP_CIPH_FLAG_FIPS 0x400 |
| 332 | /* Allow non FIPS cipher in FIPS mode */ | ||
| 333 | #define EVP_CIPH_FLAG_NON_FIPS_ALLOW 0x800 | ||
| 350 | 334 | ||
| 351 | /* ctrl() values */ | 335 | /* ctrl() values */ |
| 352 | 336 | ||
| @@ -356,7 +340,7 @@ struct evp_cipher_st | |||
| 356 | #define EVP_CTRL_SET_RC2_KEY_BITS 0x3 | 340 | #define EVP_CTRL_SET_RC2_KEY_BITS 0x3 |
| 357 | #define EVP_CTRL_GET_RC5_ROUNDS 0x4 | 341 | #define EVP_CTRL_GET_RC5_ROUNDS 0x4 |
| 358 | #define EVP_CTRL_SET_RC5_ROUNDS 0x5 | 342 | #define EVP_CTRL_SET_RC5_ROUNDS 0x5 |
| 359 | #define EVP_CTRL_RAND_KEY 0x6 | 343 | #define EVP_CTRL_SET_ACSS_MODE 0x6 |
| 360 | 344 | ||
| 361 | typedef struct evp_cipher_info_st | 345 | typedef struct evp_cipher_info_st |
| 362 | { | 346 | { |
| @@ -418,47 +402,45 @@ typedef int (EVP_PBE_KEYGEN)(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | |||
| 418 | (char *)(dh)) | 402 | (char *)(dh)) |
| 419 | #endif | 403 | #endif |
| 420 | 404 | ||
| 421 | #ifndef OPENSSL_NO_EC | ||
| 422 | #define EVP_PKEY_assign_EC_KEY(pkey,eckey) EVP_PKEY_assign((pkey),EVP_PKEY_EC,\ | ||
| 423 | (char *)(eckey)) | ||
| 424 | #endif | ||
| 425 | |||
| 426 | /* Add some extra combinations */ | 405 | /* Add some extra combinations */ |
| 427 | #define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a)) | 406 | #define EVP_get_digestbynid(a) EVP_get_digestbyname(OBJ_nid2sn(a)) |
| 428 | #define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a)) | 407 | #define EVP_get_digestbyobj(a) EVP_get_digestbynid(OBJ_obj2nid(a)) |
| 429 | #define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) | 408 | #define EVP_get_cipherbynid(a) EVP_get_cipherbyname(OBJ_nid2sn(a)) |
| 430 | #define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) | 409 | #define EVP_get_cipherbyobj(a) EVP_get_cipherbynid(OBJ_obj2nid(a)) |
| 431 | 410 | ||
| 432 | int EVP_MD_type(const EVP_MD *md); | 411 | #define EVP_MD_type(e) ((e)->type) |
| 433 | #define EVP_MD_nid(e) EVP_MD_type(e) | 412 | #define EVP_MD_nid(e) EVP_MD_type(e) |
| 434 | #define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) | 413 | #define EVP_MD_name(e) OBJ_nid2sn(EVP_MD_nid(e)) |
| 435 | int EVP_MD_pkey_type(const EVP_MD *md); | 414 | #define EVP_MD_pkey_type(e) ((e)->pkey_type) |
| 436 | int EVP_MD_size(const EVP_MD *md); | 415 | #define EVP_MD_size(e) ((e)->md_size) |
| 437 | int EVP_MD_block_size(const EVP_MD *md); | 416 | #define EVP_MD_block_size(e) ((e)->block_size) |
| 438 | 417 | ||
| 439 | const EVP_MD * EVP_MD_CTX_md(const EVP_MD_CTX *ctx); | 418 | #define EVP_MD_CTX_md(e) ((e)->digest) |
| 440 | #define EVP_MD_CTX_size(e) EVP_MD_size(EVP_MD_CTX_md(e)) | 419 | #define EVP_MD_CTX_size(e) EVP_MD_size((e)->digest) |
| 441 | #define EVP_MD_CTX_block_size(e) EVP_MD_block_size(EVP_MD_CTX_md(e)) | 420 | #define EVP_MD_CTX_block_size(e) EVP_MD_block_size((e)->digest) |
| 442 | #define EVP_MD_CTX_type(e) EVP_MD_type(EVP_MD_CTX_md(e)) | 421 | #define EVP_MD_CTX_type(e) EVP_MD_type((e)->digest) |
| 443 | 422 | ||
| 444 | int EVP_CIPHER_nid(const EVP_CIPHER *cipher); | 423 | #define EVP_CIPHER_nid(e) ((e)->nid) |
| 445 | #define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e)) | 424 | #define EVP_CIPHER_name(e) OBJ_nid2sn(EVP_CIPHER_nid(e)) |
| 446 | int EVP_CIPHER_block_size(const EVP_CIPHER *cipher); | 425 | #define EVP_CIPHER_block_size(e) ((e)->block_size) |
| 447 | int EVP_CIPHER_key_length(const EVP_CIPHER *cipher); | 426 | #define EVP_CIPHER_key_length(e) ((e)->key_len) |
| 448 | int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher); | 427 | #define EVP_CIPHER_iv_length(e) ((e)->iv_len) |
| 449 | unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher); | 428 | #define EVP_CIPHER_flags(e) ((e)->flags) |
| 450 | #define EVP_CIPHER_mode(e) (EVP_CIPHER_flags(e) & EVP_CIPH_MODE) | 429 | #define EVP_CIPHER_mode(e) (((e)->flags) & EVP_CIPH_MODE) |
| 451 | 430 | ||
| 452 | const EVP_CIPHER * EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx); | 431 | #define EVP_CIPHER_CTX_cipher(e) ((e)->cipher) |
| 453 | int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx); | 432 | #define EVP_CIPHER_CTX_nid(e) ((e)->cipher->nid) |
| 454 | int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx); | 433 | #define EVP_CIPHER_CTX_block_size(e) ((e)->cipher->block_size) |
| 455 | int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx); | 434 | #define EVP_CIPHER_CTX_key_length(e) ((e)->key_len) |
| 456 | int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx); | 435 | #define EVP_CIPHER_CTX_iv_length(e) ((e)->cipher->iv_len) |
| 457 | void * EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx); | 436 | #define EVP_CIPHER_CTX_get_app_data(e) ((e)->app_data) |
| 458 | void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data); | 437 | #define EVP_CIPHER_CTX_set_app_data(e,d) ((e)->app_data=(char *)(d)) |
| 459 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) | 438 | #define EVP_CIPHER_CTX_type(c) EVP_CIPHER_type(EVP_CIPHER_CTX_cipher(c)) |
| 460 | unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx); | 439 | #define EVP_CIPHER_CTX_flags(e) ((e)->cipher->flags) |
| 461 | #define EVP_CIPHER_CTX_mode(e) (EVP_CIPHER_CTX_flags(e) & EVP_CIPH_MODE) | 440 | #define EVP_CIPHER_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs)) |
| 441 | #define EVP_CIPHER_CTX_clear_flags(ctx,flgs) ((ctx)->flags&=~(flgs)) | ||
| 442 | #define EVP_CIPHER_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs)) | ||
| 443 | #define EVP_CIPHER_CTX_mode(e) ((e)->cipher->flags & EVP_CIPH_MODE) | ||
| 462 | 444 | ||
| 463 | #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) | 445 | #define EVP_ENCODE_LENGTH(l) (((l+2)/3*4)+(l/48+1)*2+80) |
| 464 | #define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) | 446 | #define EVP_DECODE_LENGTH(l) ((l+3)/4*3+80) |
| @@ -483,10 +465,7 @@ void BIO_set_md(BIO *,const EVP_MD *md); | |||
| 483 | #define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL) | 465 | #define BIO_get_cipher_status(b) BIO_ctrl(b,BIO_C_GET_CIPHER_STATUS,0,NULL) |
| 484 | #define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp) | 466 | #define BIO_get_cipher_ctx(b,c_pp) BIO_ctrl(b,BIO_C_GET_CIPHER_CTX,0,(char *)c_pp) |
| 485 | 467 | ||
| 486 | int EVP_Cipher(EVP_CIPHER_CTX *c, | 468 | #define EVP_Cipher(c,o,i,l) (c)->cipher->do_cipher((c),(o),(i),(l)) |
| 487 | unsigned char *out, | ||
| 488 | const unsigned char *in, | ||
| 489 | unsigned int inl); | ||
| 490 | 469 | ||
| 491 | #define EVP_add_cipher_alias(n,alias) \ | 470 | #define EVP_add_cipher_alias(n,alias) \ |
| 492 | OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n)) | 471 | OBJ_NAME_add((alias),OBJ_NAME_TYPE_CIPHER_METH|OBJ_NAME_ALIAS,(n)) |
| @@ -502,14 +481,14 @@ int EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx); | |||
| 502 | EVP_MD_CTX *EVP_MD_CTX_create(void); | 481 | EVP_MD_CTX *EVP_MD_CTX_create(void); |
| 503 | void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); | 482 | void EVP_MD_CTX_destroy(EVP_MD_CTX *ctx); |
| 504 | int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in); | 483 | int EVP_MD_CTX_copy_ex(EVP_MD_CTX *out,const EVP_MD_CTX *in); |
| 505 | void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags); | 484 | #define EVP_MD_CTX_set_flags(ctx,flgs) ((ctx)->flags|=(flgs)) |
| 506 | void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags); | 485 | #define EVP_MD_CTX_clear_flags(ctx,flgs) ((ctx)->flags&=~(flgs)) |
| 507 | int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx,int flags); | 486 | #define EVP_MD_CTX_test_flags(ctx,flgs) ((ctx)->flags&(flgs)) |
| 508 | int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl); | 487 | int EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl); |
| 509 | int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d, | 488 | int EVP_DigestUpdate(EVP_MD_CTX *ctx,const void *d, |
| 510 | size_t cnt); | 489 | unsigned int cnt); |
| 511 | int EVP_DigestFinal_ex(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); | 490 | int EVP_DigestFinal_ex(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); |
| 512 | int EVP_Digest(const void *data, size_t count, | 491 | int EVP_Digest(void *data, unsigned int count, |
| 513 | unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl); | 492 | unsigned char *md, unsigned int *size, const EVP_MD *type, ENGINE *impl); |
| 514 | 493 | ||
| 515 | int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in); | 494 | int EVP_MD_CTX_copy(EVP_MD_CTX *out,const EVP_MD_CTX *in); |
| @@ -517,7 +496,7 @@ int EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type); | |||
| 517 | int EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); | 496 | int EVP_DigestFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s); |
| 518 | 497 | ||
| 519 | int EVP_read_pw_string(char *buf,int length,const char *prompt,int verify); | 498 | int EVP_read_pw_string(char *buf,int length,const char *prompt,int verify); |
| 520 | void EVP_set_pw_prompt(const char *prompt); | 499 | void EVP_set_pw_prompt(char *prompt); |
| 521 | char * EVP_get_pw_prompt(void); | 500 | char * EVP_get_pw_prompt(void); |
| 522 | 501 | ||
| 523 | int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md, | 502 | int EVP_BytesToKey(const EVP_CIPHER *type,const EVP_MD *md, |
| @@ -556,48 +535,43 @@ int EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *outm, int *outl); | |||
| 556 | int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s, | 535 | int EVP_SignFinal(EVP_MD_CTX *ctx,unsigned char *md,unsigned int *s, |
| 557 | EVP_PKEY *pkey); | 536 | EVP_PKEY *pkey); |
| 558 | 537 | ||
| 559 | int EVP_VerifyFinal(EVP_MD_CTX *ctx,const unsigned char *sigbuf, | 538 | int EVP_VerifyFinal(EVP_MD_CTX *ctx,unsigned char *sigbuf, |
| 560 | unsigned int siglen,EVP_PKEY *pkey); | 539 | unsigned int siglen,EVP_PKEY *pkey); |
| 561 | 540 | ||
| 562 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type, | 541 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx,const EVP_CIPHER *type,unsigned char *ek, |
| 563 | const unsigned char *ek, int ekl, const unsigned char *iv, | 542 | int ekl,unsigned char *iv,EVP_PKEY *priv); |
| 564 | EVP_PKEY *priv); | ||
| 565 | int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); | 543 | int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); |
| 566 | 544 | ||
| 567 | int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, | 545 | int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek, |
| 568 | unsigned char **ek, int *ekl, unsigned char *iv, | 546 | int *ekl, unsigned char *iv,EVP_PKEY **pubk, int npubk); |
| 569 | EVP_PKEY **pubk, int npubk); | ||
| 570 | int EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl); | 547 | int EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl); |
| 571 | 548 | ||
| 572 | void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); | 549 | void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); |
| 573 | void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl, | 550 | void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out, |
| 574 | const unsigned char *in,int inl); | 551 | int *outl,unsigned char *in,int inl); |
| 575 | void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl); | 552 | void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl); |
| 576 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); | 553 | int EVP_EncodeBlock(unsigned char *t, const unsigned char *f, int n); |
| 577 | 554 | ||
| 578 | void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); | 555 | void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); |
| 579 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl, | 556 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl, |
| 580 | const unsigned char *in, int inl); | 557 | unsigned char *in, int inl); |
| 581 | int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned | 558 | int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned |
| 582 | char *out, int *outl); | 559 | char *out, int *outl); |
| 583 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); | 560 | int EVP_DecodeBlock(unsigned char *t, const unsigned char *f, int n); |
| 584 | 561 | ||
| 585 | void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); | 562 | void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *a); |
| 586 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); | 563 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *a); |
| 587 | EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void); | ||
| 588 | void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *a); | ||
| 589 | int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); | 564 | int EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen); |
| 590 | int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad); | 565 | int EVP_CIPHER_CTX_set_padding(EVP_CIPHER_CTX *c, int pad); |
| 591 | int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); | 566 | int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr); |
| 592 | int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key); | ||
| 593 | 567 | ||
| 594 | #ifndef OPENSSL_NO_BIO | 568 | #ifndef OPENSSL_NO_BIO |
| 595 | BIO_METHOD *BIO_f_md(void); | 569 | BIO_METHOD *BIO_f_md(void); |
| 596 | BIO_METHOD *BIO_f_base64(void); | 570 | BIO_METHOD *BIO_f_base64(void); |
| 597 | BIO_METHOD *BIO_f_cipher(void); | 571 | BIO_METHOD *BIO_f_cipher(void); |
| 598 | BIO_METHOD *BIO_f_reliable(void); | 572 | BIO_METHOD *BIO_f_reliable(void); |
| 599 | void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,const unsigned char *k, | 573 | void BIO_set_cipher(BIO *b,const EVP_CIPHER *c,unsigned char *k, |
| 600 | const unsigned char *i, int enc); | 574 | unsigned char *i, int enc); |
| 601 | #endif | 575 | #endif |
| 602 | 576 | ||
| 603 | const EVP_MD *EVP_md_null(void); | 577 | const EVP_MD *EVP_md_null(void); |
| @@ -615,8 +589,7 @@ const EVP_MD *EVP_sha(void); | |||
| 615 | const EVP_MD *EVP_sha1(void); | 589 | const EVP_MD *EVP_sha1(void); |
| 616 | const EVP_MD *EVP_dss(void); | 590 | const EVP_MD *EVP_dss(void); |
| 617 | const EVP_MD *EVP_dss1(void); | 591 | const EVP_MD *EVP_dss1(void); |
| 618 | const EVP_MD *EVP_ecdsa(void); | 592 | #ifdef OPENSSL_FIPS |
| 619 | #endif | ||
| 620 | #ifndef OPENSSL_NO_SHA256 | 593 | #ifndef OPENSSL_NO_SHA256 |
| 621 | const EVP_MD *EVP_sha224(void); | 594 | const EVP_MD *EVP_sha224(void); |
| 622 | const EVP_MD *EVP_sha256(void); | 595 | const EVP_MD *EVP_sha256(void); |
| @@ -625,6 +598,8 @@ const EVP_MD *EVP_sha256(void); | |||
| 625 | const EVP_MD *EVP_sha384(void); | 598 | const EVP_MD *EVP_sha384(void); |
| 626 | const EVP_MD *EVP_sha512(void); | 599 | const EVP_MD *EVP_sha512(void); |
| 627 | #endif | 600 | #endif |
| 601 | #endif | ||
| 602 | #endif | ||
| 628 | #ifndef OPENSSL_NO_MDC2 | 603 | #ifndef OPENSSL_NO_MDC2 |
| 629 | const EVP_MD *EVP_mdc2(void); | 604 | const EVP_MD *EVP_mdc2(void); |
| 630 | #endif | 605 | #endif |
| @@ -742,36 +717,8 @@ const EVP_CIPHER *EVP_aes_256_ofb(void); | |||
| 742 | const EVP_CIPHER *EVP_aes_256_ctr(void); | 717 | const EVP_CIPHER *EVP_aes_256_ctr(void); |
| 743 | #endif | 718 | #endif |
| 744 | #endif | 719 | #endif |
| 745 | #ifndef OPENSSL_NO_CAMELLIA | 720 | #ifndef OPENSSL_NO_ACSS |
| 746 | const EVP_CIPHER *EVP_camellia_128_ecb(void); | 721 | const EVP_CIPHER *EVP_acss(void); |
| 747 | const EVP_CIPHER *EVP_camellia_128_cbc(void); | ||
| 748 | const EVP_CIPHER *EVP_camellia_128_cfb1(void); | ||
| 749 | const EVP_CIPHER *EVP_camellia_128_cfb8(void); | ||
| 750 | const EVP_CIPHER *EVP_camellia_128_cfb128(void); | ||
| 751 | # define EVP_camellia_128_cfb EVP_camellia_128_cfb128 | ||
| 752 | const EVP_CIPHER *EVP_camellia_128_ofb(void); | ||
| 753 | const EVP_CIPHER *EVP_camellia_192_ecb(void); | ||
| 754 | const EVP_CIPHER *EVP_camellia_192_cbc(void); | ||
| 755 | const EVP_CIPHER *EVP_camellia_192_cfb1(void); | ||
| 756 | const EVP_CIPHER *EVP_camellia_192_cfb8(void); | ||
| 757 | const EVP_CIPHER *EVP_camellia_192_cfb128(void); | ||
| 758 | # define EVP_camellia_192_cfb EVP_camellia_192_cfb128 | ||
| 759 | const EVP_CIPHER *EVP_camellia_192_ofb(void); | ||
| 760 | const EVP_CIPHER *EVP_camellia_256_ecb(void); | ||
| 761 | const EVP_CIPHER *EVP_camellia_256_cbc(void); | ||
| 762 | const EVP_CIPHER *EVP_camellia_256_cfb1(void); | ||
| 763 | const EVP_CIPHER *EVP_camellia_256_cfb8(void); | ||
| 764 | const EVP_CIPHER *EVP_camellia_256_cfb128(void); | ||
| 765 | # define EVP_camellia_256_cfb EVP_camellia_256_cfb128 | ||
| 766 | const EVP_CIPHER *EVP_camellia_256_ofb(void); | ||
| 767 | #endif | ||
| 768 | |||
| 769 | #ifndef OPENSSL_NO_SEED | ||
| 770 | const EVP_CIPHER *EVP_seed_ecb(void); | ||
| 771 | const EVP_CIPHER *EVP_seed_cbc(void); | ||
| 772 | const EVP_CIPHER *EVP_seed_cfb128(void); | ||
| 773 | # define EVP_seed_cfb EVP_seed_cfb128 | ||
| 774 | const EVP_CIPHER *EVP_seed_ofb(void); | ||
| 775 | #endif | 722 | #endif |
| 776 | 723 | ||
| 777 | void OPENSSL_add_all_algorithms_noconf(void); | 724 | void OPENSSL_add_all_algorithms_noconf(void); |
| @@ -798,12 +745,10 @@ const EVP_CIPHER *EVP_get_cipherbyname(const char *name); | |||
| 798 | const EVP_MD *EVP_get_digestbyname(const char *name); | 745 | const EVP_MD *EVP_get_digestbyname(const char *name); |
| 799 | void EVP_cleanup(void); | 746 | void EVP_cleanup(void); |
| 800 | 747 | ||
| 801 | int EVP_PKEY_decrypt(unsigned char *dec_key, | 748 | int EVP_PKEY_decrypt(unsigned char *dec_key,unsigned char *enc_key, |
| 802 | const unsigned char *enc_key,int enc_key_len, | 749 | int enc_key_len,EVP_PKEY *private_key); |
| 803 | EVP_PKEY *private_key); | ||
| 804 | int EVP_PKEY_encrypt(unsigned char *enc_key, | 750 | int EVP_PKEY_encrypt(unsigned char *enc_key, |
| 805 | const unsigned char *key,int key_len, | 751 | unsigned char *key,int key_len,EVP_PKEY *pub_key); |
| 806 | EVP_PKEY *pub_key); | ||
| 807 | int EVP_PKEY_type(int type); | 752 | int EVP_PKEY_type(int type); |
| 808 | int EVP_PKEY_bits(EVP_PKEY *pkey); | 753 | int EVP_PKEY_bits(EVP_PKEY *pkey); |
| 809 | int EVP_PKEY_size(EVP_PKEY *pkey); | 754 | int EVP_PKEY_size(EVP_PKEY *pkey); |
| @@ -824,31 +769,24 @@ struct dh_st; | |||
| 824 | int EVP_PKEY_set1_DH(EVP_PKEY *pkey,struct dh_st *key); | 769 | int EVP_PKEY_set1_DH(EVP_PKEY *pkey,struct dh_st *key); |
| 825 | struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); | 770 | struct dh_st *EVP_PKEY_get1_DH(EVP_PKEY *pkey); |
| 826 | #endif | 771 | #endif |
| 827 | #ifndef OPENSSL_NO_EC | 772 | |
| 828 | struct ec_key_st; | ||
| 829 | int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey,struct ec_key_st *key); | ||
| 830 | struct ec_key_st *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey); | ||
| 831 | #endif | ||
| 832 | 773 | ||
| 833 | EVP_PKEY * EVP_PKEY_new(void); | 774 | EVP_PKEY * EVP_PKEY_new(void); |
| 834 | void EVP_PKEY_free(EVP_PKEY *pkey); | 775 | void EVP_PKEY_free(EVP_PKEY *pkey); |
| 835 | 776 | EVP_PKEY * d2i_PublicKey(int type,EVP_PKEY **a, unsigned char **pp, | |
| 836 | EVP_PKEY * d2i_PublicKey(int type,EVP_PKEY **a, const unsigned char **pp, | ||
| 837 | long length); | 777 | long length); |
| 838 | int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); | 778 | int i2d_PublicKey(EVP_PKEY *a, unsigned char **pp); |
| 839 | 779 | ||
| 840 | EVP_PKEY * d2i_PrivateKey(int type,EVP_PKEY **a, const unsigned char **pp, | 780 | EVP_PKEY * d2i_PrivateKey(int type,EVP_PKEY **a, unsigned char **pp, |
| 841 | long length); | 781 | long length); |
| 842 | EVP_PKEY * d2i_AutoPrivateKey(EVP_PKEY **a, const unsigned char **pp, | 782 | EVP_PKEY * d2i_AutoPrivateKey(EVP_PKEY **a, unsigned char **pp, |
| 843 | long length); | 783 | long length); |
| 844 | int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp); | 784 | int i2d_PrivateKey(EVP_PKEY *a, unsigned char **pp); |
| 845 | 785 | ||
| 846 | int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from); | 786 | int EVP_PKEY_copy_parameters(EVP_PKEY *to,EVP_PKEY *from); |
| 847 | int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey); | 787 | int EVP_PKEY_missing_parameters(EVP_PKEY *pkey); |
| 848 | int EVP_PKEY_save_parameters(EVP_PKEY *pkey,int mode); | 788 | int EVP_PKEY_save_parameters(EVP_PKEY *pkey,int mode); |
| 849 | int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b); | 789 | int EVP_PKEY_cmp_parameters(EVP_PKEY *a,EVP_PKEY *b); |
| 850 | |||
| 851 | int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b); | ||
| 852 | 790 | ||
| 853 | int EVP_CIPHER_type(const EVP_CIPHER *ctx); | 791 | int EVP_CIPHER_type(const EVP_CIPHER *ctx); |
| 854 | 792 | ||
| @@ -865,7 +803,7 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | |||
| 865 | ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, | 803 | ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, |
| 866 | int en_de); | 804 | int en_de); |
| 867 | int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, | 805 | int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, |
| 868 | const unsigned char *salt, int saltlen, int iter, | 806 | unsigned char *salt, int saltlen, int iter, |
| 869 | int keylen, unsigned char *out); | 807 | int keylen, unsigned char *out); |
| 870 | int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | 808 | int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, |
| 871 | ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, | 809 | ASN1_TYPE *param, const EVP_CIPHER *cipher, const EVP_MD *md, |
| @@ -888,32 +826,30 @@ void ERR_load_EVP_strings(void); | |||
| 888 | /* Error codes for the EVP functions. */ | 826 | /* Error codes for the EVP functions. */ |
| 889 | 827 | ||
| 890 | /* Function codes. */ | 828 | /* Function codes. */ |
| 891 | #define EVP_F_AES_INIT_KEY 133 | 829 | #define EVP_F_AES_INIT_KEY 129 |
| 892 | #define EVP_F_CAMELLIA_INIT_KEY 159 | ||
| 893 | #define EVP_F_D2I_PKEY 100 | 830 | #define EVP_F_D2I_PKEY 100 |
| 894 | #define EVP_F_DSAPKEY2PKCS8 134 | 831 | #define EVP_F_EVP_ADD_CIPHER 130 |
| 895 | #define EVP_F_DSA_PKEY2PKCS8 135 | 832 | #define EVP_F_EVP_ADD_DIGEST 131 |
| 896 | #define EVP_F_ECDSA_PKEY2PKCS8 129 | 833 | #define EVP_F_EVP_CIPHERINIT 123 |
| 897 | #define EVP_F_ECKEY_PKEY2PKCS8 132 | ||
| 898 | #define EVP_F_EVP_CIPHERINIT_EX 123 | ||
| 899 | #define EVP_F_EVP_CIPHER_CTX_CTRL 124 | 834 | #define EVP_F_EVP_CIPHER_CTX_CTRL 124 |
| 900 | #define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 | 835 | #define EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH 122 |
| 901 | #define EVP_F_EVP_DECRYPTFINAL_EX 101 | 836 | #define EVP_F_EVP_DECRYPTFINAL 101 |
| 902 | #define EVP_F_EVP_DIGESTINIT_EX 128 | 837 | #define EVP_F_EVP_DIGESTINIT 128 |
| 903 | #define EVP_F_EVP_ENCRYPTFINAL_EX 127 | 838 | #define EVP_F_EVP_ENCRYPTFINAL 127 |
| 904 | #define EVP_F_EVP_MD_CTX_COPY_EX 110 | 839 | #define EVP_F_EVP_GET_CIPHERBYNAME 132 |
| 840 | #define EVP_F_EVP_GET_DIGESTBYNAME 133 | ||
| 841 | #define EVP_F_EVP_MD_CTX_COPY 110 | ||
| 905 | #define EVP_F_EVP_OPENINIT 102 | 842 | #define EVP_F_EVP_OPENINIT 102 |
| 906 | #define EVP_F_EVP_PBE_ALG_ADD 115 | 843 | #define EVP_F_EVP_PBE_ALG_ADD 115 |
| 907 | #define EVP_F_EVP_PBE_CIPHERINIT 116 | 844 | #define EVP_F_EVP_PBE_CIPHERINIT 116 |
| 908 | #define EVP_F_EVP_PKCS82PKEY 111 | 845 | #define EVP_F_EVP_PKCS82PKEY 111 |
| 909 | #define EVP_F_EVP_PKEY2PKCS8_BROKEN 113 | 846 | #define EVP_F_EVP_PKCS8_SET_BROKEN 112 |
| 847 | #define EVP_F_EVP_PKEY2PKCS8 113 | ||
| 910 | #define EVP_F_EVP_PKEY_COPY_PARAMETERS 103 | 848 | #define EVP_F_EVP_PKEY_COPY_PARAMETERS 103 |
| 911 | #define EVP_F_EVP_PKEY_DECRYPT 104 | 849 | #define EVP_F_EVP_PKEY_DECRYPT 104 |
| 912 | #define EVP_F_EVP_PKEY_ENCRYPT 105 | 850 | #define EVP_F_EVP_PKEY_ENCRYPT 105 |
| 913 | #define EVP_F_EVP_PKEY_GET1_DH 119 | 851 | #define EVP_F_EVP_PKEY_GET1_DH 119 |
| 914 | #define EVP_F_EVP_PKEY_GET1_DSA 120 | 852 | #define EVP_F_EVP_PKEY_GET1_DSA 120 |
| 915 | #define EVP_F_EVP_PKEY_GET1_ECDSA 130 | ||
| 916 | #define EVP_F_EVP_PKEY_GET1_EC_KEY 131 | ||
| 917 | #define EVP_F_EVP_PKEY_GET1_RSA 121 | 853 | #define EVP_F_EVP_PKEY_GET1_RSA 121 |
| 918 | #define EVP_F_EVP_PKEY_NEW 106 | 854 | #define EVP_F_EVP_PKEY_NEW 106 |
| 919 | #define EVP_F_EVP_RIJNDAEL 126 | 855 | #define EVP_F_EVP_RIJNDAEL 126 |
| @@ -921,32 +857,28 @@ void ERR_load_EVP_strings(void); | |||
| 921 | #define EVP_F_EVP_VERIFYFINAL 108 | 857 | #define EVP_F_EVP_VERIFYFINAL 108 |
| 922 | #define EVP_F_PKCS5_PBE_KEYIVGEN 117 | 858 | #define EVP_F_PKCS5_PBE_KEYIVGEN 117 |
| 923 | #define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 | 859 | #define EVP_F_PKCS5_V2_PBE_KEYIVGEN 118 |
| 924 | #define EVP_F_PKCS8_SET_BROKEN 112 | ||
| 925 | #define EVP_F_RC2_MAGIC_TO_METH 109 | 860 | #define EVP_F_RC2_MAGIC_TO_METH 109 |
| 926 | #define EVP_F_RC5_CTRL 125 | 861 | #define EVP_F_RC5_CTRL 125 |
| 927 | 862 | ||
| 928 | /* Reason codes. */ | 863 | /* Reason codes. */ |
| 929 | #define EVP_R_AES_KEY_SETUP_FAILED 143 | 864 | #define EVP_R_AES_KEY_SETUP_FAILED 140 |
| 930 | #define EVP_R_ASN1_LIB 140 | ||
| 931 | #define EVP_R_BAD_BLOCK_LENGTH 136 | 865 | #define EVP_R_BAD_BLOCK_LENGTH 136 |
| 932 | #define EVP_R_BAD_DECRYPT 100 | 866 | #define EVP_R_BAD_DECRYPT 100 |
| 933 | #define EVP_R_BAD_KEY_LENGTH 137 | 867 | #define EVP_R_BAD_KEY_LENGTH 137 |
| 934 | #define EVP_R_BN_DECODE_ERROR 112 | 868 | #define EVP_R_BN_DECODE_ERROR 112 |
| 935 | #define EVP_R_BN_PUBKEY_ERROR 113 | 869 | #define EVP_R_BN_PUBKEY_ERROR 113 |
| 936 | #define EVP_R_CAMELLIA_KEY_SETUP_FAILED 157 | ||
| 937 | #define EVP_R_CIPHER_PARAMETER_ERROR 122 | 870 | #define EVP_R_CIPHER_PARAMETER_ERROR 122 |
| 938 | #define EVP_R_CTRL_NOT_IMPLEMENTED 132 | 871 | #define EVP_R_CTRL_NOT_IMPLEMENTED 132 |
| 939 | #define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133 | 872 | #define EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED 133 |
| 940 | #define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 | 873 | #define EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH 138 |
| 941 | #define EVP_R_DECODE_ERROR 114 | 874 | #define EVP_R_DECODE_ERROR 114 |
| 942 | #define EVP_R_DIFFERENT_KEY_TYPES 101 | 875 | #define EVP_R_DIFFERENT_KEY_TYPES 101 |
| 876 | #define EVP_R_DISABLED_FOR_FIPS 141 | ||
| 943 | #define EVP_R_ENCODE_ERROR 115 | 877 | #define EVP_R_ENCODE_ERROR 115 |
| 944 | #define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119 | 878 | #define EVP_R_EVP_PBE_CIPHERINIT_ERROR 119 |
| 945 | #define EVP_R_EXPECTING_AN_RSA_KEY 127 | 879 | #define EVP_R_EXPECTING_AN_RSA_KEY 127 |
| 946 | #define EVP_R_EXPECTING_A_DH_KEY 128 | 880 | #define EVP_R_EXPECTING_A_DH_KEY 128 |
| 947 | #define EVP_R_EXPECTING_A_DSA_KEY 129 | 881 | #define EVP_R_EXPECTING_A_DSA_KEY 129 |
| 948 | #define EVP_R_EXPECTING_A_ECDSA_KEY 141 | ||
| 949 | #define EVP_R_EXPECTING_A_EC_KEY 142 | ||
| 950 | #define EVP_R_INITIALIZATION_ERROR 134 | 882 | #define EVP_R_INITIALIZATION_ERROR 134 |
| 951 | #define EVP_R_INPUT_NOT_INITIALIZED 111 | 883 | #define EVP_R_INPUT_NOT_INITIALIZED 111 |
| 952 | #define EVP_R_INVALID_KEY_LENGTH 130 | 884 | #define EVP_R_INVALID_KEY_LENGTH 130 |
| @@ -971,7 +903,6 @@ void ERR_load_EVP_strings(void); | |||
| 971 | #define EVP_R_UNSUPPORTED_SALT_TYPE 126 | 903 | #define EVP_R_UNSUPPORTED_SALT_TYPE 126 |
| 972 | #define EVP_R_WRONG_FINAL_BLOCK_LENGTH 109 | 904 | #define EVP_R_WRONG_FINAL_BLOCK_LENGTH 109 |
| 973 | #define EVP_R_WRONG_PUBLIC_KEY_TYPE 110 | 905 | #define EVP_R_WRONG_PUBLIC_KEY_TYPE 110 |
| 974 | #define EVP_R_SEED_KEY_SETUP_FAILED 162 | ||
| 975 | 906 | ||
| 976 | #ifdef __cplusplus | 907 | #ifdef __cplusplus |
| 977 | } | 908 | } |
diff --git a/src/lib/libcrypto/evp/evp_acnf.c b/src/lib/libcrypto/evp/evp_acnf.c new file mode 100644 index 0000000000..ff3e311cc5 --- /dev/null +++ b/src/lib/libcrypto/evp/evp_acnf.c | |||
| @@ -0,0 +1,73 @@ | |||
| 1 | /* evp_acnf.c */ | ||
| 2 | /* Written by Stephen Henson (shenson@bigfoot.com) for the OpenSSL | ||
| 3 | * project 2001. | ||
| 4 | */ | ||
| 5 | /* ==================================================================== | ||
| 6 | * Copyright (c) 2001 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 | #include "cryptlib.h" | ||
| 60 | #include <openssl/evp.h> | ||
| 61 | #include <openssl/conf.h> | ||
| 62 | |||
| 63 | |||
| 64 | /* Load all algorithms and configure OpenSSL. | ||
| 65 | * This function is called automatically when | ||
| 66 | * OPENSSL_LOAD_CONF is set. | ||
| 67 | */ | ||
| 68 | |||
| 69 | void OPENSSL_add_all_algorithms_conf(void) | ||
| 70 | { | ||
| 71 | OPENSSL_add_all_algorithms_noconf(); | ||
| 72 | OPENSSL_config(NULL); | ||
| 73 | } | ||
diff --git a/src/lib/libcrypto/evp/evp_enc.c b/src/lib/libcrypto/evp/evp_enc.c index a1904993bf..f549eeb437 100644 --- a/src/lib/libcrypto/evp/evp_enc.c +++ b/src/lib/libcrypto/evp/evp_enc.c | |||
| @@ -60,13 +60,12 @@ | |||
| 60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 61 | #include <openssl/evp.h> | 61 | #include <openssl/evp.h> |
| 62 | #include <openssl/err.h> | 62 | #include <openssl/err.h> |
| 63 | #include <openssl/rand.h> | ||
| 64 | #ifndef OPENSSL_NO_ENGINE | 63 | #ifndef OPENSSL_NO_ENGINE |
| 65 | #include <openssl/engine.h> | 64 | #include <openssl/engine.h> |
| 66 | #endif | 65 | #endif |
| 67 | #include "evp_locl.h" | 66 | #include "evp_locl.h" |
| 68 | 67 | ||
| 69 | const char EVP_version[]="EVP" OPENSSL_VERSION_PTEXT; | 68 | const char *EVP_version="EVP" OPENSSL_VERSION_PTEXT; |
| 70 | 69 | ||
| 71 | void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) | 70 | void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) |
| 72 | { | 71 | { |
| @@ -74,13 +73,6 @@ void EVP_CIPHER_CTX_init(EVP_CIPHER_CTX *ctx) | |||
| 74 | /* ctx->cipher=NULL; */ | 73 | /* ctx->cipher=NULL; */ |
| 75 | } | 74 | } |
| 76 | 75 | ||
| 77 | EVP_CIPHER_CTX *EVP_CIPHER_CTX_new(void) | ||
| 78 | { | ||
| 79 | EVP_CIPHER_CTX *ctx=OPENSSL_malloc(sizeof *ctx); | ||
| 80 | if (ctx) | ||
| 81 | EVP_CIPHER_CTX_init(ctx); | ||
| 82 | return ctx; | ||
| 83 | } | ||
| 84 | 76 | ||
| 85 | int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | 77 | int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, |
| 86 | const unsigned char *key, const unsigned char *iv, int enc) | 78 | const unsigned char *key, const unsigned char *iv, int enc) |
| @@ -90,6 +82,48 @@ int EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, | |||
| 90 | return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc); | 82 | return EVP_CipherInit_ex(ctx,cipher,NULL,key,iv,enc); |
| 91 | } | 83 | } |
| 92 | 84 | ||
| 85 | #ifdef OPENSSL_FIPS | ||
| 86 | |||
| 87 | /* The purpose of these is to trap programs that attempt to use non FIPS | ||
| 88 | * algorithms in FIPS mode and ignore the errors. | ||
| 89 | */ | ||
| 90 | |||
| 91 | int bad_init(EVP_CIPHER_CTX *ctx, const unsigned char *key, | ||
| 92 | const unsigned char *iv, int enc) | ||
| 93 | { FIPS_ERROR_IGNORED("Cipher init"); return 0;} | ||
| 94 | |||
| 95 | int bad_do_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 96 | const unsigned char *in, unsigned int inl) | ||
| 97 | { FIPS_ERROR_IGNORED("Cipher update"); return 0;} | ||
| 98 | |||
| 99 | /* NB: no cleanup because it is allowed after failed init */ | ||
| 100 | |||
| 101 | int bad_set_asn1(EVP_CIPHER_CTX *ctx, ASN1_TYPE *typ) | ||
| 102 | { FIPS_ERROR_IGNORED("Cipher set_asn1"); return 0;} | ||
| 103 | int bad_get_asn1(EVP_CIPHER_CTX *ctx, ASN1_TYPE *typ) | ||
| 104 | { FIPS_ERROR_IGNORED("Cipher get_asn1"); return 0;} | ||
| 105 | int bad_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) | ||
| 106 | { FIPS_ERROR_IGNORED("Cipher ctrl"); return 0;} | ||
| 107 | |||
| 108 | static const EVP_CIPHER bad_cipher = | ||
| 109 | { | ||
| 110 | 0, | ||
| 111 | 0, | ||
| 112 | 0, | ||
| 113 | 0, | ||
| 114 | 0, | ||
| 115 | bad_init, | ||
| 116 | bad_do_cipher, | ||
| 117 | NULL, | ||
| 118 | 0, | ||
| 119 | bad_set_asn1, | ||
| 120 | bad_get_asn1, | ||
| 121 | bad_ctrl, | ||
| 122 | NULL | ||
| 123 | }; | ||
| 124 | |||
| 125 | #endif | ||
| 126 | |||
| 93 | int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, | 127 | int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, |
| 94 | const unsigned char *key, const unsigned char *iv, int enc) | 128 | const unsigned char *key, const unsigned char *iv, int enc) |
| 95 | { | 129 | { |
| @@ -124,7 +158,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp | |||
| 124 | { | 158 | { |
| 125 | if (!ENGINE_init(impl)) | 159 | if (!ENGINE_init(impl)) |
| 126 | { | 160 | { |
| 127 | EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR); | 161 | EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_INITIALIZATION_ERROR); |
| 128 | return 0; | 162 | return 0; |
| 129 | } | 163 | } |
| 130 | } | 164 | } |
| @@ -141,7 +175,7 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp | |||
| 141 | * control history, is that we should at least | 175 | * control history, is that we should at least |
| 142 | * be able to avoid using US mispellings of | 176 | * be able to avoid using US mispellings of |
| 143 | * "initialisation"? */ | 177 | * "initialisation"? */ |
| 144 | EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR); | 178 | EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_INITIALIZATION_ERROR); |
| 145 | return 0; | 179 | return 0; |
| 146 | } | 180 | } |
| 147 | /* We'll use the ENGINE's private cipher definition */ | 181 | /* We'll use the ENGINE's private cipher definition */ |
| @@ -154,14 +188,13 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp | |||
| 154 | else | 188 | else |
| 155 | ctx->engine = NULL; | 189 | ctx->engine = NULL; |
| 156 | #endif | 190 | #endif |
| 157 | |||
| 158 | ctx->cipher=cipher; | 191 | ctx->cipher=cipher; |
| 159 | if (ctx->cipher->ctx_size) | 192 | if (ctx->cipher->ctx_size) |
| 160 | { | 193 | { |
| 161 | ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size); | 194 | ctx->cipher_data=OPENSSL_malloc(ctx->cipher->ctx_size); |
| 162 | if (!ctx->cipher_data) | 195 | if (!ctx->cipher_data) |
| 163 | { | 196 | { |
| 164 | EVPerr(EVP_F_EVP_CIPHERINIT_EX, ERR_R_MALLOC_FAILURE); | 197 | EVPerr(EVP_F_EVP_CIPHERINIT, ERR_R_MALLOC_FAILURE); |
| 165 | return 0; | 198 | return 0; |
| 166 | } | 199 | } |
| 167 | } | 200 | } |
| @@ -175,14 +208,14 @@ int EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *imp | |||
| 175 | { | 208 | { |
| 176 | if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL)) | 209 | if(!EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_INIT, 0, NULL)) |
| 177 | { | 210 | { |
| 178 | EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_INITIALIZATION_ERROR); | 211 | EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_INITIALIZATION_ERROR); |
| 179 | return 0; | 212 | return 0; |
| 180 | } | 213 | } |
| 181 | } | 214 | } |
| 182 | } | 215 | } |
| 183 | else if(!ctx->cipher) | 216 | else if(!ctx->cipher) |
| 184 | { | 217 | { |
| 185 | EVPerr(EVP_F_EVP_CIPHERINIT_EX, EVP_R_NO_CIPHER_SET); | 218 | EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_NO_CIPHER_SET); |
| 186 | return 0; | 219 | return 0; |
| 187 | } | 220 | } |
| 188 | #ifndef OPENSSL_NO_ENGINE | 221 | #ifndef OPENSSL_NO_ENGINE |
| @@ -207,8 +240,7 @@ skip_to_init: | |||
| 207 | 240 | ||
| 208 | case EVP_CIPH_CBC_MODE: | 241 | case EVP_CIPH_CBC_MODE: |
| 209 | 242 | ||
| 210 | OPENSSL_assert(EVP_CIPHER_CTX_iv_length(ctx) <= | 243 | OPENSSL_assert(EVP_CIPHER_CTX_iv_length(ctx) <= sizeof ctx->iv); |
| 211 | (int)sizeof(ctx->iv)); | ||
| 212 | if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx)); | 244 | if(iv) memcpy(ctx->oiv, iv, EVP_CIPHER_CTX_iv_length(ctx)); |
| 213 | memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx)); | 245 | memcpy(ctx->iv, ctx->oiv, EVP_CIPHER_CTX_iv_length(ctx)); |
| 214 | break; | 246 | break; |
| @@ -219,6 +251,24 @@ skip_to_init: | |||
| 219 | } | 251 | } |
| 220 | } | 252 | } |
| 221 | 253 | ||
| 254 | #ifdef OPENSSL_FIPS | ||
| 255 | /* After 'key' is set no further parameters changes are permissible. | ||
| 256 | * So only check for non FIPS enabling at this point. | ||
| 257 | */ | ||
| 258 | if (key && FIPS_mode()) | ||
| 259 | { | ||
| 260 | if (!(ctx->cipher->flags & EVP_CIPH_FLAG_FIPS) | ||
| 261 | & !(ctx->flags & EVP_CIPH_FLAG_NON_FIPS_ALLOW)) | ||
| 262 | { | ||
| 263 | EVPerr(EVP_F_EVP_CIPHERINIT, EVP_R_DISABLED_FOR_FIPS); | ||
| 264 | ERR_add_error_data(2, "cipher=", | ||
| 265 | EVP_CIPHER_name(ctx->cipher)); | ||
| 266 | ctx->cipher = &bad_cipher; | ||
| 267 | return 0; | ||
| 268 | } | ||
| 269 | } | ||
| 270 | #endif | ||
| 271 | |||
| 222 | if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) { | 272 | if(key || (ctx->cipher->flags & EVP_CIPH_ALWAYS_CALL_INIT)) { |
| 223 | if(!ctx->cipher->init(ctx,key,iv,enc)) return 0; | 273 | if(!ctx->cipher->init(ctx,key,iv,enc)) return 0; |
| 224 | } | 274 | } |
| @@ -295,7 +345,7 @@ int EVP_EncryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | |||
| 295 | } | 345 | } |
| 296 | i=ctx->buf_len; | 346 | i=ctx->buf_len; |
| 297 | bl=ctx->cipher->block_size; | 347 | bl=ctx->cipher->block_size; |
| 298 | OPENSSL_assert(bl <= (int)sizeof(ctx->buf)); | 348 | OPENSSL_assert(bl <= sizeof ctx->buf); |
| 299 | if (i != 0) | 349 | if (i != 0) |
| 300 | { | 350 | { |
| 301 | if (i+inl < bl) | 351 | if (i+inl < bl) |
| @@ -341,8 +391,7 @@ int EVP_EncryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 341 | 391 | ||
| 342 | int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 392 | int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| 343 | { | 393 | { |
| 344 | int n,ret; | 394 | int i,n,b,bl,ret; |
| 345 | unsigned int i, b, bl; | ||
| 346 | 395 | ||
| 347 | b=ctx->cipher->block_size; | 396 | b=ctx->cipher->block_size; |
| 348 | OPENSSL_assert(b <= sizeof ctx->buf); | 397 | OPENSSL_assert(b <= sizeof ctx->buf); |
| @@ -356,7 +405,7 @@ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 356 | { | 405 | { |
| 357 | if(bl) | 406 | if(bl) |
| 358 | { | 407 | { |
| 359 | EVPerr(EVP_F_EVP_ENCRYPTFINAL_EX,EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH); | 408 | EVPerr(EVP_F_EVP_ENCRYPTFINAL,EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH); |
| 360 | return 0; | 409 | return 0; |
| 361 | } | 410 | } |
| 362 | *outl = 0; | 411 | *outl = 0; |
| @@ -378,8 +427,7 @@ int EVP_EncryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 378 | int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, | 427 | int EVP_DecryptUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, |
| 379 | const unsigned char *in, int inl) | 428 | const unsigned char *in, int inl) |
| 380 | { | 429 | { |
| 381 | int fix_len; | 430 | int b, fix_len; |
| 382 | unsigned int b; | ||
| 383 | 431 | ||
| 384 | if (inl == 0) | 432 | if (inl == 0) |
| 385 | { | 433 | { |
| @@ -432,8 +480,8 @@ int EVP_DecryptFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 432 | 480 | ||
| 433 | int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | 481 | int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) |
| 434 | { | 482 | { |
| 435 | int i,n; | 483 | int i,b; |
| 436 | unsigned int b; | 484 | int n; |
| 437 | 485 | ||
| 438 | *outl=0; | 486 | *outl=0; |
| 439 | b=ctx->cipher->block_size; | 487 | b=ctx->cipher->block_size; |
| @@ -441,7 +489,7 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 441 | { | 489 | { |
| 442 | if(ctx->buf_len) | 490 | if(ctx->buf_len) |
| 443 | { | 491 | { |
| 444 | EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH); | 492 | EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH); |
| 445 | return 0; | 493 | return 0; |
| 446 | } | 494 | } |
| 447 | *outl = 0; | 495 | *outl = 0; |
| @@ -451,21 +499,21 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 451 | { | 499 | { |
| 452 | if (ctx->buf_len || !ctx->final_used) | 500 | if (ctx->buf_len || !ctx->final_used) |
| 453 | { | 501 | { |
| 454 | EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,EVP_R_WRONG_FINAL_BLOCK_LENGTH); | 502 | EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_WRONG_FINAL_BLOCK_LENGTH); |
| 455 | return(0); | 503 | return(0); |
| 456 | } | 504 | } |
| 457 | OPENSSL_assert(b <= sizeof ctx->final); | 505 | OPENSSL_assert(b <= sizeof ctx->final); |
| 458 | n=ctx->final[b-1]; | 506 | n=ctx->final[b-1]; |
| 459 | if (n == 0 || n > (int)b) | 507 | if (n > b) |
| 460 | { | 508 | { |
| 461 | EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,EVP_R_BAD_DECRYPT); | 509 | EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_BAD_DECRYPT); |
| 462 | return(0); | 510 | return(0); |
| 463 | } | 511 | } |
| 464 | for (i=0; i<n; i++) | 512 | for (i=0; i<n; i++) |
| 465 | { | 513 | { |
| 466 | if (ctx->final[--b] != n) | 514 | if (ctx->final[--b] != n) |
| 467 | { | 515 | { |
| 468 | EVPerr(EVP_F_EVP_DECRYPTFINAL_EX,EVP_R_BAD_DECRYPT); | 516 | EVPerr(EVP_F_EVP_DECRYPTFINAL,EVP_R_BAD_DECRYPT); |
| 469 | return(0); | 517 | return(0); |
| 470 | } | 518 | } |
| 471 | } | 519 | } |
| @@ -479,15 +527,6 @@ int EVP_DecryptFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl) | |||
| 479 | return(1); | 527 | return(1); |
| 480 | } | 528 | } |
| 481 | 529 | ||
| 482 | void EVP_CIPHER_CTX_free(EVP_CIPHER_CTX *ctx) | ||
| 483 | { | ||
| 484 | if (ctx) | ||
| 485 | { | ||
| 486 | EVP_CIPHER_CTX_cleanup(ctx); | ||
| 487 | OPENSSL_free(ctx); | ||
| 488 | } | ||
| 489 | } | ||
| 490 | |||
| 491 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) | 530 | int EVP_CIPHER_CTX_cleanup(EVP_CIPHER_CTX *c) |
| 492 | { | 531 | { |
| 493 | if (c->cipher != NULL) | 532 | if (c->cipher != NULL) |
| @@ -551,13 +590,3 @@ int EVP_CIPHER_CTX_ctrl(EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr) | |||
| 551 | } | 590 | } |
| 552 | return ret; | 591 | return ret; |
| 553 | } | 592 | } |
| 554 | |||
| 555 | int EVP_CIPHER_CTX_rand_key(EVP_CIPHER_CTX *ctx, unsigned char *key) | ||
| 556 | { | ||
| 557 | if (ctx->cipher->flags & EVP_CIPH_RAND_KEY) | ||
| 558 | return EVP_CIPHER_CTX_ctrl(ctx, EVP_CTRL_RAND_KEY, 0, key); | ||
| 559 | if (RAND_bytes(key, ctx->key_len) <= 0) | ||
| 560 | return 0; | ||
| 561 | return 1; | ||
| 562 | } | ||
| 563 | |||
diff --git a/src/lib/libcrypto/evp/evp_err.c b/src/lib/libcrypto/evp/evp_err.c index e8c9e8de9c..77eee070d3 100644 --- a/src/lib/libcrypto/evp/evp_err.c +++ b/src/lib/libcrypto/evp/evp_err.c | |||
| @@ -71,31 +71,29 @@ | |||
| 71 | static ERR_STRING_DATA EVP_str_functs[]= | 71 | static ERR_STRING_DATA EVP_str_functs[]= |
| 72 | { | 72 | { |
| 73 | {ERR_FUNC(EVP_F_AES_INIT_KEY), "AES_INIT_KEY"}, | 73 | {ERR_FUNC(EVP_F_AES_INIT_KEY), "AES_INIT_KEY"}, |
| 74 | {ERR_FUNC(EVP_F_CAMELLIA_INIT_KEY), "CAMELLIA_INIT_KEY"}, | ||
| 75 | {ERR_FUNC(EVP_F_D2I_PKEY), "D2I_PKEY"}, | 74 | {ERR_FUNC(EVP_F_D2I_PKEY), "D2I_PKEY"}, |
| 76 | {ERR_FUNC(EVP_F_DSAPKEY2PKCS8), "DSAPKEY2PKCS8"}, | 75 | {ERR_FUNC(EVP_F_EVP_ADD_CIPHER), "EVP_add_cipher"}, |
| 77 | {ERR_FUNC(EVP_F_DSA_PKEY2PKCS8), "DSA_PKEY2PKCS8"}, | 76 | {ERR_FUNC(EVP_F_EVP_ADD_DIGEST), "EVP_add_digest"}, |
| 78 | {ERR_FUNC(EVP_F_ECDSA_PKEY2PKCS8), "ECDSA_PKEY2PKCS8"}, | 77 | {ERR_FUNC(EVP_F_EVP_CIPHERINIT), "EVP_CipherInit"}, |
| 79 | {ERR_FUNC(EVP_F_ECKEY_PKEY2PKCS8), "ECKEY_PKEY2PKCS8"}, | ||
| 80 | {ERR_FUNC(EVP_F_EVP_CIPHERINIT_EX), "EVP_CipherInit_ex"}, | ||
| 81 | {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_CTRL), "EVP_CIPHER_CTX_ctrl"}, | 78 | {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_CTRL), "EVP_CIPHER_CTX_ctrl"}, |
| 82 | {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH), "EVP_CIPHER_CTX_set_key_length"}, | 79 | {ERR_FUNC(EVP_F_EVP_CIPHER_CTX_SET_KEY_LENGTH), "EVP_CIPHER_CTX_set_key_length"}, |
| 83 | {ERR_FUNC(EVP_F_EVP_DECRYPTFINAL_EX), "EVP_DecryptFinal_ex"}, | 80 | {ERR_FUNC(EVP_F_EVP_DECRYPTFINAL), "EVP_DecryptFinal"}, |
| 84 | {ERR_FUNC(EVP_F_EVP_DIGESTINIT_EX), "EVP_DigestInit_ex"}, | 81 | {ERR_FUNC(EVP_F_EVP_DIGESTINIT), "EVP_DigestInit"}, |
| 85 | {ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL_EX), "EVP_EncryptFinal_ex"}, | 82 | {ERR_FUNC(EVP_F_EVP_ENCRYPTFINAL), "EVP_EncryptFinal"}, |
| 86 | {ERR_FUNC(EVP_F_EVP_MD_CTX_COPY_EX), "EVP_MD_CTX_copy_ex"}, | 83 | {ERR_FUNC(EVP_F_EVP_GET_CIPHERBYNAME), "EVP_get_cipherbyname"}, |
| 84 | {ERR_FUNC(EVP_F_EVP_GET_DIGESTBYNAME), "EVP_get_digestbyname"}, | ||
| 85 | {ERR_FUNC(EVP_F_EVP_MD_CTX_COPY), "EVP_MD_CTX_copy"}, | ||
| 87 | {ERR_FUNC(EVP_F_EVP_OPENINIT), "EVP_OpenInit"}, | 86 | {ERR_FUNC(EVP_F_EVP_OPENINIT), "EVP_OpenInit"}, |
| 88 | {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD), "EVP_PBE_alg_add"}, | 87 | {ERR_FUNC(EVP_F_EVP_PBE_ALG_ADD), "EVP_PBE_alg_add"}, |
| 89 | {ERR_FUNC(EVP_F_EVP_PBE_CIPHERINIT), "EVP_PBE_CipherInit"}, | 88 | {ERR_FUNC(EVP_F_EVP_PBE_CIPHERINIT), "EVP_PBE_CipherInit"}, |
| 90 | {ERR_FUNC(EVP_F_EVP_PKCS82PKEY), "EVP_PKCS82PKEY"}, | 89 | {ERR_FUNC(EVP_F_EVP_PKCS82PKEY), "EVP_PKCS82PKEY"}, |
| 91 | {ERR_FUNC(EVP_F_EVP_PKEY2PKCS8_BROKEN), "EVP_PKEY2PKCS8_broken"}, | 90 | {ERR_FUNC(EVP_F_EVP_PKCS8_SET_BROKEN), "EVP_PKCS8_SET_BROKEN"}, |
| 91 | {ERR_FUNC(EVP_F_EVP_PKEY2PKCS8), "EVP_PKEY2PKCS8"}, | ||
| 92 | {ERR_FUNC(EVP_F_EVP_PKEY_COPY_PARAMETERS), "EVP_PKEY_copy_parameters"}, | 92 | {ERR_FUNC(EVP_F_EVP_PKEY_COPY_PARAMETERS), "EVP_PKEY_copy_parameters"}, |
| 93 | {ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT), "EVP_PKEY_decrypt"}, | 93 | {ERR_FUNC(EVP_F_EVP_PKEY_DECRYPT), "EVP_PKEY_decrypt"}, |
| 94 | {ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT), "EVP_PKEY_encrypt"}, | 94 | {ERR_FUNC(EVP_F_EVP_PKEY_ENCRYPT), "EVP_PKEY_encrypt"}, |
| 95 | {ERR_FUNC(EVP_F_EVP_PKEY_GET1_DH), "EVP_PKEY_get1_DH"}, | 95 | {ERR_FUNC(EVP_F_EVP_PKEY_GET1_DH), "EVP_PKEY_get1_DH"}, |
| 96 | {ERR_FUNC(EVP_F_EVP_PKEY_GET1_DSA), "EVP_PKEY_get1_DSA"}, | 96 | {ERR_FUNC(EVP_F_EVP_PKEY_GET1_DSA), "EVP_PKEY_get1_DSA"}, |
| 97 | {ERR_FUNC(EVP_F_EVP_PKEY_GET1_ECDSA), "EVP_PKEY_GET1_ECDSA"}, | ||
| 98 | {ERR_FUNC(EVP_F_EVP_PKEY_GET1_EC_KEY), "EVP_PKEY_get1_EC_KEY"}, | ||
| 99 | {ERR_FUNC(EVP_F_EVP_PKEY_GET1_RSA), "EVP_PKEY_get1_RSA"}, | 97 | {ERR_FUNC(EVP_F_EVP_PKEY_GET1_RSA), "EVP_PKEY_get1_RSA"}, |
| 100 | {ERR_FUNC(EVP_F_EVP_PKEY_NEW), "EVP_PKEY_new"}, | 98 | {ERR_FUNC(EVP_F_EVP_PKEY_NEW), "EVP_PKEY_new"}, |
| 101 | {ERR_FUNC(EVP_F_EVP_RIJNDAEL), "EVP_RIJNDAEL"}, | 99 | {ERR_FUNC(EVP_F_EVP_RIJNDAEL), "EVP_RIJNDAEL"}, |
| @@ -103,7 +101,6 @@ static ERR_STRING_DATA EVP_str_functs[]= | |||
| 103 | {ERR_FUNC(EVP_F_EVP_VERIFYFINAL), "EVP_VerifyFinal"}, | 101 | {ERR_FUNC(EVP_F_EVP_VERIFYFINAL), "EVP_VerifyFinal"}, |
| 104 | {ERR_FUNC(EVP_F_PKCS5_PBE_KEYIVGEN), "PKCS5_PBE_keyivgen"}, | 102 | {ERR_FUNC(EVP_F_PKCS5_PBE_KEYIVGEN), "PKCS5_PBE_keyivgen"}, |
| 105 | {ERR_FUNC(EVP_F_PKCS5_V2_PBE_KEYIVGEN), "PKCS5_v2_PBE_keyivgen"}, | 103 | {ERR_FUNC(EVP_F_PKCS5_V2_PBE_KEYIVGEN), "PKCS5_v2_PBE_keyivgen"}, |
| 106 | {ERR_FUNC(EVP_F_PKCS8_SET_BROKEN), "PKCS8_set_broken"}, | ||
| 107 | {ERR_FUNC(EVP_F_RC2_MAGIC_TO_METH), "RC2_MAGIC_TO_METH"}, | 104 | {ERR_FUNC(EVP_F_RC2_MAGIC_TO_METH), "RC2_MAGIC_TO_METH"}, |
| 108 | {ERR_FUNC(EVP_F_RC5_CTRL), "RC5_CTRL"}, | 105 | {ERR_FUNC(EVP_F_RC5_CTRL), "RC5_CTRL"}, |
| 109 | {0,NULL} | 106 | {0,NULL} |
| @@ -112,26 +109,23 @@ static ERR_STRING_DATA EVP_str_functs[]= | |||
| 112 | static ERR_STRING_DATA EVP_str_reasons[]= | 109 | static ERR_STRING_DATA EVP_str_reasons[]= |
| 113 | { | 110 | { |
| 114 | {ERR_REASON(EVP_R_AES_KEY_SETUP_FAILED) ,"aes key setup failed"}, | 111 | {ERR_REASON(EVP_R_AES_KEY_SETUP_FAILED) ,"aes key setup failed"}, |
| 115 | {ERR_REASON(EVP_R_ASN1_LIB) ,"asn1 lib"}, | ||
| 116 | {ERR_REASON(EVP_R_BAD_BLOCK_LENGTH) ,"bad block length"}, | 112 | {ERR_REASON(EVP_R_BAD_BLOCK_LENGTH) ,"bad block length"}, |
| 117 | {ERR_REASON(EVP_R_BAD_DECRYPT) ,"bad decrypt"}, | 113 | {ERR_REASON(EVP_R_BAD_DECRYPT) ,"bad decrypt"}, |
| 118 | {ERR_REASON(EVP_R_BAD_KEY_LENGTH) ,"bad key length"}, | 114 | {ERR_REASON(EVP_R_BAD_KEY_LENGTH) ,"bad key length"}, |
| 119 | {ERR_REASON(EVP_R_BN_DECODE_ERROR) ,"bn decode error"}, | 115 | {ERR_REASON(EVP_R_BN_DECODE_ERROR) ,"bn decode error"}, |
| 120 | {ERR_REASON(EVP_R_BN_PUBKEY_ERROR) ,"bn pubkey error"}, | 116 | {ERR_REASON(EVP_R_BN_PUBKEY_ERROR) ,"bn pubkey error"}, |
| 121 | {ERR_REASON(EVP_R_CAMELLIA_KEY_SETUP_FAILED),"camellia key setup failed"}, | ||
| 122 | {ERR_REASON(EVP_R_CIPHER_PARAMETER_ERROR),"cipher parameter error"}, | 117 | {ERR_REASON(EVP_R_CIPHER_PARAMETER_ERROR),"cipher parameter error"}, |
| 123 | {ERR_REASON(EVP_R_CTRL_NOT_IMPLEMENTED) ,"ctrl not implemented"}, | 118 | {ERR_REASON(EVP_R_CTRL_NOT_IMPLEMENTED) ,"ctrl not implemented"}, |
| 124 | {ERR_REASON(EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED),"ctrl operation not implemented"}, | 119 | {ERR_REASON(EVP_R_CTRL_OPERATION_NOT_IMPLEMENTED),"ctrl operation not implemented"}, |
| 125 | {ERR_REASON(EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH),"data not multiple of block length"}, | 120 | {ERR_REASON(EVP_R_DATA_NOT_MULTIPLE_OF_BLOCK_LENGTH),"data not multiple of block length"}, |
| 126 | {ERR_REASON(EVP_R_DECODE_ERROR) ,"decode error"}, | 121 | {ERR_REASON(EVP_R_DECODE_ERROR) ,"decode error"}, |
| 127 | {ERR_REASON(EVP_R_DIFFERENT_KEY_TYPES) ,"different key types"}, | 122 | {ERR_REASON(EVP_R_DIFFERENT_KEY_TYPES) ,"different key types"}, |
| 123 | {ERR_REASON(EVP_R_DISABLED_FOR_FIPS) ,"disabled for fips"}, | ||
| 128 | {ERR_REASON(EVP_R_ENCODE_ERROR) ,"encode error"}, | 124 | {ERR_REASON(EVP_R_ENCODE_ERROR) ,"encode error"}, |
| 129 | {ERR_REASON(EVP_R_EVP_PBE_CIPHERINIT_ERROR),"evp pbe cipherinit error"}, | 125 | {ERR_REASON(EVP_R_EVP_PBE_CIPHERINIT_ERROR),"evp pbe cipherinit error"}, |
| 130 | {ERR_REASON(EVP_R_EXPECTING_AN_RSA_KEY) ,"expecting an rsa key"}, | 126 | {ERR_REASON(EVP_R_EXPECTING_AN_RSA_KEY) ,"expecting an rsa key"}, |
| 131 | {ERR_REASON(EVP_R_EXPECTING_A_DH_KEY) ,"expecting a dh key"}, | 127 | {ERR_REASON(EVP_R_EXPECTING_A_DH_KEY) ,"expecting a dh key"}, |
| 132 | {ERR_REASON(EVP_R_EXPECTING_A_DSA_KEY) ,"expecting a dsa key"}, | 128 | {ERR_REASON(EVP_R_EXPECTING_A_DSA_KEY) ,"expecting a dsa key"}, |
| 133 | {ERR_REASON(EVP_R_EXPECTING_A_ECDSA_KEY) ,"expecting a ecdsa key"}, | ||
| 134 | {ERR_REASON(EVP_R_EXPECTING_A_EC_KEY) ,"expecting a ec key"}, | ||
| 135 | {ERR_REASON(EVP_R_INITIALIZATION_ERROR) ,"initialization error"}, | 129 | {ERR_REASON(EVP_R_INITIALIZATION_ERROR) ,"initialization error"}, |
| 136 | {ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED) ,"input not initialized"}, | 130 | {ERR_REASON(EVP_R_INPUT_NOT_INITIALIZED) ,"input not initialized"}, |
| 137 | {ERR_REASON(EVP_R_INVALID_KEY_LENGTH) ,"invalid key length"}, | 131 | {ERR_REASON(EVP_R_INVALID_KEY_LENGTH) ,"invalid key length"}, |
| @@ -163,12 +157,15 @@ static ERR_STRING_DATA EVP_str_reasons[]= | |||
| 163 | 157 | ||
| 164 | void ERR_load_EVP_strings(void) | 158 | void ERR_load_EVP_strings(void) |
| 165 | { | 159 | { |
| 166 | #ifndef OPENSSL_NO_ERR | 160 | static int init=1; |
| 167 | 161 | ||
| 168 | if (ERR_func_error_string(EVP_str_functs[0].error) == NULL) | 162 | if (init) |
| 169 | { | 163 | { |
| 164 | init=0; | ||
| 165 | #ifndef OPENSSL_NO_ERR | ||
| 170 | ERR_load_strings(0,EVP_str_functs); | 166 | ERR_load_strings(0,EVP_str_functs); |
| 171 | ERR_load_strings(0,EVP_str_reasons); | 167 | ERR_load_strings(0,EVP_str_reasons); |
| 172 | } | ||
| 173 | #endif | 168 | #endif |
| 169 | |||
| 170 | } | ||
| 174 | } | 171 | } |
diff --git a/src/lib/libcrypto/evp/evp_key.c b/src/lib/libcrypto/evp/evp_key.c index 361ea69ab6..f8650d5df6 100644 --- a/src/lib/libcrypto/evp/evp_key.c +++ b/src/lib/libcrypto/evp/evp_key.c | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | /* should be init to zeros. */ | 66 | /* should be init to zeros. */ |
| 67 | static char prompt_string[80]; | 67 | static char prompt_string[80]; |
| 68 | 68 | ||
| 69 | void EVP_set_pw_prompt(const char *prompt) | 69 | void EVP_set_pw_prompt(char *prompt) |
| 70 | { | 70 | { |
| 71 | if (prompt == NULL) | 71 | if (prompt == NULL) |
| 72 | prompt_string[0]='\0'; | 72 | prompt_string[0]='\0'; |
diff --git a/src/lib/libcrypto/evp/evp_lib.c b/src/lib/libcrypto/evp/evp_lib.c index edb28ef38e..a63ba19317 100644 --- a/src/lib/libcrypto/evp/evp_lib.c +++ b/src/lib/libcrypto/evp/evp_lib.c | |||
| @@ -68,7 +68,7 @@ int EVP_CIPHER_param_to_asn1(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | |||
| 68 | if (c->cipher->set_asn1_parameters != NULL) | 68 | if (c->cipher->set_asn1_parameters != NULL) |
| 69 | ret=c->cipher->set_asn1_parameters(c,type); | 69 | ret=c->cipher->set_asn1_parameters(c,type); |
| 70 | else | 70 | else |
| 71 | ret=-1; | 71 | return -1; |
| 72 | return(ret); | 72 | return(ret); |
| 73 | } | 73 | } |
| 74 | 74 | ||
| @@ -79,21 +79,20 @@ int EVP_CIPHER_asn1_to_param(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | |||
| 79 | if (c->cipher->get_asn1_parameters != NULL) | 79 | if (c->cipher->get_asn1_parameters != NULL) |
| 80 | ret=c->cipher->get_asn1_parameters(c,type); | 80 | ret=c->cipher->get_asn1_parameters(c,type); |
| 81 | else | 81 | else |
| 82 | ret=-1; | 82 | return -1; |
| 83 | return(ret); | 83 | return(ret); |
| 84 | } | 84 | } |
| 85 | 85 | ||
| 86 | int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | 86 | int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) |
| 87 | { | 87 | { |
| 88 | int i=0; | 88 | int i=0,l; |
| 89 | unsigned int l; | ||
| 90 | 89 | ||
| 91 | if (type != NULL) | 90 | if (type != NULL) |
| 92 | { | 91 | { |
| 93 | l=EVP_CIPHER_CTX_iv_length(c); | 92 | l=EVP_CIPHER_CTX_iv_length(c); |
| 94 | OPENSSL_assert(l <= sizeof(c->iv)); | 93 | OPENSSL_assert(l <= sizeof c->iv); |
| 95 | i=ASN1_TYPE_get_octetstring(type,c->oiv,l); | 94 | i=ASN1_TYPE_get_octetstring(type,c->oiv,l); |
| 96 | if (i != (int)l) | 95 | if (i != l) |
| 97 | return(-1); | 96 | return(-1); |
| 98 | else if (i > 0) | 97 | else if (i > 0) |
| 99 | memcpy(c->iv,c->oiv,l); | 98 | memcpy(c->iv,c->oiv,l); |
| @@ -103,13 +102,12 @@ int EVP_CIPHER_get_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | |||
| 103 | 102 | ||
| 104 | int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) | 103 | int EVP_CIPHER_set_asn1_iv(EVP_CIPHER_CTX *c, ASN1_TYPE *type) |
| 105 | { | 104 | { |
| 106 | int i=0; | 105 | int i=0,j; |
| 107 | unsigned int j; | ||
| 108 | 106 | ||
| 109 | if (type != NULL) | 107 | if (type != NULL) |
| 110 | { | 108 | { |
| 111 | j=EVP_CIPHER_CTX_iv_length(c); | 109 | j=EVP_CIPHER_CTX_iv_length(c); |
| 112 | OPENSSL_assert(j <= sizeof(c->iv)); | 110 | OPENSSL_assert(j <= sizeof c->iv); |
| 113 | i=ASN1_TYPE_set_octetstring(type,c->oiv,j); | 111 | i=ASN1_TYPE_set_octetstring(type,c->oiv,j); |
| 114 | } | 112 | } |
| 115 | return(i); | 113 | return(i); |
| @@ -168,112 +166,3 @@ int EVP_CIPHER_type(const EVP_CIPHER *ctx) | |||
| 168 | } | 166 | } |
| 169 | } | 167 | } |
| 170 | 168 | ||
| 171 | int EVP_CIPHER_block_size(const EVP_CIPHER *e) | ||
| 172 | { | ||
| 173 | return e->block_size; | ||
| 174 | } | ||
| 175 | |||
| 176 | int EVP_CIPHER_CTX_block_size(const EVP_CIPHER_CTX *ctx) | ||
| 177 | { | ||
| 178 | return ctx->cipher->block_size; | ||
| 179 | } | ||
| 180 | |||
| 181 | int EVP_Cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) | ||
| 182 | { | ||
| 183 | return ctx->cipher->do_cipher(ctx,out,in,inl); | ||
| 184 | } | ||
| 185 | |||
| 186 | const EVP_CIPHER *EVP_CIPHER_CTX_cipher(const EVP_CIPHER_CTX *ctx) | ||
| 187 | { | ||
| 188 | return ctx->cipher; | ||
| 189 | } | ||
| 190 | |||
| 191 | unsigned long EVP_CIPHER_flags(const EVP_CIPHER *cipher) | ||
| 192 | { | ||
| 193 | return cipher->flags; | ||
| 194 | } | ||
| 195 | |||
| 196 | unsigned long EVP_CIPHER_CTX_flags(const EVP_CIPHER_CTX *ctx) | ||
| 197 | { | ||
| 198 | return ctx->cipher->flags; | ||
| 199 | } | ||
| 200 | |||
| 201 | void *EVP_CIPHER_CTX_get_app_data(const EVP_CIPHER_CTX *ctx) | ||
| 202 | { | ||
| 203 | return ctx->app_data; | ||
| 204 | } | ||
| 205 | |||
| 206 | void EVP_CIPHER_CTX_set_app_data(EVP_CIPHER_CTX *ctx, void *data) | ||
| 207 | { | ||
| 208 | ctx->app_data = data; | ||
| 209 | } | ||
| 210 | |||
| 211 | int EVP_CIPHER_iv_length(const EVP_CIPHER *cipher) | ||
| 212 | { | ||
| 213 | return cipher->iv_len; | ||
| 214 | } | ||
| 215 | |||
| 216 | int EVP_CIPHER_CTX_iv_length(const EVP_CIPHER_CTX *ctx) | ||
| 217 | { | ||
| 218 | return ctx->cipher->iv_len; | ||
| 219 | } | ||
| 220 | |||
| 221 | int EVP_CIPHER_key_length(const EVP_CIPHER *cipher) | ||
| 222 | { | ||
| 223 | return cipher->key_len; | ||
| 224 | } | ||
| 225 | |||
| 226 | int EVP_CIPHER_CTX_key_length(const EVP_CIPHER_CTX *ctx) | ||
| 227 | { | ||
| 228 | return ctx->key_len; | ||
| 229 | } | ||
| 230 | |||
| 231 | int EVP_CIPHER_nid(const EVP_CIPHER *cipher) | ||
| 232 | { | ||
| 233 | return cipher->nid; | ||
| 234 | } | ||
| 235 | |||
| 236 | int EVP_CIPHER_CTX_nid(const EVP_CIPHER_CTX *ctx) | ||
| 237 | { | ||
| 238 | return ctx->cipher->nid; | ||
| 239 | } | ||
| 240 | |||
| 241 | int EVP_MD_block_size(const EVP_MD *md) | ||
| 242 | { | ||
| 243 | return md->block_size; | ||
| 244 | } | ||
| 245 | |||
| 246 | int EVP_MD_type(const EVP_MD *md) | ||
| 247 | { | ||
| 248 | return md->type; | ||
| 249 | } | ||
| 250 | |||
| 251 | int EVP_MD_pkey_type(const EVP_MD *md) | ||
| 252 | { | ||
| 253 | return md->pkey_type; | ||
| 254 | } | ||
| 255 | |||
| 256 | int EVP_MD_size(const EVP_MD *md) | ||
| 257 | { | ||
| 258 | return md->md_size; | ||
| 259 | } | ||
| 260 | |||
| 261 | const EVP_MD * EVP_MD_CTX_md(const EVP_MD_CTX *ctx) | ||
| 262 | { | ||
| 263 | return ctx->digest; | ||
| 264 | } | ||
| 265 | |||
| 266 | void EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags) | ||
| 267 | { | ||
| 268 | ctx->flags |= flags; | ||
| 269 | } | ||
| 270 | |||
| 271 | void EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags) | ||
| 272 | { | ||
| 273 | ctx->flags &= ~flags; | ||
| 274 | } | ||
| 275 | |||
| 276 | int EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags) | ||
| 277 | { | ||
| 278 | return (ctx->flags & flags); | ||
| 279 | } | ||
diff --git a/src/lib/libcrypto/evp/evp_locl.h b/src/lib/libcrypto/evp/evp_locl.h index 073b0adcff..f8c5343620 100644 --- a/src/lib/libcrypto/evp/evp_locl.h +++ b/src/lib/libcrypto/evp/evp_locl.h | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | bl = ctx->cipher->block_size;\ | 65 | bl = ctx->cipher->block_size;\ |
| 66 | if(inl < bl) return 1;\ | 66 | if(inl < bl) return 1;\ |
| 67 | inl -= bl; \ | 67 | inl -= bl; \ |
| 68 | for(i=0; i <= inl; i+=bl) | 68 | for(i=0; i <= inl; i+=bl) \ |
| 69 | 69 | ||
| 70 | #define BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \ | 70 | #define BLOCK_CIPHER_func_ecb(cname, cprefix, kstruct, ksched) \ |
| 71 | static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ | 71 | static int cname##_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ |
| @@ -92,7 +92,7 @@ static int cname##_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const uns | |||
| 92 | #define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \ | 92 | #define BLOCK_CIPHER_func_cfb(cname, cprefix, cbits, kstruct, ksched) \ |
| 93 | static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ | 93 | static int cname##_cfb##cbits##_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in, unsigned int inl) \ |
| 94 | {\ | 94 | {\ |
| 95 | cprefix##_cfb##cbits##_encrypt(in, out, (long)(cbits==1?inl*8:inl), &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\ | 95 | cprefix##_cfb##cbits##_encrypt(in, out, (long)inl, &((kstruct *)ctx->cipher_data)->ksched, ctx->iv, &ctx->num, ctx->encrypt);\ |
| 96 | return 1;\ | 96 | return 1;\ |
| 97 | } | 97 | } |
| 98 | 98 | ||
| @@ -226,11 +226,27 @@ const EVP_CIPHER *EVP_##cname##_ecb(void) { return &cname##_ecb; } | |||
| 226 | 226 | ||
| 227 | #define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data) | 227 | #define EVP_C_DATA(kstruct, ctx) ((kstruct *)(ctx)->cipher_data) |
| 228 | 228 | ||
| 229 | #define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len) \ | 229 | #define IMPLEMENT_CFBR(cipher,cprefix,kstruct,ksched,keysize,cbits,iv_len,flags) \ |
| 230 | BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \ | 230 | BLOCK_CIPHER_func_cfb(cipher##_##keysize,cprefix,cbits,kstruct,ksched) \ |
| 231 | BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \ | 231 | BLOCK_CIPHER_def_cfb(cipher##_##keysize,kstruct, \ |
| 232 | NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \ | 232 | NID_##cipher##_##keysize, keysize/8, iv_len, cbits, \ |
| 233 | 0, cipher##_init_key, NULL, \ | 233 | flags, cipher##_init_key, NULL, \ |
| 234 | EVP_CIPHER_set_asn1_iv, \ | 234 | EVP_CIPHER_set_asn1_iv, \ |
| 235 | EVP_CIPHER_get_asn1_iv, \ | 235 | EVP_CIPHER_get_asn1_iv, \ |
| 236 | NULL) | 236 | NULL) |
| 237 | |||
| 238 | #ifdef OPENSSL_FIPS | ||
| 239 | #define RC2_set_key private_RC2_set_key | ||
| 240 | #define RC4_set_key private_RC4_set_key | ||
| 241 | #define CAST_set_key private_CAST_set_key | ||
| 242 | #define RC5_32_set_key private_RC5_32_set_key | ||
| 243 | #define BF_set_key private_BF_set_key | ||
| 244 | #define idea_set_encrypt_key private_idea_set_encrypt_key | ||
| 245 | |||
| 246 | #define MD5_Init private_MD5_Init | ||
| 247 | #define MD4_Init private_MD4_Init | ||
| 248 | #define MD2_Init private_MD2_Init | ||
| 249 | #define MDC2_Init private_MDC2_Init | ||
| 250 | #define SHA_Init private_SHA_Init | ||
| 251 | |||
| 252 | #endif | ||
diff --git a/src/lib/libcrypto/evp/evp_pbe.c b/src/lib/libcrypto/evp/evp_pbe.c index c26d2de0f3..91e545a141 100644 --- a/src/lib/libcrypto/evp/evp_pbe.c +++ b/src/lib/libcrypto/evp/evp_pbe.c | |||
| @@ -74,7 +74,7 @@ const EVP_MD *md; | |||
| 74 | EVP_PBE_KEYGEN *keygen; | 74 | EVP_PBE_KEYGEN *keygen; |
| 75 | } EVP_PBE_CTL; | 75 | } EVP_PBE_CTL; |
| 76 | 76 | ||
| 77 | int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, | 77 | int EVP_PBE_CipherInit (ASN1_OBJECT *pbe_obj, const char *pass, int passlen, |
| 78 | ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de) | 78 | ASN1_TYPE *param, EVP_CIPHER_CTX *ctx, int en_de) |
| 79 | { | 79 | { |
| 80 | 80 | ||
| @@ -106,8 +106,7 @@ int EVP_PBE_CipherInit(ASN1_OBJECT *pbe_obj, const char *pass, int passlen, | |||
| 106 | 106 | ||
| 107 | static int pbe_cmp(const char * const *a, const char * const *b) | 107 | static int pbe_cmp(const char * const *a, const char * const *b) |
| 108 | { | 108 | { |
| 109 | const EVP_PBE_CTL * const *pbe1 = (const EVP_PBE_CTL * const *) a, | 109 | EVP_PBE_CTL **pbe1 = (EVP_PBE_CTL **) a, **pbe2 = (EVP_PBE_CTL **)b; |
| 110 | * const *pbe2 = (const EVP_PBE_CTL * const *)b; | ||
| 111 | return ((*pbe1)->pbe_nid - (*pbe2)->pbe_nid); | 110 | return ((*pbe1)->pbe_nid - (*pbe2)->pbe_nid); |
| 112 | } | 111 | } |
| 113 | 112 | ||
diff --git a/src/lib/libcrypto/evp/evp_pkey.c b/src/lib/libcrypto/evp/evp_pkey.c index 0147f3e02a..47a69932a5 100644 --- a/src/lib/libcrypto/evp/evp_pkey.c +++ b/src/lib/libcrypto/evp/evp_pkey.c | |||
| @@ -3,7 +3,7 @@ | |||
| 3 | * project 1999. | 3 | * project 1999. |
| 4 | */ | 4 | */ |
| 5 | /* ==================================================================== | 5 | /* ==================================================================== |
| 6 | * Copyright (c) 1999-2002 The OpenSSL Project. All rights reserved. | 6 | * Copyright (c) 1999 The OpenSSL Project. All rights reserved. |
| 7 | * | 7 | * |
| 8 | * Redistribution and use in source and binary forms, with or without | 8 | * Redistribution and use in source and binary forms, with or without |
| 9 | * modification, are permitted provided that the following conditions | 9 | * modification, are permitted provided that the following conditions |
| @@ -61,24 +61,14 @@ | |||
| 61 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 62 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
| 63 | #include <openssl/rand.h> | 63 | #include <openssl/rand.h> |
| 64 | #ifndef OPENSSL_NO_RSA | ||
| 65 | #include <openssl/rsa.h> | ||
| 66 | #endif | ||
| 67 | #ifndef OPENSSL_NO_DSA | ||
| 68 | #include <openssl/dsa.h> | ||
| 69 | #endif | ||
| 70 | #include <openssl/bn.h> | ||
| 71 | 64 | ||
| 72 | #ifndef OPENSSL_NO_DSA | 65 | #ifndef OPENSSL_NO_DSA |
| 73 | static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); | 66 | static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); |
| 74 | #endif | 67 | #endif |
| 75 | #ifndef OPENSSL_NO_EC | ||
| 76 | static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8inf, EVP_PKEY *pkey); | ||
| 77 | #endif | ||
| 78 | 68 | ||
| 79 | /* Extract a private key from a PKCS8 structure */ | 69 | /* Extract a private key from a PKCS8 structure */ |
| 80 | 70 | ||
| 81 | EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8) | 71 | EVP_PKEY *EVP_PKCS82PKEY (PKCS8_PRIV_KEY_INFO *p8) |
| 82 | { | 72 | { |
| 83 | EVP_PKEY *pkey = NULL; | 73 | EVP_PKEY *pkey = NULL; |
| 84 | #ifndef OPENSSL_NO_RSA | 74 | #ifndef OPENSSL_NO_RSA |
| @@ -86,24 +76,16 @@ EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8) | |||
| 86 | #endif | 76 | #endif |
| 87 | #ifndef OPENSSL_NO_DSA | 77 | #ifndef OPENSSL_NO_DSA |
| 88 | DSA *dsa = NULL; | 78 | DSA *dsa = NULL; |
| 89 | ASN1_TYPE *t1, *t2; | ||
| 90 | ASN1_INTEGER *privkey; | 79 | ASN1_INTEGER *privkey; |
| 80 | ASN1_TYPE *t1, *t2, *param = NULL; | ||
| 91 | STACK_OF(ASN1_TYPE) *ndsa = NULL; | 81 | STACK_OF(ASN1_TYPE) *ndsa = NULL; |
| 92 | #endif | ||
| 93 | #ifndef OPENSSL_NO_EC | ||
| 94 | EC_KEY *eckey = NULL; | ||
| 95 | const unsigned char *p_tmp; | ||
| 96 | #endif | ||
| 97 | #if !defined(OPENSSL_NO_DSA) || !defined(OPENSSL_NO_EC) | ||
| 98 | ASN1_TYPE *param = NULL; | ||
| 99 | BN_CTX *ctx = NULL; | 82 | BN_CTX *ctx = NULL; |
| 100 | int plen; | 83 | int plen; |
| 101 | #endif | 84 | #endif |
| 102 | X509_ALGOR *a; | 85 | X509_ALGOR *a; |
| 103 | const unsigned char *p; | 86 | unsigned char *p; |
| 104 | const unsigned char *cp; | 87 | const unsigned char *cp; |
| 105 | int pkeylen; | 88 | int pkeylen; |
| 106 | int nid; | ||
| 107 | char obj_tmp[80]; | 89 | char obj_tmp[80]; |
| 108 | 90 | ||
| 109 | if(p8->pkey->type == V_ASN1_OCTET_STRING) { | 91 | if(p8->pkey->type == V_ASN1_OCTET_STRING) { |
| @@ -120,8 +102,7 @@ EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8) | |||
| 120 | return NULL; | 102 | return NULL; |
| 121 | } | 103 | } |
| 122 | a = p8->pkeyalg; | 104 | a = p8->pkeyalg; |
| 123 | nid = OBJ_obj2nid(a->algorithm); | 105 | switch (OBJ_obj2nid(a->algorithm)) |
| 124 | switch(nid) | ||
| 125 | { | 106 | { |
| 126 | #ifndef OPENSSL_NO_RSA | 107 | #ifndef OPENSSL_NO_RSA |
| 127 | case NID_rsaEncryption: | 108 | case NID_rsaEncryption: |
| @@ -227,112 +208,6 @@ EVP_PKEY *EVP_PKCS82PKEY(PKCS8_PRIV_KEY_INFO *p8) | |||
| 227 | return NULL; | 208 | return NULL; |
| 228 | break; | 209 | break; |
| 229 | #endif | 210 | #endif |
| 230 | #ifndef OPENSSL_NO_EC | ||
| 231 | case NID_X9_62_id_ecPublicKey: | ||
| 232 | p_tmp = p; | ||
| 233 | /* extract the ec parameters */ | ||
| 234 | param = p8->pkeyalg->parameter; | ||
| 235 | |||
| 236 | if (!param || ((param->type != V_ASN1_SEQUENCE) && | ||
| 237 | (param->type != V_ASN1_OBJECT))) | ||
| 238 | { | ||
| 239 | EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); | ||
| 240 | goto ecerr; | ||
| 241 | } | ||
| 242 | |||
| 243 | if (param->type == V_ASN1_SEQUENCE) | ||
| 244 | { | ||
| 245 | cp = p = param->value.sequence->data; | ||
| 246 | plen = param->value.sequence->length; | ||
| 247 | |||
| 248 | if (!(eckey = d2i_ECParameters(NULL, &cp, plen))) | ||
| 249 | { | ||
| 250 | EVPerr(EVP_F_EVP_PKCS82PKEY, | ||
| 251 | EVP_R_DECODE_ERROR); | ||
| 252 | goto ecerr; | ||
| 253 | } | ||
| 254 | } | ||
| 255 | else | ||
| 256 | { | ||
| 257 | EC_GROUP *group; | ||
| 258 | cp = p = param->value.object->data; | ||
| 259 | plen = param->value.object->length; | ||
| 260 | |||
| 261 | /* type == V_ASN1_OBJECT => the parameters are given | ||
| 262 | * by an asn1 OID | ||
| 263 | */ | ||
| 264 | if ((eckey = EC_KEY_new()) == NULL) | ||
| 265 | { | ||
| 266 | EVPerr(EVP_F_EVP_PKCS82PKEY, | ||
| 267 | ERR_R_MALLOC_FAILURE); | ||
| 268 | goto ecerr; | ||
| 269 | } | ||
| 270 | group = EC_GROUP_new_by_curve_name(OBJ_obj2nid(a->parameter->value.object)); | ||
| 271 | if (group == NULL) | ||
| 272 | goto ecerr; | ||
| 273 | EC_GROUP_set_asn1_flag(group, OPENSSL_EC_NAMED_CURVE); | ||
| 274 | if (EC_KEY_set_group(eckey, group) == 0) | ||
| 275 | goto ecerr; | ||
| 276 | EC_GROUP_free(group); | ||
| 277 | } | ||
| 278 | |||
| 279 | /* We have parameters now set private key */ | ||
| 280 | if (!d2i_ECPrivateKey(&eckey, &p_tmp, pkeylen)) | ||
| 281 | { | ||
| 282 | EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_DECODE_ERROR); | ||
| 283 | goto ecerr; | ||
| 284 | } | ||
| 285 | |||
| 286 | /* calculate public key (if necessary) */ | ||
| 287 | if (EC_KEY_get0_public_key(eckey) == NULL) | ||
| 288 | { | ||
| 289 | const BIGNUM *priv_key; | ||
| 290 | const EC_GROUP *group; | ||
| 291 | EC_POINT *pub_key; | ||
| 292 | /* the public key was not included in the SEC1 private | ||
| 293 | * key => calculate the public key */ | ||
| 294 | group = EC_KEY_get0_group(eckey); | ||
| 295 | pub_key = EC_POINT_new(group); | ||
| 296 | if (pub_key == NULL) | ||
| 297 | { | ||
| 298 | EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); | ||
| 299 | goto ecerr; | ||
| 300 | } | ||
| 301 | if (!EC_POINT_copy(pub_key, EC_GROUP_get0_generator(group))) | ||
| 302 | { | ||
| 303 | EC_POINT_free(pub_key); | ||
| 304 | EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); | ||
| 305 | goto ecerr; | ||
| 306 | } | ||
| 307 | priv_key = EC_KEY_get0_private_key(eckey); | ||
| 308 | if (!EC_POINT_mul(group, pub_key, priv_key, NULL, NULL, ctx)) | ||
| 309 | { | ||
| 310 | EC_POINT_free(pub_key); | ||
| 311 | EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); | ||
| 312 | goto ecerr; | ||
| 313 | } | ||
| 314 | if (EC_KEY_set_public_key(eckey, pub_key) == 0) | ||
| 315 | { | ||
| 316 | EC_POINT_free(pub_key); | ||
| 317 | EVPerr(EVP_F_EVP_PKCS82PKEY, ERR_R_EC_LIB); | ||
| 318 | goto ecerr; | ||
| 319 | } | ||
| 320 | EC_POINT_free(pub_key); | ||
| 321 | } | ||
| 322 | |||
| 323 | EVP_PKEY_assign_EC_KEY(pkey, eckey); | ||
| 324 | if (ctx) | ||
| 325 | BN_CTX_free(ctx); | ||
| 326 | break; | ||
| 327 | ecerr: | ||
| 328 | if (ctx) | ||
| 329 | BN_CTX_free(ctx); | ||
| 330 | if (eckey) | ||
| 331 | EC_KEY_free(eckey); | ||
| 332 | if (pkey) | ||
| 333 | EVP_PKEY_free(pkey); | ||
| 334 | return NULL; | ||
| 335 | #endif | ||
| 336 | default: | 211 | default: |
| 337 | EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM); | 212 | EVPerr(EVP_F_EVP_PKCS82PKEY, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM); |
| 338 | if (!a->algorithm) BUF_strlcpy (obj_tmp, "NULL", sizeof obj_tmp); | 213 | if (!a->algorithm) BUF_strlcpy (obj_tmp, "NULL", sizeof obj_tmp); |
| @@ -356,17 +231,17 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken) | |||
| 356 | PKCS8_PRIV_KEY_INFO *p8; | 231 | PKCS8_PRIV_KEY_INFO *p8; |
| 357 | 232 | ||
| 358 | if (!(p8 = PKCS8_PRIV_KEY_INFO_new())) { | 233 | if (!(p8 = PKCS8_PRIV_KEY_INFO_new())) { |
| 359 | EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN,ERR_R_MALLOC_FAILURE); | 234 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 360 | return NULL; | 235 | return NULL; |
| 361 | } | 236 | } |
| 362 | p8->broken = broken; | 237 | p8->broken = broken; |
| 363 | if (!ASN1_INTEGER_set(p8->version, 0)) { | 238 | if (!ASN1_INTEGER_set(p8->version, 0)) { |
| 364 | EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN,ERR_R_MALLOC_FAILURE); | 239 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 365 | PKCS8_PRIV_KEY_INFO_free (p8); | 240 | PKCS8_PRIV_KEY_INFO_free (p8); |
| 366 | return NULL; | 241 | return NULL; |
| 367 | } | 242 | } |
| 368 | if (!(p8->pkeyalg->parameter = ASN1_TYPE_new ())) { | 243 | if (!(p8->pkeyalg->parameter = ASN1_TYPE_new ())) { |
| 369 | EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN,ERR_R_MALLOC_FAILURE); | 244 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 370 | PKCS8_PRIV_KEY_INFO_free (p8); | 245 | PKCS8_PRIV_KEY_INFO_free (p8); |
| 371 | return NULL; | 246 | return NULL; |
| 372 | } | 247 | } |
| @@ -379,9 +254,9 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken) | |||
| 379 | 254 | ||
| 380 | p8->pkeyalg->algorithm = OBJ_nid2obj(NID_rsaEncryption); | 255 | p8->pkeyalg->algorithm = OBJ_nid2obj(NID_rsaEncryption); |
| 381 | p8->pkeyalg->parameter->type = V_ASN1_NULL; | 256 | p8->pkeyalg->parameter->type = V_ASN1_NULL; |
| 382 | if (!ASN1_pack_string_of (EVP_PKEY,pkey, i2d_PrivateKey, | 257 | if (!ASN1_pack_string ((char *)pkey, i2d_PrivateKey, |
| 383 | &p8->pkey->value.octet_string)) { | 258 | &p8->pkey->value.octet_string)) { |
| 384 | EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN,ERR_R_MALLOC_FAILURE); | 259 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 385 | PKCS8_PRIV_KEY_INFO_free (p8); | 260 | PKCS8_PRIV_KEY_INFO_free (p8); |
| 386 | return NULL; | 261 | return NULL; |
| 387 | } | 262 | } |
| @@ -396,22 +271,13 @@ PKCS8_PRIV_KEY_INFO *EVP_PKEY2PKCS8_broken(EVP_PKEY *pkey, int broken) | |||
| 396 | 271 | ||
| 397 | break; | 272 | break; |
| 398 | #endif | 273 | #endif |
| 399 | #ifndef OPENSSL_NO_EC | ||
| 400 | case EVP_PKEY_EC: | ||
| 401 | if (!eckey_pkey2pkcs8(p8, pkey)) | ||
| 402 | { | ||
| 403 | PKCS8_PRIV_KEY_INFO_free(p8); | ||
| 404 | return(NULL); | ||
| 405 | } | ||
| 406 | break; | ||
| 407 | #endif | ||
| 408 | default: | 274 | default: |
| 409 | EVPerr(EVP_F_EVP_PKEY2PKCS8_BROKEN, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM); | 275 | EVPerr(EVP_F_EVP_PKEY2PKCS8, EVP_R_UNSUPPORTED_PRIVATE_KEY_ALGORITHM); |
| 410 | PKCS8_PRIV_KEY_INFO_free (p8); | 276 | PKCS8_PRIV_KEY_INFO_free (p8); |
| 411 | return NULL; | 277 | return NULL; |
| 412 | } | 278 | } |
| 413 | RAND_add(p8->pkey->value.octet_string->data, | 279 | RAND_add(p8->pkey->value.octet_string->data, |
| 414 | p8->pkey->value.octet_string->length, 0.0); | 280 | p8->pkey->value.octet_string->length, 0); |
| 415 | return p8; | 281 | return p8; |
| 416 | } | 282 | } |
| 417 | 283 | ||
| @@ -431,8 +297,10 @@ PKCS8_PRIV_KEY_INFO *PKCS8_set_broken(PKCS8_PRIV_KEY_INFO *p8, int broken) | |||
| 431 | break; | 297 | break; |
| 432 | 298 | ||
| 433 | default: | 299 | default: |
| 434 | EVPerr(EVP_F_PKCS8_SET_BROKEN,EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE); | 300 | EVPerr(EVP_F_EVP_PKCS8_SET_BROKEN,EVP_R_PKCS8_UNKNOWN_BROKEN_TYPE); |
| 435 | return NULL; | 301 | return NULL; |
| 302 | break; | ||
| 303 | |||
| 436 | } | 304 | } |
| 437 | } | 305 | } |
| 438 | 306 | ||
| @@ -449,24 +317,24 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 449 | p8->pkeyalg->algorithm = OBJ_nid2obj(NID_dsa); | 317 | p8->pkeyalg->algorithm = OBJ_nid2obj(NID_dsa); |
| 450 | len = i2d_DSAparams (pkey->pkey.dsa, NULL); | 318 | len = i2d_DSAparams (pkey->pkey.dsa, NULL); |
| 451 | if (!(p = OPENSSL_malloc(len))) { | 319 | if (!(p = OPENSSL_malloc(len))) { |
| 452 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 320 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 453 | goto err; | 321 | goto err; |
| 454 | } | 322 | } |
| 455 | q = p; | 323 | q = p; |
| 456 | i2d_DSAparams (pkey->pkey.dsa, &q); | 324 | i2d_DSAparams (pkey->pkey.dsa, &q); |
| 457 | if (!(params = ASN1_STRING_new())) { | 325 | if (!(params = ASN1_STRING_new())) { |
| 458 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 326 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 459 | goto err; | 327 | goto err; |
| 460 | } | 328 | } |
| 461 | if (!ASN1_STRING_set(params, p, len)) { | 329 | if (!ASN1_STRING_set(params, p, len)) { |
| 462 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 330 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 463 | goto err; | 331 | goto err; |
| 464 | } | 332 | } |
| 465 | OPENSSL_free(p); | 333 | OPENSSL_free(p); |
| 466 | p = NULL; | 334 | p = NULL; |
| 467 | /* Get private key into integer */ | 335 | /* Get private key into integer */ |
| 468 | if (!(prkey = BN_to_ASN1_INTEGER (pkey->pkey.dsa->priv_key, NULL))) { | 336 | if (!(prkey = BN_to_ASN1_INTEGER (pkey->pkey.dsa->priv_key, NULL))) { |
| 469 | EVPerr(EVP_F_DSA_PKEY2PKCS8,EVP_R_ENCODE_ERROR); | 337 | EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); |
| 470 | goto err; | 338 | goto err; |
| 471 | } | 339 | } |
| 472 | 340 | ||
| @@ -475,9 +343,9 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 475 | case PKCS8_OK: | 343 | case PKCS8_OK: |
| 476 | case PKCS8_NO_OCTET: | 344 | case PKCS8_NO_OCTET: |
| 477 | 345 | ||
| 478 | if (!ASN1_pack_string_of(ASN1_INTEGER,prkey, i2d_ASN1_INTEGER, | 346 | if (!ASN1_pack_string((char *)prkey, i2d_ASN1_INTEGER, |
| 479 | &p8->pkey->value.octet_string)) { | 347 | &p8->pkey->value.octet_string)) { |
| 480 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 348 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 481 | goto err; | 349 | goto err; |
| 482 | } | 350 | } |
| 483 | 351 | ||
| @@ -495,39 +363,39 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 495 | params = NULL; | 363 | params = NULL; |
| 496 | p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; | 364 | p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; |
| 497 | if (!(ndsa = sk_ASN1_TYPE_new_null())) { | 365 | if (!(ndsa = sk_ASN1_TYPE_new_null())) { |
| 498 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 366 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 499 | goto err; | 367 | goto err; |
| 500 | } | 368 | } |
| 501 | if (!(ttmp = ASN1_TYPE_new())) { | 369 | if (!(ttmp = ASN1_TYPE_new())) { |
| 502 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 370 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 503 | goto err; | 371 | goto err; |
| 504 | } | 372 | } |
| 505 | if (!(ttmp->value.integer = | 373 | if (!(ttmp->value.integer = |
| 506 | BN_to_ASN1_INTEGER(pkey->pkey.dsa->pub_key, NULL))) { | 374 | BN_to_ASN1_INTEGER(pkey->pkey.dsa->pub_key, NULL))) { |
| 507 | EVPerr(EVP_F_DSA_PKEY2PKCS8,EVP_R_ENCODE_ERROR); | 375 | EVPerr(EVP_F_EVP_PKEY2PKCS8,EVP_R_ENCODE_ERROR); |
| 508 | goto err; | 376 | goto err; |
| 509 | } | 377 | } |
| 510 | ttmp->type = V_ASN1_INTEGER; | 378 | ttmp->type = V_ASN1_INTEGER; |
| 511 | if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { | 379 | if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { |
| 512 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 380 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 513 | goto err; | 381 | goto err; |
| 514 | } | 382 | } |
| 515 | 383 | ||
| 516 | if (!(ttmp = ASN1_TYPE_new())) { | 384 | if (!(ttmp = ASN1_TYPE_new())) { |
| 517 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 385 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 518 | goto err; | 386 | goto err; |
| 519 | } | 387 | } |
| 520 | ttmp->value.integer = prkey; | 388 | ttmp->value.integer = prkey; |
| 521 | prkey = NULL; | 389 | prkey = NULL; |
| 522 | ttmp->type = V_ASN1_INTEGER; | 390 | ttmp->type = V_ASN1_INTEGER; |
| 523 | if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { | 391 | if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { |
| 524 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 392 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 525 | goto err; | 393 | goto err; |
| 526 | } | 394 | } |
| 527 | ttmp = NULL; | 395 | ttmp = NULL; |
| 528 | 396 | ||
| 529 | if (!(p8->pkey->value.octet_string = ASN1_OCTET_STRING_new())) { | 397 | if (!(p8->pkey->value.octet_string = ASN1_OCTET_STRING_new())) { |
| 530 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 398 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 531 | goto err; | 399 | goto err; |
| 532 | } | 400 | } |
| 533 | 401 | ||
| @@ -535,7 +403,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 535 | &p8->pkey->value.octet_string->data, | 403 | &p8->pkey->value.octet_string->data, |
| 536 | &p8->pkey->value.octet_string->length)) { | 404 | &p8->pkey->value.octet_string->length)) { |
| 537 | 405 | ||
| 538 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 406 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 539 | goto err; | 407 | goto err; |
| 540 | } | 408 | } |
| 541 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); | 409 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); |
| @@ -545,36 +413,36 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 545 | 413 | ||
| 546 | p8->pkeyalg->parameter->type = V_ASN1_NULL; | 414 | p8->pkeyalg->parameter->type = V_ASN1_NULL; |
| 547 | if (!(ndsa = sk_ASN1_TYPE_new_null())) { | 415 | if (!(ndsa = sk_ASN1_TYPE_new_null())) { |
| 548 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 416 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 549 | goto err; | 417 | goto err; |
| 550 | } | 418 | } |
| 551 | if (!(ttmp = ASN1_TYPE_new())) { | 419 | if (!(ttmp = ASN1_TYPE_new())) { |
| 552 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 420 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 553 | goto err; | 421 | goto err; |
| 554 | } | 422 | } |
| 555 | ttmp->value.sequence = params; | 423 | ttmp->value.sequence = params; |
| 556 | params = NULL; | 424 | params = NULL; |
| 557 | ttmp->type = V_ASN1_SEQUENCE; | 425 | ttmp->type = V_ASN1_SEQUENCE; |
| 558 | if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { | 426 | if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { |
| 559 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 427 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 560 | goto err; | 428 | goto err; |
| 561 | } | 429 | } |
| 562 | 430 | ||
| 563 | if (!(ttmp = ASN1_TYPE_new())) { | 431 | if (!(ttmp = ASN1_TYPE_new())) { |
| 564 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 432 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 565 | goto err; | 433 | goto err; |
| 566 | } | 434 | } |
| 567 | ttmp->value.integer = prkey; | 435 | ttmp->value.integer = prkey; |
| 568 | prkey = NULL; | 436 | prkey = NULL; |
| 569 | ttmp->type = V_ASN1_INTEGER; | 437 | ttmp->type = V_ASN1_INTEGER; |
| 570 | if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { | 438 | if (!sk_ASN1_TYPE_push(ndsa, ttmp)) { |
| 571 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 439 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 572 | goto err; | 440 | goto err; |
| 573 | } | 441 | } |
| 574 | ttmp = NULL; | 442 | ttmp = NULL; |
| 575 | 443 | ||
| 576 | if (!(p8->pkey->value.octet_string = ASN1_OCTET_STRING_new())) { | 444 | if (!(p8->pkey->value.octet_string = ASN1_OCTET_STRING_new())) { |
| 577 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 445 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 578 | goto err; | 446 | goto err; |
| 579 | } | 447 | } |
| 580 | 448 | ||
| @@ -582,7 +450,7 @@ static int dsa_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | |||
| 582 | &p8->pkey->value.octet_string->data, | 450 | &p8->pkey->value.octet_string->data, |
| 583 | &p8->pkey->value.octet_string->length)) { | 451 | &p8->pkey->value.octet_string->length)) { |
| 584 | 452 | ||
| 585 | EVPerr(EVP_F_DSA_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); | 453 | EVPerr(EVP_F_EVP_PKEY2PKCS8,ERR_R_MALLOC_FAILURE); |
| 586 | goto err; | 454 | goto err; |
| 587 | } | 455 | } |
| 588 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); | 456 | sk_ASN1_TYPE_pop_free(ndsa, ASN1_TYPE_free); |
| @@ -598,197 +466,3 @@ err: | |||
| 598 | return 0; | 466 | return 0; |
| 599 | } | 467 | } |
| 600 | #endif | 468 | #endif |
| 601 | |||
| 602 | #ifndef OPENSSL_NO_EC | ||
| 603 | static int eckey_pkey2pkcs8(PKCS8_PRIV_KEY_INFO *p8, EVP_PKEY *pkey) | ||
| 604 | { | ||
| 605 | EC_KEY *ec_key; | ||
| 606 | const EC_GROUP *group; | ||
| 607 | unsigned char *p, *pp; | ||
| 608 | int nid, i, ret = 0; | ||
| 609 | unsigned int tmp_flags, old_flags; | ||
| 610 | |||
| 611 | ec_key = pkey->pkey.ec; | ||
| 612 | if (ec_key == NULL || (group = EC_KEY_get0_group(ec_key)) == NULL) | ||
| 613 | { | ||
| 614 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, EVP_R_MISSING_PARAMETERS); | ||
| 615 | return 0; | ||
| 616 | } | ||
| 617 | |||
| 618 | /* set the ec parameters OID */ | ||
| 619 | if (p8->pkeyalg->algorithm) | ||
| 620 | ASN1_OBJECT_free(p8->pkeyalg->algorithm); | ||
| 621 | |||
| 622 | p8->pkeyalg->algorithm = OBJ_nid2obj(NID_X9_62_id_ecPublicKey); | ||
| 623 | |||
| 624 | /* set the ec parameters */ | ||
| 625 | |||
| 626 | if (p8->pkeyalg->parameter) | ||
| 627 | { | ||
| 628 | ASN1_TYPE_free(p8->pkeyalg->parameter); | ||
| 629 | p8->pkeyalg->parameter = NULL; | ||
| 630 | } | ||
| 631 | |||
| 632 | if ((p8->pkeyalg->parameter = ASN1_TYPE_new()) == NULL) | ||
| 633 | { | ||
| 634 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); | ||
| 635 | return 0; | ||
| 636 | } | ||
| 637 | |||
| 638 | if (EC_GROUP_get_asn1_flag(group) | ||
| 639 | && (nid = EC_GROUP_get_curve_name(group))) | ||
| 640 | { | ||
| 641 | /* we have a 'named curve' => just set the OID */ | ||
| 642 | p8->pkeyalg->parameter->type = V_ASN1_OBJECT; | ||
| 643 | p8->pkeyalg->parameter->value.object = OBJ_nid2obj(nid); | ||
| 644 | } | ||
| 645 | else /* explicit parameters */ | ||
| 646 | { | ||
| 647 | if ((i = i2d_ECParameters(ec_key, NULL)) == 0) | ||
| 648 | { | ||
| 649 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_EC_LIB); | ||
| 650 | return 0; | ||
| 651 | } | ||
| 652 | if ((p = (unsigned char *) OPENSSL_malloc(i)) == NULL) | ||
| 653 | { | ||
| 654 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); | ||
| 655 | return 0; | ||
| 656 | } | ||
| 657 | pp = p; | ||
| 658 | if (!i2d_ECParameters(ec_key, &pp)) | ||
| 659 | { | ||
| 660 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_EC_LIB); | ||
| 661 | OPENSSL_free(p); | ||
| 662 | return 0; | ||
| 663 | } | ||
| 664 | p8->pkeyalg->parameter->type = V_ASN1_SEQUENCE; | ||
| 665 | if ((p8->pkeyalg->parameter->value.sequence | ||
| 666 | = ASN1_STRING_new()) == NULL) | ||
| 667 | { | ||
| 668 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_ASN1_LIB); | ||
| 669 | OPENSSL_free(p); | ||
| 670 | return 0; | ||
| 671 | } | ||
| 672 | ASN1_STRING_set(p8->pkeyalg->parameter->value.sequence, p, i); | ||
| 673 | OPENSSL_free(p); | ||
| 674 | } | ||
| 675 | |||
| 676 | /* set the private key */ | ||
| 677 | |||
| 678 | /* do not include the parameters in the SEC1 private key | ||
| 679 | * see PKCS#11 12.11 */ | ||
| 680 | old_flags = EC_KEY_get_enc_flags(pkey->pkey.ec); | ||
| 681 | tmp_flags = old_flags | EC_PKEY_NO_PARAMETERS; | ||
| 682 | EC_KEY_set_enc_flags(pkey->pkey.ec, tmp_flags); | ||
| 683 | i = i2d_ECPrivateKey(pkey->pkey.ec, NULL); | ||
| 684 | if (!i) | ||
| 685 | { | ||
| 686 | EC_KEY_set_enc_flags(pkey->pkey.ec, old_flags); | ||
| 687 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_EC_LIB); | ||
| 688 | return 0; | ||
| 689 | } | ||
| 690 | p = (unsigned char *) OPENSSL_malloc(i); | ||
| 691 | if (!p) | ||
| 692 | { | ||
| 693 | EC_KEY_set_enc_flags(pkey->pkey.ec, old_flags); | ||
| 694 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); | ||
| 695 | return 0; | ||
| 696 | } | ||
| 697 | pp = p; | ||
| 698 | if (!i2d_ECPrivateKey(pkey->pkey.ec, &pp)) | ||
| 699 | { | ||
| 700 | EC_KEY_set_enc_flags(pkey->pkey.ec, old_flags); | ||
| 701 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_EC_LIB); | ||
| 702 | OPENSSL_free(p); | ||
| 703 | return 0; | ||
| 704 | } | ||
| 705 | /* restore old encoding flags */ | ||
| 706 | EC_KEY_set_enc_flags(pkey->pkey.ec, old_flags); | ||
| 707 | |||
| 708 | switch(p8->broken) { | ||
| 709 | |||
| 710 | case PKCS8_OK: | ||
| 711 | p8->pkey->value.octet_string = ASN1_OCTET_STRING_new(); | ||
| 712 | if (!p8->pkey->value.octet_string || | ||
| 713 | !M_ASN1_OCTET_STRING_set(p8->pkey->value.octet_string, | ||
| 714 | (const void *)p, i)) | ||
| 715 | |||
| 716 | { | ||
| 717 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8, ERR_R_MALLOC_FAILURE); | ||
| 718 | } | ||
| 719 | else | ||
| 720 | ret = 1; | ||
| 721 | break; | ||
| 722 | case PKCS8_NO_OCTET: /* RSA specific */ | ||
| 723 | case PKCS8_NS_DB: /* DSA specific */ | ||
| 724 | case PKCS8_EMBEDDED_PARAM: /* DSA specific */ | ||
| 725 | default: | ||
| 726 | EVPerr(EVP_F_ECKEY_PKEY2PKCS8,EVP_R_ENCODE_ERROR); | ||
| 727 | } | ||
| 728 | OPENSSL_cleanse(p, (size_t)i); | ||
| 729 | OPENSSL_free(p); | ||
| 730 | return ret; | ||
| 731 | } | ||
| 732 | #endif | ||
| 733 | |||
| 734 | /* EVP_PKEY attribute functions */ | ||
| 735 | |||
| 736 | int EVP_PKEY_get_attr_count(const EVP_PKEY *key) | ||
| 737 | { | ||
| 738 | return X509at_get_attr_count(key->attributes); | ||
| 739 | } | ||
| 740 | |||
| 741 | int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, | ||
| 742 | int lastpos) | ||
| 743 | { | ||
| 744 | return X509at_get_attr_by_NID(key->attributes, nid, lastpos); | ||
| 745 | } | ||
| 746 | |||
| 747 | int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, ASN1_OBJECT *obj, | ||
| 748 | int lastpos) | ||
| 749 | { | ||
| 750 | return X509at_get_attr_by_OBJ(key->attributes, obj, lastpos); | ||
| 751 | } | ||
| 752 | |||
| 753 | X509_ATTRIBUTE *EVP_PKEY_get_attr(const EVP_PKEY *key, int loc) | ||
| 754 | { | ||
| 755 | return X509at_get_attr(key->attributes, loc); | ||
| 756 | } | ||
| 757 | |||
| 758 | X509_ATTRIBUTE *EVP_PKEY_delete_attr(EVP_PKEY *key, int loc) | ||
| 759 | { | ||
| 760 | return X509at_delete_attr(key->attributes, loc); | ||
| 761 | } | ||
| 762 | |||
| 763 | int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) | ||
| 764 | { | ||
| 765 | if(X509at_add1_attr(&key->attributes, attr)) return 1; | ||
| 766 | return 0; | ||
| 767 | } | ||
| 768 | |||
| 769 | int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, | ||
| 770 | const ASN1_OBJECT *obj, int type, | ||
| 771 | const unsigned char *bytes, int len) | ||
| 772 | { | ||
| 773 | if(X509at_add1_attr_by_OBJ(&key->attributes, obj, | ||
| 774 | type, bytes, len)) return 1; | ||
| 775 | return 0; | ||
| 776 | } | ||
| 777 | |||
| 778 | int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, | ||
| 779 | int nid, int type, | ||
| 780 | const unsigned char *bytes, int len) | ||
| 781 | { | ||
| 782 | if(X509at_add1_attr_by_NID(&key->attributes, nid, | ||
| 783 | type, bytes, len)) return 1; | ||
| 784 | return 0; | ||
| 785 | } | ||
| 786 | |||
| 787 | int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, | ||
| 788 | const char *attrname, int type, | ||
| 789 | const unsigned char *bytes, int len) | ||
| 790 | { | ||
| 791 | if(X509at_add1_attr_by_txt(&key->attributes, attrname, | ||
| 792 | type, bytes, len)) return 1; | ||
| 793 | return 0; | ||
| 794 | } | ||
diff --git a/src/lib/libcrypto/evp/evp_test.c b/src/lib/libcrypto/evp/evp_test.c new file mode 100644 index 0000000000..a624cfd248 --- /dev/null +++ b/src/lib/libcrypto/evp/evp_test.c | |||
| @@ -0,0 +1,422 @@ | |||
| 1 | /* Written by Ben Laurie, 2001 */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * | ||
| 9 | * 1. Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * | ||
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer in | ||
| 14 | * the documentation and/or other materials provided with the | ||
| 15 | * distribution. | ||
| 16 | * | ||
| 17 | * 3. All advertising materials mentioning features or use of this | ||
| 18 | * software must display the following acknowledgment: | ||
| 19 | * "This product includes software developed by the OpenSSL Project | ||
| 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 21 | * | ||
| 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 23 | * endorse or promote products derived from this software without | ||
| 24 | * prior written permission. For written permission, please contact | ||
| 25 | * openssl-core@openssl.org. | ||
| 26 | * | ||
| 27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 28 | * nor may "OpenSSL" appear in their names without prior written | ||
| 29 | * permission of the OpenSSL Project. | ||
| 30 | * | ||
| 31 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 32 | * acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 35 | * | ||
| 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 48 | */ | ||
| 49 | |||
| 50 | #include <stdio.h> | ||
| 51 | #include <string.h> | ||
| 52 | |||
| 53 | #include "../e_os.h" | ||
| 54 | |||
| 55 | #include <openssl/evp.h> | ||
| 56 | #ifndef OPENSSL_NO_ENGINE | ||
| 57 | #include <openssl/engine.h> | ||
| 58 | #endif | ||
| 59 | #include <openssl/err.h> | ||
| 60 | #include <openssl/conf.h> | ||
| 61 | |||
| 62 | static void hexdump(FILE *f,const char *title,const unsigned char *s,int l) | ||
| 63 | { | ||
| 64 | int n=0; | ||
| 65 | |||
| 66 | fprintf(f,"%s",title); | ||
| 67 | for( ; n < l ; ++n) | ||
| 68 | { | ||
| 69 | if((n%16) == 0) | ||
| 70 | fprintf(f,"\n%04x",n); | ||
| 71 | fprintf(f," %02x",s[n]); | ||
| 72 | } | ||
| 73 | fprintf(f,"\n"); | ||
| 74 | } | ||
| 75 | |||
| 76 | static int convert(unsigned char *s) | ||
| 77 | { | ||
| 78 | unsigned char *d; | ||
| 79 | |||
| 80 | for(d=s ; *s ; s+=2,++d) | ||
| 81 | { | ||
| 82 | unsigned int n; | ||
| 83 | |||
| 84 | if(!s[1]) | ||
| 85 | { | ||
| 86 | fprintf(stderr,"Odd number of hex digits!"); | ||
| 87 | EXIT(4); | ||
| 88 | } | ||
| 89 | sscanf((char *)s,"%2x",&n); | ||
| 90 | *d=(unsigned char)n; | ||
| 91 | } | ||
| 92 | return s-d; | ||
| 93 | } | ||
| 94 | |||
| 95 | static char *sstrsep(char **string, const char *delim) | ||
| 96 | { | ||
| 97 | char isdelim[256]; | ||
| 98 | char *token = *string; | ||
| 99 | |||
| 100 | if (**string == 0) | ||
| 101 | return NULL; | ||
| 102 | |||
| 103 | memset(isdelim, 0, 256); | ||
| 104 | isdelim[0] = 1; | ||
| 105 | |||
| 106 | while (*delim) | ||
| 107 | { | ||
| 108 | isdelim[(unsigned char)(*delim)] = 1; | ||
| 109 | delim++; | ||
| 110 | } | ||
| 111 | |||
| 112 | while (!isdelim[(unsigned char)(**string)]) | ||
| 113 | { | ||
| 114 | (*string)++; | ||
| 115 | } | ||
| 116 | |||
| 117 | if (**string) | ||
| 118 | { | ||
| 119 | **string = 0; | ||
| 120 | (*string)++; | ||
| 121 | } | ||
| 122 | |||
| 123 | return token; | ||
| 124 | } | ||
| 125 | |||
| 126 | static unsigned char *ustrsep(char **p,const char *sep) | ||
| 127 | { return (unsigned char *)sstrsep(p,sep); } | ||
| 128 | |||
| 129 | static int test1_exit(int ec) | ||
| 130 | { | ||
| 131 | EXIT(ec); | ||
| 132 | return(0); /* To keep some compilers quiet */ | ||
| 133 | } | ||
| 134 | |||
| 135 | static void test1(const EVP_CIPHER *c,const unsigned char *key,int kn, | ||
| 136 | const unsigned char *iv,int in, | ||
| 137 | const unsigned char *plaintext,int pn, | ||
| 138 | const unsigned char *ciphertext,int cn, | ||
| 139 | int encdec,int multiplier) | ||
| 140 | { | ||
| 141 | EVP_CIPHER_CTX ctx; | ||
| 142 | unsigned char out[4096]; | ||
| 143 | int outl,outl2; | ||
| 144 | |||
| 145 | printf("Testing cipher %s%s\n",EVP_CIPHER_name(c), | ||
| 146 | (encdec == 1 ? "(encrypt)" : (encdec == 0 ? "(decrypt)" : "(encrypt/decrypt)"))); | ||
| 147 | hexdump(stdout,"Key",key,kn); | ||
| 148 | if(in) | ||
| 149 | hexdump(stdout,"IV",iv,in); | ||
| 150 | hexdump(stdout,"Plaintext",plaintext,pn); | ||
| 151 | hexdump(stdout,"Ciphertext",ciphertext,cn); | ||
| 152 | |||
| 153 | if(kn != c->key_len) | ||
| 154 | { | ||
| 155 | fprintf(stderr,"Key length doesn't match, got %d expected %d\n",kn, | ||
| 156 | c->key_len); | ||
| 157 | test1_exit(5); | ||
| 158 | } | ||
| 159 | EVP_CIPHER_CTX_init(&ctx); | ||
| 160 | if (encdec != 0) | ||
| 161 | { | ||
| 162 | if(!EVP_EncryptInit_ex(&ctx,c,NULL,key,iv)) | ||
| 163 | { | ||
| 164 | fprintf(stderr,"EncryptInit failed\n"); | ||
| 165 | ERR_print_errors_fp(stderr); | ||
| 166 | test1_exit(10); | ||
| 167 | } | ||
| 168 | EVP_CIPHER_CTX_set_padding(&ctx,0); | ||
| 169 | |||
| 170 | if(!EVP_EncryptUpdate(&ctx,out,&outl,plaintext,pn*multiplier)) | ||
| 171 | { | ||
| 172 | fprintf(stderr,"Encrypt failed\n"); | ||
| 173 | ERR_print_errors_fp(stderr); | ||
| 174 | test1_exit(6); | ||
| 175 | } | ||
| 176 | if(!EVP_EncryptFinal_ex(&ctx,out+outl,&outl2)) | ||
| 177 | { | ||
| 178 | fprintf(stderr,"EncryptFinal failed\n"); | ||
| 179 | ERR_print_errors_fp(stderr); | ||
| 180 | test1_exit(7); | ||
| 181 | } | ||
| 182 | |||
| 183 | if(outl+outl2 != cn*multiplier) | ||
| 184 | { | ||
| 185 | fprintf(stderr,"Ciphertext length mismatch got %d expected %d\n", | ||
| 186 | outl+outl2,cn); | ||
| 187 | test1_exit(8); | ||
| 188 | } | ||
| 189 | |||
| 190 | if(memcmp(out,ciphertext,cn)) | ||
| 191 | { | ||
| 192 | fprintf(stderr,"Ciphertext mismatch\n"); | ||
| 193 | hexdump(stderr,"Got",out,cn); | ||
| 194 | hexdump(stderr,"Expected",ciphertext,cn); | ||
| 195 | test1_exit(9); | ||
| 196 | } | ||
| 197 | } | ||
| 198 | |||
| 199 | if (encdec <= 0) | ||
| 200 | { | ||
| 201 | if(!EVP_DecryptInit_ex(&ctx,c,NULL,key,iv)) | ||
| 202 | { | ||
| 203 | fprintf(stderr,"DecryptInit failed\n"); | ||
| 204 | ERR_print_errors_fp(stderr); | ||
| 205 | test1_exit(11); | ||
| 206 | } | ||
| 207 | EVP_CIPHER_CTX_set_padding(&ctx,0); | ||
| 208 | |||
| 209 | if(!EVP_DecryptUpdate(&ctx,out,&outl,ciphertext,cn*multiplier)) | ||
| 210 | { | ||
| 211 | fprintf(stderr,"Decrypt failed\n"); | ||
| 212 | ERR_print_errors_fp(stderr); | ||
| 213 | test1_exit(6); | ||
| 214 | } | ||
| 215 | if(!EVP_DecryptFinal_ex(&ctx,out+outl,&outl2)) | ||
| 216 | { | ||
| 217 | fprintf(stderr,"DecryptFinal failed\n"); | ||
| 218 | ERR_print_errors_fp(stderr); | ||
| 219 | test1_exit(7); | ||
| 220 | } | ||
| 221 | |||
| 222 | if(outl+outl2 != cn*multiplier) | ||
| 223 | { | ||
| 224 | fprintf(stderr,"Plaintext length mismatch got %d expected %d\n", | ||
| 225 | outl+outl2,cn); | ||
| 226 | test1_exit(8); | ||
| 227 | } | ||
| 228 | |||
| 229 | if(memcmp(out,plaintext,cn)) | ||
| 230 | { | ||
| 231 | fprintf(stderr,"Plaintext mismatch\n"); | ||
| 232 | hexdump(stderr,"Got",out,cn); | ||
| 233 | hexdump(stderr,"Expected",plaintext,cn); | ||
| 234 | test1_exit(9); | ||
| 235 | } | ||
| 236 | } | ||
| 237 | |||
| 238 | EVP_CIPHER_CTX_cleanup(&ctx); | ||
| 239 | |||
| 240 | printf("\n"); | ||
| 241 | } | ||
| 242 | |||
| 243 | static int test_cipher(const char *cipher,const unsigned char *key,int kn, | ||
| 244 | const unsigned char *iv,int in, | ||
| 245 | const unsigned char *plaintext,int pn, | ||
| 246 | const unsigned char *ciphertext,int cn, | ||
| 247 | int encdec,int multiplier) | ||
| 248 | { | ||
| 249 | const EVP_CIPHER *c; | ||
| 250 | |||
| 251 | c=EVP_get_cipherbyname(cipher); | ||
| 252 | if(!c) | ||
| 253 | return 0; | ||
| 254 | |||
| 255 | test1(c,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec,multiplier); | ||
| 256 | |||
| 257 | return 1; | ||
| 258 | } | ||
| 259 | |||
| 260 | static int test_digest(const char *digest, | ||
| 261 | const unsigned char *plaintext,int pn, | ||
| 262 | const unsigned char *ciphertext, unsigned int cn) | ||
| 263 | { | ||
| 264 | const EVP_MD *d; | ||
| 265 | EVP_MD_CTX ctx; | ||
| 266 | unsigned char md[EVP_MAX_MD_SIZE]; | ||
| 267 | unsigned int mdn; | ||
| 268 | |||
| 269 | d=EVP_get_digestbyname(digest); | ||
| 270 | if(!d) | ||
| 271 | return 0; | ||
| 272 | |||
| 273 | printf("Testing digest %s\n",EVP_MD_name(d)); | ||
| 274 | hexdump(stdout,"Plaintext",plaintext,pn); | ||
| 275 | hexdump(stdout,"Digest",ciphertext,cn); | ||
| 276 | |||
| 277 | EVP_MD_CTX_init(&ctx); | ||
| 278 | if(!EVP_DigestInit_ex(&ctx,d, NULL)) | ||
| 279 | { | ||
| 280 | fprintf(stderr,"DigestInit failed\n"); | ||
| 281 | ERR_print_errors_fp(stderr); | ||
| 282 | EXIT(100); | ||
| 283 | } | ||
| 284 | if(!EVP_DigestUpdate(&ctx,plaintext,pn)) | ||
| 285 | { | ||
| 286 | fprintf(stderr,"DigestUpdate failed\n"); | ||
| 287 | ERR_print_errors_fp(stderr); | ||
| 288 | EXIT(101); | ||
| 289 | } | ||
| 290 | if(!EVP_DigestFinal_ex(&ctx,md,&mdn)) | ||
| 291 | { | ||
| 292 | fprintf(stderr,"DigestFinal failed\n"); | ||
| 293 | ERR_print_errors_fp(stderr); | ||
| 294 | EXIT(101); | ||
| 295 | } | ||
| 296 | EVP_MD_CTX_cleanup(&ctx); | ||
| 297 | |||
| 298 | if(mdn != cn) | ||
| 299 | { | ||
| 300 | fprintf(stderr,"Digest length mismatch, got %d expected %d\n",mdn,cn); | ||
| 301 | EXIT(102); | ||
| 302 | } | ||
| 303 | |||
| 304 | if(memcmp(md,ciphertext,cn)) | ||
| 305 | { | ||
| 306 | fprintf(stderr,"Digest mismatch\n"); | ||
| 307 | hexdump(stderr,"Got",md,cn); | ||
| 308 | hexdump(stderr,"Expected",ciphertext,cn); | ||
| 309 | EXIT(103); | ||
| 310 | } | ||
| 311 | |||
| 312 | printf("\n"); | ||
| 313 | |||
| 314 | EVP_MD_CTX_cleanup(&ctx); | ||
| 315 | |||
| 316 | return 1; | ||
| 317 | } | ||
| 318 | |||
| 319 | int main(int argc,char **argv) | ||
| 320 | { | ||
| 321 | const char *szTestFile; | ||
| 322 | FILE *f; | ||
| 323 | |||
| 324 | if(argc != 2) | ||
| 325 | { | ||
| 326 | fprintf(stderr,"%s <test file>\n",argv[0]); | ||
| 327 | EXIT(1); | ||
| 328 | } | ||
| 329 | CRYPTO_malloc_debug_init(); | ||
| 330 | CRYPTO_set_mem_debug_options(V_CRYPTO_MDEBUG_ALL); | ||
| 331 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
| 332 | |||
| 333 | szTestFile=argv[1]; | ||
| 334 | |||
| 335 | f=fopen(szTestFile,"r"); | ||
| 336 | if(!f) | ||
| 337 | { | ||
| 338 | perror(szTestFile); | ||
| 339 | EXIT(2); | ||
| 340 | } | ||
| 341 | |||
| 342 | /* Load up the software EVP_CIPHER and EVP_MD definitions */ | ||
| 343 | OpenSSL_add_all_ciphers(); | ||
| 344 | OpenSSL_add_all_digests(); | ||
| 345 | #ifndef OPENSSL_NO_ENGINE | ||
| 346 | /* Load all compiled-in ENGINEs */ | ||
| 347 | ENGINE_load_builtin_engines(); | ||
| 348 | #endif | ||
| 349 | #if 0 | ||
| 350 | OPENSSL_config(); | ||
| 351 | #endif | ||
| 352 | #ifndef OPENSSL_NO_ENGINE | ||
| 353 | /* Register all available ENGINE implementations of ciphers and digests. | ||
| 354 | * This could perhaps be changed to "ENGINE_register_all_complete()"? */ | ||
| 355 | ENGINE_register_all_ciphers(); | ||
| 356 | ENGINE_register_all_digests(); | ||
| 357 | /* If we add command-line options, this statement should be switchable. | ||
| 358 | * It'll prevent ENGINEs being ENGINE_init()ialised for cipher/digest use if | ||
| 359 | * they weren't already initialised. */ | ||
| 360 | /* ENGINE_set_cipher_flags(ENGINE_CIPHER_FLAG_NOINIT); */ | ||
| 361 | #endif | ||
| 362 | |||
| 363 | for( ; ; ) | ||
| 364 | { | ||
| 365 | char line[4096]; | ||
| 366 | char *p; | ||
| 367 | char *cipher; | ||
| 368 | unsigned char *iv,*key,*plaintext,*ciphertext; | ||
| 369 | int encdec; | ||
| 370 | int kn,in,pn,cn; | ||
| 371 | int multiplier=1; | ||
| 372 | |||
| 373 | if(!fgets((char *)line,sizeof line,f)) | ||
| 374 | break; | ||
| 375 | if(line[0] == '#' || line[0] == '\n') | ||
| 376 | continue; | ||
| 377 | p=line; | ||
| 378 | cipher=sstrsep(&p,":"); | ||
| 379 | key=ustrsep(&p,":"); | ||
| 380 | iv=ustrsep(&p,":"); | ||
| 381 | plaintext=ustrsep(&p,":"); | ||
| 382 | ciphertext=ustrsep(&p,":"); | ||
| 383 | if (p[-1] == '\n') { | ||
| 384 | p[-1] = '\0'; | ||
| 385 | encdec = -1; | ||
| 386 | } else { | ||
| 387 | encdec = atoi(sstrsep(&p,"\n")); | ||
| 388 | } | ||
| 389 | |||
| 390 | |||
| 391 | kn=convert(key); | ||
| 392 | in=convert(iv); | ||
| 393 | pn=convert(plaintext); | ||
| 394 | cn=convert(ciphertext); | ||
| 395 | |||
| 396 | if(strchr(cipher,'*')) | ||
| 397 | { | ||
| 398 | p=cipher; | ||
| 399 | sstrsep(&p,"*"); | ||
| 400 | multiplier=atoi(sstrsep(&p,"*")); | ||
| 401 | } | ||
| 402 | |||
| 403 | if(!test_cipher(cipher,key,kn,iv,in,plaintext,pn,ciphertext,cn,encdec, | ||
| 404 | multiplier) | ||
| 405 | && !test_digest(cipher,plaintext,pn,ciphertext,cn)) | ||
| 406 | { | ||
| 407 | fprintf(stderr,"Can't find %s\n",cipher); | ||
| 408 | EXIT(3); | ||
| 409 | } | ||
| 410 | } | ||
| 411 | |||
| 412 | #ifndef OPENSSL_NO_ENGINE | ||
| 413 | ENGINE_cleanup(); | ||
| 414 | #endif | ||
| 415 | EVP_cleanup(); | ||
| 416 | CRYPTO_cleanup_all_ex_data(); | ||
| 417 | ERR_remove_state(0); | ||
| 418 | ERR_free_strings(); | ||
| 419 | CRYPTO_mem_leaks_fp(stderr); | ||
| 420 | |||
| 421 | return 0; | ||
| 422 | } | ||
diff --git a/src/lib/libcrypto/evp/evptests.txt b/src/lib/libcrypto/evp/evptests.txt new file mode 100644 index 0000000000..dfe91a5bc0 --- /dev/null +++ b/src/lib/libcrypto/evp/evptests.txt | |||
| @@ -0,0 +1,288 @@ | |||
| 1 | #cipher:key:iv:plaintext:ciphertext:0/1(decrypt/encrypt) | ||
| 2 | #digest:::input:output | ||
| 3 | |||
| 4 | # SHA(1) tests (from shatest.c) | ||
| 5 | SHA1:::616263:a9993e364706816aba3e25717850c26c9cd0d89d | ||
| 6 | |||
| 7 | # MD5 tests (from md5test.c) | ||
| 8 | MD5::::d41d8cd98f00b204e9800998ecf8427e | ||
| 9 | MD5:::61:0cc175b9c0f1b6a831c399e269772661 | ||
| 10 | MD5:::616263:900150983cd24fb0d6963f7d28e17f72 | ||
| 11 | MD5:::6d65737361676520646967657374:f96b697d7cb7938d525a2f31aaf161d0 | ||
| 12 | MD5:::6162636465666768696a6b6c6d6e6f707172737475767778797a:c3fcd3d76192e4007dfb496cca67e13b | ||
| 13 | MD5:::4142434445464748494a4b4c4d4e4f505152535455565758595a6162636465666768696a6b6c6d6e6f707172737475767778797a30313233343536373839:d174ab98d277d9f5a5611c2c9f419d9f | ||
| 14 | MD5:::3132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930313233343536373839303132333435363738393031323334353637383930:57edf4a22be3c955ac49da2e2107b67a | ||
| 15 | |||
| 16 | # AES 128 ECB tests (from FIPS-197 test vectors, encrypt) | ||
| 17 | |||
| 18 | AES-128-ECB:000102030405060708090A0B0C0D0E0F::00112233445566778899AABBCCDDEEFF:69C4E0D86A7B0430D8CDB78070B4C55A:1 | ||
| 19 | |||
| 20 | # AES 192 ECB tests (from FIPS-197 test vectors, encrypt) | ||
| 21 | |||
| 22 | AES-192-ECB:000102030405060708090A0B0C0D0E0F1011121314151617::00112233445566778899AABBCCDDEEFF:DDA97CA4864CDFE06EAF70A0EC0D7191:1 | ||
| 23 | |||
| 24 | # AES 256 ECB tests (from FIPS-197 test vectors, encrypt) | ||
| 25 | |||
| 26 | AES-256-ECB:000102030405060708090A0B0C0D0E0F101112131415161718191A1B1C1D1E1F::00112233445566778899AABBCCDDEEFF:8EA2B7CA516745BFEAFC49904B496089:1 | ||
| 27 | |||
| 28 | # AES 128 ECB tests (from NIST test vectors, encrypt) | ||
| 29 | |||
| 30 | #AES-128-ECB:00000000000000000000000000000000::00000000000000000000000000000000:C34C052CC0DA8D73451AFE5F03BE297F:1 | ||
| 31 | |||
| 32 | # AES 128 ECB tests (from NIST test vectors, decrypt) | ||
| 33 | |||
| 34 | #AES-128-ECB:00000000000000000000000000000000::44416AC2D1F53C583303917E6BE9EBE0:00000000000000000000000000000000:0 | ||
| 35 | |||
| 36 | # AES 192 ECB tests (from NIST test vectors, decrypt) | ||
| 37 | |||
| 38 | #AES-192-ECB:000000000000000000000000000000000000000000000000::48E31E9E256718F29229319C19F15BA4:00000000000000000000000000000000:0 | ||
| 39 | |||
| 40 | # AES 256 ECB tests (from NIST test vectors, decrypt) | ||
| 41 | |||
| 42 | #AES-256-ECB:0000000000000000000000000000000000000000000000000000000000000000::058CCFFDBBCB382D1F6F56585D8A4ADE:00000000000000000000000000000000:0 | ||
| 43 | |||
| 44 | # AES 128 CBC tests (from NIST test vectors, encrypt) | ||
| 45 | |||
| 46 | #AES-128-CBC:00000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:8A05FC5E095AF4848A08D328D3688E3D:1 | ||
| 47 | |||
| 48 | # AES 192 CBC tests (from NIST test vectors, encrypt) | ||
| 49 | |||
| 50 | #AES-192-CBC:000000000000000000000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:7BD966D53AD8C1BB85D2ADFAE87BB104:1 | ||
| 51 | |||
| 52 | # AES 256 CBC tests (from NIST test vectors, encrypt) | ||
| 53 | |||
| 54 | #AES-256-CBC:0000000000000000000000000000000000000000000000000000000000000000:00000000000000000000000000000000:00000000000000000000000000000000:FE3C53653E2F45B56FCD88B2CC898FF0:1 | ||
| 55 | |||
| 56 | # AES 128 CBC tests (from NIST test vectors, decrypt) | ||
| 57 | |||
| 58 | #AES-128-CBC:00000000000000000000000000000000:00000000000000000000000000000000:FACA37E0B0C85373DF706E73F7C9AF86:00000000000000000000000000000000:0 | ||
| 59 | |||
| 60 | # AES tests from NIST document SP800-38A | ||
| 61 | # For all ECB encrypts and decrypts, the transformed sequence is | ||
| 62 | # AES-bits-ECB:key::plaintext:ciphertext:encdec | ||
| 63 | # ECB-AES128.Encrypt and ECB-AES128.Decrypt | ||
| 64 | AES-128-ECB:2B7E151628AED2A6ABF7158809CF4F3C::6BC1BEE22E409F96E93D7E117393172A:3AD77BB40D7A3660A89ECAF32466EF97 | ||
| 65 | AES-128-ECB:2B7E151628AED2A6ABF7158809CF4F3C::AE2D8A571E03AC9C9EB76FAC45AF8E51:F5D3D58503B9699DE785895A96FDBAAF | ||
| 66 | AES-128-ECB:2B7E151628AED2A6ABF7158809CF4F3C::30C81C46A35CE411E5FBC1191A0A52EF:43B1CD7F598ECE23881B00E3ED030688 | ||
| 67 | AES-128-ECB:2B7E151628AED2A6ABF7158809CF4F3C::F69F2445DF4F9B17AD2B417BE66C3710:7B0C785E27E8AD3F8223207104725DD4 | ||
| 68 | # ECB-AES192.Encrypt and ECB-AES192.Decrypt | ||
| 69 | AES-192-ECB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B::6BC1BEE22E409F96E93D7E117393172A:BD334F1D6E45F25FF712A214571FA5CC | ||
| 70 | AES-192-ECB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B::AE2D8A571E03AC9C9EB76FAC45AF8E51:974104846D0AD3AD7734ECB3ECEE4EEF | ||
| 71 | AES-192-ECB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B::30C81C46A35CE411E5FBC1191A0A52EF:EF7AFD2270E2E60ADCE0BA2FACE6444E | ||
| 72 | AES-192-ECB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B::F69F2445DF4F9B17AD2B417BE66C3710:9A4B41BA738D6C72FB16691603C18E0E | ||
| 73 | # ECB-AES256.Encrypt and ECB-AES256.Decrypt | ||
| 74 | AES-256-ECB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4::6BC1BEE22E409F96E93D7E117393172A:F3EED1BDB5D2A03C064B5A7E3DB181F8 | ||
| 75 | AES-256-ECB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4::AE2D8A571E03AC9C9EB76FAC45AF8E51:591CCB10D410ED26DC5BA74A31362870 | ||
| 76 | AES-256-ECB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4::30C81C46A35CE411E5FBC1191A0A52EF:B6ED21B99CA6F4F9F153E7B1BEAFED1D | ||
| 77 | AES-256-ECB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4::F69F2445DF4F9B17AD2B417BE66C3710:23304B7A39F9F3FF067D8D8F9E24ECC7 | ||
| 78 | # For all CBC encrypts and decrypts, the transformed sequence is | ||
| 79 | # AES-bits-CBC:key:IV/ciphertext':plaintext:ciphertext:encdec | ||
| 80 | # CBC-AES128.Encrypt and CBC-AES128.Decrypt | ||
| 81 | AES-128-CBC:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:7649ABAC8119B246CEE98E9B12E9197D | ||
| 82 | AES-128-CBC:2B7E151628AED2A6ABF7158809CF4F3C:7649ABAC8119B246CEE98E9B12E9197D:AE2D8A571E03AC9C9EB76FAC45AF8E51:5086CB9B507219EE95DB113A917678B2 | ||
| 83 | AES-128-CBC:2B7E151628AED2A6ABF7158809CF4F3C:5086CB9B507219EE95DB113A917678B2:30C81C46A35CE411E5FBC1191A0A52EF:73BED6B8E3C1743B7116E69E22229516 | ||
| 84 | AES-128-CBC:2B7E151628AED2A6ABF7158809CF4F3C:73BED6B8E3C1743B7116E69E22229516:F69F2445DF4F9B17AD2B417BE66C3710:3FF1CAA1681FAC09120ECA307586E1A7 | ||
| 85 | # CBC-AES192.Encrypt and CBC-AES192.Decrypt | ||
| 86 | AES-192-CBC:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:4F021DB243BC633D7178183A9FA071E8 | ||
| 87 | AES-192-CBC:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:4F021DB243BC633D7178183A9FA071E8:AE2D8A571E03AC9C9EB76FAC45AF8E51:B4D9ADA9AD7DEDF4E5E738763F69145A | ||
| 88 | AES-192-CBC:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:B4D9ADA9AD7DEDF4E5E738763F69145A:30C81C46A35CE411E5FBC1191A0A52EF:571B242012FB7AE07FA9BAAC3DF102E0 | ||
| 89 | AES-192-CBC:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:571B242012FB7AE07FA9BAAC3DF102E0:F69F2445DF4F9B17AD2B417BE66C3710:08B0E27988598881D920A9E64F5615CD | ||
| 90 | # CBC-AES256.Encrypt and CBC-AES256.Decrypt | ||
| 91 | AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:F58C4C04D6E5F1BA779EABFB5F7BFBD6 | ||
| 92 | AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:F58C4C04D6E5F1BA779EABFB5F7BFBD6:AE2D8A571E03AC9C9EB76FAC45AF8E51:9CFC4E967EDB808D679F777BC6702C7D | ||
| 93 | AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:9CFC4E967EDB808D679F777BC6702C7D:30C81C46A35CE411E5FBC1191A0A52EF:39F23369A9D9BACFA530E26304231461 | ||
| 94 | AES-256-CBC:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39F23369A9D9BACFA530E26304231461:F69F2445DF4F9B17AD2B417BE66C3710:B2EB05E2C39BE9FCDA6C19078C6A9D1B | ||
| 95 | |||
| 96 | # CFB1-AES128.Encrypt | ||
| 97 | |||
| 98 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:1 | ||
| 99 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:1 | ||
| 100 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:1 | ||
| 101 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:1 | ||
| 102 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:1 | ||
| 103 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:1 | ||
| 104 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:1 | ||
| 105 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:1 | ||
| 106 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:1 | ||
| 107 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:1 | ||
| 108 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:1 | ||
| 109 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:1 | ||
| 110 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:1 | ||
| 111 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:1 | ||
| 112 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:1 | ||
| 113 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:1 | ||
| 114 | # all of the above packed into one... | ||
| 115 | # in: 0110 1011 1100 0001 = 6bc1 | ||
| 116 | # out: 0110 1000 1011 0011 = 68b3 | ||
| 117 | AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:1 | ||
| 118 | |||
| 119 | # CFB1-AES128.Decrypt | ||
| 120 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:00:00:0 | ||
| 121 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00020406080a0c0e10121416181a1c1e:80:80:0 | ||
| 122 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0004080c1014181c2024282c3034383d:80:80:0 | ||
| 123 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0008101820283038404850586068707b:00:00:0 | ||
| 124 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:00102030405060708090a0b0c0d0e0f6:80:80:0 | ||
| 125 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0020406080a0c0e10121416181a1c1ed:00:00:0 | ||
| 126 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:004080c1014181c2024282c3034383da:80:00:0 | ||
| 127 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:008101820283038404850586068707b4:80:00:0 | ||
| 128 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f68:80:80:0 | ||
| 129 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:020406080a0c0e10121416181a1c1ed1:80:00:0 | ||
| 130 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:04080c1014181c2024282c3034383da2:00:80:0 | ||
| 131 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:08101820283038404850586068707b45:00:80:0 | ||
| 132 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:102030405060708090a0b0c0d0e0f68b:00:00:0 | ||
| 133 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:20406080a0c0e10121416181a1c1ed16:00:00:0 | ||
| 134 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:4080c1014181c2024282c3034383da2c:00:80:0 | ||
| 135 | AES-128-CFB1:2b7e151628aed2a6abf7158809cf4f3c:8101820283038404850586068707b459:80:80:0 | ||
| 136 | # all of the above packed into one... | ||
| 137 | # in: 0110 1000 1011 0011 = 68b3 | ||
| 138 | # out: 0110 1011 1100 0001 = 6bc1 | ||
| 139 | AES-128-CFB1*8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1:68b3:0 | ||
| 140 | |||
| 141 | # TODO: CFB1-AES192 and 256 | ||
| 142 | |||
| 143 | # CFB8-AES128.Encrypt | ||
| 144 | |||
| 145 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:1 | ||
| 146 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:1 | ||
| 147 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:1 | ||
| 148 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:1 | ||
| 149 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:1 | ||
| 150 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:1 | ||
| 151 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:1 | ||
| 152 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:1 | ||
| 153 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:1 | ||
| 154 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:1 | ||
| 155 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:1 | ||
| 156 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:1 | ||
| 157 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:1 | ||
| 158 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:1 | ||
| 159 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:1 | ||
| 160 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:1 | ||
| 161 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:1 | ||
| 162 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:1 | ||
| 163 | # all of the above packed into one | ||
| 164 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:1 | ||
| 165 | |||
| 166 | # CFB8-AES128.Decrypt | ||
| 167 | |||
| 168 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6b:3b:0 | ||
| 169 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0102030405060708090a0b0c0d0e0f3b:c1:79:0 | ||
| 170 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:02030405060708090a0b0c0d0e0f3b79:be:42:0 | ||
| 171 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:030405060708090a0b0c0d0e0f3b7942:e2:4c:0 | ||
| 172 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0405060708090a0b0c0d0e0f3b79424c:2e:9c:0 | ||
| 173 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:05060708090a0b0c0d0e0f3b79424c9c:40:0d:0 | ||
| 174 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:060708090a0b0c0d0e0f3b79424c9c0d:9f:d4:0 | ||
| 175 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0708090a0b0c0d0e0f3b79424c9c0dd4:96:36:0 | ||
| 176 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:08090a0b0c0d0e0f3b79424c9c0dd436:e9:ba:0 | ||
| 177 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:090a0b0c0d0e0f3b79424c9c0dd436ba:3d:ce:0 | ||
| 178 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0a0b0c0d0e0f3b79424c9c0dd436bace:7e:9e:0 | ||
| 179 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0b0c0d0e0f3b79424c9c0dd436bace9e:11:0e:0 | ||
| 180 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0c0d0e0f3b79424c9c0dd436bace9e0e:73:d4:0 | ||
| 181 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0d0e0f3b79424c9c0dd436bace9e0ed4:93:58:0 | ||
| 182 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0e0f3b79424c9c0dd436bace9e0ed458:17:6a:0 | ||
| 183 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:0f3b79424c9c0dd436bace9e0ed4586a:2a:4f:0 | ||
| 184 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:3b79424c9c0dd436bace9e0ed4586a4f:ae:32:0 | ||
| 185 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:79424c9c0dd436bace9e0ed4586a4f32:2d:b9:0 | ||
| 186 | # all of the above packed into one | ||
| 187 | AES-128-CFB8:2b7e151628aed2a6abf7158809cf4f3c:000102030405060708090a0b0c0d0e0f:6bc1bee22e409f96e93d7e117393172aae2d:3b79424c9c0dd436bace9e0ed4586a4f32b9:0 | ||
| 188 | |||
| 189 | # TODO: 192 and 256 bit keys | ||
| 190 | |||
| 191 | # For all CFB128 encrypts and decrypts, the transformed sequence is | ||
| 192 | # AES-bits-CFB:key:IV/ciphertext':plaintext:ciphertext:encdec | ||
| 193 | # CFB128-AES128.Encrypt | ||
| 194 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:3B3FD92EB72DAD20333449F8E83CFB4A:1 | ||
| 195 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:3B3FD92EB72DAD20333449F8E83CFB4A:AE2D8A571E03AC9C9EB76FAC45AF8E51:C8A64537A0B3A93FCDE3CDAD9F1CE58B:1 | ||
| 196 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:C8A64537A0B3A93FCDE3CDAD9F1CE58B:30C81C46A35CE411E5FBC1191A0A52EF:26751F67A3CBB140B1808CF187A4F4DF:1 | ||
| 197 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:26751F67A3CBB140B1808CF187A4F4DF:F69F2445DF4F9B17AD2B417BE66C3710:C04B05357C5D1C0EEAC4C66F9FF7F2E6:1 | ||
| 198 | # CFB128-AES128.Decrypt | ||
| 199 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:3B3FD92EB72DAD20333449F8E83CFB4A:0 | ||
| 200 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:3B3FD92EB72DAD20333449F8E83CFB4A:AE2D8A571E03AC9C9EB76FAC45AF8E51:C8A64537A0B3A93FCDE3CDAD9F1CE58B:0 | ||
| 201 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:C8A64537A0B3A93FCDE3CDAD9F1CE58B:30C81C46A35CE411E5FBC1191A0A52EF:26751F67A3CBB140B1808CF187A4F4DF:0 | ||
| 202 | AES-128-CFB:2B7E151628AED2A6ABF7158809CF4F3C:26751F67A3CBB140B1808CF187A4F4DF:F69F2445DF4F9B17AD2B417BE66C3710:C04B05357C5D1C0EEAC4C66F9FF7F2E6:0 | ||
| 203 | # CFB128-AES192.Encrypt | ||
| 204 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:CDC80D6FDDF18CAB34C25909C99A4174:1 | ||
| 205 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:CDC80D6FDDF18CAB34C25909C99A4174:AE2D8A571E03AC9C9EB76FAC45AF8E51:67CE7F7F81173621961A2B70171D3D7A:1 | ||
| 206 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:67CE7F7F81173621961A2B70171D3D7A:30C81C46A35CE411E5FBC1191A0A52EF:2E1E8A1DD59B88B1C8E60FED1EFAC4C9:1 | ||
| 207 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:2E1E8A1DD59B88B1C8E60FED1EFAC4C9:F69F2445DF4F9B17AD2B417BE66C3710:C05F9F9CA9834FA042AE8FBA584B09FF:1 | ||
| 208 | # CFB128-AES192.Decrypt | ||
| 209 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:CDC80D6FDDF18CAB34C25909C99A4174:0 | ||
| 210 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:CDC80D6FDDF18CAB34C25909C99A4174:AE2D8A571E03AC9C9EB76FAC45AF8E51:67CE7F7F81173621961A2B70171D3D7A:0 | ||
| 211 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:67CE7F7F81173621961A2B70171D3D7A:30C81C46A35CE411E5FBC1191A0A52EF:2E1E8A1DD59B88B1C8E60FED1EFAC4C9:0 | ||
| 212 | AES-192-CFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:2E1E8A1DD59B88B1C8E60FED1EFAC4C9:F69F2445DF4F9B17AD2B417BE66C3710:C05F9F9CA9834FA042AE8FBA584B09FF:0 | ||
| 213 | # CFB128-AES256.Encrypt | ||
| 214 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:DC7E84BFDA79164B7ECD8486985D3860:1 | ||
| 215 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:DC7E84BFDA79164B7ECD8486985D3860:AE2D8A571E03AC9C9EB76FAC45AF8E51:39FFED143B28B1C832113C6331E5407B:1 | ||
| 216 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39FFED143B28B1C832113C6331E5407B:30C81C46A35CE411E5FBC1191A0A52EF:DF10132415E54B92A13ED0A8267AE2F9:1 | ||
| 217 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:DF10132415E54B92A13ED0A8267AE2F9:F69F2445DF4F9B17AD2B417BE66C3710:75A385741AB9CEF82031623D55B1E471:1 | ||
| 218 | # CFB128-AES256.Decrypt | ||
| 219 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:DC7E84BFDA79164B7ECD8486985D3860:0 | ||
| 220 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:DC7E84BFDA79164B7ECD8486985D3860:AE2D8A571E03AC9C9EB76FAC45AF8E51:39FFED143B28B1C832113C6331E5407B:0 | ||
| 221 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:39FFED143B28B1C832113C6331E5407B:30C81C46A35CE411E5FBC1191A0A52EF:DF10132415E54B92A13ED0A8267AE2F9:0 | ||
| 222 | AES-256-CFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:DF10132415E54B92A13ED0A8267AE2F9:F69F2445DF4F9B17AD2B417BE66C3710:75A385741AB9CEF82031623D55B1E471:0 | ||
| 223 | # For all OFB encrypts and decrypts, the transformed sequence is | ||
| 224 | # AES-bits-CFB:key:IV/output':plaintext:ciphertext:encdec | ||
| 225 | # OFB-AES128.Encrypt | ||
| 226 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:3B3FD92EB72DAD20333449F8E83CFB4A:1 | ||
| 227 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:50FE67CC996D32B6DA0937E99BAFEC60:AE2D8A571E03AC9C9EB76FAC45AF8E51:7789508D16918F03F53C52DAC54ED825:1 | ||
| 228 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:D9A4DADA0892239F6B8B3D7680E15674:30C81C46A35CE411E5FBC1191A0A52EF:9740051E9C5FECF64344F7A82260EDCC:1 | ||
| 229 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:A78819583F0308E7A6BF36B1386ABF23:F69F2445DF4F9B17AD2B417BE66C3710:304C6528F659C77866A510D9C1D6AE5E:1 | ||
| 230 | # OFB-AES128.Decrypt | ||
| 231 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:3B3FD92EB72DAD20333449F8E83CFB4A:0 | ||
| 232 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:50FE67CC996D32B6DA0937E99BAFEC60:AE2D8A571E03AC9C9EB76FAC45AF8E51:7789508D16918F03F53C52DAC54ED825:0 | ||
| 233 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:D9A4DADA0892239F6B8B3D7680E15674:30C81C46A35CE411E5FBC1191A0A52EF:9740051E9C5FECF64344F7A82260EDCC:0 | ||
| 234 | AES-128-OFB:2B7E151628AED2A6ABF7158809CF4F3C:A78819583F0308E7A6BF36B1386ABF23:F69F2445DF4F9B17AD2B417BE66C3710:304C6528F659C77866A510D9C1D6AE5E:0 | ||
| 235 | # OFB-AES192.Encrypt | ||
| 236 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:CDC80D6FDDF18CAB34C25909C99A4174:1 | ||
| 237 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:A609B38DF3B1133DDDFF2718BA09565E:AE2D8A571E03AC9C9EB76FAC45AF8E51:FCC28B8D4C63837C09E81700C1100401:1 | ||
| 238 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:52EF01DA52602FE0975F78AC84BF8A50:30C81C46A35CE411E5FBC1191A0A52EF:8D9A9AEAC0F6596F559C6D4DAF59A5F2:1 | ||
| 239 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:BD5286AC63AABD7EB067AC54B553F71D:F69F2445DF4F9B17AD2B417BE66C3710:6D9F200857CA6C3E9CAC524BD9ACC92A:1 | ||
| 240 | # OFB-AES192.Decrypt | ||
| 241 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:CDC80D6FDDF18CAB34C25909C99A4174:0 | ||
| 242 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:A609B38DF3B1133DDDFF2718BA09565E:AE2D8A571E03AC9C9EB76FAC45AF8E51:FCC28B8D4C63837C09E81700C1100401:0 | ||
| 243 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:52EF01DA52602FE0975F78AC84BF8A50:30C81C46A35CE411E5FBC1191A0A52EF:8D9A9AEAC0F6596F559C6D4DAF59A5F2:0 | ||
| 244 | AES-192-OFB:8E73B0F7DA0E6452C810F32B809079E562F8EAD2522C6B7B:BD5286AC63AABD7EB067AC54B553F71D:F69F2445DF4F9B17AD2B417BE66C3710:6D9F200857CA6C3E9CAC524BD9ACC92A:0 | ||
| 245 | # OFB-AES256.Encrypt | ||
| 246 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:DC7E84BFDA79164B7ECD8486985D3860:1 | ||
| 247 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:B7BF3A5DF43989DD97F0FA97EBCE2F4A:AE2D8A571E03AC9C9EB76FAC45AF8E51:4FEBDC6740D20B3AC88F6AD82A4FB08D:1 | ||
| 248 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:E1C656305ED1A7A6563805746FE03EDC:30C81C46A35CE411E5FBC1191A0A52EF:71AB47A086E86EEDF39D1C5BBA97C408:1 | ||
| 249 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:41635BE625B48AFC1666DD42A09D96E7:F69F2445DF4F9B17AD2B417BE66C3710:0126141D67F37BE8538F5A8BE740E484:1 | ||
| 250 | # OFB-AES256.Decrypt | ||
| 251 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:000102030405060708090A0B0C0D0E0F:6BC1BEE22E409F96E93D7E117393172A:DC7E84BFDA79164B7ECD8486985D3860:0 | ||
| 252 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:B7BF3A5DF43989DD97F0FA97EBCE2F4A:AE2D8A571E03AC9C9EB76FAC45AF8E51:4FEBDC6740D20B3AC88F6AD82A4FB08D:0 | ||
| 253 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:E1C656305ED1A7A6563805746FE03EDC:30C81C46A35CE411E5FBC1191A0A52EF:71AB47A086E86EEDF39D1C5BBA97C408:0 | ||
| 254 | AES-256-OFB:603DEB1015CA71BE2B73AEF0857D77811F352C073B6108D72D9810A30914DFF4:41635BE625B48AFC1666DD42A09D96E7:F69F2445DF4F9B17AD2B417BE66C3710:0126141D67F37BE8538F5A8BE740E484:0 | ||
| 255 | |||
| 256 | # DES ECB tests (from destest) | ||
| 257 | |||
| 258 | DES-ECB:0000000000000000::0000000000000000:8CA64DE9C1B123A7 | ||
| 259 | DES-ECB:FFFFFFFFFFFFFFFF::FFFFFFFFFFFFFFFF:7359B2163E4EDC58 | ||
| 260 | DES-ECB:3000000000000000::1000000000000001:958E6E627A05557B | ||
| 261 | DES-ECB:1111111111111111::1111111111111111:F40379AB9E0EC533 | ||
| 262 | DES-ECB:0123456789ABCDEF::1111111111111111:17668DFC7292532D | ||
| 263 | DES-ECB:1111111111111111::0123456789ABCDEF:8A5AE1F81AB8F2DD | ||
| 264 | DES-ECB:FEDCBA9876543210::0123456789ABCDEF:ED39D950FA74BCC4 | ||
| 265 | |||
| 266 | # DESX-CBC tests (from destest) | ||
| 267 | DESX-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363534333231204E6F77206973207468652074696D6520666F722000000000:846B2914851E9A2954732F8AA0A611C115CDC2D7951B1053A63C5E03B21AA3C4 | ||
| 268 | |||
| 269 | # DES EDE3 CBC tests (from destest) | ||
| 270 | DES-EDE3-CBC:0123456789abcdeff1e0d3c2b5a49786fedcba9876543210:fedcba9876543210:37363534333231204E6F77206973207468652074696D6520666F722000000000:3FE301C962AC01D02213763C1CBD4CDC799657C064ECF5D41C673812CFDE9675 | ||
| 271 | |||
| 272 | # DES CFB1 from FIPS 81 | ||
| 273 | # plaintext: 0100 1110 0110 1111 0111 0111 = 4e6f77 | ||
| 274 | # ciphertext: 1100 1101 0001 1110 1100 1001 = cd1ec9 | ||
| 275 | |||
| 276 | DES-CFB1*8:0123456789abcdef:1234567890abcdef:4e6f77:cd1ec9 | ||
| 277 | |||
| 278 | # DES CFB8 from FIPS 81 | ||
| 279 | |||
| 280 | DES-CFB8:0123456789abcdef:1234567890abcdef:4e6f7720697320746865:f31fda07011462ee187f | ||
| 281 | |||
| 282 | # RC4 tests (from rc4test) | ||
| 283 | RC4:0123456789abcdef0123456789abcdef::0123456789abcdef:75b7878099e0c596 | ||
| 284 | RC4:0123456789abcdef0123456789abcdef::0000000000000000:7494c2e7104b0879 | ||
| 285 | RC4:00000000000000000000000000000000::0000000000000000:de188941a3375d3a | ||
| 286 | RC4:ef012345ef012345ef012345ef012345::0000000000000000000000000000000000000000:d6a141a7ec3c38dfbd615a1162e1c7ba36b67858 | ||
| 287 | RC4:0123456789abcdef0123456789abcdef::123456789ABCDEF0123456789ABCDEF0123456789ABCDEF012345678:66a0949f8af7d6891f7f832ba833c00c892ebe30143ce28740011ecf | ||
| 288 | RC4:ef012345ef012345ef012345ef012345::00000000000000000000:d6a141a7ec3c38dfbd61 | ||
diff --git a/src/lib/libcrypto/evp/m_dss.c b/src/lib/libcrypto/evp/m_dss.c index a948c77fa4..d393eb3400 100644 --- a/src/lib/libcrypto/evp/m_dss.c +++ b/src/lib/libcrypto/evp/m_dss.c | |||
| @@ -61,16 +61,12 @@ | |||
| 61 | #include <openssl/evp.h> | 61 | #include <openssl/evp.h> |
| 62 | #include <openssl/objects.h> | 62 | #include <openssl/objects.h> |
| 63 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
| 64 | #ifndef OPENSSL_NO_DSA | ||
| 65 | #include <openssl/dsa.h> | ||
| 66 | #endif | ||
| 67 | 64 | ||
| 68 | #ifndef OPENSSL_NO_SHA | 65 | #ifndef OPENSSL_NO_SHA |
| 69 | |||
| 70 | static int init(EVP_MD_CTX *ctx) | 66 | static int init(EVP_MD_CTX *ctx) |
| 71 | { return SHA1_Init(ctx->md_data); } | 67 | { return SHA1_Init(ctx->md_data); } |
| 72 | 68 | ||
| 73 | static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | 69 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 74 | { return SHA1_Update(ctx->md_data,data,count); } | 70 | { return SHA1_Update(ctx->md_data,data,count); } |
| 75 | 71 | ||
| 76 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | 72 | static int final(EVP_MD_CTX *ctx,unsigned char *md) |
| @@ -81,7 +77,7 @@ static const EVP_MD dsa_md= | |||
| 81 | NID_dsaWithSHA, | 77 | NID_dsaWithSHA, |
| 82 | NID_dsaWithSHA, | 78 | NID_dsaWithSHA, |
| 83 | SHA_DIGEST_LENGTH, | 79 | SHA_DIGEST_LENGTH, |
| 84 | 0, | 80 | EVP_MD_FLAG_FIPS, |
| 85 | init, | 81 | init, |
| 86 | update, | 82 | update, |
| 87 | final, | 83 | final, |
diff --git a/src/lib/libcrypto/evp/m_dss1.c b/src/lib/libcrypto/evp/m_dss1.c index c12e13972b..23b90d0538 100644 --- a/src/lib/libcrypto/evp/m_dss1.c +++ b/src/lib/libcrypto/evp/m_dss1.c | |||
| @@ -56,23 +56,25 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_SHA | ||
| 59 | #include <stdio.h> | 60 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_SHA | ||
| 63 | |||
| 64 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 65 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 66 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
| 67 | #ifndef OPENSSL_NO_DSA | ||
| 68 | #include <openssl/dsa.h> | ||
| 69 | #endif | ||
| 70 | 65 | ||
| 71 | static int init(EVP_MD_CTX *ctx) | 66 | static int init(EVP_MD_CTX *ctx) |
| 72 | { return SHA1_Init(ctx->md_data); } | 67 | { return SHA1_Init(ctx->md_data); } |
| 73 | 68 | ||
| 74 | static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | 69 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 70 | #ifndef OPENSSL_FIPS | ||
| 75 | { return SHA1_Update(ctx->md_data,data,count); } | 71 | { return SHA1_Update(ctx->md_data,data,count); } |
| 72 | #else | ||
| 73 | { | ||
| 74 | OPENSSL_assert(sizeof(count)<=sizeof(size_t)); | ||
| 75 | return SHA1_Update(ctx->md_data,data,count); | ||
| 76 | } | ||
| 77 | #endif | ||
| 76 | 78 | ||
| 77 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | 79 | static int final(EVP_MD_CTX *ctx,unsigned char *md) |
| 78 | { return SHA1_Final(md,ctx->md_data); } | 80 | { return SHA1_Final(md,ctx->md_data); } |
| @@ -82,7 +84,7 @@ static const EVP_MD dss1_md= | |||
| 82 | NID_dsa, | 84 | NID_dsa, |
| 83 | NID_dsaWithSHA1, | 85 | NID_dsaWithSHA1, |
| 84 | SHA_DIGEST_LENGTH, | 86 | SHA_DIGEST_LENGTH, |
| 85 | 0, | 87 | EVP_MD_FLAG_FIPS, |
| 86 | init, | 88 | init, |
| 87 | update, | 89 | update, |
| 88 | final, | 90 | final, |
diff --git a/src/lib/libcrypto/evp/m_md2.c b/src/lib/libcrypto/evp/m_md2.c new file mode 100644 index 0000000000..0df48e5199 --- /dev/null +++ b/src/lib/libcrypto/evp/m_md2.c | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /* crypto/evp/m_md2.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 OPENSSL_NO_MD2 | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include "evp_locl.h" | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/x509.h> | ||
| 66 | #include <openssl/md2.h> | ||
| 67 | |||
| 68 | static int init(EVP_MD_CTX *ctx) | ||
| 69 | { return MD2_Init(ctx->md_data); } | ||
| 70 | |||
| 71 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
| 72 | { return MD2_Update(ctx->md_data,data,count); } | ||
| 73 | |||
| 74 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
| 75 | { return MD2_Final(md,ctx->md_data); } | ||
| 76 | |||
| 77 | static const EVP_MD md2_md= | ||
| 78 | { | ||
| 79 | NID_md2, | ||
| 80 | NID_md2WithRSAEncryption, | ||
| 81 | MD2_DIGEST_LENGTH, | ||
| 82 | 0, | ||
| 83 | init, | ||
| 84 | update, | ||
| 85 | final, | ||
| 86 | NULL, | ||
| 87 | NULL, | ||
| 88 | EVP_PKEY_RSA_method, | ||
| 89 | MD2_BLOCK, | ||
| 90 | sizeof(EVP_MD *)+sizeof(MD2_CTX), | ||
| 91 | }; | ||
| 92 | |||
| 93 | const EVP_MD *EVP_md2(void) | ||
| 94 | { | ||
| 95 | return(&md2_md); | ||
| 96 | } | ||
| 97 | #endif | ||
diff --git a/src/lib/libcrypto/evp/m_md4.c b/src/lib/libcrypto/evp/m_md4.c index 1e0b7c5b42..0605e4b707 100644 --- a/src/lib/libcrypto/evp/m_md4.c +++ b/src/lib/libcrypto/evp/m_md4.c | |||
| @@ -56,23 +56,19 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_MD4 | ||
| 59 | #include <stdio.h> | 60 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_MD4 | ||
| 63 | |||
| 64 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 63 | #include "evp_locl.h" | ||
| 65 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 66 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
| 67 | #include <openssl/md4.h> | 66 | #include <openssl/md4.h> |
| 68 | #ifndef OPENSSL_NO_RSA | ||
| 69 | #include <openssl/rsa.h> | ||
| 70 | #endif | ||
| 71 | 67 | ||
| 72 | static int init(EVP_MD_CTX *ctx) | 68 | static int init(EVP_MD_CTX *ctx) |
| 73 | { return MD4_Init(ctx->md_data); } | 69 | { return MD4_Init(ctx->md_data); } |
| 74 | 70 | ||
| 75 | static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | 71 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 76 | { return MD4_Update(ctx->md_data,data,count); } | 72 | { return MD4_Update(ctx->md_data,data,count); } |
| 77 | 73 | ||
| 78 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | 74 | static int final(EVP_MD_CTX *ctx,unsigned char *md) |
diff --git a/src/lib/libcrypto/evp/m_md5.c b/src/lib/libcrypto/evp/m_md5.c index 63c142119e..752615d473 100644 --- a/src/lib/libcrypto/evp/m_md5.c +++ b/src/lib/libcrypto/evp/m_md5.c | |||
| @@ -56,23 +56,19 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_MD5 | ||
| 59 | #include <stdio.h> | 60 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_MD5 | ||
| 63 | |||
| 64 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 63 | #include "evp_locl.h" | ||
| 65 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 66 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
| 67 | #include <openssl/md5.h> | 66 | #include <openssl/md5.h> |
| 68 | #ifndef OPENSSL_NO_RSA | ||
| 69 | #include <openssl/rsa.h> | ||
| 70 | #endif | ||
| 71 | 67 | ||
| 72 | static int init(EVP_MD_CTX *ctx) | 68 | static int init(EVP_MD_CTX *ctx) |
| 73 | { return MD5_Init(ctx->md_data); } | 69 | { return MD5_Init(ctx->md_data); } |
| 74 | 70 | ||
| 75 | static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | 71 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 76 | { return MD5_Update(ctx->md_data,data,count); } | 72 | { return MD5_Update(ctx->md_data,data,count); } |
| 77 | 73 | ||
| 78 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | 74 | static int final(EVP_MD_CTX *ctx,unsigned char *md) |
diff --git a/src/lib/libcrypto/evp/m_mdc2.c b/src/lib/libcrypto/evp/m_mdc2.c new file mode 100644 index 0000000000..62de1336b8 --- /dev/null +++ b/src/lib/libcrypto/evp/m_mdc2.c | |||
| @@ -0,0 +1,97 @@ | |||
| 1 | /* crypto/evp/m_mdc2.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 OPENSSL_NO_MDC2 | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include <openssl/evp.h> | ||
| 63 | #include "evp_locl.h" | ||
| 64 | #include <openssl/objects.h> | ||
| 65 | #include <openssl/x509.h> | ||
| 66 | #include <openssl/mdc2.h> | ||
| 67 | |||
| 68 | static int init(EVP_MD_CTX *ctx) | ||
| 69 | { return MDC2_Init(ctx->md_data); } | ||
| 70 | |||
| 71 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
| 72 | { return MDC2_Update(ctx->md_data,data,count); } | ||
| 73 | |||
| 74 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
| 75 | { return MDC2_Final(md,ctx->md_data); } | ||
| 76 | |||
| 77 | static const EVP_MD mdc2_md= | ||
| 78 | { | ||
| 79 | NID_mdc2, | ||
| 80 | NID_mdc2WithRSA, | ||
| 81 | MDC2_DIGEST_LENGTH, | ||
| 82 | 0, | ||
| 83 | init, | ||
| 84 | update, | ||
| 85 | final, | ||
| 86 | NULL, | ||
| 87 | NULL, | ||
| 88 | EVP_PKEY_RSA_ASN1_OCTET_STRING_method, | ||
| 89 | MDC2_BLOCK, | ||
| 90 | sizeof(EVP_MD *)+sizeof(MDC2_CTX), | ||
| 91 | }; | ||
| 92 | |||
| 93 | const EVP_MD *EVP_mdc2(void) | ||
| 94 | { | ||
| 95 | return(&mdc2_md); | ||
| 96 | } | ||
| 97 | #endif | ||
diff --git a/src/lib/libcrypto/evp/m_null.c b/src/lib/libcrypto/evp/m_null.c index cb0721699d..f6f0a1d2c0 100644 --- a/src/lib/libcrypto/evp/m_null.c +++ b/src/lib/libcrypto/evp/m_null.c | |||
| @@ -65,7 +65,7 @@ | |||
| 65 | static int init(EVP_MD_CTX *ctx) | 65 | static int init(EVP_MD_CTX *ctx) |
| 66 | { return 1; } | 66 | { return 1; } |
| 67 | 67 | ||
| 68 | static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | 68 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 69 | { return 1; } | 69 | { return 1; } |
| 70 | 70 | ||
| 71 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | 71 | static int final(EVP_MD_CTX *ctx,unsigned char *md) |
diff --git a/src/lib/libcrypto/evp/m_ripemd.c b/src/lib/libcrypto/evp/m_ripemd.c index a1d60ee78d..64725528dc 100644 --- a/src/lib/libcrypto/evp/m_ripemd.c +++ b/src/lib/libcrypto/evp/m_ripemd.c | |||
| @@ -56,23 +56,18 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_RIPEMD | ||
| 59 | #include <stdio.h> | 60 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_RIPEMD | ||
| 63 | |||
| 64 | #include <openssl/ripemd.h> | 62 | #include <openssl/ripemd.h> |
| 65 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 66 | #include <openssl/objects.h> | 64 | #include <openssl/objects.h> |
| 67 | #include <openssl/x509.h> | 65 | #include <openssl/x509.h> |
| 68 | #ifndef OPENSSL_NO_RSA | ||
| 69 | #include <openssl/rsa.h> | ||
| 70 | #endif | ||
| 71 | 66 | ||
| 72 | static int init(EVP_MD_CTX *ctx) | 67 | static int init(EVP_MD_CTX *ctx) |
| 73 | { return RIPEMD160_Init(ctx->md_data); } | 68 | { return RIPEMD160_Init(ctx->md_data); } |
| 74 | 69 | ||
| 75 | static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | 70 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 76 | { return RIPEMD160_Update(ctx->md_data,data,count); } | 71 | { return RIPEMD160_Update(ctx->md_data,data,count); } |
| 77 | 72 | ||
| 78 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | 73 | static int final(EVP_MD_CTX *ctx,unsigned char *md) |
diff --git a/src/lib/libcrypto/evp/m_sha.c b/src/lib/libcrypto/evp/m_sha.c new file mode 100644 index 0000000000..ed54909b16 --- /dev/null +++ b/src/lib/libcrypto/evp/m_sha.c | |||
| @@ -0,0 +1,99 @@ | |||
| 1 | /* crypto/evp/m_sha.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 | #if !defined(OPENSSL_NO_SHA) && !defined(OPENSSL_NO_SHA0) | ||
| 60 | #include <stdio.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | /* Including sha.h prior evp.h masks FIPS SHA declarations, but that's | ||
| 63 | * exactly what we want to achieve here... */ | ||
| 64 | #include <openssl/sha.h> | ||
| 65 | #include <openssl/evp.h> | ||
| 66 | #include "evp_locl.h" | ||
| 67 | #include <openssl/objects.h> | ||
| 68 | #include <openssl/x509.h> | ||
| 69 | |||
| 70 | static int init(EVP_MD_CTX *ctx) | ||
| 71 | { return SHA_Init(ctx->md_data); } | ||
| 72 | |||
| 73 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) | ||
| 74 | { return SHA_Update(ctx->md_data,data,count); } | ||
| 75 | |||
| 76 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | ||
| 77 | { return SHA_Final(md,ctx->md_data); } | ||
| 78 | |||
| 79 | static const EVP_MD sha_md= | ||
| 80 | { | ||
| 81 | NID_sha, | ||
| 82 | NID_shaWithRSAEncryption, | ||
| 83 | SHA_DIGEST_LENGTH, | ||
| 84 | 0, | ||
| 85 | init, | ||
| 86 | update, | ||
| 87 | final, | ||
| 88 | NULL, | ||
| 89 | NULL, | ||
| 90 | EVP_PKEY_RSA_method, | ||
| 91 | SHA_CBLOCK, | ||
| 92 | sizeof(EVP_MD *)+sizeof(SHA_CTX), | ||
| 93 | }; | ||
| 94 | |||
| 95 | const EVP_MD *EVP_sha(void) | ||
| 96 | { | ||
| 97 | return(&sha_md); | ||
| 98 | } | ||
| 99 | #endif | ||
diff --git a/src/lib/libcrypto/evp/m_sha1.c b/src/lib/libcrypto/evp/m_sha1.c index 4679b1c463..60da93873c 100644 --- a/src/lib/libcrypto/evp/m_sha1.c +++ b/src/lib/libcrypto/evp/m_sha1.c | |||
| @@ -56,23 +56,25 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_SHA | ||
| 59 | #include <stdio.h> | 60 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_SHA | ||
| 63 | |||
| 64 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 65 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 66 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
| 67 | #ifndef OPENSSL_NO_RSA | ||
| 68 | #include <openssl/rsa.h> | ||
| 69 | #endif | ||
| 70 | 65 | ||
| 71 | static int init(EVP_MD_CTX *ctx) | 66 | static int init(EVP_MD_CTX *ctx) |
| 72 | { return SHA1_Init(ctx->md_data); } | 67 | { return SHA1_Init(ctx->md_data); } |
| 73 | 68 | ||
| 74 | static int update(EVP_MD_CTX *ctx,const void *data,size_t count) | 69 | static int update(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 70 | #ifndef OPENSSL_FIPS | ||
| 75 | { return SHA1_Update(ctx->md_data,data,count); } | 71 | { return SHA1_Update(ctx->md_data,data,count); } |
| 72 | #else | ||
| 73 | { | ||
| 74 | OPENSSL_assert(sizeof(count)<=sizeof(size_t)); | ||
| 75 | return SHA1_Update(ctx->md_data,data,count); | ||
| 76 | } | ||
| 77 | #endif | ||
| 76 | 78 | ||
| 77 | static int final(EVP_MD_CTX *ctx,unsigned char *md) | 79 | static int final(EVP_MD_CTX *ctx,unsigned char *md) |
| 78 | { return SHA1_Final(md,ctx->md_data); } | 80 | { return SHA1_Final(md,ctx->md_data); } |
| @@ -82,7 +84,7 @@ static const EVP_MD sha1_md= | |||
| 82 | NID_sha1, | 84 | NID_sha1, |
| 83 | NID_sha1WithRSAEncryption, | 85 | NID_sha1WithRSAEncryption, |
| 84 | SHA_DIGEST_LENGTH, | 86 | SHA_DIGEST_LENGTH, |
| 85 | 0, | 87 | EVP_MD_FLAG_FIPS, |
| 86 | init, | 88 | init, |
| 87 | update, | 89 | update, |
| 88 | final, | 90 | final, |
| @@ -99,6 +101,7 @@ const EVP_MD *EVP_sha1(void) | |||
| 99 | } | 101 | } |
| 100 | #endif | 102 | #endif |
| 101 | 103 | ||
| 104 | #ifdef OPENSSL_FIPS | ||
| 102 | #ifndef OPENSSL_NO_SHA256 | 105 | #ifndef OPENSSL_NO_SHA256 |
| 103 | static int init224(EVP_MD_CTX *ctx) | 106 | static int init224(EVP_MD_CTX *ctx) |
| 104 | { return SHA224_Init(ctx->md_data); } | 107 | { return SHA224_Init(ctx->md_data); } |
| @@ -109,8 +112,11 @@ static int init256(EVP_MD_CTX *ctx) | |||
| 109 | * SHA256 functions even in SHA224 context. This is what happens | 112 | * SHA256 functions even in SHA224 context. This is what happens |
| 110 | * there anyway, so we can spare few CPU cycles:-) | 113 | * there anyway, so we can spare few CPU cycles:-) |
| 111 | */ | 114 | */ |
| 112 | static int update256(EVP_MD_CTX *ctx,const void *data,size_t count) | 115 | static int update256(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 113 | { return SHA256_Update(ctx->md_data,data,count); } | 116 | { |
| 117 | OPENSSL_assert(sizeof(count)<=sizeof(size_t)); | ||
| 118 | return SHA256_Update(ctx->md_data,data,count); | ||
| 119 | } | ||
| 114 | static int final256(EVP_MD_CTX *ctx,unsigned char *md) | 120 | static int final256(EVP_MD_CTX *ctx,unsigned char *md) |
| 115 | { return SHA256_Final(md,ctx->md_data); } | 121 | { return SHA256_Final(md,ctx->md_data); } |
| 116 | 122 | ||
| @@ -119,7 +125,7 @@ static const EVP_MD sha224_md= | |||
| 119 | NID_sha224, | 125 | NID_sha224, |
| 120 | NID_sha224WithRSAEncryption, | 126 | NID_sha224WithRSAEncryption, |
| 121 | SHA224_DIGEST_LENGTH, | 127 | SHA224_DIGEST_LENGTH, |
| 122 | 0, | 128 | EVP_MD_FLAG_FIPS, |
| 123 | init224, | 129 | init224, |
| 124 | update256, | 130 | update256, |
| 125 | final256, | 131 | final256, |
| @@ -138,7 +144,7 @@ static const EVP_MD sha256_md= | |||
| 138 | NID_sha256, | 144 | NID_sha256, |
| 139 | NID_sha256WithRSAEncryption, | 145 | NID_sha256WithRSAEncryption, |
| 140 | SHA256_DIGEST_LENGTH, | 146 | SHA256_DIGEST_LENGTH, |
| 141 | 0, | 147 | EVP_MD_FLAG_FIPS, |
| 142 | init256, | 148 | init256, |
| 143 | update256, | 149 | update256, |
| 144 | final256, | 150 | final256, |
| @@ -151,7 +157,7 @@ static const EVP_MD sha256_md= | |||
| 151 | 157 | ||
| 152 | const EVP_MD *EVP_sha256(void) | 158 | const EVP_MD *EVP_sha256(void) |
| 153 | { return(&sha256_md); } | 159 | { return(&sha256_md); } |
| 154 | #endif /* ifndef OPENSSL_NO_SHA256 */ | 160 | #endif /* ifndef OPENSSL_NO_SHA256 */ |
| 155 | 161 | ||
| 156 | #ifndef OPENSSL_NO_SHA512 | 162 | #ifndef OPENSSL_NO_SHA512 |
| 157 | static int init384(EVP_MD_CTX *ctx) | 163 | static int init384(EVP_MD_CTX *ctx) |
| @@ -159,8 +165,11 @@ static int init384(EVP_MD_CTX *ctx) | |||
| 159 | static int init512(EVP_MD_CTX *ctx) | 165 | static int init512(EVP_MD_CTX *ctx) |
| 160 | { return SHA512_Init(ctx->md_data); } | 166 | { return SHA512_Init(ctx->md_data); } |
| 161 | /* See comment in SHA224/256 section */ | 167 | /* See comment in SHA224/256 section */ |
| 162 | static int update512(EVP_MD_CTX *ctx,const void *data,size_t count) | 168 | static int update512(EVP_MD_CTX *ctx,const void *data,unsigned long count) |
| 163 | { return SHA512_Update(ctx->md_data,data,count); } | 169 | { |
| 170 | OPENSSL_assert(sizeof(count)<=sizeof(size_t)); | ||
| 171 | return SHA512_Update(ctx->md_data,data,count); | ||
| 172 | } | ||
| 164 | static int final512(EVP_MD_CTX *ctx,unsigned char *md) | 173 | static int final512(EVP_MD_CTX *ctx,unsigned char *md) |
| 165 | { return SHA512_Final(md,ctx->md_data); } | 174 | { return SHA512_Final(md,ctx->md_data); } |
| 166 | 175 | ||
| @@ -169,7 +178,7 @@ static const EVP_MD sha384_md= | |||
| 169 | NID_sha384, | 178 | NID_sha384, |
| 170 | NID_sha384WithRSAEncryption, | 179 | NID_sha384WithRSAEncryption, |
| 171 | SHA384_DIGEST_LENGTH, | 180 | SHA384_DIGEST_LENGTH, |
| 172 | 0, | 181 | EVP_MD_FLAG_FIPS, |
| 173 | init384, | 182 | init384, |
| 174 | update512, | 183 | update512, |
| 175 | final512, | 184 | final512, |
| @@ -188,7 +197,7 @@ static const EVP_MD sha512_md= | |||
| 188 | NID_sha512, | 197 | NID_sha512, |
| 189 | NID_sha512WithRSAEncryption, | 198 | NID_sha512WithRSAEncryption, |
| 190 | SHA512_DIGEST_LENGTH, | 199 | SHA512_DIGEST_LENGTH, |
| 191 | 0, | 200 | EVP_MD_FLAG_FIPS, |
| 192 | init512, | 201 | init512, |
| 193 | update512, | 202 | update512, |
| 194 | final512, | 203 | final512, |
| @@ -201,4 +210,5 @@ static const EVP_MD sha512_md= | |||
| 201 | 210 | ||
| 202 | const EVP_MD *EVP_sha512(void) | 211 | const EVP_MD *EVP_sha512(void) |
| 203 | { return(&sha512_md); } | 212 | { return(&sha512_md); } |
| 204 | #endif /* ifndef OPENSSL_NO_SHA512 */ | 213 | #endif /* ifndef OPENSSL_NO_SHA512 */ |
| 214 | #endif /* ifdef OPENSSL_FIPS */ | ||
diff --git a/src/lib/libcrypto/evp/names.c b/src/lib/libcrypto/evp/names.c index 88c1e780dd..7712453046 100644 --- a/src/lib/libcrypto/evp/names.c +++ b/src/lib/libcrypto/evp/names.c | |||
| @@ -61,14 +61,17 @@ | |||
| 61 | #include <openssl/evp.h> | 61 | #include <openssl/evp.h> |
| 62 | #include <openssl/objects.h> | 62 | #include <openssl/objects.h> |
| 63 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
| 64 | #ifdef OPENSSL_FIPS | ||
| 65 | #include <openssl/fips.h> | ||
| 66 | #endif | ||
| 64 | 67 | ||
| 65 | int EVP_add_cipher(const EVP_CIPHER *c) | 68 | int EVP_add_cipher(const EVP_CIPHER *c) |
| 66 | { | 69 | { |
| 67 | int r; | 70 | int r; |
| 68 | 71 | ||
| 69 | r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c); | 72 | r=OBJ_NAME_add(OBJ_nid2sn(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(char *)c); |
| 70 | if (r == 0) return(0); | 73 | if (r == 0) return(0); |
| 71 | r=OBJ_NAME_add(OBJ_nid2ln(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(const char *)c); | 74 | r=OBJ_NAME_add(OBJ_nid2ln(c->nid),OBJ_NAME_TYPE_CIPHER_METH,(char *)c); |
| 72 | return(r); | 75 | return(r); |
| 73 | } | 76 | } |
| 74 | 77 | ||
| @@ -78,9 +81,9 @@ int EVP_add_digest(const EVP_MD *md) | |||
| 78 | const char *name; | 81 | const char *name; |
| 79 | 82 | ||
| 80 | name=OBJ_nid2sn(md->type); | 83 | name=OBJ_nid2sn(md->type); |
| 81 | r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(const char *)md); | 84 | r=OBJ_NAME_add(name,OBJ_NAME_TYPE_MD_METH,(char *)md); |
| 82 | if (r == 0) return(0); | 85 | if (r == 0) return(0); |
| 83 | r=OBJ_NAME_add(OBJ_nid2ln(md->type),OBJ_NAME_TYPE_MD_METH,(const char *)md); | 86 | r=OBJ_NAME_add(OBJ_nid2ln(md->type),OBJ_NAME_TYPE_MD_METH,(char *)md); |
| 84 | if (r == 0) return(0); | 87 | if (r == 0) return(0); |
| 85 | 88 | ||
| 86 | if (md->type != md->pkey_type) | 89 | if (md->type != md->pkey_type) |
diff --git a/src/lib/libcrypto/evp/openbsd_hw.c b/src/lib/libcrypto/evp/openbsd_hw.c new file mode 100644 index 0000000000..3831a5731e --- /dev/null +++ b/src/lib/libcrypto/evp/openbsd_hw.c | |||
| @@ -0,0 +1,446 @@ | |||
| 1 | /* Written by Ben Laurie, 2001 */ | ||
| 2 | /* | ||
| 3 | * Copyright (c) 2001 The OpenSSL Project. All rights reserved. | ||
| 4 | * | ||
| 5 | * Redistribution and use in source and binary forms, with or without | ||
| 6 | * modification, are permitted provided that the following conditions | ||
| 7 | * are met: | ||
| 8 | * | ||
| 9 | * 1. Redistributions of source code must retain the above copyright | ||
| 10 | * notice, this list of conditions and the following disclaimer. | ||
| 11 | * | ||
| 12 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 13 | * notice, this list of conditions and the following disclaimer in | ||
| 14 | * the documentation and/or other materials provided with the | ||
| 15 | * distribution. | ||
| 16 | * | ||
| 17 | * 3. All advertising materials mentioning features or use of this | ||
| 18 | * software must display the following acknowledgment: | ||
| 19 | * "This product includes software developed by the OpenSSL Project | ||
| 20 | * for use in the OpenSSL Toolkit. (http://www.openssl.org/)" | ||
| 21 | * | ||
| 22 | * 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to | ||
| 23 | * endorse or promote products derived from this software without | ||
| 24 | * prior written permission. For written permission, please contact | ||
| 25 | * openssl-core@openssl.org. | ||
| 26 | * | ||
| 27 | * 5. Products derived from this software may not be called "OpenSSL" | ||
| 28 | * nor may "OpenSSL" appear in their names without prior written | ||
| 29 | * permission of the OpenSSL Project. | ||
| 30 | * | ||
| 31 | * 6. Redistributions of any form whatsoever must retain the following | ||
| 32 | * acknowledgment: | ||
| 33 | * "This product includes software developed by the OpenSSL Project | ||
| 34 | * for use in the OpenSSL Toolkit (http://www.openssl.org/)" | ||
| 35 | * | ||
| 36 | * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY | ||
| 37 | * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 38 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | ||
| 39 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR | ||
| 40 | * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
| 41 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
| 42 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 43 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 44 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, | ||
| 45 | * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | ||
| 46 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED | ||
| 47 | * OF THE POSSIBILITY OF SUCH DAMAGE. | ||
| 48 | */ | ||
| 49 | |||
| 50 | #include <openssl/evp.h> | ||
| 51 | #include <openssl/objects.h> | ||
| 52 | #include <openssl/rsa.h> | ||
| 53 | #include "evp_locl.h" | ||
| 54 | |||
| 55 | /* This stuff should now all be supported through | ||
| 56 | * crypto/engine/hw_openbsd_dev_crypto.c unless I botched it up */ | ||
| 57 | static void *dummy=&dummy; | ||
| 58 | |||
| 59 | #if 0 | ||
| 60 | |||
| 61 | /* check flag after OpenSSL headers to ensure make depend works */ | ||
| 62 | #ifdef OPENSSL_OPENBSD_DEV_CRYPTO | ||
| 63 | |||
| 64 | #include <fcntl.h> | ||
| 65 | #include <stdio.h> | ||
| 66 | #include <errno.h> | ||
| 67 | #include <sys/ioctl.h> | ||
| 68 | #include <crypto/cryptodev.h> | ||
| 69 | #include <unistd.h> | ||
| 70 | #include <assert.h> | ||
| 71 | |||
| 72 | /* longest key supported in hardware */ | ||
| 73 | #define MAX_HW_KEY 24 | ||
| 74 | #define MAX_HW_IV 8 | ||
| 75 | |||
| 76 | #define MD5_DIGEST_LENGTH 16 | ||
| 77 | #define MD5_CBLOCK 64 | ||
| 78 | |||
| 79 | static int fd; | ||
| 80 | static int dev_failed; | ||
| 81 | |||
| 82 | typedef struct session_op session_op; | ||
| 83 | |||
| 84 | #define CDATA(ctx) EVP_C_DATA(session_op,ctx) | ||
| 85 | |||
| 86 | static void err(const char *str) | ||
| 87 | { | ||
| 88 | fprintf(stderr,"%s: errno %d\n",str,errno); | ||
| 89 | } | ||
| 90 | |||
| 91 | static int dev_crypto_init(session_op *ses) | ||
| 92 | { | ||
| 93 | if(dev_failed) | ||
| 94 | return 0; | ||
| 95 | if(!fd) | ||
| 96 | { | ||
| 97 | int cryptodev_fd; | ||
| 98 | |||
| 99 | if ((cryptodev_fd=open("/dev/crypto",O_RDWR,0)) < 0) | ||
| 100 | { | ||
| 101 | err("/dev/crypto"); | ||
| 102 | dev_failed=1; | ||
| 103 | return 0; | ||
| 104 | } | ||
| 105 | if (ioctl(cryptodev_fd,CRIOGET,&fd) == -1) | ||
| 106 | { | ||
| 107 | err("CRIOGET failed"); | ||
| 108 | close(cryptodev_fd); | ||
| 109 | dev_failed=1; | ||
| 110 | return 0; | ||
| 111 | } | ||
| 112 | close(cryptodev_fd); | ||
| 113 | } | ||
| 114 | assert(ses); | ||
| 115 | memset(ses,'\0',sizeof *ses); | ||
| 116 | |||
| 117 | return 1; | ||
| 118 | } | ||
| 119 | |||
| 120 | static int dev_crypto_cleanup(EVP_CIPHER_CTX *ctx) | ||
| 121 | { | ||
| 122 | if(ioctl(fd,CIOCFSESSION,&CDATA(ctx)->ses) == -1) | ||
| 123 | err("CIOCFSESSION failed"); | ||
| 124 | |||
| 125 | OPENSSL_free(CDATA(ctx)->key); | ||
| 126 | |||
| 127 | return 1; | ||
| 128 | } | ||
| 129 | |||
| 130 | static int dev_crypto_init_key(EVP_CIPHER_CTX *ctx,int cipher, | ||
| 131 | const unsigned char *key,int klen) | ||
| 132 | { | ||
| 133 | if(!dev_crypto_init(CDATA(ctx))) | ||
| 134 | return 0; | ||
| 135 | |||
| 136 | CDATA(ctx)->key=OPENSSL_malloc(MAX_HW_KEY); | ||
| 137 | |||
| 138 | assert(ctx->cipher->iv_len <= MAX_HW_IV); | ||
| 139 | |||
| 140 | memcpy(CDATA(ctx)->key,key,klen); | ||
| 141 | |||
| 142 | CDATA(ctx)->cipher=cipher; | ||
| 143 | CDATA(ctx)->keylen=klen; | ||
| 144 | |||
| 145 | if (ioctl(fd,CIOCGSESSION,CDATA(ctx)) == -1) | ||
| 146 | { | ||
| 147 | err("CIOCGSESSION failed"); | ||
| 148 | return 0; | ||
| 149 | } | ||
| 150 | return 1; | ||
| 151 | } | ||
| 152 | |||
| 153 | static int dev_crypto_cipher(EVP_CIPHER_CTX *ctx,unsigned char *out, | ||
| 154 | const unsigned char *in,unsigned int inl) | ||
| 155 | { | ||
| 156 | struct crypt_op cryp; | ||
| 157 | unsigned char lb[MAX_HW_IV]; | ||
| 158 | |||
| 159 | if(!inl) | ||
| 160 | return 1; | ||
| 161 | |||
| 162 | assert(CDATA(ctx)); | ||
| 163 | assert(!dev_failed); | ||
| 164 | |||
| 165 | memset(&cryp,'\0',sizeof cryp); | ||
| 166 | cryp.ses=CDATA(ctx)->ses; | ||
| 167 | cryp.op=ctx->encrypt ? COP_ENCRYPT : COP_DECRYPT; | ||
| 168 | cryp.flags=0; | ||
| 169 | cryp.len=inl; | ||
| 170 | assert((inl&(ctx->cipher->block_size-1)) == 0); | ||
| 171 | cryp.src=(caddr_t)in; | ||
| 172 | cryp.dst=(caddr_t)out; | ||
| 173 | cryp.mac=0; | ||
| 174 | if(ctx->cipher->iv_len) | ||
| 175 | cryp.iv=(caddr_t)ctx->iv; | ||
| 176 | |||
| 177 | if(!ctx->encrypt) | ||
| 178 | memcpy(lb,&in[cryp.len-ctx->cipher->iv_len],ctx->cipher->iv_len); | ||
| 179 | |||
| 180 | if(ioctl(fd, CIOCCRYPT, &cryp) == -1) | ||
| 181 | { | ||
| 182 | if(errno == EINVAL) /* buffers are misaligned */ | ||
| 183 | { | ||
| 184 | unsigned int cinl=0; | ||
| 185 | char *cin=NULL; | ||
| 186 | char *cout=NULL; | ||
| 187 | |||
| 188 | /* NB: this can only make cinl != inl with stream ciphers */ | ||
| 189 | cinl=(inl+3)/4*4; | ||
| 190 | |||
| 191 | if(((unsigned long)in&3) || cinl != inl) | ||
| 192 | { | ||
| 193 | cin=OPENSSL_malloc(cinl); | ||
| 194 | memcpy(cin,in,inl); | ||
| 195 | cryp.src=cin; | ||
| 196 | } | ||
| 197 | |||
| 198 | if(((unsigned long)out&3) || cinl != inl) | ||
| 199 | { | ||
| 200 | cout=OPENSSL_malloc(cinl); | ||
| 201 | cryp.dst=cout; | ||
| 202 | } | ||
| 203 | |||
| 204 | cryp.len=cinl; | ||
| 205 | |||
| 206 | if(ioctl(fd, CIOCCRYPT, &cryp) == -1) | ||
| 207 | { | ||
| 208 | err("CIOCCRYPT(2) failed"); | ||
| 209 | printf("src=%p dst=%p\n",cryp.src,cryp.dst); | ||
| 210 | abort(); | ||
| 211 | return 0; | ||
| 212 | } | ||
| 213 | |||
| 214 | if(cout) | ||
| 215 | { | ||
| 216 | memcpy(out,cout,inl); | ||
| 217 | OPENSSL_free(cout); | ||
| 218 | } | ||
| 219 | if(cin) | ||
| 220 | OPENSSL_free(cin); | ||
| 221 | } | ||
| 222 | else | ||
| 223 | { | ||
| 224 | err("CIOCCRYPT failed"); | ||
| 225 | abort(); | ||
| 226 | return 0; | ||
| 227 | } | ||
| 228 | } | ||
| 229 | |||
| 230 | if(ctx->encrypt) | ||
| 231 | memcpy(ctx->iv,&out[cryp.len-ctx->cipher->iv_len],ctx->cipher->iv_len); | ||
| 232 | else | ||
| 233 | memcpy(ctx->iv,lb,ctx->cipher->iv_len); | ||
| 234 | |||
| 235 | return 1; | ||
| 236 | } | ||
| 237 | |||
| 238 | static int dev_crypto_des_ede3_init_key(EVP_CIPHER_CTX *ctx, | ||
| 239 | const unsigned char *key, | ||
| 240 | const unsigned char *iv, int enc) | ||
| 241 | { return dev_crypto_init_key(ctx,CRYPTO_3DES_CBC,key,24); } | ||
| 242 | |||
| 243 | #define dev_crypto_des_ede3_cbc_cipher dev_crypto_cipher | ||
| 244 | |||
| 245 | BLOCK_CIPHER_def_cbc(dev_crypto_des_ede3, session_op, NID_des_ede3, 8, 24, 8, | ||
| 246 | 0, dev_crypto_des_ede3_init_key, | ||
| 247 | dev_crypto_cleanup, | ||
| 248 | EVP_CIPHER_set_asn1_iv, | ||
| 249 | EVP_CIPHER_get_asn1_iv, | ||
| 250 | NULL) | ||
| 251 | |||
| 252 | static int dev_crypto_rc4_init_key(EVP_CIPHER_CTX *ctx, | ||
| 253 | const unsigned char *key, | ||
| 254 | const unsigned char *iv, int enc) | ||
| 255 | { return dev_crypto_init_key(ctx,CRYPTO_ARC4,key,16); } | ||
| 256 | |||
| 257 | static const EVP_CIPHER r4_cipher= | ||
| 258 | { | ||
| 259 | NID_rc4, | ||
| 260 | 1,16,0, /* FIXME: key should be up to 256 bytes */ | ||
| 261 | EVP_CIPH_VARIABLE_LENGTH, | ||
| 262 | dev_crypto_rc4_init_key, | ||
| 263 | dev_crypto_cipher, | ||
| 264 | dev_crypto_cleanup, | ||
| 265 | sizeof(session_op), | ||
| 266 | NULL, | ||
| 267 | NULL, | ||
| 268 | NULL | ||
| 269 | }; | ||
| 270 | |||
| 271 | const EVP_CIPHER *EVP_dev_crypto_rc4(void) | ||
| 272 | { return &r4_cipher; } | ||
| 273 | |||
| 274 | typedef struct | ||
| 275 | { | ||
| 276 | session_op sess; | ||
| 277 | char *data; | ||
| 278 | int len; | ||
| 279 | unsigned char md[EVP_MAX_MD_SIZE]; | ||
| 280 | } MD_DATA; | ||
| 281 | |||
| 282 | static int dev_crypto_init_digest(MD_DATA *md_data,int mac) | ||
| 283 | { | ||
| 284 | if(!dev_crypto_init(&md_data->sess)) | ||
| 285 | return 0; | ||
| 286 | |||
| 287 | md_data->len=0; | ||
| 288 | md_data->data=NULL; | ||
| 289 | |||
| 290 | md_data->sess.mac=mac; | ||
| 291 | |||
| 292 | if (ioctl(fd,CIOCGSESSION,&md_data->sess) == -1) | ||
| 293 | { | ||
| 294 | err("CIOCGSESSION failed"); | ||
| 295 | return 0; | ||
| 296 | } | ||
| 297 | return 1; | ||
| 298 | } | ||
| 299 | |||
| 300 | static int dev_crypto_cleanup_digest(MD_DATA *md_data) | ||
| 301 | { | ||
| 302 | if (ioctl(fd,CIOCFSESSION,&md_data->sess.ses) == -1) | ||
| 303 | { | ||
| 304 | err("CIOCFSESSION failed"); | ||
| 305 | return 0; | ||
| 306 | } | ||
| 307 | |||
| 308 | return 1; | ||
| 309 | } | ||
| 310 | |||
| 311 | /* FIXME: if device can do chained MACs, then don't accumulate */ | ||
| 312 | /* FIXME: move accumulation to the framework */ | ||
| 313 | static int dev_crypto_md5_init(EVP_MD_CTX *ctx) | ||
| 314 | { return dev_crypto_init_digest(ctx->md_data,CRYPTO_MD5); } | ||
| 315 | |||
| 316 | static int do_digest(int ses,unsigned char *md,const void *data,int len) | ||
| 317 | { | ||
| 318 | struct crypt_op cryp; | ||
| 319 | static unsigned char md5zero[16]= | ||
| 320 | { | ||
| 321 | 0xd4,0x1d,0x8c,0xd9,0x8f,0x00,0xb2,0x04, | ||
| 322 | 0xe9,0x80,0x09,0x98,0xec,0xf8,0x42,0x7e | ||
| 323 | }; | ||
| 324 | |||
| 325 | /* some cards can't do zero length */ | ||
| 326 | if(!len) | ||
| 327 | { | ||
| 328 | memcpy(md,md5zero,16); | ||
| 329 | return 1; | ||
| 330 | } | ||
| 331 | |||
| 332 | memset(&cryp,'\0',sizeof cryp); | ||
| 333 | cryp.ses=ses; | ||
| 334 | cryp.op=COP_ENCRYPT;/* required to do the MAC rather than check it */ | ||
| 335 | cryp.len=len; | ||
| 336 | cryp.src=(caddr_t)data; | ||
| 337 | cryp.dst=(caddr_t)data; // FIXME!!! | ||
| 338 | cryp.mac=(caddr_t)md; | ||
| 339 | |||
| 340 | if(ioctl(fd, CIOCCRYPT, &cryp) == -1) | ||
| 341 | { | ||
| 342 | if(errno == EINVAL) /* buffer is misaligned */ | ||
| 343 | { | ||
| 344 | char *dcopy; | ||
| 345 | |||
| 346 | dcopy=OPENSSL_malloc(len); | ||
| 347 | memcpy(dcopy,data,len); | ||
| 348 | cryp.src=dcopy; | ||
| 349 | cryp.dst=cryp.src; // FIXME!!! | ||
| 350 | |||
| 351 | if(ioctl(fd, CIOCCRYPT, &cryp) == -1) | ||
| 352 | { | ||
| 353 | err("CIOCCRYPT(MAC2) failed"); | ||
| 354 | abort(); | ||
| 355 | return 0; | ||
| 356 | } | ||
| 357 | OPENSSL_free(dcopy); | ||
| 358 | } | ||
| 359 | else | ||
| 360 | { | ||
| 361 | err("CIOCCRYPT(MAC) failed"); | ||
| 362 | abort(); | ||
| 363 | return 0; | ||
| 364 | } | ||
| 365 | } | ||
| 366 | // printf("done\n"); | ||
| 367 | |||
| 368 | return 1; | ||
| 369 | } | ||
| 370 | |||
| 371 | static int dev_crypto_md5_update(EVP_MD_CTX *ctx,const void *data, | ||
| 372 | unsigned long len) | ||
| 373 | { | ||
| 374 | MD_DATA *md_data=ctx->md_data; | ||
| 375 | |||
| 376 | if(ctx->flags&EVP_MD_CTX_FLAG_ONESHOT) | ||
| 377 | return do_digest(md_data->sess.ses,md_data->md,data,len); | ||
| 378 | |||
| 379 | md_data->data=OPENSSL_realloc(md_data->data,md_data->len+len); | ||
| 380 | memcpy(md_data->data+md_data->len,data,len); | ||
| 381 | md_data->len+=len; | ||
| 382 | |||
| 383 | return 1; | ||
| 384 | } | ||
| 385 | |||
| 386 | static int dev_crypto_md5_final(EVP_MD_CTX *ctx,unsigned char *md) | ||
| 387 | { | ||
| 388 | int ret; | ||
| 389 | MD_DATA *md_data=ctx->md_data; | ||
| 390 | |||
| 391 | if(ctx->flags&EVP_MD_CTX_FLAG_ONESHOT) | ||
| 392 | { | ||
| 393 | memcpy(md,md_data->md,MD5_DIGEST_LENGTH); | ||
| 394 | ret=1; | ||
| 395 | } | ||
| 396 | else | ||
| 397 | { | ||
| 398 | ret=do_digest(md_data->sess.ses,md,md_data->data,md_data->len); | ||
| 399 | OPENSSL_free(md_data->data); | ||
| 400 | md_data->data=NULL; | ||
| 401 | md_data->len=0; | ||
| 402 | } | ||
| 403 | |||
| 404 | return ret; | ||
| 405 | } | ||
| 406 | |||
| 407 | static int dev_crypto_md5_copy(EVP_MD_CTX *to,const EVP_MD_CTX *from) | ||
| 408 | { | ||
| 409 | const MD_DATA *from_md=from->md_data; | ||
| 410 | MD_DATA *to_md=to->md_data; | ||
| 411 | |||
| 412 | // How do we copy sessions? | ||
| 413 | assert(from->digest->flags&EVP_MD_FLAG_ONESHOT); | ||
| 414 | |||
| 415 | to_md->data=OPENSSL_malloc(from_md->len); | ||
| 416 | memcpy(to_md->data,from_md->data,from_md->len); | ||
| 417 | |||
| 418 | return 1; | ||
| 419 | } | ||
| 420 | |||
| 421 | static int dev_crypto_md5_cleanup(EVP_MD_CTX *ctx) | ||
| 422 | { | ||
| 423 | return dev_crypto_cleanup_digest(ctx->md_data); | ||
| 424 | } | ||
| 425 | |||
| 426 | static const EVP_MD md5_md= | ||
| 427 | { | ||
| 428 | NID_md5, | ||
| 429 | NID_md5WithRSAEncryption, | ||
| 430 | MD5_DIGEST_LENGTH, | ||
| 431 | EVP_MD_FLAG_ONESHOT, // XXX: set according to device info... | ||
| 432 | dev_crypto_md5_init, | ||
| 433 | dev_crypto_md5_update, | ||
| 434 | dev_crypto_md5_final, | ||
| 435 | dev_crypto_md5_copy, | ||
| 436 | dev_crypto_md5_cleanup, | ||
| 437 | EVP_PKEY_RSA_method, | ||
| 438 | MD5_CBLOCK, | ||
| 439 | sizeof(MD_DATA), | ||
| 440 | }; | ||
| 441 | |||
| 442 | const EVP_MD *EVP_dev_crypto_md5(void) | ||
| 443 | { return &md5_md; } | ||
| 444 | |||
| 445 | #endif | ||
| 446 | #endif | ||
diff --git a/src/lib/libcrypto/evp/p5_crpt.c b/src/lib/libcrypto/evp/p5_crpt.c index 48d50014a0..a1874e83b2 100644 --- a/src/lib/libcrypto/evp/p5_crpt.c +++ b/src/lib/libcrypto/evp/p5_crpt.c | |||
| @@ -110,18 +110,12 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, | |||
| 110 | int i; | 110 | int i; |
| 111 | PBEPARAM *pbe; | 111 | PBEPARAM *pbe; |
| 112 | int saltlen, iter; | 112 | int saltlen, iter; |
| 113 | unsigned char *salt; | 113 | unsigned char *salt, *pbuf; |
| 114 | const unsigned char *pbuf; | ||
| 115 | 114 | ||
| 116 | /* Extract useful info from parameter */ | 115 | /* Extract useful info from parameter */ |
| 117 | if (param == NULL || param->type != V_ASN1_SEQUENCE || | ||
| 118 | param->value.sequence == NULL) { | ||
| 119 | EVPerr(EVP_F_PKCS5_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); | ||
| 120 | return 0; | ||
| 121 | } | ||
| 122 | |||
| 123 | pbuf = param->value.sequence->data; | 116 | pbuf = param->value.sequence->data; |
| 124 | if (!(pbe = d2i_PBEPARAM(NULL, &pbuf, param->value.sequence->length))) { | 117 | if (!param || (param->type != V_ASN1_SEQUENCE) || |
| 118 | !(pbe = d2i_PBEPARAM (NULL, &pbuf, param->value.sequence->length))) { | ||
| 125 | EVPerr(EVP_F_PKCS5_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); | 119 | EVPerr(EVP_F_PKCS5_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); |
| 126 | return 0; | 120 | return 0; |
| 127 | } | 121 | } |
| @@ -146,7 +140,7 @@ int PKCS5_PBE_keyivgen(EVP_CIPHER_CTX *cctx, const char *pass, int passlen, | |||
| 146 | EVP_DigestFinal_ex (&ctx, md_tmp, NULL); | 140 | EVP_DigestFinal_ex (&ctx, md_tmp, NULL); |
| 147 | } | 141 | } |
| 148 | EVP_MD_CTX_cleanup(&ctx); | 142 | EVP_MD_CTX_cleanup(&ctx); |
| 149 | OPENSSL_assert(EVP_CIPHER_key_length(cipher) <= (int)sizeof(md_tmp)); | 143 | OPENSSL_assert(EVP_CIPHER_key_length(cipher) <= sizeof md_tmp); |
| 150 | memcpy(key, md_tmp, EVP_CIPHER_key_length(cipher)); | 144 | memcpy(key, md_tmp, EVP_CIPHER_key_length(cipher)); |
| 151 | OPENSSL_assert(EVP_CIPHER_iv_length(cipher) <= 16); | 145 | OPENSSL_assert(EVP_CIPHER_iv_length(cipher) <= 16); |
| 152 | memcpy(iv, md_tmp + (16 - EVP_CIPHER_iv_length(cipher)), | 146 | memcpy(iv, md_tmp + (16 - EVP_CIPHER_iv_length(cipher)), |
diff --git a/src/lib/libcrypto/evp/p5_crpt2.c b/src/lib/libcrypto/evp/p5_crpt2.c index c969d5a206..1d5fabc4b2 100644 --- a/src/lib/libcrypto/evp/p5_crpt2.c +++ b/src/lib/libcrypto/evp/p5_crpt2.c | |||
| @@ -55,10 +55,10 @@ | |||
| 55 | * Hudson (tjh@cryptsoft.com). | 55 | * Hudson (tjh@cryptsoft.com). |
| 56 | * | 56 | * |
| 57 | */ | 57 | */ |
| 58 | #if !defined(OPENSSL_NO_HMAC) && !defined(OPENSSL_NO_SHA) | ||
| 58 | #include <stdio.h> | 59 | #include <stdio.h> |
| 59 | #include <stdlib.h> | 60 | #include <stdlib.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | #if !defined(OPENSSL_NO_HMAC) && !defined(OPENSSL_NO_SHA) | ||
| 62 | #include <openssl/x509.h> | 62 | #include <openssl/x509.h> |
| 63 | #include <openssl/evp.h> | 63 | #include <openssl/evp.h> |
| 64 | #include <openssl/hmac.h> | 64 | #include <openssl/hmac.h> |
| @@ -77,7 +77,7 @@ | |||
| 77 | */ | 77 | */ |
| 78 | 78 | ||
| 79 | int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, | 79 | int PKCS5_PBKDF2_HMAC_SHA1(const char *pass, int passlen, |
| 80 | const unsigned char *salt, int saltlen, int iter, | 80 | unsigned char *salt, int saltlen, int iter, |
| 81 | int keylen, unsigned char *out) | 81 | int keylen, unsigned char *out) |
| 82 | { | 82 | { |
| 83 | unsigned char digtmp[SHA_DIGEST_LENGTH], *p, itmp[4]; | 83 | unsigned char digtmp[SHA_DIGEST_LENGTH], *p, itmp[4]; |
| @@ -148,23 +148,16 @@ int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | |||
| 148 | ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, | 148 | ASN1_TYPE *param, const EVP_CIPHER *c, const EVP_MD *md, |
| 149 | int en_de) | 149 | int en_de) |
| 150 | { | 150 | { |
| 151 | unsigned char *salt, key[EVP_MAX_KEY_LENGTH]; | 151 | unsigned char *pbuf, *salt, key[EVP_MAX_KEY_LENGTH]; |
| 152 | const unsigned char *pbuf; | 152 | int saltlen, keylen, iter, plen; |
| 153 | int saltlen, iter, plen; | ||
| 154 | unsigned int keylen; | ||
| 155 | PBE2PARAM *pbe2 = NULL; | 153 | PBE2PARAM *pbe2 = NULL; |
| 156 | const EVP_CIPHER *cipher; | 154 | const EVP_CIPHER *cipher; |
| 157 | PBKDF2PARAM *kdf = NULL; | 155 | PBKDF2PARAM *kdf = NULL; |
| 158 | 156 | ||
| 159 | if (param == NULL || param->type != V_ASN1_SEQUENCE || | ||
| 160 | param->value.sequence == NULL) { | ||
| 161 | EVPerr(EVP_F_PKCS5_V2_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); | ||
| 162 | return 0; | ||
| 163 | } | ||
| 164 | |||
| 165 | pbuf = param->value.sequence->data; | 157 | pbuf = param->value.sequence->data; |
| 166 | plen = param->value.sequence->length; | 158 | plen = param->value.sequence->length; |
| 167 | if(!(pbe2 = d2i_PBE2PARAM(NULL, &pbuf, plen))) { | 159 | if(!param || (param->type != V_ASN1_SEQUENCE) || |
| 160 | !(pbe2 = d2i_PBE2PARAM(NULL, &pbuf, plen))) { | ||
| 168 | EVPerr(EVP_F_PKCS5_V2_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); | 161 | EVPerr(EVP_F_PKCS5_V2_PBE_KEYIVGEN,EVP_R_DECODE_ERROR); |
| 169 | return 0; | 162 | return 0; |
| 170 | } | 163 | } |
| @@ -220,7 +213,7 @@ int PKCS5_v2_PBE_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, int passlen, | |||
| 220 | 213 | ||
| 221 | /* Now check the parameters of the kdf */ | 214 | /* Now check the parameters of the kdf */ |
| 222 | 215 | ||
| 223 | if(kdf->keylength && (ASN1_INTEGER_get(kdf->keylength) != (int)keylen)){ | 216 | if(kdf->keylength && (ASN1_INTEGER_get(kdf->keylength) != keylen)){ |
| 224 | EVPerr(EVP_F_PKCS5_V2_PBE_KEYIVGEN, | 217 | EVPerr(EVP_F_PKCS5_V2_PBE_KEYIVGEN, |
| 225 | EVP_R_UNSUPPORTED_KEYLENGTH); | 218 | EVP_R_UNSUPPORTED_KEYLENGTH); |
| 226 | goto err; | 219 | goto err; |
diff --git a/src/lib/libcrypto/evp/p_dec.c b/src/lib/libcrypto/evp/p_dec.c index f64901f653..8af620400e 100644 --- a/src/lib/libcrypto/evp/p_dec.c +++ b/src/lib/libcrypto/evp/p_dec.c | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | #include <openssl/objects.h> | 66 | #include <openssl/objects.h> |
| 67 | #include <openssl/x509.h> | 67 | #include <openssl/x509.h> |
| 68 | 68 | ||
| 69 | int EVP_PKEY_decrypt(unsigned char *key, const unsigned char *ek, int ekl, | 69 | int EVP_PKEY_decrypt(unsigned char *key, unsigned char *ek, int ekl, |
| 70 | EVP_PKEY *priv) | 70 | EVP_PKEY *priv) |
| 71 | { | 71 | { |
| 72 | int ret= -1; | 72 | int ret= -1; |
diff --git a/src/lib/libcrypto/evp/p_enc.c b/src/lib/libcrypto/evp/p_enc.c index c2dfdc52ad..656883b996 100644 --- a/src/lib/libcrypto/evp/p_enc.c +++ b/src/lib/libcrypto/evp/p_enc.c | |||
| @@ -66,7 +66,7 @@ | |||
| 66 | #include <openssl/objects.h> | 66 | #include <openssl/objects.h> |
| 67 | #include <openssl/x509.h> | 67 | #include <openssl/x509.h> |
| 68 | 68 | ||
| 69 | int EVP_PKEY_encrypt(unsigned char *ek, const unsigned char *key, int key_len, | 69 | int EVP_PKEY_encrypt(unsigned char *ek, unsigned char *key, int key_len, |
| 70 | EVP_PKEY *pubk) | 70 | EVP_PKEY *pubk) |
| 71 | { | 71 | { |
| 72 | int ret=0; | 72 | int ret=0; |
diff --git a/src/lib/libcrypto/evp/p_lib.c b/src/lib/libcrypto/evp/p_lib.c index 22155ecf62..215b94292a 100644 --- a/src/lib/libcrypto/evp/p_lib.c +++ b/src/lib/libcrypto/evp/p_lib.c | |||
| @@ -58,60 +58,24 @@ | |||
| 58 | 58 | ||
| 59 | #include <stdio.h> | 59 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 60 | #include "cryptlib.h" |
| 61 | #include <openssl/bn.h> | ||
| 62 | #include <openssl/err.h> | ||
| 63 | #include <openssl/objects.h> | 61 | #include <openssl/objects.h> |
| 64 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 65 | #include <openssl/asn1_mac.h> | 63 | #include <openssl/asn1_mac.h> |
| 66 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
| 67 | #ifndef OPENSSL_NO_RSA | ||
| 68 | #include <openssl/rsa.h> | ||
| 69 | #endif | ||
| 70 | #ifndef OPENSSL_NO_DSA | ||
| 71 | #include <openssl/dsa.h> | ||
| 72 | #endif | ||
| 73 | #ifndef OPENSSL_NO_DH | ||
| 74 | #include <openssl/dh.h> | ||
| 75 | #endif | ||
| 76 | 65 | ||
| 77 | static void EVP_PKEY_free_it(EVP_PKEY *x); | 66 | static void EVP_PKEY_free_it(EVP_PKEY *x); |
| 78 | 67 | ||
| 79 | int EVP_PKEY_bits(EVP_PKEY *pkey) | 68 | int EVP_PKEY_bits(EVP_PKEY *pkey) |
| 80 | { | 69 | { |
| 81 | if (0) | ||
| 82 | return 0; | ||
| 83 | #ifndef OPENSSL_NO_RSA | 70 | #ifndef OPENSSL_NO_RSA |
| 84 | else if (pkey->type == EVP_PKEY_RSA) | 71 | if (pkey->type == EVP_PKEY_RSA) |
| 85 | return(BN_num_bits(pkey->pkey.rsa->n)); | 72 | return(BN_num_bits(pkey->pkey.rsa->n)); |
| 73 | else | ||
| 86 | #endif | 74 | #endif |
| 87 | #ifndef OPENSSL_NO_DSA | 75 | #ifndef OPENSSL_NO_DSA |
| 88 | else if (pkey->type == EVP_PKEY_DSA) | 76 | if (pkey->type == EVP_PKEY_DSA) |
| 89 | return(BN_num_bits(pkey->pkey.dsa->p)); | 77 | return(BN_num_bits(pkey->pkey.dsa->p)); |
| 90 | #endif | 78 | #endif |
| 91 | #ifndef OPENSSL_NO_EC | ||
| 92 | else if (pkey->type == EVP_PKEY_EC) | ||
| 93 | { | ||
| 94 | BIGNUM *order = BN_new(); | ||
| 95 | const EC_GROUP *group; | ||
| 96 | int ret; | ||
| 97 | |||
| 98 | if (!order) | ||
| 99 | { | ||
| 100 | ERR_clear_error(); | ||
| 101 | return 0; | ||
| 102 | } | ||
| 103 | group = EC_KEY_get0_group(pkey->pkey.ec); | ||
| 104 | if (!EC_GROUP_get_order(group, order, NULL)) | ||
| 105 | { | ||
| 106 | ERR_clear_error(); | ||
| 107 | return 0; | ||
| 108 | } | ||
| 109 | |||
| 110 | ret = BN_num_bits(order); | ||
| 111 | BN_free(order); | ||
| 112 | return ret; | ||
| 113 | } | ||
| 114 | #endif | ||
| 115 | return(0); | 79 | return(0); |
| 116 | } | 80 | } |
| 117 | 81 | ||
| @@ -128,11 +92,6 @@ int EVP_PKEY_size(EVP_PKEY *pkey) | |||
| 128 | if (pkey->type == EVP_PKEY_DSA) | 92 | if (pkey->type == EVP_PKEY_DSA) |
| 129 | return(DSA_size(pkey->pkey.dsa)); | 93 | return(DSA_size(pkey->pkey.dsa)); |
| 130 | #endif | 94 | #endif |
| 131 | #ifndef OPENSSL_NO_ECDSA | ||
| 132 | if (pkey->type == EVP_PKEY_EC) | ||
| 133 | return(ECDSA_size(pkey->pkey.ec)); | ||
| 134 | #endif | ||
| 135 | |||
| 136 | return(0); | 95 | return(0); |
| 137 | } | 96 | } |
| 138 | 97 | ||
| @@ -148,20 +107,10 @@ int EVP_PKEY_save_parameters(EVP_PKEY *pkey, int mode) | |||
| 148 | return(ret); | 107 | return(ret); |
| 149 | } | 108 | } |
| 150 | #endif | 109 | #endif |
| 151 | #ifndef OPENSSL_NO_EC | ||
| 152 | if (pkey->type == EVP_PKEY_EC) | ||
| 153 | { | ||
| 154 | int ret = pkey->save_parameters; | ||
| 155 | |||
| 156 | if (mode >= 0) | ||
| 157 | pkey->save_parameters = mode; | ||
| 158 | return(ret); | ||
| 159 | } | ||
| 160 | #endif | ||
| 161 | return(0); | 110 | return(0); |
| 162 | } | 111 | } |
| 163 | 112 | ||
| 164 | int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) | 113 | int EVP_PKEY_copy_parameters(EVP_PKEY *to, EVP_PKEY *from) |
| 165 | { | 114 | { |
| 166 | if (to->type != from->type) | 115 | if (to->type != from->type) |
| 167 | { | 116 | { |
| @@ -192,23 +141,12 @@ int EVP_PKEY_copy_parameters(EVP_PKEY *to, const EVP_PKEY *from) | |||
| 192 | to->pkey.dsa->g=a; | 141 | to->pkey.dsa->g=a; |
| 193 | } | 142 | } |
| 194 | #endif | 143 | #endif |
| 195 | #ifndef OPENSSL_NO_EC | ||
| 196 | if (to->type == EVP_PKEY_EC) | ||
| 197 | { | ||
| 198 | EC_GROUP *group = EC_GROUP_dup(EC_KEY_get0_group(from->pkey.ec)); | ||
| 199 | if (group == NULL) | ||
| 200 | goto err; | ||
| 201 | if (EC_KEY_set_group(to->pkey.ec, group) == 0) | ||
| 202 | goto err; | ||
| 203 | EC_GROUP_free(group); | ||
| 204 | } | ||
| 205 | #endif | ||
| 206 | return(1); | 144 | return(1); |
| 207 | err: | 145 | err: |
| 208 | return(0); | 146 | return(0); |
| 209 | } | 147 | } |
| 210 | 148 | ||
| 211 | int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) | 149 | int EVP_PKEY_missing_parameters(EVP_PKEY *pkey) |
| 212 | { | 150 | { |
| 213 | #ifndef OPENSSL_NO_DSA | 151 | #ifndef OPENSSL_NO_DSA |
| 214 | if (pkey->type == EVP_PKEY_DSA) | 152 | if (pkey->type == EVP_PKEY_DSA) |
| @@ -220,18 +158,10 @@ int EVP_PKEY_missing_parameters(const EVP_PKEY *pkey) | |||
| 220 | return(1); | 158 | return(1); |
| 221 | } | 159 | } |
| 222 | #endif | 160 | #endif |
| 223 | #ifndef OPENSSL_NO_EC | ||
| 224 | if (pkey->type == EVP_PKEY_EC) | ||
| 225 | { | ||
| 226 | if (EC_KEY_get0_group(pkey->pkey.ec) == NULL) | ||
| 227 | return(1); | ||
| 228 | } | ||
| 229 | #endif | ||
| 230 | |||
| 231 | return(0); | 161 | return(0); |
| 232 | } | 162 | } |
| 233 | 163 | ||
| 234 | int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) | 164 | int EVP_PKEY_cmp_parameters(EVP_PKEY *a, EVP_PKEY *b) |
| 235 | { | 165 | { |
| 236 | #ifndef OPENSSL_NO_DSA | 166 | #ifndef OPENSSL_NO_DSA |
| 237 | if ((a->type == EVP_PKEY_DSA) && (b->type == EVP_PKEY_DSA)) | 167 | if ((a->type == EVP_PKEY_DSA) && (b->type == EVP_PKEY_DSA)) |
| @@ -244,72 +174,9 @@ int EVP_PKEY_cmp_parameters(const EVP_PKEY *a, const EVP_PKEY *b) | |||
| 244 | return(1); | 174 | return(1); |
| 245 | } | 175 | } |
| 246 | #endif | 176 | #endif |
| 247 | #ifndef OPENSSL_NO_EC | ||
| 248 | if (a->type == EVP_PKEY_EC && b->type == EVP_PKEY_EC) | ||
| 249 | { | ||
| 250 | const EC_GROUP *group_a = EC_KEY_get0_group(a->pkey.ec), | ||
| 251 | *group_b = EC_KEY_get0_group(b->pkey.ec); | ||
| 252 | if (EC_GROUP_cmp(group_a, group_b, NULL)) | ||
| 253 | return 0; | ||
| 254 | else | ||
| 255 | return 1; | ||
| 256 | } | ||
| 257 | #endif | ||
| 258 | return(-1); | 177 | return(-1); |
| 259 | } | 178 | } |
| 260 | 179 | ||
| 261 | int EVP_PKEY_cmp(const EVP_PKEY *a, const EVP_PKEY *b) | ||
| 262 | { | ||
| 263 | if (a->type != b->type) | ||
| 264 | return -1; | ||
| 265 | |||
| 266 | if (EVP_PKEY_cmp_parameters(a, b) == 0) | ||
| 267 | return 0; | ||
| 268 | |||
| 269 | switch (a->type) | ||
| 270 | { | ||
| 271 | #ifndef OPENSSL_NO_RSA | ||
| 272 | case EVP_PKEY_RSA: | ||
| 273 | if (BN_cmp(b->pkey.rsa->n,a->pkey.rsa->n) != 0 | ||
| 274 | || BN_cmp(b->pkey.rsa->e,a->pkey.rsa->e) != 0) | ||
| 275 | return 0; | ||
| 276 | break; | ||
| 277 | #endif | ||
| 278 | #ifndef OPENSSL_NO_DSA | ||
| 279 | case EVP_PKEY_DSA: | ||
| 280 | if (BN_cmp(b->pkey.dsa->pub_key,a->pkey.dsa->pub_key) != 0) | ||
| 281 | return 0; | ||
| 282 | break; | ||
| 283 | #endif | ||
| 284 | #ifndef OPENSSL_NO_EC | ||
| 285 | case EVP_PKEY_EC: | ||
| 286 | { | ||
| 287 | int r; | ||
| 288 | const EC_GROUP *group = EC_KEY_get0_group(b->pkey.ec); | ||
| 289 | const EC_POINT *pa = EC_KEY_get0_public_key(a->pkey.ec), | ||
| 290 | *pb = EC_KEY_get0_public_key(b->pkey.ec); | ||
| 291 | r = EC_POINT_cmp(group, pa, pb, NULL); | ||
| 292 | if (r != 0) | ||
| 293 | { | ||
| 294 | if (r == 1) | ||
| 295 | return 0; | ||
| 296 | else | ||
| 297 | return -2; | ||
| 298 | } | ||
| 299 | } | ||
| 300 | break; | ||
| 301 | #endif | ||
| 302 | #ifndef OPENSSL_NO_DH | ||
| 303 | case EVP_PKEY_DH: | ||
| 304 | return -2; | ||
| 305 | #endif | ||
| 306 | default: | ||
| 307 | return -2; | ||
| 308 | } | ||
| 309 | |||
| 310 | return 1; | ||
| 311 | } | ||
| 312 | |||
| 313 | EVP_PKEY *EVP_PKEY_new(void) | 180 | EVP_PKEY *EVP_PKEY_new(void) |
| 314 | { | 181 | { |
| 315 | EVP_PKEY *ret; | 182 | EVP_PKEY *ret; |
| @@ -379,29 +246,6 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) | |||
| 379 | } | 246 | } |
| 380 | #endif | 247 | #endif |
| 381 | 248 | ||
| 382 | #ifndef OPENSSL_NO_EC | ||
| 383 | |||
| 384 | int EVP_PKEY_set1_EC_KEY(EVP_PKEY *pkey, EC_KEY *key) | ||
| 385 | { | ||
| 386 | int ret = EVP_PKEY_assign_EC_KEY(pkey,key); | ||
| 387 | if (ret) | ||
| 388 | EC_KEY_up_ref(key); | ||
| 389 | return ret; | ||
| 390 | } | ||
| 391 | |||
| 392 | EC_KEY *EVP_PKEY_get1_EC_KEY(EVP_PKEY *pkey) | ||
| 393 | { | ||
| 394 | if (pkey->type != EVP_PKEY_EC) | ||
| 395 | { | ||
| 396 | EVPerr(EVP_F_EVP_PKEY_GET1_EC_KEY, EVP_R_EXPECTING_A_EC_KEY); | ||
| 397 | return NULL; | ||
| 398 | } | ||
| 399 | EC_KEY_up_ref(pkey->pkey.ec); | ||
| 400 | return pkey->pkey.ec; | ||
| 401 | } | ||
| 402 | #endif | ||
| 403 | |||
| 404 | |||
| 405 | #ifndef OPENSSL_NO_DH | 249 | #ifndef OPENSSL_NO_DH |
| 406 | 250 | ||
| 407 | int EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) | 251 | int EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) |
| @@ -438,8 +282,6 @@ int EVP_PKEY_type(int type) | |||
| 438 | return(EVP_PKEY_DSA); | 282 | return(EVP_PKEY_DSA); |
| 439 | case EVP_PKEY_DH: | 283 | case EVP_PKEY_DH: |
| 440 | return(EVP_PKEY_DH); | 284 | return(EVP_PKEY_DH); |
| 441 | case EVP_PKEY_EC: | ||
| 442 | return(EVP_PKEY_EC); | ||
| 443 | default: | 285 | default: |
| 444 | return(NID_undef); | 286 | return(NID_undef); |
| 445 | } | 287 | } |
| @@ -464,8 +306,6 @@ void EVP_PKEY_free(EVP_PKEY *x) | |||
| 464 | } | 306 | } |
| 465 | #endif | 307 | #endif |
| 466 | EVP_PKEY_free_it(x); | 308 | EVP_PKEY_free_it(x); |
| 467 | if (x->attributes) | ||
| 468 | sk_X509_ATTRIBUTE_pop_free(x->attributes, X509_ATTRIBUTE_free); | ||
| 469 | OPENSSL_free(x); | 309 | OPENSSL_free(x); |
| 470 | } | 310 | } |
| 471 | 311 | ||
| @@ -487,11 +327,6 @@ static void EVP_PKEY_free_it(EVP_PKEY *x) | |||
| 487 | DSA_free(x->pkey.dsa); | 327 | DSA_free(x->pkey.dsa); |
| 488 | break; | 328 | break; |
| 489 | #endif | 329 | #endif |
| 490 | #ifndef OPENSSL_NO_EC | ||
| 491 | case EVP_PKEY_EC: | ||
| 492 | EC_KEY_free(x->pkey.ec); | ||
| 493 | break; | ||
| 494 | #endif | ||
| 495 | #ifndef OPENSSL_NO_DH | 330 | #ifndef OPENSSL_NO_DH |
| 496 | case EVP_PKEY_DH: | 331 | case EVP_PKEY_DH: |
| 497 | DH_free(x->pkey.dh); | 332 | DH_free(x->pkey.dh); |
diff --git a/src/lib/libcrypto/evp/p_open.c b/src/lib/libcrypto/evp/p_open.c index 9935206d0f..5a933d1cda 100644 --- a/src/lib/libcrypto/evp/p_open.c +++ b/src/lib/libcrypto/evp/p_open.c | |||
| @@ -56,19 +56,15 @@ | |||
| 56 | * [including the GNU Public Licence.] | 56 | * [including the GNU Public Licence.] |
| 57 | */ | 57 | */ |
| 58 | 58 | ||
| 59 | #ifndef OPENSSL_NO_RSA | ||
| 59 | #include <stdio.h> | 60 | #include <stdio.h> |
| 60 | #include "cryptlib.h" | 61 | #include "cryptlib.h" |
| 61 | |||
| 62 | #ifndef OPENSSL_NO_RSA | ||
| 63 | |||
| 64 | #include <openssl/evp.h> | 62 | #include <openssl/evp.h> |
| 65 | #include <openssl/objects.h> | 63 | #include <openssl/objects.h> |
| 66 | #include <openssl/x509.h> | 64 | #include <openssl/x509.h> |
| 67 | #include <openssl/rsa.h> | ||
| 68 | 65 | ||
| 69 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, | 66 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char *ek, |
| 70 | const unsigned char *ek, int ekl, const unsigned char *iv, | 67 | int ekl, unsigned char *iv, EVP_PKEY *priv) |
| 71 | EVP_PKEY *priv) | ||
| 72 | { | 68 | { |
| 73 | unsigned char *key=NULL; | 69 | unsigned char *key=NULL; |
| 74 | int i,size=0,ret=0; | 70 | int i,size=0,ret=0; |
diff --git a/src/lib/libcrypto/evp/p_seal.c b/src/lib/libcrypto/evp/p_seal.c index 8cc8fcb0bd..37e547fe72 100644 --- a/src/lib/libcrypto/evp/p_seal.c +++ b/src/lib/libcrypto/evp/p_seal.c | |||
| @@ -78,7 +78,7 @@ int EVP_SealInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, unsigned char **ek | |||
| 78 | } | 78 | } |
| 79 | if ((npubk <= 0) || !pubk) | 79 | if ((npubk <= 0) || !pubk) |
| 80 | return 1; | 80 | return 1; |
| 81 | if (EVP_CIPHER_CTX_rand_key(ctx, key) <= 0) | 81 | if (RAND_bytes(key,EVP_MAX_KEY_LENGTH) <= 0) |
| 82 | return 0; | 82 | return 0; |
| 83 | if (EVP_CIPHER_CTX_iv_length(ctx)) | 83 | if (EVP_CIPHER_CTX_iv_length(ctx)) |
| 84 | RAND_pseudo_bytes(iv,EVP_CIPHER_CTX_iv_length(ctx)); | 84 | RAND_pseudo_bytes(iv,EVP_CIPHER_CTX_iv_length(ctx)); |
diff --git a/src/lib/libcrypto/evp/p_verify.c b/src/lib/libcrypto/evp/p_verify.c index 21a40a375e..d854d743a5 100644 --- a/src/lib/libcrypto/evp/p_verify.c +++ b/src/lib/libcrypto/evp/p_verify.c | |||
| @@ -62,7 +62,7 @@ | |||
| 62 | #include <openssl/objects.h> | 62 | #include <openssl/objects.h> |
| 63 | #include <openssl/x509.h> | 63 | #include <openssl/x509.h> |
| 64 | 64 | ||
| 65 | int EVP_VerifyFinal(EVP_MD_CTX *ctx, const unsigned char *sigbuf, | 65 | int EVP_VerifyFinal(EVP_MD_CTX *ctx, unsigned char *sigbuf, |
| 66 | unsigned int siglen, EVP_PKEY *pkey) | 66 | unsigned int siglen, EVP_PKEY *pkey) |
| 67 | { | 67 | { |
| 68 | unsigned char m[EVP_MAX_MD_SIZE]; | 68 | unsigned char m[EVP_MAX_MD_SIZE]; |
