diff options
Diffstat (limited to 'src/lib/libssl')
404 files changed, 76888 insertions, 0 deletions
diff --git a/src/lib/libssl/Makefile b/src/lib/libssl/Makefile new file mode 100644 index 0000000000..3954b2d858 --- /dev/null +++ b/src/lib/libssl/Makefile | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | .include <bsd.own.mk> | ||
| 2 | ECHO= /bin/echo | ||
| 3 | |||
| 4 | .if exists(${.OBJDIR}/src-patent) | ||
| 5 | SUBDIR= crypto-patent ssl-patent | ||
| 6 | .else | ||
| 7 | SUBDIR= crypto ssl | ||
| 8 | .endif | ||
| 9 | |||
| 10 | .include <bsd.subdir.mk> | ||
diff --git a/src/lib/libssl/Makefile.bsd-wrapper b/src/lib/libssl/Makefile.bsd-wrapper new file mode 100644 index 0000000000..282912514d --- /dev/null +++ b/src/lib/libssl/Makefile.bsd-wrapper | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | # Build wrapper for SSLeay. | ||
| 2 | # $OpenBSD: Makefile.bsd-wrapper,v 1.9 1999/03/17 18:25:56 deraadt Exp $ | ||
| 3 | |||
| 4 | # Our lndir is hacked; specify a full path to avoid potential conflicts | ||
| 5 | # with the one installed with X11. | ||
| 6 | LNDIR= /usr/bin/lndir | ||
| 7 | |||
| 8 | |||
| 9 | # Figure out what flag we use to SSLeay's configure. This | ||
| 10 | # needs to be tested on all architectures. | ||
| 11 | |||
| 12 | .if ${MACHINE_ARCH} == "i386" | ||
| 13 | SSLCONF= OpenBSD-x86 | ||
| 14 | .else | ||
| 15 | .if ${MACHINE_ARCH} == "pmax" | ||
| 16 | SSLCONF= OpenBSD-pmax | ||
| 17 | .else | ||
| 18 | .if ${MACHINE_ARCH} == "arc" | ||
| 19 | SSLCONF= OpenBSD-arc | ||
| 20 | .else | ||
| 21 | .if ${MACHINE_ARCH} == "alpha" | ||
| 22 | SSLCONF= OpenBSD-alpha | ||
| 23 | .else | ||
| 24 | .if ${MACHINE_ARCH} == "sparc" | ||
| 25 | SSLCONF= OpenBSD-bigendian | ||
| 26 | .else | ||
| 27 | .if ${MACHINE_ARCH} == "m88k" | ||
| 28 | SSLCONF= OpenBSD-bigendian | ||
| 29 | .else | ||
| 30 | ##UNTESTED! | ||
| 31 | SSLCONF= OpenBSD-bigendian | ||
| 32 | .endif | ||
| 33 | .endif | ||
| 34 | .endif | ||
| 35 | .endif | ||
| 36 | .endif | ||
| 37 | .endif | ||
| 38 | |||
| 39 | MUNGEDFILES = ${.OBJDIR}/${SSL_SRC}/crypto/bf/bf_locl.h \ | ||
| 40 | ${.OBJDIR}/${SSL_SRC}/crypto/bn/bn.h \ | ||
| 41 | ${.OBJDIR}/${SSL_SRC}/crypto/des/des.h \ | ||
| 42 | ${.OBJDIR}/${SSL_SRC}/crypto/des/des_locl.h \ | ||
| 43 | ${.OBJDIR}/${SSL_SRC}/crypto/idea/idea.h \ | ||
| 44 | ${.OBJDIR}/${SSL_SRC}/crypto/md2/md2.h \ | ||
| 45 | ${.OBJDIR}/${SSL_SRC}/crypto/rc2/rc2.h \ | ||
| 46 | ${.OBJDIR}/${SSL_SRC}/crypto/rc4/rc4.h \ | ||
| 47 | ${.OBJDIR}/${SSL_SRC}/crypto/rc4/rc4_locl.h | ||
| 48 | |||
| 49 | |||
| 50 | .include <bsd.own.mk> | ||
| 51 | |||
| 52 | .if exists(src-patent) | ||
| 53 | SSL_SRC=src-patent | ||
| 54 | .else | ||
| 55 | SSL_SRC=src | ||
| 56 | .endif | ||
| 57 | |||
| 58 | all: prereq | ||
| 59 | cd ${.OBJDIR} && ${MAKE} | ||
| 60 | |||
| 61 | includes: prereq | ||
| 62 | cd ${.OBJDIR} && ${MAKE} includes | ||
| 63 | |||
| 64 | prereq: ${.OBJDIR}/${SSL_SRC}/crypto/md2/md2.h | ||
| 65 | |||
| 66 | install: | ||
| 67 | cd ${.OBJDIR} && ${MAKE} install | ||
| 68 | |||
| 69 | ${.OBJDIR}/${SSL_SRC}/crypto/md2/md2.h : ${.OBJDIR}/${SSL_SRC}/Makefile.ssl | ||
| 70 | cd ${.OBJDIR}/${SSL_SRC} && /usr/bin/perl Configure ${SSLCONF} | ||
| 71 | |||
| 72 | .if !exists(${.OBJDIR}/${SSL_SRC}/Makefile.ssl) | ||
| 73 | ${.OBJDIR}/${SSL_SRC}/Makefile.ssl: ${.CURDIR}/${SSL_SRC}/Makefile.ssl | ||
| 74 | ${LNDIR} -s -e obj -e obj.${MACHINE_ARCH} -e Makefile.bsd-wrapper -e Makefile.ssl ${.CURDIR} && cp ${.CURDIR}/${SSL_SRC}/Makefile.ssl ${.OBJDIR}/${SSL_SRC} | ||
| 75 | .endif | ||
| 76 | |||
| 77 | clean: ${.OBJDIR}/${SSL_SRC}/Makefile.ssl | ||
| 78 | cd ${.OBJDIR} && ${MAKE} clean | ||
| 79 | |||
| 80 | cleandir: ${.OBJDIR}/${SSL_SRC}/Makefile.ssl | ||
| 81 | cd ${.OBJDIR} && rm -f ${MUNGEDFILES} && ${MAKE} cleandir | ||
| 82 | |||
| 83 | test: | ||
| 84 | # Nothing here so far... | ||
| 85 | |||
| 86 | depend: | ||
| 87 | # Nothing here so far... | ||
| 88 | |||
| 89 | lint: | ||
| 90 | # Nothing here so far... | ||
| 91 | |||
| 92 | tags: | ||
| 93 | # Nothing here so far... | ||
| 94 | |||
| 95 | distribution: | ||
| 96 | ${INSTALL} ${INSTALL_COPY} -g ${BINGRP} -m 444 \ | ||
| 97 | ${.CURDIR}/ssleay.cnf ${DESTDIR}/etc/ssl/lib/ssleay.cnf | ||
| 98 | |||
| 99 | .include <bsd.obj.mk> | ||
| 100 | .include <bsd.subdir.mk> | ||
diff --git a/src/lib/libssl/README.OPENBSD b/src/lib/libssl/README.OPENBSD new file mode 100644 index 0000000000..7cc3d0d424 --- /dev/null +++ b/src/lib/libssl/README.OPENBSD | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | |||
| 2 | This is an SSLeay-0.9.0b (the b means the PKCS#1 bug is fixed) tree. | ||
| 3 | |||
| 4 | It has the following modifcations made to it. | ||
| 5 | |||
| 6 | 0) util/perlpath.pl has been run to change perlpath to /usr/bin | ||
| 7 | util/ssldir.pl has been run to change the ssl dir to /usr/ssl | ||
| 8 | Null check added to crypto/err/err.c (mailed to Eric Young) | ||
| 9 | to avoid problems in error handling. Includes install into | ||
| 10 | /usr/include/ssl, certs and configs are expected to be in | ||
| 11 | /etc/ssl. | ||
| 12 | |||
| 13 | 1) Changes for openbsd compilation to have been made to | ||
| 14 | config and Configure (these have been sent to Eric Young) | ||
| 15 | |||
| 16 | NOTES: | ||
| 17 | |||
| 18 | Many tests will fail miserably, since most of them start | ||
| 19 | with SSL v2, which requires RSA, and of course, they barf. | ||
| 20 | idea tests will also fail. This is to be expected. Do | ||
| 21 | "make -k test" if you want to see the output and draw | ||
| 22 | your own conclusions. | ||
| 23 | |||
| 24 | Many parts of the utility programs may not work, although things | ||
| 25 | like client and server will provided you start them in a mode | ||
| 26 | that does not require RSA to operate. | ||
| 27 | |||
| 28 | Unlike an ssl library built to remove the offending routines | ||
| 29 | (which removes many of the things like SSL23init which many | ||
| 30 | packages like web servers use) this library does contain | ||
| 31 | stubs for everything. The patent bits will simply fail. The | ||
| 32 | idea is that this may be used as is for limited functionality, | ||
| 33 | or where possible replaced with a full function library. When | ||
| 34 | porting an app it is important to remember to try to use the | ||
| 35 | tls1 version of stuff first where possible. I.E. if you're | ||
| 36 | going to SSL-ize OpenBSD telnet, for example, call the tls1 init | ||
| 37 | functions *NOT* sslv2init or sslv23init, or you'll be dependent | ||
| 38 | on RSA and have a version that will only work with a full | ||
| 39 | function library. Use the tls versions and you'll work with | ||
| 40 | both - a good thing. | ||
| 41 | |||
| 42 | "crypto" and "ssl" are OpenBSD style build dirs for the | ||
| 43 | libraries of the same name. "ssleay" is the build dir for the | ||
| 44 | "ssleay" executable, used to control everything vagely ssleay | ||
| 45 | like, from testing to generating certificates, to playing | ||
| 46 | simple client server games. libraries expect to install headers | ||
| 47 | in "/usr/include/ssl", libraries in /usr/lib, ssleay in /usr/sbin | ||
| 48 | |||
| 49 | TODO: | ||
| 50 | SSLeay contains just no library docs, it's all use the | ||
| 51 | force, read the source. This should be fixed sometime. | ||
| 52 | |||
| 53 | DSS certificate generation is a black art. This | ||
| 54 | needs to be properly documented and a comprehensive procedure | ||
| 55 | written up, at least for how to generate a cert for | ||
| 56 | a host to be used by multiple servers. beck@ has talked | ||
| 57 | to Mark Shuttleworth of Thawte, and he has agreed that | ||
| 58 | if we can get DSS hosts certs up and running Thawte will | ||
| 59 | consider providing the service (for the usual fee of course) | ||
| 60 | of for-real signing of OpenBSD host certs for those who | ||
| 61 | want a real CA for things like telnet and ftp and the like. | ||
| 62 | |||
| 63 | Apps beyond ssleay need testing - apps that use exclusively old style | ||
| 64 | sslv2 or sslv2/3 need to be converted/modified where possible to | ||
| 65 | try the tls1 stuff, so that we can handle doing things without | ||
| 66 | RSA. | ||
diff --git a/src/lib/libssl/crypto-patent/Makefile b/src/lib/libssl/crypto-patent/Makefile new file mode 100644 index 0000000000..14ceca92d7 --- /dev/null +++ b/src/lib/libssl/crypto-patent/Makefile | |||
| @@ -0,0 +1,179 @@ | |||
| 1 | |||
| 2 | LIB= crypto | ||
| 3 | |||
| 4 | SSLEAYDIST= src-patent | ||
| 5 | |||
| 6 | LCRYPTO_SRC= ${.CURDIR}/../${SSLEAYDIST}/crypto | ||
| 7 | |||
| 8 | .if ${MACHINE_ARCH} == "i386" | ||
| 9 | CFLAGS+= -DL_ENDIAN -DBN_ASM | ||
| 10 | .else | ||
| 11 | .if ${MACHINE_ARCH} == "arc" | ||
| 12 | CFLAGS+= -DL_ENDIAN | ||
| 13 | .else | ||
| 14 | .if ${MACHINE_ARCH} == "pmax" | ||
| 15 | CFLAGS+= -DL_ENDIAN | ||
| 16 | .else | ||
| 17 | .if ${MACHINE_ARCH} == "alpha" | ||
| 18 | # no ENDIAN stuff defined for alpha | ||
| 19 | .else | ||
| 20 | CFLAGS+= -DB_ENDIAN | ||
| 21 | .endif | ||
| 22 | .endif | ||
| 23 | .endif | ||
| 24 | .endif | ||
| 25 | |||
| 26 | CFLAGS+= -DNO_IDEA -DTERMIOS -DANSI_SOURCE | ||
| 27 | CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST} | ||
| 28 | CFLAGS+= -I${LCRYPTO_SRC} | ||
| 29 | SRCS+= cryptlib.c mem.c cversion.c ex_data.c cpt_err.c | ||
| 30 | CFLAGS+= -I${LCRYPTO_SRC}/md2 | ||
| 31 | SRCS+= md2_dgst.c md2_one.c | ||
| 32 | CFLAGS+= -I${LCRYPTO_SRC}/md5 | ||
| 33 | SRCS+= md5_dgst.c md5_one.c | ||
| 34 | CFLAGS+= -I${LCRYPTO_SRC}/sha | ||
| 35 | SRCS+= sha_dgst.c sha1dgst.c sha_one.c sha1_one.c | ||
| 36 | CFLAGS+= -I${LCRYPTO_SRC}/mdc2 | ||
| 37 | SRCS+= mdc2dgst.c mdc2_one.c | ||
| 38 | CFLAGS+= -I${LCRYPTO_SRC}/hmac | ||
| 39 | SRCS+= hmac.c | ||
| 40 | CFLAGS+= -I${LCRYPTO_SRC}/ripemd | ||
| 41 | SRCS+= rmd_dgst.c rmd_one.c | ||
| 42 | CFLAGS+= -I${LCRYPTO_SRC}/des | ||
| 43 | SRCS+= cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c \ | ||
| 44 | ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c \ | ||
| 45 | fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c \ | ||
| 46 | qud_cksm.c rand_key.c read_pwd.c rpc_enc.c set_key.c \ | ||
| 47 | des_enc.c fcrypt_b.c read2pwd.c \ | ||
| 48 | fcrypt.c xcbc_enc.c \ | ||
| 49 | str2key.c cfb64ede.c ofb64ede.c supp.c | ||
| 50 | CFLAGS+= -I${LCRYPTO_SRC}/rc2 | ||
| 51 | SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c | ||
| 52 | SRCS+= rc2ofb64.c | ||
| 53 | CFLAGS+= -I${LCRYPTO_SRC}/rc4 | ||
| 54 | SRCS+= rc4_skey.c rc4_enc.c | ||
| 55 | CFLAGS+= -I${LCRYPTO_SRC}/rc5 | ||
| 56 | SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5cfb64.c | ||
| 57 | SRCS+= rc5ofb64.c rc5_enc.c | ||
| 58 | CFLAGS+= -I${LCRYPTO_SRC}/idea | ||
| 59 | SRCS+= i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c | ||
| 60 | SRCS+= i_skey.c | ||
| 61 | CFLAGS+= -I${LCRYPTO_SRC}/bf | ||
| 62 | SRCS+= bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c bf_enc.c | ||
| 63 | CFLAGS+= -I${LCRYPTO_SRC}/cast | ||
| 64 | SRCS+= c_skey.c c_ecb.c c_cfb64.c c_ofb64.c c_enc.c | ||
| 65 | CFLAGS+= -I${LCRYPTO_SRC}/bn | ||
| 66 | SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c | ||
| 67 | SRCS+= bn_mul.c bn_print.c bn_rand.c bn_shift.c bn_sub.c | ||
| 68 | SRCS+= bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c | ||
| 69 | SRCS+= bn_sqr.c bn_recp.c bn_mont.c bn_mpi.c | ||
| 70 | SRCS+= bn_mulw.c | ||
| 71 | CFLAGS+= -I${LCRYPTO_SRC}/rsa | ||
| 72 | SRCS+= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c | ||
| 73 | SRCS+= rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c | ||
| 74 | SRCS+= rsa_none.c | ||
| 75 | CFLAGS+= -I${LCRYPTO_SRC}/dsa | ||
| 76 | SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c | ||
| 77 | SRCS+= dsa_sign.c dsa_err.c | ||
| 78 | CFLAGS+= -I${LCRYPTO_SRC}/dh | ||
| 79 | SRCS+= dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c | ||
| 80 | CFLAGS+= -I${LCRYPTO_SRC}/buffer | ||
| 81 | SRCS+= buffer.c buf_err.c | ||
| 82 | CFLAGS+= -I${LCRYPTO_SRC}/bio | ||
| 83 | SRCS+= bio_lib.c bio_cb.c bio_err.c bss_mem.c | ||
| 84 | SRCS+= bss_null.c bss_fd.c bss_file.c bss_sock.c | ||
| 85 | SRCS+= bss_conn.c bf_null.c bf_buff.c | ||
| 86 | SRCS+= b_print.c b_dump.c b_sock.c bss_acpt.c | ||
| 87 | SRCS+= bf_nbio.c | ||
| 88 | CFLAGS+= -I${LCRYPTO_SRC}/stack | ||
| 89 | SRCS+= stack.c | ||
| 90 | CFLAGS+= -I${LCRYPTO_SRC}/lhash | ||
| 91 | SRCS+= lhash.c lh_stats.c | ||
| 92 | CFLAGS+= -I${LCRYPTO_SRC}/rand | ||
| 93 | SRCS+= md_rand.c randfile.c | ||
| 94 | CFLAGS+= -I${LCRYPTO_SRC}/err | ||
| 95 | SRCS+= err.c err_all.c err_prn.c | ||
| 96 | CFLAGS+= -I${LCRYPTO_SRC}/objects | ||
| 97 | SRCS+= obj_dat.c obj_lib.c obj_err.c | ||
| 98 | CFLAGS+= -I${LCRYPTO_SRC}/evp | ||
| 99 | SRCS+= encode.c digest.c evp_enc.c evp_key.c | ||
| 100 | SRCS+= e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c | ||
| 101 | SRCS+= e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c | ||
| 102 | SRCS+= e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c | ||
| 103 | SRCS+= e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c | ||
| 104 | SRCS+= e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c | ||
| 105 | SRCS+= e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c | ||
| 106 | SRCS+= e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c | ||
| 107 | SRCS+= e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c | ||
| 108 | SRCS+= m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c | ||
| 109 | SRCS+= m_dss1.c m_mdc2.c m_ripemd.c p_open.c | ||
| 110 | SRCS+= p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c | ||
| 111 | SRCS+= p_dec.c bio_md.c bio_b64.c bio_enc.c | ||
| 112 | SRCS+= evp_err.c e_null.c c_all.c evp_lib.c | ||
| 113 | CFLAGS+= -I${LCRYPTO_SRC}/pem | ||
| 114 | SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c | ||
| 115 | SRCS+= pem_all.c pem_err.c | ||
| 116 | CFLAGS+= -I${LCRYPTO_SRC}/asn1 | ||
| 117 | SRCS+= a_object.c a_bitstr.c a_utctm.c a_int.c | ||
| 118 | SRCS+= a_octet.c a_print.c a_type.c a_set.c | ||
| 119 | SRCS+= a_dup.c a_d2i_fp.c a_i2d_fp.c a_sign.c | ||
| 120 | SRCS+= a_digest.c a_verify.c x_algor.c x_val.c | ||
| 121 | SRCS+= x_pubkey.c x_sig.c x_req.c x_attrib.c | ||
| 122 | SRCS+= x_name.c x_cinf.c x_x509.c x_crl.c | ||
| 123 | SRCS+= x_info.c x_spki.c d2i_r_pr.c i2d_r_pr.c | ||
| 124 | SRCS+= d2i_r_pu.c i2d_r_pu.c d2i_s_pr.c i2d_s_pr.c | ||
| 125 | SRCS+= d2i_s_pu.c i2d_s_pu.c d2i_pu.c d2i_pr.c | ||
| 126 | SRCS+= i2d_pu.c i2d_pr.c t_req.c t_x509.c | ||
| 127 | SRCS+= t_pkey.c p7_i_s.c p7_signi.c p7_signd.c | ||
| 128 | SRCS+= p7_recip.c p7_enc_c.c p7_evp.c p7_dgst.c | ||
| 129 | SRCS+= p7_s_e.c p7_enc.c p7_lib.c f_int.c | ||
| 130 | SRCS+= f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c | ||
| 131 | SRCS+= d2i_dsap.c n_pkey.c a_hdr.c x_pkey.c | ||
| 132 | SRCS+= a_bool.c x_exten.c asn1_par.c asn1_lib.c | ||
| 133 | SRCS+= asn1_err.c a_meth.c a_bytes.c evp_asn1.c | ||
| 134 | CFLAGS+= -I${LCRYPTO_SRC}/x509 | ||
| 135 | SRCS+= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c | ||
| 136 | SRCS+= x509_obj.c x509_req.c x509_vfy.c x509_set.c | ||
| 137 | SRCS+= x509rset.c x509_err.c x509name.c x509_v3.c | ||
| 138 | SRCS+= x509_ext.c x509pack.c x509type.c x509_lu.c | ||
| 139 | SRCS+= x_all.c x509_txt.c by_file.c by_dir.c | ||
| 140 | SRCS+= v3_net.c v3_x509.c | ||
| 141 | CFLAGS+= -I${LCRYPTO_SRC}/conf | ||
| 142 | SRCS+= conf.c conf_err.c | ||
| 143 | CFLAGS+= -I${LCRYPTO_SRC}/txt_db | ||
| 144 | SRCS+= txt_db.c | ||
| 145 | CFLAGS+= -I${LCRYPTO_SRC}/pkcs7 | ||
| 146 | SRCS+= pk7_lib.c pkcs7err.c pk7_doit.c | ||
| 147 | |||
| 148 | HDRS= asn1/asn1.h asn1/asn1_mac.h bf/blowfish.h bio/bio.h \ | ||
| 149 | bn/bn.h buffer/buffer.h cast/cast.h conf/conf.h des/des.h dh/dh.h \ | ||
| 150 | dsa/dsa.h err/err.h evp/evp.h hmac/hmac.h idea/idea.h lhash/lhash.h \ | ||
| 151 | md2/md2.h md5/md5.h mdc2/mdc2.h objects/objects.h pem/pem.h \ | ||
| 152 | pkcs7/pkcs7.h rand/rand.h rc2/rc2.h rc4/rc4.h rc5/rc5.h \ | ||
| 153 | ripemd/ripemd.h rsa/rsa.h sha/sha.h stack/stack.h txt_db/txt_db.h \ | ||
| 154 | x509/x509.h x509/x509_vfy.h crypto.h cryptall.h ../e_os.h | ||
| 155 | |||
| 156 | .PATH: ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 ${LCRYPTO_SRC}/sha ${LCRYPTO_SRC}/mdc2 \ | ||
| 157 | ${LCRYPTO_SRC}/hmac ${LCRYPTO_SRC}/ripemd ${LCRYPTO_SRC}/des ${LCRYPTO_SRC}/rc2 \ | ||
| 158 | ${LCRYPTO_SRC}/rc4 ${LCRYPTO_SRC}/rc5 ${LCRYPTO_SRC}/idea ${LCRYPTO_SRC}/bf \ | ||
| 159 | ${LCRYPTO_SRC}/cast ${LCRYPTO_SRC}/bn ${LCRYPTO_SRC}/rsa ${LCRYPTO_SRC}/dsa \ | ||
| 160 | ${LCRYPTO_SRC}/dh ${LCRYPTO_SRC}/buffer ${LCRYPTO_SRC}/bio ${LCRYPTO_SRC}/stack \ | ||
| 161 | ${LCRYPTO_SRC}/lhash ${LCRYPTO_SRC}/rand ${LCRYPTO_SRC}/err ${LCRYPTO_SRC}/objects \ | ||
| 162 | ${LCRYPTO_SRC}/evp ${LCRYPTO_SRC}/pem ${LCRYPTO_SRC}/asn1 ${LCRYPTO_SRC}/asn1 \ | ||
| 163 | ${LCRYPTO_SRC}/x509 ${LCRYPTO_SRC}/conf txt_db/txt_db.c ${LCRYPTO_SRC}/pkcs7 \ | ||
| 164 | ${LCRYPTO_SRC}/txt_db ${LCRYPTO_SRC} | ||
| 165 | |||
| 166 | includes: | ||
| 167 | @test -d ${DESTDIR}/usr/include/ssl || mkdir ${DESTDIR}/usr/include/ssl | ||
| 168 | @cd ${LCRYPTO_SRC}; for i in $(HDRS); do \ | ||
| 169 | j="cmp -s ${LCRYPTO_SRC}/$$i \ | ||
| 170 | ${DESTDIR}/usr/include/ssl/`basename $$i` || \ | ||
| 171 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ | ||
| 172 | ${LCRYPTO_SRC}/$$i ${DESTDIR}/usr/include/ssl"; \ | ||
| 173 | echo $$j; \ | ||
| 174 | eval "$$j"; \ | ||
| 175 | done | ||
| 176 | |||
| 177 | |||
| 178 | .include <bsd.lib.mk> | ||
| 179 | |||
diff --git a/src/lib/libssl/crypto-patent/shlib_version b/src/lib/libssl/crypto-patent/shlib_version new file mode 100644 index 0000000000..893819d18f --- /dev/null +++ b/src/lib/libssl/crypto-patent/shlib_version | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | major=1 | ||
| 2 | minor=1 | ||
diff --git a/src/lib/libssl/crypto/Makefile b/src/lib/libssl/crypto/Makefile new file mode 100644 index 0000000000..9db529295b --- /dev/null +++ b/src/lib/libssl/crypto/Makefile | |||
| @@ -0,0 +1,183 @@ | |||
| 1 | |||
| 2 | LIB= crypto | ||
| 3 | |||
| 4 | SSLEAYDIST= src | ||
| 5 | |||
| 6 | LCRYPTO_SRC= ${.CURDIR}/../${SSLEAYDIST}/crypto | ||
| 7 | |||
| 8 | .if ${MACHINE_ARCH} == "i386" | ||
| 9 | CFLAGS+= -DL_ENDIAN -DBN_ASM | ||
| 10 | .else | ||
| 11 | .if ${MACHINE_ARCH} == "arc" | ||
| 12 | CFLAGS+= -DL_ENDIAN | ||
| 13 | .else | ||
| 14 | .if ${MACHINE_ARCH} == "pmax" | ||
| 15 | CFLAGS+= -DL_ENDIAN | ||
| 16 | .else | ||
| 17 | .if ${MACHINE_ARCH} == "alpha" | ||
| 18 | # no ENDIAN stuff defined for alpha | ||
| 19 | .else | ||
| 20 | CFLAGS+= -DB_ENDIAN | ||
| 21 | .endif | ||
| 22 | .endif | ||
| 23 | .endif | ||
| 24 | .endif | ||
| 25 | |||
| 26 | CFLAGS+= -DNO_IDEA -DTERMIOS -DANSI_SOURCE | ||
| 27 | CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST} | ||
| 28 | CFLAGS+= -I${LCRYPTO_SRC} | ||
| 29 | SRCS+= cryptlib.c mem.c cversion.c ex_data.c cpt_err.c | ||
| 30 | CFLAGS+= -I${LCRYPTO_SRC}/md2 | ||
| 31 | SRCS+= md2_dgst.c md2_one.c | ||
| 32 | CFLAGS+= -I${LCRYPTO_SRC}/md5 | ||
| 33 | SRCS+= md5_dgst.c md5_one.c | ||
| 34 | CFLAGS+= -I${LCRYPTO_SRC}/sha | ||
| 35 | SRCS+= sha_dgst.c sha1dgst.c sha_one.c sha1_one.c | ||
| 36 | CFLAGS+= -I${LCRYPTO_SRC}/mdc2 | ||
| 37 | SRCS+= mdc2dgst.c mdc2_one.c | ||
| 38 | CFLAGS+= -I${LCRYPTO_SRC}/hmac | ||
| 39 | SRCS+= hmac.c | ||
| 40 | CFLAGS+= -I${LCRYPTO_SRC}/ripemd | ||
| 41 | SRCS+= rmd_dgst.c rmd_one.c | ||
| 42 | CFLAGS+= -I${LCRYPTO_SRC}/des | ||
| 43 | SRCS+= cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c \ | ||
| 44 | ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c \ | ||
| 45 | fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c \ | ||
| 46 | qud_cksm.c rand_key.c read_pwd.c rpc_enc.c set_key.c \ | ||
| 47 | des_enc.c fcrypt_b.c read2pwd.c \ | ||
| 48 | fcrypt.c xcbc_enc.c \ | ||
| 49 | str2key.c cfb64ede.c ofb64ede.c supp.c | ||
| 50 | CFLAGS+= -I${LCRYPTO_SRC}/rc2 | ||
| 51 | SRCS+= rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c | ||
| 52 | SRCS+= rc2ofb64.c | ||
| 53 | CFLAGS+= -I${LCRYPTO_SRC}/rc4 | ||
| 54 | SRCS+= rc4_skey.c rc4_enc.c | ||
| 55 | CFLAGS+= -I${LCRYPTO_SRC}/rc5 | ||
| 56 | SRCS+= rc5_skey.c rc5_ecb.c rc5cfb64.c rc5cfb64.c | ||
| 57 | SRCS+= rc5ofb64.c rc5_enc.c | ||
| 58 | CFLAGS+= -I${LCRYPTO_SRC}/idea | ||
| 59 | SRCS+= i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c | ||
| 60 | SRCS+= i_skey.c | ||
| 61 | CFLAGS+= -I${LCRYPTO_SRC}/bf | ||
| 62 | SRCS+= bf_skey.c bf_ecb.c bf_cfb64.c bf_ofb64.c bf_enc.c | ||
| 63 | CFLAGS+= -I${LCRYPTO_SRC}/cast | ||
| 64 | SRCS+= c_skey.c c_ecb.c c_cfb64.c c_ofb64.c c_enc.c | ||
| 65 | CFLAGS+= -I${LCRYPTO_SRC}/bn | ||
| 66 | SRCS+= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c | ||
| 67 | SRCS+= bn_mul.c bn_print.c bn_rand.c bn_shift.c bn_sub.c | ||
| 68 | SRCS+= bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c | ||
| 69 | SRCS+= bn_sqr.c bn_recp.c bn_mont.c bn_mpi.c | ||
| 70 | SRCS+= bn_mulw.c | ||
| 71 | CFLAGS+= -I${LCRYPTO_SRC}/rsa | ||
| 72 | SRCS+= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c | ||
| 73 | SRCS+= rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c | ||
| 74 | SRCS+= rsa_none.c | ||
| 75 | CFLAGS+= -I${LCRYPTO_SRC}/dsa | ||
| 76 | SRCS+= dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c | ||
| 77 | SRCS+= dsa_sign.c dsa_err.c | ||
| 78 | CFLAGS+= -I${LCRYPTO_SRC}/dh | ||
| 79 | SRCS+= dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c | ||
| 80 | CFLAGS+= -I${LCRYPTO_SRC}/buffer | ||
| 81 | SRCS+= buffer.c buf_err.c | ||
| 82 | CFLAGS+= -I${LCRYPTO_SRC}/bio | ||
| 83 | SRCS+= bio_lib.c bio_cb.c bio_err.c bss_mem.c | ||
| 84 | SRCS+= bss_null.c bss_fd.c bss_file.c bss_sock.c | ||
| 85 | SRCS+= bss_conn.c bf_null.c bf_buff.c | ||
| 86 | SRCS+= b_print.c b_dump.c b_sock.c bss_acpt.c | ||
| 87 | SRCS+= bf_nbio.c | ||
| 88 | CFLAGS+= -I${LCRYPTO_SRC}/stack | ||
| 89 | SRCS+= stack.c | ||
| 90 | CFLAGS+= -I${LCRYPTO_SRC}/lhash | ||
| 91 | SRCS+= lhash.c lh_stats.c | ||
| 92 | CFLAGS+= -I${LCRYPTO_SRC}/rand | ||
| 93 | SRCS+= md_rand.c randfile.c | ||
| 94 | CFLAGS+= -I${LCRYPTO_SRC}/err | ||
| 95 | SRCS+= err.c err_all.c err_prn.c | ||
| 96 | CFLAGS+= -I${LCRYPTO_SRC}/objects | ||
| 97 | SRCS+= obj_dat.c obj_lib.c obj_err.c | ||
| 98 | CFLAGS+= -I${LCRYPTO_SRC}/evp | ||
| 99 | SRCS+= encode.c digest.c evp_enc.c evp_key.c | ||
| 100 | SRCS+= e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c | ||
| 101 | SRCS+= e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c | ||
| 102 | SRCS+= e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c | ||
| 103 | SRCS+= e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c | ||
| 104 | SRCS+= e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c | ||
| 105 | SRCS+= e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c | ||
| 106 | SRCS+= e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c | ||
| 107 | SRCS+= e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c | ||
| 108 | SRCS+= m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c | ||
| 109 | SRCS+= m_dss1.c m_mdc2.c m_ripemd.c p_open.c | ||
| 110 | SRCS+= p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c | ||
| 111 | SRCS+= p_dec.c bio_md.c bio_b64.c bio_enc.c | ||
| 112 | SRCS+= evp_err.c e_null.c c_all.c evp_lib.c | ||
| 113 | CFLAGS+= -I${LCRYPTO_SRC}/pem | ||
| 114 | SRCS+= pem_sign.c pem_seal.c pem_info.c pem_lib.c | ||
| 115 | SRCS+= pem_all.c pem_err.c | ||
| 116 | CFLAGS+= -I${LCRYPTO_SRC}/asn1 | ||
| 117 | SRCS+= a_object.c a_bitstr.c a_utctm.c a_int.c | ||
| 118 | SRCS+= a_octet.c a_print.c a_type.c a_set.c | ||
| 119 | SRCS+= a_dup.c a_d2i_fp.c a_i2d_fp.c a_sign.c | ||
| 120 | SRCS+= a_digest.c a_verify.c x_algor.c x_val.c | ||
| 121 | SRCS+= x_pubkey.c x_sig.c x_req.c x_attrib.c | ||
| 122 | SRCS+= x_name.c x_cinf.c x_x509.c x_crl.c | ||
| 123 | SRCS+= x_info.c x_spki.c d2i_r_pr.c i2d_r_pr.c | ||
| 124 | SRCS+= d2i_r_pu.c i2d_r_pu.c d2i_s_pr.c i2d_s_pr.c | ||
| 125 | SRCS+= d2i_s_pu.c i2d_s_pu.c d2i_pu.c d2i_pr.c | ||
| 126 | SRCS+= i2d_pu.c i2d_pr.c t_req.c t_x509.c | ||
| 127 | SRCS+= t_pkey.c p7_i_s.c p7_signi.c p7_signd.c | ||
| 128 | SRCS+= p7_recip.c p7_enc_c.c p7_evp.c p7_dgst.c | ||
| 129 | SRCS+= p7_s_e.c p7_enc.c p7_lib.c f_int.c | ||
| 130 | SRCS+= f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c | ||
| 131 | SRCS+= d2i_dsap.c n_pkey.c a_hdr.c x_pkey.c | ||
| 132 | SRCS+= a_bool.c x_exten.c asn1_par.c asn1_lib.c | ||
| 133 | SRCS+= asn1_err.c a_meth.c a_bytes.c evp_asn1.c | ||
| 134 | CFLAGS+= -I${LCRYPTO_SRC}/x509 | ||
| 135 | SRCS+= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c | ||
| 136 | SRCS+= x509_obj.c x509_req.c x509_vfy.c x509_set.c | ||
| 137 | SRCS+= x509rset.c x509_err.c x509name.c x509_v3.c | ||
| 138 | SRCS+= x509_ext.c x509pack.c x509type.c x509_lu.c | ||
| 139 | SRCS+= x_all.c x509_txt.c by_file.c by_dir.c | ||
| 140 | SRCS+= v3_net.c v3_x509.c | ||
| 141 | CFLAGS+= -I${LCRYPTO_SRC}/conf | ||
| 142 | SRCS+= conf.c conf_err.c | ||
| 143 | CFLAGS+= -I${LCRYPTO_SRC}/txt_db | ||
| 144 | SRCS+= txt_db.c | ||
| 145 | CFLAGS+= -I${LCRYPTO_SRC}/pkcs7 | ||
| 146 | SRCS+= pk7_lib.c pkcs7err.c pk7_doit.c | ||
| 147 | |||
| 148 | HDRS= asn1/asn1.h asn1/asn1_mac.h bf/blowfish.h bio/bio.h \ | ||
| 149 | bn/bn.h buffer/buffer.h cast/cast.h conf/conf.h des/des.h dh/dh.h \ | ||
| 150 | dsa/dsa.h err/err.h evp/evp.h hmac/hmac.h idea/idea.h lhash/lhash.h \ | ||
| 151 | md2/md2.h md5/md5.h mdc2/mdc2.h objects/objects.h pem/pem.h \ | ||
| 152 | pkcs7/pkcs7.h rand/rand.h rc2/rc2.h rc4/rc4.h rc5/rc5.h \ | ||
| 153 | ripemd/ripemd.h rsa/rsa.h sha/sha.h stack/stack.h txt_db/txt_db.h \ | ||
| 154 | x509/x509.h x509/x509_vfy.h crypto.h cryptall.h ../e_os.h | ||
| 155 | |||
| 156 | .PATH: ${LCRYPTO_SRC}/md2 ${LCRYPTO_SRC}/md5 ${LCRYPTO_SRC}/sha ${LCRYPTO_SRC}/mdc2 \ | ||
| 157 | ${LCRYPTO_SRC}/hmac ${LCRYPTO_SRC}/ripemd ${LCRYPTO_SRC}/des ${LCRYPTO_SRC}/rc2 \ | ||
| 158 | ${LCRYPTO_SRC}/rc4 ${LCRYPTO_SRC}/rc5 ${LCRYPTO_SRC}/idea ${LCRYPTO_SRC}/bf \ | ||
| 159 | ${LCRYPTO_SRC}/cast ${LCRYPTO_SRC}/bn ${LCRYPTO_SRC}/rsa ${LCRYPTO_SRC}/dsa \ | ||
| 160 | ${LCRYPTO_SRC}/dh ${LCRYPTO_SRC}/buffer ${LCRYPTO_SRC}/bio ${LCRYPTO_SRC}/stack \ | ||
| 161 | ${LCRYPTO_SRC}/lhash ${LCRYPTO_SRC}/rand ${LCRYPTO_SRC}/err ${LCRYPTO_SRC}/objects \ | ||
| 162 | ${LCRYPTO_SRC}/evp ${LCRYPTO_SRC}/pem ${LCRYPTO_SRC}/asn1 ${LCRYPTO_SRC}/asn1 \ | ||
| 163 | ${LCRYPTO_SRC}/x509 ${LCRYPTO_SRC}/conf txt_db/txt_db.c ${LCRYPTO_SRC}/pkcs7 \ | ||
| 164 | ${LCRYPTO_SRC}/txt_db ${LCRYPTO_SRC} | ||
| 165 | |||
| 166 | includes: | ||
| 167 | @test -d ${DESTDIR}/usr/include/ssl || mkdir ${DESTDIR}/usr/include/ssl | ||
| 168 | @d=`mktemp -d /tmp/libsslXXXXXXXXXX`; \ | ||
| 169 | cd ${LCRYPTO_SRC}; for i in $(HDRS); do \ | ||
| 170 | f=`basename $$i`; \ | ||
| 171 | j="sed 's/#include \"\\([^\"]*\\)\"/#include <ssl\\/\\1>/' \ | ||
| 172 | ${LCRYPTO_SRC}/$$i >$$d/$$f && \ | ||
| 173 | (cmp -s $$d/$$f ${DESTDIR}/usr/include/ssl/$$f || \ | ||
| 174 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ | ||
| 175 | $$d/$$f ${DESTDIR}/usr/include/ssl)"; \ | ||
| 176 | echo $$j; \ | ||
| 177 | eval "$$j"; \ | ||
| 178 | done; \ | ||
| 179 | rm -rf $$d | ||
| 180 | |||
| 181 | |||
| 182 | .include <bsd.lib.mk> | ||
| 183 | |||
diff --git a/src/lib/libssl/crypto/shlib_version b/src/lib/libssl/crypto/shlib_version new file mode 100644 index 0000000000..1edea46de9 --- /dev/null +++ b/src/lib/libssl/crypto/shlib_version | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | major=1 | ||
| 2 | minor=0 | ||
diff --git a/src/lib/libssl/src/COPYRIGHT b/src/lib/libssl/src/COPYRIGHT new file mode 100644 index 0000000000..4faa8c0a46 --- /dev/null +++ b/src/lib/libssl/src/COPYRIGHT | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | Copyright (C) 1997 Eric Young (eay@cryptsoft.com) | ||
| 2 | All rights reserved. | ||
| 3 | |||
| 4 | This package is an SSL implementation written by Eric Young (eay@cryptsoft.com). | ||
| 5 | The implementation was written so as to conform with Netscapes SSL. | ||
| 6 | |||
| 7 | This library is free for commercial and non-commercial use as long as | ||
| 8 | the following conditions are aheared to. The following conditions | ||
| 9 | apply to all code found in this distribution, be it the RC4, RSA, | ||
| 10 | lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 11 | included with this distribution is covered by the same copyright terms | ||
| 12 | except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 13 | |||
| 14 | Please note that MD2, MD5 and IDEA are publically available standards | ||
| 15 | that contain sample implementations, I have re-coded them in my own | ||
| 16 | way but there is nothing special about those implementations. The DES | ||
| 17 | library is another mater :-). | ||
| 18 | |||
| 19 | Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 20 | the code are not to be removed. | ||
| 21 | If this package is used in a product, Eric Young should be given attribution | ||
| 22 | as the author of the parts of the library used. | ||
| 23 | This can be in the form of a textual message at program startup or | ||
| 24 | in documentation (online or textual) provided with the package. | ||
| 25 | |||
| 26 | Redistribution and use in source and binary forms, with or without | ||
| 27 | modification, are permitted provided that the following conditions | ||
| 28 | are met: | ||
| 29 | 1. Redistributions of source code must retain the copyright | ||
| 30 | notice, this list of conditions and the following disclaimer. | ||
| 31 | 2. Redistributions in binary form must reproduce the above copyright | ||
| 32 | notice, this list of conditions and the following disclaimer in the | ||
| 33 | documentation and/or other materials provided with the distribution. | ||
| 34 | 3. All advertising materials mentioning features or use of this software | ||
| 35 | must display the following acknowledgement: | ||
| 36 | "This product includes cryptographic software written by | ||
| 37 | Eric Young (eay@cryptsoft.com)" | ||
| 38 | The word 'cryptographic' can be left out if the rouines from the library | ||
| 39 | being used are not cryptographic related :-). | ||
| 40 | 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 41 | the apps directory (application code) you must include an acknowledgement: | ||
| 42 | "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 43 | |||
| 44 | THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 45 | ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 46 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 47 | ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 48 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 49 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 50 | OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 51 | HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 52 | LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 53 | OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 54 | SUCH DAMAGE. | ||
| 55 | |||
| 56 | The licence and distribution terms for any publically available version or | ||
| 57 | derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 58 | copied and put under another distribution licence | ||
| 59 | [including the GNU Public Licence.] | ||
| 60 | |||
| 61 | The reason behind this being stated in this direct manner is past | ||
| 62 | experience in code simply being copied and the attribution removed | ||
| 63 | from it and then being distributed as part of other packages. This | ||
| 64 | implementation was a non-trivial and unpaid effort. | ||
| 65 | |||
diff --git a/src/lib/libssl/src/Configure b/src/lib/libssl/src/Configure index 1dc0ed320c..8b9ecbcdef 100644 --- a/src/lib/libssl/src/Configure +++ b/src/lib/libssl/src/Configure | |||
| @@ -135,6 +135,8 @@ $x86_bsdi_asm="asm/bn86bsdi.o:asm/dx86bsdi.o asm/yx86bsdi.o:asm/bx86bsdi.o:asm/m | |||
| 135 | "OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::SIXTY_FOUR_BIT_LONGS DES_INT DES_PTR DES_RISC2:::", | 135 | "OpenBSD-alpha","gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall::SIXTY_FOUR_BIT_LONGS DES_INT DES_PTR DES_RISC2:::", |
| 136 | "OpenBSD-x86", "gcc:-DTERMIOS -DBN_ASM -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm", | 136 | "OpenBSD-x86", "gcc:-DTERMIOS -DBN_ASM -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm", |
| 137 | "OpenBSD-bigendian", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::", | 137 | "OpenBSD-bigendian", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DB_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::", |
| 138 | "OpenBSD-pmax", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DL_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::", | ||
| 139 | "OpenBSD-arc", "gcc:-DTERMIOS -O3 -fomit-frame-pointer -Wall -DL_ENDIAN::BN_LLONG MD2_CHAR RC4_INDEX DES_UNROLL:::", | ||
| 138 | "FreeBSD", "gcc:-DTERMIOS -DBN_ASM -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm", | 140 | "FreeBSD", "gcc:-DTERMIOS -DBN_ASM -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall::BN_LLONG $x86_gcc_des $x86_gcc_opts:$x86_out_asm", |
| 139 | #"bsdi-gcc", "gcc:-O3 -ffast-math -DBN_ASM -DL_ENDIAN -DPERL5 -m486::RSA_LLONG $x86_gc_des $x86_gcc_opts:$x86_bsdi_asm", | 141 | #"bsdi-gcc", "gcc:-O3 -ffast-math -DBN_ASM -DL_ENDIAN -DPERL5 -m486::RSA_LLONG $x86_gc_des $x86_gcc_opts:$x86_bsdi_asm", |
| 140 | "nextstep", "cc:-O3 -Wall -DBN_ASM::BN_LLONG $x86_gcc_des $x86_gcc_opts:::", | 142 | "nextstep", "cc:-O3 -Wall -DBN_ASM::BN_LLONG $x86_gcc_des $x86_gcc_opts:::", |
diff --git a/src/lib/libssl/src/HISTORY b/src/lib/libssl/src/HISTORY new file mode 100644 index 0000000000..7712100038 --- /dev/null +++ b/src/lib/libssl/src/HISTORY | |||
| @@ -0,0 +1,316 @@ | |||
| 1 | 16-Mar-98 | ||
| 2 | - Patch for Cray T90 from Wayne Schroeder <schroede@SDSC.EDU> | ||
| 3 | - Lots and lots of changes | ||
| 4 | |||
| 5 | 29-Jan-98 | ||
| 6 | - ASN1_BIT_STRING_set_bit()/ASN1_BIT_STRING_get_bit() from | ||
| 7 | Goetz Babin-Ebell <babinebell@trustcenter.de>. | ||
| 8 | - SSL_version() now returns SSL2_VERSION, SSL3_VERSION or | ||
| 9 | TLS1_VERSION. | ||
| 10 | |||
| 11 | 7-Jan-98 | ||
| 12 | - Finally reworked the cipher string to ciphers again, so it | ||
| 13 | works correctly | ||
| 14 | - All the app_data stuff is now ex_data with funcion calls to access. | ||
| 15 | The index is supplied by a function and 'methods' can be setup | ||
| 16 | for the types that are called on XXX_new/XXX_free. This lets | ||
| 17 | applications get notified on creation and destruction. Some of | ||
| 18 | the RSA methods could be implemented this way and I may do so. | ||
| 19 | - Oh yes, SSL under perl5 is working at the basic level. | ||
| 20 | |||
| 21 | 15-Dec-97 | ||
| 22 | - Warning - the gethostbyname cache is not fully thread safe, | ||
| 23 | but it should work well enough. | ||
| 24 | - Major internal reworking of the app_data stuff. More functions | ||
| 25 | but if you were accessing ->app_data directly, things will | ||
| 26 | stop working. | ||
| 27 | - The perlv5 stuff is working. Currently on message digests, | ||
| 28 | ciphers and the bignum library. | ||
| 29 | |||
| 30 | 9-Dec-97 | ||
| 31 | - Modified re-negotiation so that server initated re-neg | ||
| 32 | will cause a SSL_read() to return -1 should retry. | ||
| 33 | The danger otherwise was that the server and the | ||
| 34 | client could end up both trying to read when using non-blocking | ||
| 35 | sockets. | ||
| 36 | |||
| 37 | 4-Dec-97 | ||
| 38 | - Lots of small changes | ||
| 39 | - Fix for binaray mode in Windows for the FILE BIO, thanks to | ||
| 40 | Bob Denny <rdenny@dc3.com> | ||
| 41 | |||
| 42 | 17-Nov-97 | ||
| 43 | - Quite a few internal cleanups, (removal of errno, and using macros | ||
| 44 | defined in e_os.h). | ||
| 45 | - A bug in ca.c, pointed out by yasuyuki-ito@d-cruise.co.jp, where | ||
| 46 | the automactic naming out output files was being stuffed up. | ||
| 47 | |||
| 48 | 29-Oct-97 | ||
| 49 | - The Cast5 cipher has been added. MD5 and SHA-1 are now in assember | ||
| 50 | for x86. | ||
| 51 | |||
| 52 | 21-Oct-97 | ||
| 53 | - Fixed a bug in the BIO_gethostbyname() cache. | ||
| 54 | |||
| 55 | 15-Oct-97 | ||
| 56 | - cbc mode for blowfish/des/3des is now in assember. Blowfish asm | ||
| 57 | has also been improved. At this point in time, on the pentium, | ||
| 58 | md5 is %80 faster, the unoptimesed sha-1 is %79 faster, | ||
| 59 | des-cbc is %28 faster, des-ede3-cbc is %9 faster and blowfish-cbc | ||
| 60 | is %62 faster. | ||
| 61 | |||
| 62 | 12-Oct-97 | ||
| 63 | - MEM_BUF_grow() has been fixed so that it always sets the buf->length | ||
| 64 | to the value we are 'growing' to. Think of MEM_BUF_grow() as the | ||
| 65 | way to set the length value correctly. | ||
| 66 | |||
| 67 | 10-Oct-97 | ||
| 68 | - I now hash for certificate lookup on the raw DER encoded RDN (md5). | ||
| 69 | This breaks things again :-(. This is efficent since I cache | ||
| 70 | the DER encoding of the RDN. | ||
| 71 | - The text DN now puts in the numeric OID instead of UNKNOWN. | ||
| 72 | - req can now process arbitary OIDs in the config file. | ||
| 73 | - I've been implementing md5 in x86 asm, much faster :-). | ||
| 74 | - Started sha1 in x86 asm, needs more work. | ||
| 75 | - Quite a few speedups in the BN stuff. RSA public operation | ||
| 76 | has been made faster by caching the BN_MONT_CTX structure. | ||
| 77 | The calulating of the Ai where A*Ai === 1 mod m was rather | ||
| 78 | expensive. Basically a 40-50% speedup on public operations. | ||
| 79 | The RSA speedup is now 15% on pentiums and %20 on pentium | ||
| 80 | pro. | ||
| 81 | |||
| 82 | 30-Sep-97 | ||
| 83 | - After doing some profiling, I added x86 adm for bn_add_words(), | ||
| 84 | which just adds 2 arrays of longs together. A %10 speedup | ||
| 85 | for 512 and 1024 bit RSA on the pentium pro. | ||
| 86 | |||
| 87 | 29-Sep-97 | ||
| 88 | - Converted the x86 bignum assembler to us the perl scripts | ||
| 89 | for generation. | ||
| 90 | |||
| 91 | 23-Sep-97 | ||
| 92 | - If SSL_set_session() is passed a NULL session, it now clears the | ||
| 93 | current session-id. | ||
| 94 | |||
| 95 | 22-Sep-97 | ||
| 96 | - Added a '-ss_cert file' to apps/ca.c. This will sign selfsigned | ||
| 97 | certificates. | ||
| 98 | - Bug in crypto/evp/encode.c where by decoding of 65 base64 | ||
| 99 | encoded lines, one line at a time (via a memory BIO) would report | ||
| 100 | EOF after the first line was decoded. | ||
| 101 | - Fix in X509_find_by_issuer_and_serial() from | ||
| 102 | Dr Stephen Henson <shenson@bigfoot.com> | ||
| 103 | |||
| 104 | 19-Sep-97 | ||
| 105 | - NO_FP_API and NO_STDIO added. | ||
| 106 | - Put in sh config command. It auto runs Configure with the correct | ||
| 107 | parameters. | ||
| 108 | |||
| 109 | 18-Sep-97 | ||
| 110 | - Fix x509.c so if a DSA cert has different parameters to its parent, | ||
| 111 | they are left in place. Not tested yet. | ||
| 112 | |||
| 113 | 16-Sep-97 | ||
| 114 | - ssl_create_cipher_list() had some bugs, fixes from | ||
| 115 | Patrick Eisenacher <eisenach@stud.uni-frankfurt.de> | ||
| 116 | - Fixed a bug in the Base64 BIO, where it would return 1 instead | ||
| 117 | of -1 when end of input was encountered but should retry. | ||
| 118 | Basically a Base64/Memory BIO interaction problem. | ||
| 119 | - Added a HMAC set of functions in preporarion for TLS work. | ||
| 120 | |||
| 121 | 15-Sep-97 | ||
| 122 | - Top level makefile tweak - Cameron Simpson <cs@zip.com.au> | ||
| 123 | - Prime generation spead up %25 (512 bit prime, pentium pro linux) | ||
| 124 | by using montgomery multiplication in the prime number test. | ||
| 125 | |||
| 126 | 11-Sep-97 | ||
| 127 | - Ugly bug in ssl3_write_bytes(). Basically if application land | ||
| 128 | does a SSL_write(ssl,buf,len) where len > 16k, the SSLv3 write code | ||
| 129 | did not check the size and tried to copy the entire buffer. | ||
| 130 | This would tend to cause memory overwrites since SSLv3 has | ||
| 131 | a maximum packet size of 16k. If your program uses | ||
| 132 | buffers <= 16k, you would probably never see this problem. | ||
| 133 | - Fixed a new errors that were cause by malloc() not returning | ||
| 134 | 0 initialised memory.. | ||
| 135 | - SSL_OP_NETSCAPE_CA_DN_BUG was being switched on when using | ||
| 136 | SSL_CTX_set_options(ssl_ctx,SSL_OP_ALL); which was a bad thing | ||
| 137 | since this flags stops SSLeay being able to handle client | ||
| 138 | cert requests correctly. | ||
| 139 | |||
| 140 | 08-Sep-97 | ||
| 141 | - SSL_SESS_CACHE_NO_INTERNAL_LOOKUP option added. When switched | ||
| 142 | on, the SSL server routines will not use a SSL_SESSION that is | ||
| 143 | held in it's cache. This in intended to be used with the session-id | ||
| 144 | callbacks so that while the session-ids are still stored in the | ||
| 145 | cache, the decision to use them and how to look them up can be | ||
| 146 | done by the callbacks. The are the 'new', 'get' and 'remove' | ||
| 147 | callbacks. This can be used to determine the session-id | ||
| 148 | to use depending on information like which port/host the connection | ||
| 149 | is coming from. Since the are also SSL_SESSION_set_app_data() and | ||
| 150 | SSL_SESSION_get_app_data() functions, the application can hold | ||
| 151 | information against the session-id as well. | ||
| 152 | |||
| 153 | 03-Sep-97 | ||
| 154 | - Added lookup of CRLs to the by_dir method, | ||
| 155 | X509_load_crl_file() also added. Basically it means you can | ||
| 156 | lookup CRLs via the same system used to lookup certificates. | ||
| 157 | - Changed things so that the X509_NAME structure can contain | ||
| 158 | ASN.1 BIT_STRINGS which is required for the unique | ||
| 159 | identifier OID. | ||
| 160 | - Fixed some problems with the auto flushing of the session-id | ||
| 161 | cache. It was not occuring on the server side. | ||
| 162 | |||
| 163 | 02-Sep-97 | ||
| 164 | - Added SSL_CTX_sess_cache_size(SSL_CTX *ctx,unsigned long size) | ||
| 165 | which is the maximum number of entries allowed in the | ||
| 166 | session-id cache. This is enforced with a simple FIFO list. | ||
| 167 | The default size is 20*1024 entries which is rather large :-). | ||
| 168 | The Timeout code is still always operating. | ||
| 169 | |||
| 170 | 01-Sep-97 | ||
| 171 | - Added an argument to all the 'generate private key/prime` | ||
| 172 | callbacks. It is the last parameter so this should not | ||
| 173 | break existing code but it is needed for C++. | ||
| 174 | - Added the BIO_FLAGS_BASE64_NO_NL flag for the BIO_f_base64() | ||
| 175 | BIO. This lets the BIO read and write base64 encoded data | ||
| 176 | without inserting or looking for '\n' characters. The '-A' | ||
| 177 | flag turns this on when using apps/enc.c. | ||
| 178 | - RSA_NO_PADDING added to help BSAFE functionality. This is a | ||
| 179 | very dangerous thing to use, since RSA private key | ||
| 180 | operations without random padding bytes (as PKCS#1 adds) can | ||
| 181 | be attacked such that the private key can be revealed. | ||
| 182 | - ASN.1 bug and rc2-40-cbc and rc4-40 added by | ||
| 183 | Dr Stephen Henson <shenson@bigfoot.com> | ||
| 184 | |||
| 185 | 31-Aug-97 (stuff added while I was away) | ||
| 186 | - Linux pthreads by Tim Hudson (tjh@cryptsoft.com). | ||
| 187 | - RSA_flags() added allowing bypass of pub/priv match check | ||
| 188 | in ssl/ssl_rsa.c - Tim Hudson. | ||
| 189 | - A few minor bugs. | ||
| 190 | |||
| 191 | SSLeay 0.8.1 released. | ||
| 192 | |||
| 193 | 19-Jul-97 | ||
| 194 | - Server side initated dynamic renegotiation is broken. I will fix | ||
| 195 | it when I get back from holidays. | ||
| 196 | |||
| 197 | 15-Jul-97 | ||
| 198 | - Quite a few small changes. | ||
| 199 | - INVALID_SOCKET usage cleanups from Alex Kiernan <alex@hisoft.co.uk> | ||
| 200 | |||
| 201 | 09-Jul-97 | ||
| 202 | - Added 2 new values to the SSL info callback. | ||
| 203 | SSL_CB_START which is passed when the SSL protocol is started | ||
| 204 | and SSL_CB_DONE when it has finished sucsessfully. | ||
| 205 | |||
| 206 | 08-Jul-97 | ||
| 207 | - Fixed a few bugs problems in apps/req.c and crypto/asn1/x_pkey.c | ||
| 208 | that related to DSA public/private keys. | ||
| 209 | - Added all the relevent PEM and normal IO functions to support | ||
| 210 | reading and writing RSAPublic keys. | ||
| 211 | - Changed makefiles to use ${AR} instead of 'ar r' | ||
| 212 | |||
| 213 | 07-Jul-97 | ||
| 214 | - Error in ERR_remove_state() that would leave a dangling reference | ||
| 215 | to a free()ed location - thanks to Alex Kiernan <alex@hisoft.co.uk> | ||
| 216 | - s_client now prints the X509_NAMEs passed from the server | ||
| 217 | when requesting a client cert. | ||
| 218 | - Added a ssl->type, which is one of SSL_ST_CONNECT or | ||
| 219 | SSL_ST_ACCEPT. I had to add it so I could tell if I was | ||
| 220 | a connect or an accept after the handshake had finished. | ||
| 221 | - SSL_get_client_CA_list(SSL *s) now returns the CA names | ||
| 222 | passed by the server if called by a client side SSL. | ||
| 223 | |||
| 224 | 05-Jul-97 | ||
| 225 | - Bug in X509_NAME_get_text_by_OBJ(), looking starting at index | ||
| 226 | 0, not -1 :-( Fix from Tim Hudson (tjh@cryptsoft.com). | ||
| 227 | |||
| 228 | 04-Jul-97 | ||
| 229 | - Fixed some things in X509_NAME_add_entry(), thanks to | ||
| 230 | Matthew Donald <matthew@world.net>. | ||
| 231 | - I had a look at the cipher section and though that it was a | ||
| 232 | bit confused, so I've changed it. | ||
| 233 | - I was not setting up the RC4-64-MD5 cipher correctly. It is | ||
| 234 | a MS special that appears in exported MS Money. | ||
| 235 | - Error in all my DH ciphers. Section 7.6.7.3 of the SSLv3 | ||
| 236 | spec. I was missing the two byte length header for the | ||
| 237 | ClientDiffieHellmanPublic value. This is a packet sent from | ||
| 238 | the client to the server. The SSL_OP_SSLEAY_080_CLIENT_DH_BUG | ||
| 239 | option will enable SSLeay server side SSLv3 accept either | ||
| 240 | the correct or my 080 packet format. | ||
| 241 | - Fixed a few typos in crypto/pem.org. | ||
| 242 | |||
| 243 | 02-Jul-97 | ||
| 244 | - Alias mapping for EVP_get_(digest|cipher)byname is now | ||
| 245 | performed before a lookup for actual cipher. This means | ||
| 246 | that an alias can be used to 're-direct' a cipher or a | ||
| 247 | digest. | ||
| 248 | - ASN1_read_bio() had a bug that only showed up when using a | ||
| 249 | memory BIO. When EOF is reached in the memory BIO, it is | ||
| 250 | reported as a -1 with BIO_should_retry() set to true. | ||
| 251 | |||
| 252 | 01-Jul-97 | ||
| 253 | - Fixed an error in X509_verify_cert() caused by my | ||
| 254 | miss-understanding how 'do { contine } while(0);' works. | ||
| 255 | Thanks to Emil Sit <sit@mit.edu> for educating me :-) | ||
| 256 | |||
| 257 | 30-Jun-97 | ||
| 258 | - Base64 decoding error. If the last data line did not end with | ||
| 259 | a '=', sometimes extra data would be returned. | ||
| 260 | - Another 'cut and paste' bug in x509.c related to setting up the | ||
| 261 | STDout BIO. | ||
| 262 | |||
| 263 | 27-Jun-97 | ||
| 264 | - apps/ciphers.c was not printing due to an editing error. | ||
| 265 | - Alex Kiernan <alex@hisoft.co.uk> send in a nice fix for | ||
| 266 | a library build error in util/mk1mf.pl | ||
| 267 | |||
| 268 | 26-Jun-97 | ||
| 269 | - Still did not have the auto 'experimental' code removal | ||
| 270 | script correct. | ||
| 271 | - A few header tweaks for Watcom 11.0 under Win32 from | ||
| 272 | Rolf Lindemann <Lindemann@maz-hh.de> | ||
| 273 | - 0 length OCTET_STRING bug in asn1_parse | ||
| 274 | - A minor fix with an non-existent function in the MS .def files. | ||
| 275 | - A few changes to the PKCS7 stuff. | ||
| 276 | |||
| 277 | 25-Jun-97 | ||
| 278 | SSLeay 0.8.0 finally it gets released. | ||
| 279 | |||
| 280 | 24-Jun-97 | ||
| 281 | Added a SSL_OP_EPHEMERAL_RSA option which causes all SSLv3 RSA keys to | ||
| 282 | use a temporary RSA key. This is experimental and needs some more work. | ||
| 283 | Fixed a few Win16 build problems. | ||
| 284 | |||
| 285 | 23-Jun-97 | ||
| 286 | SSLv3 bug. I was not doing the 'lookup' of the CERT structure | ||
| 287 | correctly. I was taking the SSL->ctx->default_cert when I should | ||
| 288 | have been using SSL->cert. The bug was in ssl/s3_srvr.c | ||
| 289 | |||
| 290 | 20-Jun-97 | ||
| 291 | X509_ATTRIBUTES were being encoded wrongly by apps/reg.c and the | ||
| 292 | rest of the library. Even though I had the code required to do | ||
| 293 | it correctly, apps/req.c was doing the wrong thing. I have fixed | ||
| 294 | and tested everything. | ||
| 295 | |||
| 296 | Missing a few #ifdef FIONBIO sections in crypto/bio/bss_acpt.c. | ||
| 297 | |||
| 298 | 19-Jun-97 | ||
| 299 | Fixed a bug in the SSLv2 server side first packet handling. When | ||
| 300 | using the non-blocking test BIO, the ssl->s2->first_packet flag | ||
| 301 | was being reset when a would-block failure occurred when reading | ||
| 302 | the first 5 bytes of the first packet. This caused the checking | ||
| 303 | logic to run at the wrong time and cause an error. | ||
| 304 | |||
| 305 | Fixed a problem with specifying cipher. If RC4-MD5 were used, | ||
| 306 | only the SSLv3 version would be picked up. Now this will pick | ||
| 307 | up both SSLv2 and SSLv3 versions. This required changing the | ||
| 308 | SSL_CIPHER->mask values so that they only mask the ciphers, | ||
| 309 | digests, authentication, export type and key-exchange algorithms. | ||
| 310 | |||
| 311 | I found that when a SSLv23 session is established, a reused | ||
| 312 | session, of type SSLv3 was attempting to write the SSLv2 | ||
| 313 | ciphers, which were invalid. The SSL_METHOD->put_cipher_by_char | ||
| 314 | method has been modified so it will only write out cipher which | ||
| 315 | that method knows about. | ||
| 316 | |||
diff --git a/src/lib/libssl/src/HISTORY.066 b/src/lib/libssl/src/HISTORY.066 new file mode 100644 index 0000000000..f85224977a --- /dev/null +++ b/src/lib/libssl/src/HISTORY.066 | |||
| @@ -0,0 +1,443 @@ | |||
| 1 | SSLeay 0.6.5 | ||
| 2 | |||
| 3 | After quite some time (3 months), the new release. I have been very busy | ||
| 4 | for the last few months and so this is mostly bug fixes and improvments. | ||
| 5 | |||
| 6 | The main additions are | ||
| 7 | |||
| 8 | - assember for x86 DES. For all those gcc based systems, this is a big | ||
| 9 | improvement. From 117,000 DES operation a second on a pentium 100, | ||
| 10 | I now get 191,000. I have also reworked the C version so it | ||
| 11 | now gives 148,000 DESs per second. | ||
| 12 | - As mentioned above, the inner DES macros now have some more variant that | ||
| 13 | sometimes help, sometimes hinder performance. There are now 3 options | ||
| 14 | DES_PTR (ptr vs array lookup), DES_UNROLL (full vs partial loop unrolling) | ||
| 15 | and DES_RISC (a more register intensive version of the inner macro). | ||
| 16 | The crypto/des/des_opts.c program, when compiled and run, will give | ||
| 17 | an indication of the correct options to use. | ||
| 18 | - The BIO stuff has been improved. Read doc/bio.doc. There are now | ||
| 19 | modules for encryption and base64 encoding and a BIO_printf() function. | ||
| 20 | - The CA program will accept simple one line X509v3 extensions in the | ||
| 21 | ssleay.cnf file. Have a look at the example. Currently this just | ||
| 22 | puts the text into the certificate as an OCTET_STRING so currently | ||
| 23 | the more advanced X509v3 data types are not handled but this is enough | ||
| 24 | for the netscape extensions. | ||
| 25 | - There is the start of a nicer higher level interface to the X509 | ||
| 26 | strucutre. | ||
| 27 | - Quite a lot of bug fixes. | ||
| 28 | - CRYPTO_malloc_init() (or CRYPTO_set_mem_functions()) can be used | ||
| 29 | to define the malloc(), free() and realloc() routines to use | ||
| 30 | (look in crypto/crypto.h). This is mostly needed for Windows NT/95 when | ||
| 31 | using DLLs and mixing CRT libraries. | ||
| 32 | |||
| 33 | In general, read the 'VERSION' file for changes and be aware that some of | ||
| 34 | the new stuff may not have been tested quite enough yet, so don't just plonk | ||
| 35 | in SSLeay 0.6.5 when 0.6.4 used to work and expect nothing to break. | ||
| 36 | |||
| 37 | SSLeay 0.6.4 30/08/96 eay | ||
| 38 | |||
| 39 | I've just finished some test builds on Windows NT, Windows 3.1, Solaris 2.3, | ||
| 40 | Solaris 2.5, Linux, IRIX, HPUX 10 and everthing seems to work :-). | ||
| 41 | |||
| 42 | The main changes in this release | ||
| 43 | |||
| 44 | - Thread safe. have a read of doc/threads.doc and play in the mt directory. | ||
| 45 | For anyone using 0.6.3 with threads, I found 2 major errors so consider | ||
| 46 | moving to 0.6.4. I have a test program that builds under NT and | ||
| 47 | solaris. | ||
| 48 | - The get session-id callback has changed. Have a read of doc/callback.doc. | ||
| 49 | - The X509_cert_verify callback (the SSL_verify callback) now | ||
| 50 | has another argument. Have a read of doc/callback.doc | ||
| 51 | - 'ca -preserve', sign without re-ordering the DN. Not tested much. | ||
| 52 | - VMS support. | ||
| 53 | - Compile time memory leak detection can now be built into SSLeay. | ||
| 54 | Read doc/memory.doc | ||
| 55 | - CONF routines now understand '\', '\n', '\r' etc. What this means is that | ||
| 56 | the SPKAC object mentioned in doc/ns-ca.doc can be on multiple lines. | ||
| 57 | - 'ssleay ciphers' added, lists the default cipher list for SSLeay. | ||
| 58 | - RC2 key setup is now compatable with Netscape. | ||
| 59 | - Modifed server side of SSL implementation, big performance difference when | ||
| 60 | using session-id reuse. | ||
| 61 | |||
| 62 | 0.6.3 | ||
| 63 | |||
| 64 | Bug fixes and the addition of some nice stuff to the 'ca' program. | ||
| 65 | Have a read of doc/ns-ca.doc for how hit has been modified so | ||
| 66 | it can be driven from a CGI script. The CGI script is not provided, | ||
| 67 | but that is just being left as an excersize for the reader :-). | ||
| 68 | |||
| 69 | 0.6.2 | ||
| 70 | |||
| 71 | This is most bug fixes and functionality improvements. | ||
| 72 | |||
| 73 | Additions are | ||
| 74 | - More thread debugging patches, the thread stuff is still being | ||
| 75 | tested, but for those keep to play with stuff, have a look in | ||
| 76 | crypto/cryptlib.c. The application needs to define 1 (or optionaly | ||
| 77 | a second) callback that is used to implement locking. Compiling | ||
| 78 | with LOCK_DEBUG spits out lots of locking crud :-). | ||
| 79 | This is what I'm currently working on. | ||
| 80 | - SSL_CTX_set_default_passwd_cb() can be used to define the callback | ||
| 81 | function used in the SSL*_file() functions used to load keys. I was | ||
| 82 | always of the opinion that people should call | ||
| 83 | PEM_read_RSAPrivateKey() and pass the callback they want to use, but | ||
| 84 | it appears they just want to use the SSL_*_file() function() :-(. | ||
| 85 | - 'enc' now has a -kfile so a key can be read from a file. This is | ||
| 86 | mostly used so that the passwd does not appear when using 'ps', | ||
| 87 | which appears imposible to stop under solaris. | ||
| 88 | - X509v3 certificates now work correctly. I even have more examples | ||
| 89 | in my tests :-). There is now a X509_EXTENSION type that is used in | ||
| 90 | X509v3 certificates and CRLv2. | ||
| 91 | - Fixed that signature type error :-( | ||
| 92 | - Fixed quite a few potential memory leaks and problems when reusing | ||
| 93 | X509, CRL and REQ structures. | ||
| 94 | - EVP_set_pw_prompt() now sets the library wide default password | ||
| 95 | prompt. | ||
| 96 | - The 'pkcs7' command will now, given the -print_certs flag, output in | ||
| 97 | pem format, all certificates and CRL contained within. This is more | ||
| 98 | of a pre-emtive thing for the new verisign distribution method. I | ||
| 99 | should also note, that this also gives and example in code, of how | ||
| 100 | to do this :-), or for that matter, what is involved in going the | ||
| 101 | other way (list of certs and crl -> pkcs7). | ||
| 102 | - Added RSA's DESX to the DES library. It is also available via the | ||
| 103 | EVP_desx_cbc() method and via 'enc desx'. | ||
| 104 | |||
| 105 | SSLeay 0.6.1 | ||
| 106 | |||
| 107 | The main functional changes since 0.6.0 are as follows | ||
| 108 | - Bad news, the Microsoft 060 DLL's are not compatable, but the good news is | ||
| 109 | that from now on, I'll keep the .def numbers the same so they will be. | ||
| 110 | - RSA private key operations are about 2 times faster that 0.6.0 | ||
| 111 | - The SSL_CTX now has more fields so default values can be put against | ||
| 112 | it. When an SSL structure is created, these default values are used | ||
| 113 | but can be overwritten. There are defaults for cipher, certificate, | ||
| 114 | private key, verify mode and callback. This means SSL session | ||
| 115 | creation can now be | ||
| 116 | ssl=SSL_new() | ||
| 117 | SSL_set_fd(ssl,sock); | ||
| 118 | SSL_accept(ssl) | ||
| 119 | .... | ||
| 120 | All the other uglyness with having to keep a global copy of the | ||
| 121 | private key and certificate/verify mode in the server is now gone. | ||
| 122 | - ssl/ssltest.c - one process talking SSL to its self for testing. | ||
| 123 | - Storage of Session-id's can be controled via a session_cache_mode | ||
| 124 | flag. There is also now an automatic default flushing of | ||
| 125 | old session-id's. | ||
| 126 | - The X509_cert_verify() function now has another parameter, this | ||
| 127 | should not effect most people but it now means that the reason for | ||
| 128 | the failure to verify is now available via SSL_get_verify_result(ssl). | ||
| 129 | You don't have to use a global variable. | ||
| 130 | - SSL_get_app_data() and SSL_set_app_data() can be used to keep some | ||
| 131 | application data against the SSL structure. It is upto the application | ||
| 132 | to free the data. I don't use it, but it is available. | ||
| 133 | - SSL_CTX_set_cert_verify_callback() can be used to specify a | ||
| 134 | verify callback function that completly replaces my certificate | ||
| 135 | verification code. Xcert should be able to use this :-). | ||
| 136 | The callback is of the form int app_verify_callback(arg,ssl,cert). | ||
| 137 | This needs to be documented more. | ||
| 138 | - I have started playing with shared library builds, have a look in | ||
| 139 | the shlib directory. It is very simple. If you need a numbered | ||
| 140 | list of functions, have a look at misc/crypto.num and misc/ssl.num. | ||
| 141 | - There is some stuff to do locking to make the library thread safe. | ||
| 142 | I have only started this stuff and have not finished. If anyone is | ||
| 143 | keen to do so, please send me the patches when finished. | ||
| 144 | |||
| 145 | So I have finally made most of the additions to the SSL interface that | ||
| 146 | I thought were needed. | ||
| 147 | |||
| 148 | There will probably be a pause before I make any non-bug/documentation | ||
| 149 | related changes to SSLeay since I'm feeling like a bit of a break. | ||
| 150 | |||
| 151 | eric - 12 Jul 1996 | ||
| 152 | I saw recently a comment by some-one that we now seem to be entering | ||
| 153 | the age of perpetual Beta software. | ||
| 154 | Pioneered by packages like linux but refined to an art form by | ||
| 155 | netscape. | ||
| 156 | |||
| 157 | I too wish to join this trend with the anouncement of SSLeay 0.6.0 :-). | ||
| 158 | |||
| 159 | There are quite a large number of sections that are 'works in | ||
| 160 | progress' in this package. I will also list the major changes and | ||
| 161 | what files you should read. | ||
| 162 | |||
| 163 | BIO - this is the new IO structure being used everywhere in SSLeay. I | ||
| 164 | started out developing this because of microsoft, I wanted a mechanism | ||
| 165 | to callback to the application for all IO, so Windows 3.1 DLL | ||
| 166 | perversion could be hidden from me and the 15 different ways to write | ||
| 167 | to a file under NT would also not be dictated by me at library build | ||
| 168 | time. What the 'package' is is an API for a data structure containing | ||
| 169 | functions. IO interfaces can be written to conform to the | ||
| 170 | specification. This in not intended to hide the underlying data type | ||
| 171 | from the application, but to hide it from SSLeay :-). | ||
| 172 | I have only really finished testing the FILE * and socket/fd modules. | ||
| 173 | There are also 'filter' BIO's. Currently I have only implemented | ||
| 174 | message digests, and it is in use in the dgst application. This | ||
| 175 | functionality will allow base64/encrypto/buffering modules to be | ||
| 176 | 'push' into a BIO without it affecting the semantics. I'm also | ||
| 177 | working on an SSL BIO which will hide the SSL_accept()/SLL_connet() | ||
| 178 | from an event loop which uses the interface. | ||
| 179 | It is also possible to 'attach' callbacks to a BIO so they get called | ||
| 180 | before and after each operation, alowing extensive debug output | ||
| 181 | to be generated (try running dgst with -d). | ||
| 182 | |||
| 183 | Unfortunaly in the conversion from 0.5.x to 0.6.0, quite a few | ||
| 184 | functions that used to take FILE *, now take BIO *. | ||
| 185 | The wrappers are easy to write | ||
| 186 | |||
| 187 | function_fp(fp,x) | ||
| 188 | FILE *fp; | ||
| 189 | { | ||
| 190 | BIO *b; | ||
| 191 | int ret; | ||
| 192 | |||
| 193 | if ((b=BIO_new(BIO_s_file())) == NULL) error..... | ||
| 194 | BIO_set_fp(b,fp,BIO_NOCLOSE); | ||
| 195 | ret=function_bio(b,x); | ||
| 196 | BIO_free(b); | ||
| 197 | return(ret); | ||
| 198 | } | ||
| 199 | Remember, there are no functions that take FILE * in SSLeay when | ||
| 200 | compiled for Windows 3.1 DLL's. | ||
| 201 | |||
| 202 | -- | ||
| 203 | I have added a general EVP_PKEY type that can hold a public/private | ||
| 204 | key. This is now what is used by the EVP_ functions and is passed | ||
| 205 | around internally. I still have not done the PKCS#8 stuff, but | ||
| 206 | X509_PKEY is defined and waiting :-) | ||
| 207 | |||
| 208 | -- | ||
| 209 | For a full function name listings, have a look at ms/crypt32.def and | ||
| 210 | ms/ssl32.def. These are auto-generated but are complete. | ||
| 211 | Things like ASN1_INTEGER_get() have been added and are in here if you | ||
| 212 | look. I have renamed a few things, again, have a look through the | ||
| 213 | function list and you will probably find what you are after. I intend | ||
| 214 | to at least put a one line descrition for each one..... | ||
| 215 | |||
| 216 | -- | ||
| 217 | Microsoft - thats what this release is about, read the MICROSOFT file. | ||
| 218 | |||
| 219 | -- | ||
| 220 | Multi-threading support. I have started hunting through the code and | ||
| 221 | flaging where things need to be done. In a state of work but high on | ||
| 222 | the list. | ||
| 223 | |||
| 224 | -- | ||
| 225 | For random numbers, edit e_os.h and set DEVRANDOM (it's near the top) | ||
| 226 | be be you random data device, otherwise 'RFILE' in e_os.h | ||
| 227 | will be used, in your home directory. It will be updated | ||
| 228 | periodically. The environment variable RANDFILE will override this | ||
| 229 | choice and read/write to that file instead. DEVRANDOM is used in | ||
| 230 | conjunction to the RFILE/RANDFILE. If you wish to 'seed' the random | ||
| 231 | number generator, pick on one of these files. | ||
| 232 | |||
| 233 | -- | ||
| 234 | |||
| 235 | The list of things to read and do | ||
| 236 | |||
| 237 | dgst -d | ||
| 238 | s_client -state (this uses a callback placed in the SSL state loop and | ||
| 239 | will be used else-where to help debug/monitor what | ||
| 240 | is happening.) | ||
| 241 | |||
| 242 | doc/why.doc | ||
| 243 | doc/bio.doc <- hmmm, needs lots of work. | ||
| 244 | doc/bss_file.doc <- one that is working :-) | ||
| 245 | doc/session.doc <- it has changed | ||
| 246 | doc/speed.doc | ||
| 247 | also play with ssleay version -a. I have now added a SSLeay() | ||
| 248 | function that returns a version number, eg 0600 for this release | ||
| 249 | which is primarily to be used to check DLL version against the | ||
| 250 | application. | ||
| 251 | util/* Quite a few will not interest people, but some may, like | ||
| 252 | mk1mf.pl, mkdef.pl, | ||
| 253 | util/do_ms.sh | ||
| 254 | |||
| 255 | try | ||
| 256 | cc -Iinclude -Icrypto -c crypto/crypto.c | ||
| 257 | cc -Iinclude -Issl -c ssl/ssl.c | ||
| 258 | You have just built the SSLeay libraries as 2 object files :-) | ||
| 259 | |||
| 260 | Have a general rummage around in the bin stall directory and look at | ||
| 261 | what is in there, like CA.sh and c_rehash | ||
| 262 | |||
| 263 | There are lots more things but it is 12:30am on a Friday night and I'm | ||
| 264 | heading home :-). | ||
| 265 | |||
| 266 | eric 22-Jun-1996 | ||
| 267 | This version has quite a few major bug fixes and improvements. It DOES NOT | ||
| 268 | do SSLv3 yet. | ||
| 269 | |||
| 270 | The main things changed | ||
| 271 | - A Few days ago I added the s_mult application to ssleay which is | ||
| 272 | a demo of an SSL server running in an event loop type thing. | ||
| 273 | It supports non-blocking IO, I have finally gotten it right, SSL_accept() | ||
| 274 | can operate in non-blocking IO mode, look at the code to see how :-). | ||
| 275 | Have a read of doc/s_mult as well. This program leaks memory and | ||
| 276 | file descriptors everywhere but I have not cleaned it up yet. | ||
| 277 | This is a demo of how to do non-blocking IO. | ||
| 278 | - The SSL session management has been 'worked over' and there is now | ||
| 279 | quite an expansive set of functions to manipulate them. Have a read of | ||
| 280 | doc/session.doc for some-things I quickly whipped up about how it now works. | ||
| 281 | This assume you know the SSLv2 protocol :-) | ||
| 282 | - I can now read/write the netscape certificate format, use the | ||
| 283 | -inform/-outform 'net' options to the x509 command. I have not put support | ||
| 284 | for this type in the other demo programs, but it would be easy to add. | ||
| 285 | - asn1parse and 'enc' have been modified so that when reading base64 | ||
| 286 | encoded files (pem format), they do not require '-----BEGIN' header lines. | ||
| 287 | The 'enc' program had a buffering bug fixed, it can be used as a general | ||
| 288 | base64 -> binary -> base64 filter by doing 'enc -a -e' and 'enc -a -d' | ||
| 289 | respecivly. Leaving out the '-a' flag in this case makes the 'enc' command | ||
| 290 | into a form of 'cat'. | ||
| 291 | - The 'x509' and 'req' programs have been fixed and modified a little so | ||
| 292 | that they generate self-signed certificates correctly. The test | ||
| 293 | script actually generates a 'CA' certificate and then 'signs' a | ||
| 294 | 'user' certificate. Have a look at this shell script (test/sstest) | ||
| 295 | to see how things work, it tests most possible combinations of what can | ||
| 296 | be done. | ||
| 297 | - The 'SSL_set_pref_cipher()' function has been 'fixed' and the prefered name | ||
| 298 | of SSL_set_cipher_list() is now the correct API (stops confusion :-). | ||
| 299 | If this function is used in the client, only the specified ciphers can | ||
| 300 | be used, with preference given to the order the ciphers were listed. | ||
| 301 | For the server, if this is used, only the specified ciphers will be used | ||
| 302 | to accept connections. If this 'option' is not used, a default set of | ||
| 303 | ciphers will be used. The SSL_CTX_set_cipher_list(SSL_CTX *ctx) sets this | ||
| 304 | list for all ciphers started against the SSL_CTX. So the order is | ||
| 305 | SSL cipher_list, if not present, SSL_CTX cipher list, if not | ||
| 306 | present, then the library default. | ||
| 307 | What this means is that normally ciphers like | ||
| 308 | NULL-MD5 will never be used. The only way this cipher can be used | ||
| 309 | for both ends to specify to use it. | ||
| 310 | To enable or disable ciphers in the library at build time, modify the | ||
| 311 | first field for the cipher in the ssl_ciphers array in ssl/ssl_lib.c. | ||
| 312 | This file also contains the 'pref_cipher' list which is the default | ||
| 313 | cipher preference order. | ||
| 314 | - I'm not currently sure if the 'rsa -inform net' and the 'rsa -outform net' | ||
| 315 | options work. They should, and they enable loading and writing the | ||
| 316 | netscape rsa private key format. I will be re-working this section of | ||
| 317 | SSLeay for the next version. What is currently in place is a quick and | ||
| 318 | dirty hack. | ||
| 319 | - I've re-written parts of the bignum library. This gives speedups | ||
| 320 | for all platforms. I now provide assembler for use under Windows NT. | ||
| 321 | I have not tested the Windows 3.1 assembler but it is quite simple code. | ||
| 322 | This gives RSAprivate_key operation encryption times of 0.047s (512bit key) | ||
| 323 | and 0.230s (1024bit key) on a pentium 100 which I consider reasonable. | ||
| 324 | Basically the times available under linux/solaris x86 can be achieve under | ||
| 325 | Windows NT. I still don't know how these times compare to RSA's BSAFE | ||
| 326 | library but I have been emailing with people and with their help, I should | ||
| 327 | be able to get my library's quite a bit faster still (more algorithm changes). | ||
| 328 | The object file crypto/bn/asm/x86-32.obj should be used when linking | ||
| 329 | under NT. | ||
| 330 | - 'make makefile.one' in the top directory will generate a single makefile | ||
| 331 | called 'makefile.one' This makefile contains no perl references and | ||
| 332 | will build the SSLeay library into the 'tmp' and 'out' directories. | ||
| 333 | util/mk1mf.pl >makefile.one is how this makefile is | ||
| 334 | generated. The mk1mf.pl command take several option to generate the | ||
| 335 | makefile for use with cc, gcc, Visual C++ and Borland C++. This is | ||
| 336 | still under development. I have only build .lib's for NT and MSDOS | ||
| 337 | I will be working on this more. I still need to play with the | ||
| 338 | correct compiler setups for these compilers and add some more stuff but | ||
| 339 | basically if you just want to compile the library | ||
| 340 | on a 'non-unix' platform, this is a very very good file to start with :-). | ||
| 341 | Have a look in the 'microsoft' directory for my current makefiles. | ||
| 342 | I have not yet modified things to link with sockets under Windows NT. | ||
| 343 | You guys should be able to do this since this is actually outside of the | ||
| 344 | SSLeay scope :-). I will be doing it for myself soon. | ||
| 345 | util/mk1mf.pl takes quite a few options including no-rc, rsaref and no-sock | ||
| 346 | to build without RC2/RC4, to require RSAref for linking, and to | ||
| 347 | build with no socket code. | ||
| 348 | |||
| 349 | - Oh yes, the cipher that was reported to be compatible with RSA's RC2 cipher | ||
| 350 | that was posted to sci.crypt has been added to the library and SSL. | ||
| 351 | I take the view that if RC2 is going to be included in a standard, | ||
| 352 | I'll include the cipher to make my package complete. | ||
| 353 | There are NO_RC2, NO_RC4 and NO_IDEA macros to remove these ciphers | ||
| 354 | at compile time. I have not tested this recently but it should all work | ||
| 355 | and if you are in the USA and don't want RSA threatening to sue you, | ||
| 356 | you could probably remove the RC4/RC2 code inside these sections. | ||
| 357 | I may in the future include a perl script that does this code | ||
| 358 | removal automatically for those in the USA :-). | ||
| 359 | - I have removed all references to sed in the makefiles. So basically, | ||
| 360 | the development environment requires perl and sh. The build environment | ||
| 361 | does not (use the makefile.one makefile). | ||
| 362 | The Configure script still requires perl, this will probably stay that way | ||
| 363 | since I have perl for Windows NT :-). | ||
| 364 | |||
| 365 | eric (03-May-1996) | ||
| 366 | |||
| 367 | PS Have a look in the VERSION file for more details on the changes and | ||
| 368 | bug fixes. | ||
| 369 | I have fixed a few bugs, added alpha and x86 assembler and generally cleaned | ||
| 370 | things up. This version will be quite stable, mostly because I'm on | ||
| 371 | holidays until 10-March-1996. For any problems in the interum, send email | ||
| 372 | to Tim Hudson <tjh@mincom.oz.au>. | ||
| 373 | |||
| 374 | SSLeay 0.5.0 | ||
| 375 | |||
| 376 | 12-12-95 | ||
| 377 | This is going out before it should really be released. | ||
| 378 | |||
| 379 | I leave for 11 weeks holidays on the 22-12-95 and so I either sit on | ||
| 380 | this for 11 weeks or get things out. It is still going to change a | ||
| 381 | lot in the next week so if you do grab this version, please test and | ||
| 382 | give me feed back ASAP, inculuding questions on how to do things with | ||
| 383 | the library. This will prompt me to write documentation so I don't | ||
| 384 | have to answer the same question again :-). | ||
| 385 | |||
| 386 | This 'pre' release version is for people who are interested in the | ||
| 387 | library. The applications will have to be changed to use | ||
| 388 | the new version of the SSL interface. I intend to finish more | ||
| 389 | documentation before I leave but until then, look at the programs in | ||
| 390 | the apps directory. As far as code goes, it is much much nicer than | ||
| 391 | the old version. | ||
| 392 | |||
| 393 | The current library works, has no memory leaks (as far as I can tell) | ||
| 394 | and is far more bug free that 0.4.5d. There are no global variable of | ||
| 395 | consequence (I believe) and I will produce some documentation that | ||
| 396 | tell where to look for those people that do want to do multi-threaded | ||
| 397 | stuff. | ||
| 398 | |||
| 399 | There should be more documentation. Have a look in the | ||
| 400 | doc directory. I'll be adding more before I leave, it is a start | ||
| 401 | by mostly documents the crypto library. Tim Hudson will update | ||
| 402 | the web page ASAP. The spelling and grammar are crap but | ||
| 403 | it is better than nothing :-) | ||
| 404 | |||
| 405 | Reasons to start playing with version 0.5.0 | ||
| 406 | - All the programs in the apps directory build into one ssleay binary. | ||
| 407 | - There is a new version of the 'req' program that generates certificate | ||
| 408 | requests, there is even documentation for this one :-) | ||
| 409 | - There is a demo certification authorithy program. Currently it will | ||
| 410 | look at the simple database and update it. It will generate CRL from | ||
| 411 | the data base. You need to edit the database by hand to revoke a | ||
| 412 | certificate, it is my aim to use perl5/Tk but I don't have time to do | ||
| 413 | this right now. It will generate the certificates but the management | ||
| 414 | scripts still need to be written. This is not a hard task. | ||
| 415 | - Things have been cleaned up alot. | ||
| 416 | - Have a look at the enc and dgst programs in the apps directory. | ||
| 417 | - It supports v3 of x509 certiticates. | ||
| 418 | |||
| 419 | |||
| 420 | Major things missing. | ||
| 421 | - I have been working on (and thinging about) the distributed x509 | ||
| 422 | hierachy problem. I have not had time to put my solution in place. | ||
| 423 | It will have to wait until I come back. | ||
| 424 | - I have not put in CRL checking in the certificate verification but | ||
| 425 | it would not be hard to do. I was waiting until I could generate my | ||
| 426 | own CRL (which has only been in the last week) and I don't have time | ||
| 427 | to put it in correctly. | ||
| 428 | - Montgomery multiplication need to be implemented. I know the | ||
| 429 | algorithm, just ran out of time. | ||
| 430 | - PKCS#7. I can load and write the DER version. I need to re-work | ||
| 431 | things to support BER (if that means nothing, read the ASN1 spec :-). | ||
| 432 | - Testing of the higher level digital envelope routines. I have not | ||
| 433 | played with the *_seal() and *_open() type functions. They are | ||
| 434 | written but need testing. The *_sign() and *_verify() functions are | ||
| 435 | rock solid. | ||
| 436 | - PEM. Doing this and PKCS#7 have been dependant on the distributed | ||
| 437 | x509 heirachy problem. I started implementing my ideas, got | ||
| 438 | distracted writing a CA program and then ran out of time. I provide | ||
| 439 | the functionality of RSAref at least. | ||
| 440 | - Re work the asm. code for the x86. I've changed by low level bignum | ||
| 441 | interface again, so I really need to tweak the x86 stuff. gcc is | ||
| 442 | good enough for the other boxes. | ||
| 443 | |||
diff --git a/src/lib/libssl/src/MICROSOFT b/src/lib/libssl/src/MICROSOFT new file mode 100644 index 0000000000..54176f0472 --- /dev/null +++ b/src/lib/libssl/src/MICROSOFT | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | The Microsoft World. | ||
| 2 | |||
| 3 | The good news, to build SSLeay for the Microsft World | ||
| 4 | |||
| 5 | Windows 3.1 DLL's | ||
| 6 | perl Configure VC-WIN16 | ||
| 7 | nmake -f ms\w31dll.mak | ||
| 8 | |||
| 9 | Windows NT/95 DLL's | ||
| 10 | perl Configure VC-WIN32 | ||
| 11 | nmake -f ms\ntdll.mak | ||
| 12 | |||
| 13 | Now the bad news | ||
| 14 | All builds were done using Microsofts Visual C++ 1.52c and [45].x. | ||
| 15 | If you are a borland person, you are probably going to have to help me | ||
| 16 | finish the stuff in util/pl/BC*pl | ||
| 17 | |||
| 18 | All builds were made under Windows NT - this means long filenames, so | ||
| 19 | you may have problems under Windows 3.1 but probably not under 95. | ||
| 20 | |||
| 21 | Because file pointers don't work in DLL's under Windows 3.1 (well at | ||
| 22 | least stdin/stdout don't and I don't like having to differentiate | ||
| 23 | between these and other file pointers), I now use the BIO file-pointer | ||
| 24 | module, which needs to be linked into your application. You can either | ||
| 25 | use the memory buffer BIO for IO, or compile bss_file.c into your | ||
| 26 | application, it is in the apps directory and is just a copy of | ||
| 27 | crypto/buffer/bss_file.c with #define APPS_WIN16 added. | ||
| 28 | I have not yet automated the makefile to automatically copy it into 'out' | ||
| 29 | for a win 3.1 build.... | ||
| 30 | |||
| 31 | All callbacks passed into SSLeay for Windows 3.1 need to be of type | ||
| 32 | _far _loadds. | ||
| 33 | |||
| 34 | I don't support building with the pascal calling convention. | ||
| 35 | |||
| 36 | The DLL and static builds are large memory model. | ||
| 37 | |||
| 38 | To build static libraries for NT/95 or win 3.1 | ||
| 39 | |||
| 40 | perl util/mk1mf.pl VC-WIN32 > mf-stat.nt | ||
| 41 | perl util/mk1mf.pl VC-WIN16 > mf-stat.w31 | ||
| 42 | for DLL's | ||
| 43 | perl util/mk1mf.pl dll VC-WIN32 > mf-dll.nt | ||
| 44 | perl util/mk1mf.pl dll VC-WIN16 > mf-dll.w31 | ||
| 45 | |||
| 46 | Again you will notice that if you dont have perl, you cannot do this. | ||
| 47 | |||
| 48 | Now the next importaint issue. Running Configure! | ||
| 49 | I have small assember code files for critical big number library operation | ||
| 50 | in crypto/bn/asm. There is, asm code, object files and uuencode | ||
| 51 | object files. They are | ||
| 52 | x86nt32.asm - 32bit flat memory model assember - suitable Win32 | ||
| 53 | x86w16.asm - 16bit assember - used in the msdos build. | ||
| 54 | x86w32.asm - 32bit assember, win 3.1 segments, used for win16 build. | ||
| 55 | |||
| 56 | If you feel compelled to build the 16bit maths routines in the windows 3.1 | ||
| 57 | build, | ||
| 58 | perl Configure VC-W31-16 | ||
| 59 | perl util/mk1mf.pl dll VC-W31-16 > mf-dll.w31 | ||
| 60 | |||
| 61 | If you hate assember and don't want anything to do with it, | ||
| 62 | perl util/mk1mf.pl no-asm VC-WIN16 > mf-dll.w31 | ||
| 63 | will work for any of the makefile generations. | ||
| 64 | |||
| 65 | There are more options to mk1mf.pl but these all leave the temporary | ||
| 66 | files in 'tmp' and the output files in 'out' by default. | ||
| 67 | |||
| 68 | The NT build is done for console mode. | ||
| 69 | |||
| 70 | The Windows 3.1 version of SSLeay uses quickwin, the interface is ugly | ||
| 71 | but it is better than nothing. If you want ugly, try doing anything | ||
| 72 | that involves getting a password. I decided to be ugly instead of | ||
| 73 | echoing characters. For Windows 3.1 I would just sugest using the | ||
| 74 | msdos version of the ssleay application for command line work. | ||
| 75 | The QuickWin build is primarily for testing. | ||
| 76 | |||
| 77 | For both NT and Windows 3.1, I have not written the code so that | ||
| 78 | s_client, s_server can take input from the keyboard. You can happily | ||
| 79 | start applications up in separate windows, watch them handshake, and then sit | ||
| 80 | there for-ever. I have not had the time to get this working, and I've | ||
| 81 | been able to test things from a unix box to the NT box :-). | ||
| 82 | Try running ssleay s_server on the windows box | ||
| 83 | (with either -cert ../apps/server.pem -www) | ||
| 84 | and run ssleay s_time from another window. | ||
| 85 | This often stuffs up on Windows 3.1, but I'm not worried since this is | ||
| 86 | probably a problem with my demo applications, not the libraries. | ||
| 87 | |||
| 88 | After a build of one of the version of microsoft SSLeay, | ||
| 89 | 'cd ms' and then run 'test'. This should check everything out and | ||
| 90 | even does a trial run of generating certificates. | ||
| 91 | 'test.bat' requires that perl be install, you be in the ms directory | ||
| 92 | (not the test directory, thats for unix so stay out :-) and that the | ||
| 93 | build output directory be ../out | ||
| 94 | |||
| 95 | On a last note, you will probably get division by zero errors and | ||
| 96 | stuff after a build. This is due to your own inability to follow | ||
| 97 | instructions :-). | ||
| 98 | |||
| 99 | The reasons for the problem is probably one of the following. | ||
| 100 | |||
| 101 | 1) You did not run Configure. This is critical for windows 3.1 when | ||
| 102 | using assember. The values in crypto/bn/bn.h must match the | ||
| 103 | ones requred for the assember code. (remember that if you | ||
| 104 | edit crypto/bn/bn.h by hand, it will be clobered the next time | ||
| 105 | you run Configure by the contents of crypto/bn/bn.org). | ||
| 106 | SSLeay version -o will list the compile options. | ||
| 107 | For VC-WIN32 you need bn(64,32) or bn(32,32) | ||
| 108 | For VC-W31-32/VC-WIN16 you need bn(32,32) | ||
| 109 | For VC-W31-16 you need bn(32,16) or bn(16,16) | ||
| 110 | For VC-MSDOS you need bn(32,16) or bn(16,16). | ||
| 111 | |||
| 112 | The first number will be 2 times bigger than the second if | ||
| 113 | BN_LLONG is defined in bn.h and the size of the second number | ||
| 114 | depends on the 'bits' defined at the start of bn.h. Have a | ||
| 115 | look, it's all reasonably clear. | ||
| 116 | If you want to start messing with 8 bit builds and things like | ||
| 117 | that, build without the assember by re-generating a makefile | ||
| 118 | via 'perl util/mk1mf.pl no-asm'. | ||
| 119 | 2) You tried to build under MS-DOS or Windows 3.1 using the /G3 | ||
| 120 | option. Don't. It is buggy (thats why you just got that | ||
| 121 | error) and unless you want to work out which optimising flag | ||
| 122 | to turn off, I'm not going to help you :-). I also noticed | ||
| 123 | that code often ran slower when compiled with /G3. | ||
| 124 | 3) Under NT/95, malloc goes stupid. You are probably linking with | ||
| 125 | the wrong library, there are problems if you mix the threaded | ||
| 126 | and non-threaded libraries (due to the DLL being staticly | ||
| 127 | linked with one and the applicaion using another. | ||
| 128 | |||
| 129 | Well hopefully thats most of the MS issues handled, see you in ssl-users :-). | ||
| 130 | |||
| 131 | eric 30-Aug-1996 | ||
| 132 | |||
| 133 | SSLeay 0.6.5 | ||
| 134 | For Windows 95/NT, add CRYPTO_malloc_init() to your program before any | ||
| 135 | calls to the SSLeay libraries. This function will insert callbacks so that | ||
| 136 | the SSLeay libraries will use the same malloc(), free() and realloc() as | ||
| 137 | your application so 'problem 3)' mentioned above will go away. | ||
| 138 | |||
| 139 | There is now DES assember for Windows NT/95. The file is | ||
| 140 | crypto/des/asm/win32.asm and replaces crypto/des/des_enc.c in the build. | ||
| 141 | |||
| 142 | There is also Blowfish assember for Windows NT/95. The file is | ||
| 143 | crypto/bf/asm/win32.asm and replaces crypto/bf/bf_enc.c in the build. | ||
| 144 | |||
| 145 | eric 25-Jun-1997 | ||
| 146 | |||
diff --git a/src/lib/libssl/src/MINFO b/src/lib/libssl/src/MINFO new file mode 100644 index 0000000000..0509f33648 --- /dev/null +++ b/src/lib/libssl/src/MINFO | |||
| @@ -0,0 +1,968 @@ | |||
| 1 | RELATIVE_DIRECTORY=. | ||
| 2 | AR=ar r | ||
| 3 | BASENAME=SSLeay | ||
| 4 | BF_ENC=bf_enc.o | ||
| 5 | BN_MULW=bn_mulw.o | ||
| 6 | CAST_ENC=c_enc.o | ||
| 7 | CC=cc | ||
| 8 | CFLAG=-O -DNOPROTO | ||
| 9 | DES_ENC=des_enc.o fcrypt_b.o | ||
| 10 | DIRS=crypto ssl rsaref apps test tools | ||
| 11 | EDIRS=times doc bugs util include certs ms shlib mt demos perl dep | ||
| 12 | EXHEADER=e_os.h | ||
| 13 | EX_LIBS= | ||
| 14 | GENERAL=Makefile | ||
| 15 | HEADER=e_os.h | ||
| 16 | INSTALLTOP=/usr/local/ssl | ||
| 17 | LIBS=libcrypto.a libssl.a | ||
| 18 | MAKE=make -f Makefile.ssl | ||
| 19 | MAKEFILE=Makefile.ssl | ||
| 20 | MAN1=1 | ||
| 21 | MAN3=3 | ||
| 22 | MD5_ASM_OBJ= | ||
| 23 | MISC=COPYRIGHT Configure HISTORY.066 INSTALL Makefile.ssl Makefile README TODO HISTORY README.066 README.080 README.090 VERSION PROBLEMS MINFO makefile.one e_os.h MICROSOFT makevms.com config PATENTS | ||
| 24 | NAME=SSLeay-0.9.0 | ||
| 25 | ONEDIRS=out tmp | ||
| 26 | PEX_LIBS=-L. -L.. -L../.. -L../../.. | ||
| 27 | RC4_ENC=rc4_enc.o | ||
| 28 | RC5_ENC=rc5_enc.o | ||
| 29 | RMD160_ASM_OBJ= | ||
| 30 | SDIRS=md2 md5 sha mdc2 hmac ripemd des rc2 rc4 rc5 idea bf cast bn rsa dsa dh buffer bio stack lhash rand err objects evp pem asn1 x509 conf txt_db pkcs7 | ||
| 31 | SHA1_ASM_OBJ= | ||
| 32 | SHELL=/bin/sh | ||
| 33 | TARFILE=SSLeay-0.9.0.tar | ||
| 34 | TOP=. | ||
| 35 | VERSION=0.9.0 | ||
| 36 | WDIRS=windows | ||
| 37 | WTARFILE=SSLeay-0.9.0-win.tar | ||
| 38 | RELATIVE_DIRECTORY= | ||
| 39 | RELATIVE_DIRECTORY=crypto | ||
| 40 | ALL=Makefile README cryptlib.c mem.c cversion.c ex_data.c cpt_err.c cryptlib.h date.h crypto.h cryptall.h | ||
| 41 | AR=ar r | ||
| 42 | CC=cc | ||
| 43 | CFLAG=-g | ||
| 44 | CFLAGS=-I. -I../include -g -DCFLAGS=" \"cc -g\" " | ||
| 45 | DIR=crypto | ||
| 46 | ERR=crypto | ||
| 47 | ERRC=cpt_err | ||
| 48 | EXHEADER=crypto.h cryptall.h | ||
| 49 | EX_LIBS= | ||
| 50 | GENERAL=Makefile README | ||
| 51 | HEADER=cryptlib.h date.h crypto.h cryptall.h | ||
| 52 | INCLUDE=-I. -I../include | ||
| 53 | INCLUDES=-I.. -I../../include | ||
| 54 | INSTALLTOP=/usr/local/ssl | ||
| 55 | LIB=../libcrypto.a | ||
| 56 | LIBOBJ=cryptlib.o mem.o cversion.o ex_data.o cpt_err.o | ||
| 57 | LIBS= | ||
| 58 | LIBSRC=cryptlib.c mem.c cversion.c ex_data.c cpt_err.c | ||
| 59 | MAKE=make -f Makefile.ssl | ||
| 60 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 61 | MAKEFILE=Makefile.ssl | ||
| 62 | PEX_LIBS= | ||
| 63 | RM=/bin/rm -f | ||
| 64 | SDIRS=md2 md5 sha mdc2 hmac ripemd des rc2 rc4 rc5 idea bf cast bn rsa dsa dh buffer bio stack lhash rand err objects evp pem x509 asn1 conf txt_db pkcs7 | ||
| 65 | SRC=cryptlib.c mem.c cversion.c ex_data.c cpt_err.c | ||
| 66 | TOP=.. | ||
| 67 | RELATIVE_DIRECTORY= | ||
| 68 | RELATIVE_DIRECTORY=crypto/md2 | ||
| 69 | ALL=Makefile md2_dgst.c md5_one.c md2.h | ||
| 70 | APPS= | ||
| 71 | AR=ar r | ||
| 72 | CC=cc | ||
| 73 | CFLAG=-g | ||
| 74 | CFLAGS= -g | ||
| 75 | DIR=md | ||
| 76 | EXHEADER=md2.h | ||
| 77 | GENERAL=Makefile | ||
| 78 | HEADER=md2.h | ||
| 79 | INCLUDES= | ||
| 80 | INSTALLTOP=/usr/local/ssl | ||
| 81 | LIB=../../libcrypto.a | ||
| 82 | LIBOBJ=md2_dgst.o md2_one.o | ||
| 83 | LIBSRC=md2_dgst.c md5_one.c | ||
| 84 | MAKE=make -f Makefile.ssl | ||
| 85 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 86 | MAKEFILE=Makefile.ssl | ||
| 87 | SRC=md2_dgst.c md5_one.c | ||
| 88 | TEST=md2test.c | ||
| 89 | TOP=../.. | ||
| 90 | RELATIVE_DIRECTORY= | ||
| 91 | RELATIVE_DIRECTORY=crypto/md5 | ||
| 92 | ALL=Makefile md5_dgst.c md5_one.c md5_locl.h md5.h | ||
| 93 | APPS=md5.c | ||
| 94 | AR=ar r | ||
| 95 | CC=cc | ||
| 96 | CFLAG=-g | ||
| 97 | CFLAGS= -g | ||
| 98 | CPP=cc -E | ||
| 99 | DIR=md5 | ||
| 100 | EXHEADER=md5.h | ||
| 101 | GENERAL=Makefile | ||
| 102 | HEADER=md5_locl.h md5.h | ||
| 103 | INCLUDES= | ||
| 104 | INSTALLTOP=/usr/local/ssl | ||
| 105 | LIB=../../libcrypto.a | ||
| 106 | LIBOBJ=md5_dgst.o md5_one.o | ||
| 107 | LIBSRC=md5_dgst.c md5_one.c | ||
| 108 | MAKE=make -f Makefile.ssl | ||
| 109 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 110 | MAKEFILE=Makefile.ssl | ||
| 111 | MD5_ASM_OBJ= | ||
| 112 | SRC=md5_dgst.c md5_one.c | ||
| 113 | TEST=md5test.c | ||
| 114 | TOP=../.. | ||
| 115 | RELATIVE_DIRECTORY= | ||
| 116 | RELATIVE_DIRECTORY=crypto/sha | ||
| 117 | ALL=Makefile sha_dgst.c sha1dgst.c sha_one.c sha1_one.c sha_locl.h sha.h | ||
| 118 | APPS= | ||
| 119 | AR=ar r | ||
| 120 | CC=cc | ||
| 121 | CFLAG=-g | ||
| 122 | CFLAGS= -g | ||
| 123 | DIR=sha | ||
| 124 | EXHEADER=sha.h | ||
| 125 | GENERAL=Makefile | ||
| 126 | HEADER=sha_locl.h sha.h | ||
| 127 | INCLUDES= | ||
| 128 | INSTALLTOP=/usr/local/ssl | ||
| 129 | LIB=../../libcrypto.a | ||
| 130 | LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o | ||
| 131 | LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c | ||
| 132 | MAKE=make -f Makefile.ssl | ||
| 133 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 134 | MAKEFILE=Makefile.ssl | ||
| 135 | SHA1_ASM_OBJ= | ||
| 136 | SRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c | ||
| 137 | TEST=shatest.c sha1test.c | ||
| 138 | TOP=../.. | ||
| 139 | RELATIVE_DIRECTORY= | ||
| 140 | RELATIVE_DIRECTORY=crypto/mdc2 | ||
| 141 | ALL=Makefile mdc2dgst.c mdc2_one.c mdc2.h | ||
| 142 | APPS= | ||
| 143 | AR=ar r | ||
| 144 | CC=cc | ||
| 145 | CFLAG=-g | ||
| 146 | CFLAGS= -g | ||
| 147 | DIR=mdc2 | ||
| 148 | EXHEADER=mdc2.h | ||
| 149 | GENERAL=Makefile | ||
| 150 | HEADER=mdc2.h | ||
| 151 | INCLUDES= | ||
| 152 | INSTALLTOP=/usr/local/ssl | ||
| 153 | LIB=../../libcrypto.a | ||
| 154 | LIBOBJ=mdc2dgst.o mdc2_one.o | ||
| 155 | LIBSRC=mdc2dgst.c mdc2_one.c | ||
| 156 | MAKE=make -f Makefile.ssl | ||
| 157 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 158 | MAKEFILE=Makefile.ssl | ||
| 159 | SRC=mdc2dgst.c mdc2_one.c | ||
| 160 | TEST=mdc2test.c | ||
| 161 | TOP=../.. | ||
| 162 | RELATIVE_DIRECTORY= | ||
| 163 | RELATIVE_DIRECTORY=crypto/hmac | ||
| 164 | ALL=Makefile hmac.c hmac.h | ||
| 165 | APPS= | ||
| 166 | AR=ar r | ||
| 167 | CC=cc | ||
| 168 | CFLAG=-g | ||
| 169 | CFLAGS= -g | ||
| 170 | DIR=hmac | ||
| 171 | EXHEADER=hmac.h | ||
| 172 | GENERAL=Makefile | ||
| 173 | HEADER=hmac.h | ||
| 174 | INCLUDES= | ||
| 175 | INSTALLTOP=/usr/local/ssl | ||
| 176 | LIB=../../libcrypto.a | ||
| 177 | LIBOBJ=hmac.o | ||
| 178 | LIBSRC=hmac.c | ||
| 179 | MAKE=make -f Makefile.ssl | ||
| 180 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 181 | MAKEFILE=Makefile.ssl | ||
| 182 | SRC=hmac.c | ||
| 183 | TEST=hmactest.c | ||
| 184 | TOP=../.. | ||
| 185 | RELATIVE_DIRECTORY= | ||
| 186 | RELATIVE_DIRECTORY=crypto/ripemd | ||
| 187 | ALL=Makefile rmd_dgst.c rmd_one.c rmd_locl.h rmdconst.h ripemd.h | ||
| 188 | APPS=rmd160.c | ||
| 189 | AR=ar r | ||
| 190 | CC=cc | ||
| 191 | CFLAG=-g | ||
| 192 | CFLAGS= -g | ||
| 193 | CPP=cc -E | ||
| 194 | DIR=ripemd | ||
| 195 | EXHEADER=ripemd.h | ||
| 196 | GENERAL=Makefile | ||
| 197 | HEADER=rmd_locl.h rmdconst.h ripemd.h | ||
| 198 | INCLUDES= | ||
| 199 | INSTALLTOP=/usr/local/ssl | ||
| 200 | LIB=../../libcrypto.a | ||
| 201 | LIBOBJ=rmd_dgst.o rmd_one.o | ||
| 202 | LIBSRC=rmd_dgst.c rmd_one.c | ||
| 203 | MAKE=make -f Makefile.ssl | ||
| 204 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 205 | MAKEFILE=Makefile.ssl | ||
| 206 | RIP_ASM_OBJ= | ||
| 207 | SRC=rmd_dgst.c rmd_one.c | ||
| 208 | TEST=rmdtest.c | ||
| 209 | TOP=../.. | ||
| 210 | RELATIVE_DIRECTORY= | ||
| 211 | RELATIVE_DIRECTORY=crypto/des | ||
| 212 | ALL=Makefile des.org des_locl.org cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c qud_cksm.c rand_key.c read_pwd.c rpc_enc.c set_key.c des_enc.c fcrypt_b.c read2pwd.c fcrypt.c xcbc_enc.c str2key.c cfb64ede.c ofb64ede.c supp.c des_locl.h rpc_des.h podd.h sk.h spr.h des_ver.h des.h | ||
| 213 | APPS= | ||
| 214 | AR=ar r | ||
| 215 | CC=cc | ||
| 216 | CFLAG=-g | ||
| 217 | CFLAGS= -g | ||
| 218 | CPP=cc -E | ||
| 219 | DES_ENC=des_enc.o fcrypt_b.o | ||
| 220 | DIR=des | ||
| 221 | EXHEADER=des.h | ||
| 222 | GENERAL=Makefile des.org des_locl.org | ||
| 223 | HEADER=des_locl.h rpc_des.h podd.h sk.h spr.h des_ver.h des.h | ||
| 224 | INCLUDES= | ||
| 225 | INSTALLTOP=/usr/local/ssl | ||
| 226 | LIB=../../libcrypto.a | ||
| 227 | LIBOBJ=set_key.o ecb_enc.o cbc_enc.o ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o ofb64ede.o enc_read.o enc_writ.o ofb64enc.o ofb_enc.o str2key.o pcbc_enc.o qud_cksm.o rand_key.o des_enc.o fcrypt_b.o read2pwd.o fcrypt.o xcbc_enc.o read_pwd.o rpc_enc.o cbc_cksm.o supp.o | ||
| 228 | LIBSRC=cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c qud_cksm.c rand_key.c read_pwd.c rpc_enc.c set_key.c des_enc.c fcrypt_b.c read2pwd.c fcrypt.c xcbc_enc.c str2key.c cfb64ede.c ofb64ede.c supp.c | ||
| 229 | MAKE=make -f Makefile.ssl | ||
| 230 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 231 | MAKEFILE=Makefile.ssl | ||
| 232 | SRC=cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c qud_cksm.c rand_key.c read_pwd.c rpc_enc.c set_key.c des_enc.c fcrypt_b.c read2pwd.c fcrypt.c xcbc_enc.c str2key.c cfb64ede.c ofb64ede.c supp.c | ||
| 233 | TEST=destest.c | ||
| 234 | TOP=../.. | ||
| 235 | RELATIVE_DIRECTORY= | ||
| 236 | RELATIVE_DIRECTORY=crypto/rc2 | ||
| 237 | ALL=Makefile rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c rc2_locl.h rc2.h | ||
| 238 | APPS= | ||
| 239 | AR=ar r | ||
| 240 | CC=cc | ||
| 241 | CFLAG=-g | ||
| 242 | CFLAGS= -g | ||
| 243 | DIR=rc2 | ||
| 244 | EXHEADER=rc2.h | ||
| 245 | GENERAL=Makefile | ||
| 246 | HEADER=rc2_locl.h rc2.h | ||
| 247 | INCLUDES= | ||
| 248 | INSTALLTOP=/usr/local/ssl | ||
| 249 | LIB=../../libcrypto.a | ||
| 250 | LIBOBJ=rc2_ecb.o rc2_skey.o rc2_cbc.o rc2cfb64.o rc2ofb64.o | ||
| 251 | LIBSRC=rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c | ||
| 252 | MAKE=make -f Makefile.ssl | ||
| 253 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 254 | MAKEFILE=Makefile.ssl | ||
| 255 | SRC=rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c | ||
| 256 | TEST=rc2test.c | ||
| 257 | TOP=../.. | ||
| 258 | RELATIVE_DIRECTORY= | ||
| 259 | RELATIVE_DIRECTORY=crypto/rc4 | ||
| 260 | ALL=Makefile rc4_skey.c rc4_enc.c rc4.h rc4_locl.h | ||
| 261 | APPS= | ||
| 262 | AR=ar r | ||
| 263 | CC=cc | ||
| 264 | CFLAG=-g | ||
| 265 | CFLAGS= -g | ||
| 266 | DIR=rc4 | ||
| 267 | EXHEADER=rc4.h | ||
| 268 | GENERAL=Makefile | ||
| 269 | HEADER=rc4.h rc4_locl.h | ||
| 270 | INCLUDES= | ||
| 271 | INSTALLTOP=/usr/local/ssl | ||
| 272 | LIB=../../libcrypto.a | ||
| 273 | LIBOBJ=rc4_skey.o rc4_enc.o | ||
| 274 | LIBSRC=rc4_skey.c rc4_enc.c | ||
| 275 | MAKE=make -f Makefile.ssl | ||
| 276 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 277 | MAKEFILE=Makefile.ssl | ||
| 278 | RC4_ENC=rc4_enc.o | ||
| 279 | SRC=rc4_skey.c rc4_enc.c | ||
| 280 | TEST=rc4test.c | ||
| 281 | TOP=../.. | ||
| 282 | RELATIVE_DIRECTORY= | ||
| 283 | RELATIVE_DIRECTORY=crypto/rc5 | ||
| 284 | ALL=Makefile rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c rc5_locl.h rc5.h | ||
| 285 | APPS= | ||
| 286 | AR=ar r | ||
| 287 | CC=cc | ||
| 288 | CFLAG=-g | ||
| 289 | CFLAGS= -g | ||
| 290 | CPP=cc -E | ||
| 291 | DIR=rc5 | ||
| 292 | EXHEADER=rc5.h | ||
| 293 | GENERAL=Makefile | ||
| 294 | HEADER=rc5_locl.h rc5.h | ||
| 295 | INCLUDES= | ||
| 296 | INSTALLTOP=/usr/local/ssl | ||
| 297 | LIB=../../libcrypto.a | ||
| 298 | LIBOBJ=rc5_skey.o rc5_ecb.o rc5_enc.o rc5cfb64.o rc5ofb64.o | ||
| 299 | LIBSRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c | ||
| 300 | MAKE=make -f Makefile.ssl | ||
| 301 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 302 | MAKEFILE=Makefile.ssl | ||
| 303 | RC5_ENC=rc5_enc.o | ||
| 304 | SRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c | ||
| 305 | TEST=rc5test.c | ||
| 306 | TOP=../.. | ||
| 307 | RELATIVE_DIRECTORY= | ||
| 308 | RELATIVE_DIRECTORY=crypto/idea | ||
| 309 | ALL=Makefile i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c idea_lcl.h idea.h | ||
| 310 | APPS= | ||
| 311 | AR=ar r | ||
| 312 | CC=cc | ||
| 313 | CFLAG=-g | ||
| 314 | CFLAGS= -g | ||
| 315 | DIR=idea | ||
| 316 | EXHEADER=idea.h | ||
| 317 | GENERAL=Makefile | ||
| 318 | HEADER=idea_lcl.h idea.h | ||
| 319 | INCLUDES= | ||
| 320 | INSTALLTOP=/usr/local/ssl | ||
| 321 | LIB=../../libcrypto.a | ||
| 322 | LIBOBJ=i_cbc.o i_cfb64.o i_ofb64.o i_ecb.o i_skey.o | ||
| 323 | LIBSRC=i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c | ||
| 324 | MAKE=make -f Makefile.ssl | ||
| 325 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 326 | MAKEFILE=Makefile.ssl | ||
| 327 | SRC=i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c | ||
| 328 | TEST=ideatest.c | ||
| 329 | TOP=../.. | ||
| 330 | RELATIVE_DIRECTORY= | ||
| 331 | RELATIVE_DIRECTORY=crypto/bf | ||
| 332 | ALL=Makefile bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c bf_pi.h bf_locl.h blowfish.h | ||
| 333 | APPS= | ||
| 334 | AR=ar r | ||
| 335 | BF_ENC=bf_enc.o | ||
| 336 | CC=cc | ||
| 337 | CFLAG=-g | ||
| 338 | CFLAGS= -g | ||
| 339 | CPP=cc -E | ||
| 340 | DIR=bf | ||
| 341 | EXHEADER=blowfish.h | ||
| 342 | GENERAL=Makefile | ||
| 343 | HEADER=bf_pi.h bf_locl.h blowfish.h | ||
| 344 | INCLUDES= | ||
| 345 | INSTALLTOP=/usr/local/ssl | ||
| 346 | LIB=../../libcrypto.a | ||
| 347 | LIBOBJ=bf_skey.o bf_ecb.o bf_enc.o bf_cfb64.o bf_ofb64.o | ||
| 348 | LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c | ||
| 349 | MAKE=make -f Makefile.ssl | ||
| 350 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 351 | MAKEFILE=Makefile.ssl | ||
| 352 | SRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c | ||
| 353 | TEST=bftest.c | ||
| 354 | TOP=../.. | ||
| 355 | RELATIVE_DIRECTORY= | ||
| 356 | RELATIVE_DIRECTORY=crypto/cast | ||
| 357 | ALL=Makefile c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c cast_s.h cast_lcl.h cast.h | ||
| 358 | APPS= | ||
| 359 | AR=ar r | ||
| 360 | CAST_ENC=c_enc.o | ||
| 361 | CC=cc | ||
| 362 | CFLAG=-g | ||
| 363 | CFLAGS= -g | ||
| 364 | CPP=cc -E | ||
| 365 | DIR=cast | ||
| 366 | EXHEADER=cast.h | ||
| 367 | GENERAL=Makefile | ||
| 368 | HEADER=cast_s.h cast_lcl.h cast.h | ||
| 369 | INCLUDES= | ||
| 370 | INSTALLTOP=/usr/local/ssl | ||
| 371 | LIB=../../libcrypto.a | ||
| 372 | LIBOBJ=c_skey.o c_ecb.o c_enc.o c_cfb64.o c_ofb64.o | ||
| 373 | LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c | ||
| 374 | MAKE=make -f Makefile.ssl | ||
| 375 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 376 | MAKEFILE=Makefile.ssl | ||
| 377 | SRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c | ||
| 378 | TEST=casttest.c | ||
| 379 | TOP=../.. | ||
| 380 | RELATIVE_DIRECTORY= | ||
| 381 | RELATIVE_DIRECTORY=crypto/bn | ||
| 382 | ALL=Makefile bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c bn_mul.c bn_print.c bn_rand.c bn_shift.c bn_sub.c bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_mulw.c bn_recp.c bn_mont.c bn_mpi.c bn_lcl.h bn_prime.h bn.h | ||
| 383 | APPS= | ||
| 384 | AR=ar r | ||
| 385 | BN_MULW=bn_mulw.o | ||
| 386 | CC=cc | ||
| 387 | CFLAG=-g | ||
| 388 | CFLAGS=-I.. -I../../include -g | ||
| 389 | DIR=bn | ||
| 390 | ERR=bn | ||
| 391 | ERRC=bn_err | ||
| 392 | EXHEADER=bn.h | ||
| 393 | GENERAL=Makefile | ||
| 394 | HEADER=bn_lcl.h bn_prime.h bn.h | ||
| 395 | INCLUDES=-I.. -I../../include | ||
| 396 | INSTALLTOP=/usr/local/ssl | ||
| 397 | LIB=../../libcrypto.a | ||
| 398 | LIBOBJ=bn_add.o bn_div.o bn_exp.o bn_lib.o bn_mod.o bn_mul.o bn_print.o bn_rand.o bn_shift.o bn_sub.o bn_word.o bn_blind.o bn_gcd.o bn_prime.o bn_err.o bn_sqr.o bn_mulw.o bn_recp.o bn_mont.o bn_mpi.o | ||
| 399 | LIBSRC=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c bn_mul.c bn_print.c bn_rand.c bn_shift.c bn_sub.c bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_mulw.c bn_recp.c bn_mont.c bn_mpi.c | ||
| 400 | MAKE=make -f Makefile.ssl | ||
| 401 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 402 | MAKEFILE=Makefile.ssl | ||
| 403 | SRC=bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c bn_mul.c bn_print.c bn_rand.c bn_shift.c bn_sub.c bn_word.c bn_blind.c bn_gcd.c bn_prime.c bn_err.c bn_sqr.c bn_mulw.c bn_recp.c bn_mont.c bn_mpi.c | ||
| 404 | TEST=bntest.c exptest.c | ||
| 405 | TOP=../.. | ||
| 406 | RELATIVE_DIRECTORY= | ||
| 407 | RELATIVE_DIRECTORY=crypto/rsa | ||
| 408 | ALL=Makefile rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c rsa_none.c rsa.h | ||
| 409 | APPS= | ||
| 410 | AR=ar r | ||
| 411 | CC=cc | ||
| 412 | CFLAG=-g | ||
| 413 | CFLAGS=-I.. -I../../include -g | ||
| 414 | DIR=rsa | ||
| 415 | ERR=rsa | ||
| 416 | ERRC=rsa_err | ||
| 417 | EXHEADER=rsa.h | ||
| 418 | GENERAL=Makefile | ||
| 419 | HEADER=rsa.h | ||
| 420 | INCLUDES=-I.. -I../../include | ||
| 421 | INSTALLTOP=/usr/local/ssl | ||
| 422 | LIB=../../libcrypto.a | ||
| 423 | LIBOBJ=rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o rsa_err.o rsa_pk1.o rsa_ssl.o rsa_none.o | ||
| 424 | LIBSRC=rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c rsa_none.c | ||
| 425 | MAKE=make -f Makefile.ssl | ||
| 426 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 427 | MAKEFILE=Makefile.ssl | ||
| 428 | SRC=rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c rsa_err.c rsa_pk1.c rsa_ssl.c rsa_none.c | ||
| 429 | TEST= | ||
| 430 | TOP=../.. | ||
| 431 | RELATIVE_DIRECTORY= | ||
| 432 | RELATIVE_DIRECTORY=crypto/dsa | ||
| 433 | ALL=Makefile dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c dsa_sign.c dsa_err.c dsa.h | ||
| 434 | APPS= | ||
| 435 | AR=ar r | ||
| 436 | CC=cc | ||
| 437 | CFLAG=-g | ||
| 438 | CFLAGS=-I.. -I../../include -g | ||
| 439 | DIR=dsa | ||
| 440 | ERR=dsa | ||
| 441 | ERRC=dsa_err | ||
| 442 | EXHEADER=dsa.h | ||
| 443 | GENERAL=Makefile | ||
| 444 | HEADER=dsa.h | ||
| 445 | INCLUDES=-I.. -I../../include | ||
| 446 | INSTALLTOP=/usr/local/ssl | ||
| 447 | LIB=../../libcrypto.a | ||
| 448 | LIBOBJ=dsa_gen.o dsa_key.o dsa_lib.o dsa_vrf.o dsa_sign.o dsa_err.o | ||
| 449 | LIBSRC=dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c dsa_sign.c dsa_err.c | ||
| 450 | MAKE=make -f Makefile.ssl | ||
| 451 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 452 | MAKEFILE=Makefile.ssl | ||
| 453 | SRC=dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c dsa_sign.c dsa_err.c | ||
| 454 | TEST=dsatest.c | ||
| 455 | TOP=../.. | ||
| 456 | RELATIVE_DIRECTORY= | ||
| 457 | RELATIVE_DIRECTORY=crypto/dh | ||
| 458 | ALL=Makefile dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c dh.h | ||
| 459 | APPS= | ||
| 460 | AR=ar r | ||
| 461 | CC=cc | ||
| 462 | CFLAG=-g | ||
| 463 | CFLAGS=-I.. -I../../include -g | ||
| 464 | DIR=dh | ||
| 465 | ERR=dh | ||
| 466 | ERRC=dh_err | ||
| 467 | EXHEADER=dh.h | ||
| 468 | GENERAL=Makefile | ||
| 469 | HEADER=dh.h | ||
| 470 | INCLUDES=-I.. -I../../include | ||
| 471 | INSTALLTOP=/usr/local/ssl | ||
| 472 | LIB=../../libcrypto.a | ||
| 473 | LIBOBJ=dh_gen.o dh_key.o dh_lib.o dh_check.o dh_err.o | ||
| 474 | LIBSRC=dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c | ||
| 475 | MAKE=make -f Makefile.ssl | ||
| 476 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 477 | MAKEFILE=Makefile.ssl | ||
| 478 | SRC=dh_gen.c dh_key.c dh_lib.c dh_check.c dh_err.c | ||
| 479 | TEST=dhtest.c | ||
| 480 | TOP=../.. | ||
| 481 | RELATIVE_DIRECTORY= | ||
| 482 | RELATIVE_DIRECTORY=crypto/buffer | ||
| 483 | ALL=Makefile buffer.c buf_err.c buffer.h | ||
| 484 | APPS= | ||
| 485 | AR=ar r | ||
| 486 | CC=cc | ||
| 487 | CFLAG=-g | ||
| 488 | CFLAGS=-I.. -I../../include -g | ||
| 489 | DIR=buffer | ||
| 490 | ERR=buffer | ||
| 491 | ERRC=buf_err | ||
| 492 | EXHEADER=buffer.h | ||
| 493 | GENERAL=Makefile | ||
| 494 | HEADER=buffer.h | ||
| 495 | INCLUDES=-I.. -I../../include | ||
| 496 | INSTALLTOP=/usr/local/ssl | ||
| 497 | LIB=../../libcrypto.a | ||
| 498 | LIBOBJ=buffer.o buf_err.o | ||
| 499 | LIBSRC=buffer.c buf_err.c | ||
| 500 | MAKE=make -f Makefile.ssl | ||
| 501 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 502 | MAKEFILE=Makefile.ssl | ||
| 503 | SRC=buffer.c buf_err.c | ||
| 504 | TEST= | ||
| 505 | TOP=../.. | ||
| 506 | RELATIVE_DIRECTORY= | ||
| 507 | RELATIVE_DIRECTORY=crypto/bio | ||
| 508 | ALL=Makefile bio_lib.c bio_cb.c bio_err.c bss_mem.c bss_null.c bss_fd.c bss_file.c bss_sock.c bss_conn.c bf_null.c bf_buff.c b_print.c b_dump.c b_sock.c bss_acpt.c bf_nbio.c bio.h bss_file.c | ||
| 509 | APPS= | ||
| 510 | AR=ar r | ||
| 511 | CC=cc | ||
| 512 | CFLAG=-g | ||
| 513 | CFLAGS=-I.. -I../../include -g | ||
| 514 | DIR=bio | ||
| 515 | ERR=bio | ||
| 516 | ERRC=bio_err | ||
| 517 | EXHEADER=bio.h bss_file.c | ||
| 518 | GENERAL=Makefile | ||
| 519 | HEADER=bio.h bss_file.c | ||
| 520 | INCLUDES=-I.. -I../../include | ||
| 521 | INSTALLTOP=/usr/local/ssl | ||
| 522 | LIB=../../libcrypto.a | ||
| 523 | LIBOBJ=bio_lib.o bio_cb.o bio_err.o bss_mem.o bss_null.o bss_fd.o bss_file.o bss_sock.o bss_conn.o bf_null.o bf_buff.o b_print.o b_dump.o b_sock.o bss_acpt.o bf_nbio.o | ||
| 524 | LIBSRC=bio_lib.c bio_cb.c bio_err.c bss_mem.c bss_null.c bss_fd.c bss_file.c bss_sock.c bss_conn.c bf_null.c bf_buff.c b_print.c b_dump.c b_sock.c bss_acpt.c bf_nbio.c | ||
| 525 | MAKE=make -f Makefile.ssl | ||
| 526 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 527 | MAKEFILE=Makefile.ssl | ||
| 528 | SRC=bio_lib.c bio_cb.c bio_err.c bss_mem.c bss_null.c bss_fd.c bss_file.c bss_sock.c bss_conn.c bf_null.c bf_buff.c b_print.c b_dump.c b_sock.c bss_acpt.c bf_nbio.c | ||
| 529 | TEST= | ||
| 530 | TOP=../.. | ||
| 531 | RELATIVE_DIRECTORY= | ||
| 532 | RELATIVE_DIRECTORY=crypto/stack | ||
| 533 | ALL=Makefile stack.c stack.h | ||
| 534 | APPS= | ||
| 535 | AR=ar r | ||
| 536 | CC=cc | ||
| 537 | CFLAG=-g | ||
| 538 | CFLAGS= -g | ||
| 539 | DIR=stack | ||
| 540 | EXHEADER=stack.h | ||
| 541 | GENERAL=Makefile | ||
| 542 | HEADER=stack.h | ||
| 543 | INCLUDES= | ||
| 544 | INSTALLTOP=/usr/local/ssl | ||
| 545 | LIB=../../libcrypto.a | ||
| 546 | LIBOBJ=stack.o | ||
| 547 | LIBSRC=stack.c | ||
| 548 | MAKE=make -f Makefile.ssl | ||
| 549 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 550 | MAKEFILE=Makefile.ssl | ||
| 551 | SRC=stack.c | ||
| 552 | TEST= | ||
| 553 | TOP=../.. | ||
| 554 | RELATIVE_DIRECTORY= | ||
| 555 | RELATIVE_DIRECTORY=crypto/lhash | ||
| 556 | ALL=Makefile lhash.c lh_stats.c lhash.h | ||
| 557 | APPS= | ||
| 558 | AR=ar r | ||
| 559 | CC=cc | ||
| 560 | CFLAG=-g | ||
| 561 | CFLAGS= -g | ||
| 562 | DIR=lhash | ||
| 563 | EXHEADER=lhash.h | ||
| 564 | GENERAL=Makefile | ||
| 565 | HEADER=lhash.h | ||
| 566 | INCLUDES= | ||
| 567 | INSTALLTOP=/usr/local/ssl | ||
| 568 | LIB=../../libcrypto.a | ||
| 569 | LIBOBJ=lhash.o lh_stats.o | ||
| 570 | LIBSRC=lhash.c lh_stats.c | ||
| 571 | MAKE=make -f Makefile.ssl | ||
| 572 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 573 | MAKEFILE=Makefile.ssl | ||
| 574 | SRC=lhash.c lh_stats.c | ||
| 575 | TEST= | ||
| 576 | TOP=../.. | ||
| 577 | RELATIVE_DIRECTORY= | ||
| 578 | RELATIVE_DIRECTORY=crypto/rand | ||
| 579 | ALL=Makefile md_rand.c randfile.c rand.h | ||
| 580 | APPS= | ||
| 581 | AR=ar r | ||
| 582 | CC=cc | ||
| 583 | CFLAG=-g | ||
| 584 | CFLAGS= -g | ||
| 585 | DIR=rand | ||
| 586 | EXHEADER=rand.h | ||
| 587 | GENERAL=Makefile | ||
| 588 | HEADER=rand.h | ||
| 589 | INCLUDES= | ||
| 590 | INSTALLTOP=/usr/local/ssl | ||
| 591 | LIB=../../libcrypto.a | ||
| 592 | LIBOBJ=md_rand.o randfile.o | ||
| 593 | LIBSRC=md_rand.c randfile.c | ||
| 594 | MAKE=make -f Makefile.ssl | ||
| 595 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 596 | MAKEFILE=Makefile.ssl | ||
| 597 | SRC=md_rand.c randfile.c | ||
| 598 | TEST=randtest.c | ||
| 599 | TOP=../.. | ||
| 600 | RELATIVE_DIRECTORY= | ||
| 601 | RELATIVE_DIRECTORY=crypto/err | ||
| 602 | ALL=Makefile err.c err_all.c err_prn.c err.h | ||
| 603 | APPS= | ||
| 604 | AR=ar r | ||
| 605 | CC=cc | ||
| 606 | CFLAG=-g | ||
| 607 | CFLAGS=-I.. -I../../include -g | ||
| 608 | DIR=err | ||
| 609 | EXHEADER=err.h | ||
| 610 | GENERAL=Makefile | ||
| 611 | HEADER=err.h | ||
| 612 | INCLUDES=-I.. -I../../include | ||
| 613 | INSTALLTOP=/usr/local/ssl | ||
| 614 | LIB=../../libcrypto.a | ||
| 615 | LIBOBJ=err.o err_all.o err_prn.o | ||
| 616 | LIBSRC=err.c err_all.c err_prn.c | ||
| 617 | MAKE=make -f Makefile.ssl | ||
| 618 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 619 | MAKEFILE=Makefile.ssl | ||
| 620 | SRC=err.c err_all.c err_prn.c | ||
| 621 | TEST= | ||
| 622 | TOP=../.. | ||
| 623 | RELATIVE_DIRECTORY= | ||
| 624 | RELATIVE_DIRECTORY=crypto/objects | ||
| 625 | ALL=Makefile README obj_dat.c obj_lib.c obj_err.c objects.h obj_dat.h | ||
| 626 | APPS= | ||
| 627 | AR=ar r | ||
| 628 | CC=cc | ||
| 629 | CFLAG=-g | ||
| 630 | CFLAGS=-I.. -I../../include -g | ||
| 631 | DIR=objects | ||
| 632 | ERR=objects | ||
| 633 | ERRC=obj_err | ||
| 634 | EXHEADER=objects.h | ||
| 635 | GENERAL=Makefile README | ||
| 636 | HEADER=objects.h obj_dat.h | ||
| 637 | INCLUDES=-I.. -I../../include | ||
| 638 | INSTALLTOP=/usr/local/ssl | ||
| 639 | LIB=../../libcrypto.a | ||
| 640 | LIBOBJ=obj_dat.o obj_lib.o obj_err.o | ||
| 641 | LIBSRC=obj_dat.c obj_lib.c obj_err.c | ||
| 642 | MAKE=make -f Makefile.ssl | ||
| 643 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 644 | MAKEFILE=Makefile.ssl | ||
| 645 | SRC=obj_dat.c obj_lib.c obj_err.c | ||
| 646 | TEST= | ||
| 647 | TOP=../.. | ||
| 648 | RELATIVE_DIRECTORY= | ||
| 649 | RELATIVE_DIRECTORY=crypto/evp | ||
| 650 | ALL=Makefile encode.c digest.c evp_enc.c evp_key.c e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c m_dss1.c m_mdc2.c m_ripemd.c p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c c_all.c evp_lib.c evp.h | ||
| 651 | APPS= | ||
| 652 | AR=ar r | ||
| 653 | CC=cc | ||
| 654 | CFLAG=-g | ||
| 655 | CFLAGS=-I.. -I../../include -g | ||
| 656 | DIR=evp | ||
| 657 | ERR=evp | ||
| 658 | ERRC=evp_err | ||
| 659 | EXHEADER=evp.h | ||
| 660 | GENERAL=Makefile | ||
| 661 | HEADER=evp.h | ||
| 662 | INCLUDES=-I.. -I../../include | ||
| 663 | INSTALLTOP=/usr/local/ssl | ||
| 664 | LIB=../../libcrypto.a | ||
| 665 | LIBOBJ=encode.o digest.o evp_enc.o evp_key.o e_ecb_d.o e_cbc_d.o e_cfb_d.o e_ofb_d.o e_ecb_i.o e_cbc_i.o e_cfb_i.o e_ofb_i.o e_ecb_3d.o e_cbc_3d.o e_rc4.o names.o e_cfb_3d.o e_ofb_3d.o e_xcbc_d.o e_ecb_r2.o e_cbc_r2.o e_cfb_r2.o e_ofb_r2.o e_ecb_bf.o e_cbc_bf.o e_cfb_bf.o e_ofb_bf.o e_ecb_c.o e_cbc_c.o e_cfb_c.o e_ofb_c.o e_ecb_r5.o e_cbc_r5.o e_cfb_r5.o e_ofb_r5.o m_null.o m_md2.o m_md5.o m_sha.o m_sha1.o m_dss.o m_dss1.o m_mdc2.o m_ripemd.o p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o bio_md.o bio_b64.o bio_enc.o evp_err.o e_null.o c_all.o evp_lib.o | ||
| 666 | LIBSRC=encode.c digest.c evp_enc.c evp_key.c e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c m_dss1.c m_mdc2.c m_ripemd.c p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c c_all.c evp_lib.c | ||
| 667 | MAKE=make -f Makefile.ssl | ||
| 668 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 669 | MAKEFILE=Makefile.ssl | ||
| 670 | SRC=encode.c digest.c evp_enc.c evp_key.c e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c e_ecb_r2.c e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c e_ecb_bf.c e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c e_ecb_c.c e_cbc_c.c e_cfb_c.c e_ofb_c.c e_ecb_r5.c e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c m_null.c m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c m_dss1.c m_mdc2.c m_ripemd.c p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c bio_md.c bio_b64.c bio_enc.c evp_err.c e_null.c c_all.c evp_lib.c | ||
| 671 | TEST= | ||
| 672 | TOP=../.. | ||
| 673 | RELATIVE_DIRECTORY= | ||
| 674 | RELATIVE_DIRECTORY=crypto/pem | ||
| 675 | ALL=Makefile pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c pem.h | ||
| 676 | APPS= | ||
| 677 | AR=ar r | ||
| 678 | CC=cc | ||
| 679 | CFLAG=-g | ||
| 680 | CFLAGS=-I.. -I../../include -g | ||
| 681 | CTX_SIZE=ctx_size | ||
| 682 | DIR=pem | ||
| 683 | ERR=pem | ||
| 684 | ERRC=pem_err | ||
| 685 | EXHEADER=pem.h | ||
| 686 | GENERAL=Makefile | ||
| 687 | HEADER=pem.h | ||
| 688 | INCLUDES=-I.. -I../../include | ||
| 689 | INSTALLTOP=/usr/local/ssl | ||
| 690 | LIB=../../libcrypto.a | ||
| 691 | LIBOBJ=pem_sign.o pem_seal.o pem_info.o pem_lib.o pem_all.o pem_err.o | ||
| 692 | LIBSRC=pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c | ||
| 693 | MAKE=make -f Makefile.ssl | ||
| 694 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 695 | MAKEFILE=Makefile.ssl | ||
| 696 | SRC=pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c pem_err.c | ||
| 697 | TEST= | ||
| 698 | TOP=../.. | ||
| 699 | RELATIVE_DIRECTORY= | ||
| 700 | RELATIVE_DIRECTORY=crypto/asn1 | ||
| 701 | ALL=Makefile README a_object.c a_bitstr.c a_utctm.c a_int.c a_octet.c a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c a_sign.c a_digest.c a_verify.c x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_name.c x_cinf.c x_x509.c x_crl.c x_info.c x_spki.c d2i_r_pr.c i2d_r_pr.c d2i_r_pu.c i2d_r_pu.c d2i_s_pr.c i2d_s_pr.c d2i_s_pu.c i2d_s_pu.c d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c t_req.c t_x509.c t_pkey.c p7_i_s.c p7_signi.c p7_signd.c p7_recip.c p7_enc_c.c p7_evp.c p7_dgst.c p7_s_e.c p7_enc.c p7_lib.c f_int.c f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c d2i_dsap.c n_pkey.c a_hdr.c x_pkey.c a_bool.c x_exten.c asn1_par.c asn1_lib.c asn1_err.c a_meth.c a_bytes.c evp_asn1.c asn1.h asn1_mac.h | ||
| 702 | APPS= | ||
| 703 | AR=ar r | ||
| 704 | CC=cc | ||
| 705 | CFLAG=-g | ||
| 706 | CFLAGS=-I.. -I../../include -g | ||
| 707 | DIR=asn1 | ||
| 708 | ERR=asn1 | ||
| 709 | ERRC=asn1_err | ||
| 710 | EXHEADER=asn1.h asn1_mac.h | ||
| 711 | GENERAL=Makefile README | ||
| 712 | HEADER=asn1.h asn1_mac.h | ||
| 713 | INCLUDES=-I.. -I../../include | ||
| 714 | INSTALLTOP=/usr/local/ssl | ||
| 715 | LIB=../../libcrypto.a | ||
| 716 | LIBOBJ=a_object.o a_bitstr.o a_utctm.o a_int.o a_octet.o a_print.o a_type.o a_set.o a_dup.o a_d2i_fp.o a_i2d_fp.o a_sign.o a_digest.o a_verify.o x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o x_name.o x_cinf.o x_x509.o x_crl.o x_info.o x_spki.o d2i_r_pr.o i2d_r_pr.o d2i_r_pu.o i2d_r_pu.o d2i_s_pr.o i2d_s_pr.o d2i_s_pu.o i2d_s_pu.o d2i_pu.o d2i_pr.o i2d_pu.o i2d_pr.o t_req.o t_x509.o t_pkey.o p7_i_s.o p7_signi.o p7_signd.o p7_recip.o p7_enc_c.o p7_evp.o p7_dgst.o p7_s_e.o p7_enc.o p7_lib.o f_int.o f_string.o i2d_dhp.o i2d_dsap.o d2i_dhp.o d2i_dsap.o n_pkey.o a_hdr.o x_pkey.o a_bool.o x_exten.o asn1_par.o asn1_lib.o asn1_err.o a_meth.o a_bytes.o evp_asn1.o | ||
| 717 | LIBSRC=a_object.c a_bitstr.c a_utctm.c a_int.c a_octet.c a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c a_sign.c a_digest.c a_verify.c x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_name.c x_cinf.c x_x509.c x_crl.c x_info.c x_spki.c d2i_r_pr.c i2d_r_pr.c d2i_r_pu.c i2d_r_pu.c d2i_s_pr.c i2d_s_pr.c d2i_s_pu.c i2d_s_pu.c d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c t_req.c t_x509.c t_pkey.c p7_i_s.c p7_signi.c p7_signd.c p7_recip.c p7_enc_c.c p7_evp.c p7_dgst.c p7_s_e.c p7_enc.c p7_lib.c f_int.c f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c d2i_dsap.c n_pkey.c a_hdr.c x_pkey.c a_bool.c x_exten.c asn1_par.c asn1_lib.c asn1_err.c a_meth.c a_bytes.c evp_asn1.c | ||
| 718 | MAKE=make -f Makefile.ssl | ||
| 719 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 720 | MAKEFILE=Makefile.ssl | ||
| 721 | SRC=a_object.c a_bitstr.c a_utctm.c a_int.c a_octet.c a_print.c a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c a_sign.c a_digest.c a_verify.c x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c x_name.c x_cinf.c x_x509.c x_crl.c x_info.c x_spki.c d2i_r_pr.c i2d_r_pr.c d2i_r_pu.c i2d_r_pu.c d2i_s_pr.c i2d_s_pr.c d2i_s_pu.c i2d_s_pu.c d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c t_req.c t_x509.c t_pkey.c p7_i_s.c p7_signi.c p7_signd.c p7_recip.c p7_enc_c.c p7_evp.c p7_dgst.c p7_s_e.c p7_enc.c p7_lib.c f_int.c f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c d2i_dsap.c n_pkey.c a_hdr.c x_pkey.c a_bool.c x_exten.c asn1_par.c asn1_lib.c asn1_err.c a_meth.c a_bytes.c evp_asn1.c | ||
| 722 | TEST= | ||
| 723 | TOP=../.. | ||
| 724 | RELATIVE_DIRECTORY= | ||
| 725 | RELATIVE_DIRECTORY=crypto/x509 | ||
| 726 | ALL=Makefile README x509_def.c x509_d2.c x509_r2x.c x509_cmp.c x509_obj.c x509_req.c x509_vfy.c x509_set.c x509rset.c x509_err.c x509name.c x509_v3.c x509_ext.c x509pack.c x509type.c x509_lu.c x_all.c x509_txt.c by_file.c by_dir.c v3_net.c v3_x509.c x509.h x509_vfy.h | ||
| 727 | APPS= | ||
| 728 | AR=ar r | ||
| 729 | CC=cc | ||
| 730 | CFLAG=-g | ||
| 731 | CFLAGS=-I.. -I../../include -g | ||
| 732 | DIR=x509 | ||
| 733 | ERR=x509 | ||
| 734 | ERRC=x509_err | ||
| 735 | EXHEADER=x509.h x509_vfy.h | ||
| 736 | GENERAL=Makefile README | ||
| 737 | HEADER=x509.h x509_vfy.h | ||
| 738 | INCLUDES=-I.. -I../../include | ||
| 739 | INSTALLTOP=/usr/local/ssl | ||
| 740 | LIB=../../libcrypto.a | ||
| 741 | LIBOBJ=x509_def.o x509_d2.o x509_r2x.o x509_cmp.o x509_obj.o x509_req.o x509_vfy.o x509_set.o x509rset.o x509_err.o x509name.o x509_v3.o x509_ext.o x509pack.o x509type.o x509_lu.o x_all.o x509_txt.o by_file.o by_dir.o v3_net.o v3_x509.o | ||
| 742 | LIBSRC=x509_def.c x509_d2.c x509_r2x.c x509_cmp.c x509_obj.c x509_req.c x509_vfy.c x509_set.c x509rset.c x509_err.c x509name.c x509_v3.c x509_ext.c x509pack.c x509type.c x509_lu.c x_all.c x509_txt.c by_file.c by_dir.c v3_net.c v3_x509.c | ||
| 743 | MAKE=make -f Makefile.ssl | ||
| 744 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 745 | MAKEFILE=Makefile.ssl | ||
| 746 | SRC=x509_def.c x509_d2.c x509_r2x.c x509_cmp.c x509_obj.c x509_req.c x509_vfy.c x509_set.c x509rset.c x509_err.c x509name.c x509_v3.c x509_ext.c x509pack.c x509type.c x509_lu.c x_all.c x509_txt.c by_file.c by_dir.c v3_net.c v3_x509.c | ||
| 747 | TEST= | ||
| 748 | TOP=../.. | ||
| 749 | RELATIVE_DIRECTORY= | ||
| 750 | RELATIVE_DIRECTORY=crypto/conf | ||
| 751 | ALL=Makefile conf.c conf_err.c conf_lcl.h conf.h | ||
| 752 | APPS= | ||
| 753 | AR=ar r | ||
| 754 | CC=cc | ||
| 755 | CFLAG=-g | ||
| 756 | CFLAGS=-I.. -I../../include -g | ||
| 757 | DIR=conf | ||
| 758 | ERR=conf | ||
| 759 | ERRC=conf_err | ||
| 760 | EXHEADER=conf.h | ||
| 761 | GENERAL=Makefile | ||
| 762 | HEADER=conf_lcl.h conf.h | ||
| 763 | INCLUDES=-I.. -I../../include | ||
| 764 | INSTALLTOP=/usr/local/ssl | ||
| 765 | LIB=../../libcrypto.a | ||
| 766 | LIBOBJ=conf.o conf_err.o | ||
| 767 | LIBSRC=conf.c conf_err.c | ||
| 768 | MAKE=make -f Makefile.ssl | ||
| 769 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 770 | MAKEFILE=Makefile.ssl | ||
| 771 | SRC=conf.c conf_err.c | ||
| 772 | TEST= | ||
| 773 | TOP=../.. | ||
| 774 | RELATIVE_DIRECTORY= | ||
| 775 | RELATIVE_DIRECTORY=crypto/txt_db | ||
| 776 | ALL=Makefile txt_db.c txt_db.h | ||
| 777 | APPS= | ||
| 778 | AR=ar r | ||
| 779 | CC=cc | ||
| 780 | CFLAG=-g | ||
| 781 | CFLAGS= -g | ||
| 782 | DIR=txt_db | ||
| 783 | EXHEADER=txt_db.h | ||
| 784 | GENERAL=Makefile | ||
| 785 | HEADER=txt_db.h | ||
| 786 | INCLUDES= | ||
| 787 | INSTALLTOP=/usr/local/ssl | ||
| 788 | LIB=../../libcrypto.a | ||
| 789 | LIBOBJ=txt_db.o | ||
| 790 | LIBSRC=txt_db.c | ||
| 791 | MAKE=make -f Makefile.ssl | ||
| 792 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 793 | MAKEFILE=Makefile.ssl | ||
| 794 | SRC=txt_db.c | ||
| 795 | TEST= | ||
| 796 | TOP=../.. | ||
| 797 | RELATIVE_DIRECTORY= | ||
| 798 | RELATIVE_DIRECTORY=crypto/pkcs7 | ||
| 799 | ALL=Makefile README pk7_lib.c pkcs7err.c pk7_doit.c pkcs7.h | ||
| 800 | APPS= | ||
| 801 | AR=ar r | ||
| 802 | CC=cc | ||
| 803 | CFLAG=-g | ||
| 804 | CFLAGS=-I.. -I../../include -g | ||
| 805 | DIR=pkcs7 | ||
| 806 | ERR=pkcs7 | ||
| 807 | ERRC=pkcs7err | ||
| 808 | EXHEADER=pkcs7.h | ||
| 809 | GENERAL=Makefile README | ||
| 810 | HEADER=pkcs7.h | ||
| 811 | INCLUDES=-I.. -I../../include | ||
| 812 | INSTALLTOP=/usr/local/ssl | ||
| 813 | LIB=../../libcrypto.a | ||
| 814 | LIBOBJ=pk7_lib.o pkcs7err.o pk7_doit.o | ||
| 815 | LIBSRC=pk7_lib.c pkcs7err.c pk7_doit.c | ||
| 816 | MAKE=make -f Makefile.ssl | ||
| 817 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 818 | MAKEFILE=Makefile.ssl | ||
| 819 | SRC=pk7_lib.c pkcs7err.c pk7_doit.c | ||
| 820 | TEST= | ||
| 821 | TOP=../.. | ||
| 822 | RELATIVE_DIRECTORY= | ||
| 823 | RELATIVE_DIRECTORY=ssl | ||
| 824 | ALL=Makefile README s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c ssl_lib.c ssl_err2.c ssl_cert.c ssl_sess.c ssl_ciph.c ssl_stat.c ssl_rsa.c ssl_asn1.c ssl_txt.c ssl_algs.c bio_ssl.c ssl_err.c ssl.h ssl2.h ssl3.h ssl23.h tls1.h ssl_locl.h | ||
| 825 | APPS= | ||
| 826 | AR=ar r | ||
| 827 | CC=cc | ||
| 828 | CFLAG=-g | ||
| 829 | CFLAGS=-I../crypto -I../include -g | ||
| 830 | DIR=ssl | ||
| 831 | ERR=ssl | ||
| 832 | ERRC=ssl_err | ||
| 833 | EXHEADER=ssl.h ssl2.h ssl3.h ssl23.h tls1.h | ||
| 834 | GENERAL=Makefile README | ||
| 835 | HEADER=ssl.h ssl2.h ssl3.h ssl23.h tls1.h ssl_locl.h | ||
| 836 | INCLUDES=-I../crypto -I../include | ||
| 837 | INSTALLTOP=/usr/local/ssl | ||
| 838 | LIB=../libssl.a | ||
| 839 | LIBOBJ=s2_meth.o s2_srvr.o s2_clnt.o s2_lib.o s2_enc.o s2_pkt.o s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o s3_pkt.o s3_both.o s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o s23_pkt.o t1_meth.o t1_srvr.o t1_clnt.o t1_lib.o t1_enc.o ssl_lib.o ssl_err2.o ssl_cert.o ssl_sess.o ssl_ciph.o ssl_stat.o ssl_rsa.o ssl_asn1.o ssl_txt.o ssl_algs.o bio_ssl.o ssl_err.o | ||
| 840 | LIBSRC=s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c ssl_lib.c ssl_err2.c ssl_cert.c ssl_sess.c ssl_ciph.c ssl_stat.c ssl_rsa.c ssl_asn1.c ssl_txt.c ssl_algs.c bio_ssl.c ssl_err.c | ||
| 841 | MAKE=make -f Makefile.ssl | ||
| 842 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 843 | MAKEFILE=Makefile.ssl | ||
| 844 | SRC=s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c ssl_lib.c ssl_err2.c ssl_cert.c ssl_sess.c ssl_ciph.c ssl_stat.c ssl_rsa.c ssl_asn1.c ssl_txt.c ssl_algs.c bio_ssl.c ssl_err.c | ||
| 845 | TEST=ssltest.c | ||
| 846 | TOP=.. | ||
| 847 | RELATIVE_DIRECTORY= | ||
| 848 | RELATIVE_DIRECTORY=rsaref | ||
| 849 | ALL=Makefile rsaref.c rsar_err.c rsaref.h | ||
| 850 | APPS= | ||
| 851 | AR=ar r | ||
| 852 | CC=cc | ||
| 853 | CFLAG=-g | ||
| 854 | CFLAGS=-I../crypto -I../include -g | ||
| 855 | DIR=rsaref | ||
| 856 | ERR=rsaref | ||
| 857 | ERRC=rsar_err | ||
| 858 | EXHEADER= | ||
| 859 | GENERAL=Makefile | ||
| 860 | HEADER= rsaref.h | ||
| 861 | INCLUDES=-I../crypto -I../include | ||
| 862 | INSTALLTOP=/usr/local/ssl | ||
| 863 | LIB=../libRSAglue.a | ||
| 864 | LIBOBJ=rsaref.o rsar_err.o | ||
| 865 | LIBSRC=rsaref.c rsar_err.c | ||
| 866 | MAKE=make -f Makefile.ssl | ||
| 867 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 868 | MAKEFILE=Makefile.ssl | ||
| 869 | SRC=rsaref.c rsar_err.c | ||
| 870 | TEST= | ||
| 871 | TOP=.. | ||
| 872 | RELATIVE_DIRECTORY= | ||
| 873 | RELATIVE_DIRECTORY=apps | ||
| 874 | ALL=Makefile verify.c asn1pars.c req.c dgst.c dh.c enc.c gendh.c errstr.c ca.c pkcs7.c crl2p7.c crl.c rsa.c dsa.c dsaparam.c x509.c genrsa.c s_server.c s_client.c speed.c s_time.c apps.c s_cb.c s_socket.c version.c sess_id.c ciphers.c apps.h progs.h s_apps.h testdsa.h testrsa.h | ||
| 875 | A_OBJ=apps.o | ||
| 876 | A_SRC=apps.c | ||
| 877 | CC=cc | ||
| 878 | CFLAG=-g -static | ||
| 879 | CFLAGS=-DMONOLITH -I../include -g -static | ||
| 880 | DIR=apps | ||
| 881 | DLIBCRYPTO=../libcrypto.a | ||
| 882 | DLIBSSL=../libssl.a | ||
| 883 | EXE=ssleay | ||
| 884 | EXHEADER= | ||
| 885 | EX_LIBS= | ||
| 886 | E_EXE=verify asn1pars req dgst dh enc gendh errstr ca crl rsa dsa dsaparam x509 genrsa s_server s_client speed s_time version pkcs7 crl2pkcs7 sess_id ciphers | ||
| 887 | E_OBJ=verify.o asn1pars.o req.o dgst.o dh.o enc.o gendh.o errstr.o ca.o pkcs7.o crl2p7.o crl.o rsa.o dsa.o dsaparam.o x509.o genrsa.o s_server.o s_client.o speed.o s_time.o apps.o s_cb.o s_socket.o version.o sess_id.o ciphers.o | ||
| 888 | E_SRC=verify.c asn1pars.c req.c dgst.c dh.c enc.c gendh.c errstr.c ca.c pkcs7.c crl2p7.c crl.c rsa.c dsa.c dsaparam.c x509.c genrsa.c s_server.c s_client.c speed.c s_time.c apps.c s_cb.c s_socket.c version.c sess_id.c ciphers.c | ||
| 889 | GENERAL=Makefile | ||
| 890 | HEADER=apps.h progs.h s_apps.h testdsa.h testrsa.h | ||
| 891 | INCLUDES=-I../include | ||
| 892 | INSTALLTOP=/usr/local/ssl | ||
| 893 | LIBCRYPTO=-L.. -lcrypto | ||
| 894 | LIBSSL=-L.. -lssl | ||
| 895 | MAKE=make -f Makefile.ssl | ||
| 896 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 897 | MAKEFILE=Makefile.ssl | ||
| 898 | PEX_LIBS= | ||
| 899 | PROGS=ssleay.c | ||
| 900 | RM=/bin/rm -f | ||
| 901 | SCRIPTS=CA.sh der_chop | ||
| 902 | SRC=verify.c asn1pars.c req.c dgst.c dh.c enc.c gendh.c errstr.c ca.c pkcs7.c crl2p7.c crl.c rsa.c dsa.c dsaparam.c x509.c genrsa.c s_server.c s_client.c speed.c s_time.c apps.c s_cb.c s_socket.c version.c sess_id.c ciphers.c | ||
| 903 | SSLEAY=ssleay | ||
| 904 | S_OBJ=s_cb.o s_socket.o | ||
| 905 | S_SRC=s_cb.c s_socket.c | ||
| 906 | TOP=.. | ||
| 907 | RELATIVE_DIRECTORY= | ||
| 908 | RELATIVE_DIRECTORY=test | ||
| 909 | ALL=Makefile.ssl bntest.c ideatest.c md2test.c md5test.c hmactest.c rc2test.c rc4test.c rc5test.c destest.c shatest.c sha1test.c mdc2test.c rmdtest.c randtest.c dhtest.c casttest.c bftest.c ssltest.c dsatest.c exptest.c | ||
| 910 | BFTEST=bftest | ||
| 911 | BNTEST=bntest | ||
| 912 | CASTTEST=casttest | ||
| 913 | CC=cc | ||
| 914 | CFLAG=-g | ||
| 915 | CFLAGS=-I../include -g | ||
| 916 | DESTEST=destest | ||
| 917 | DHTEST=dhtest | ||
| 918 | DIR=test | ||
| 919 | DLIBCRYPTO=../libcrypto.a | ||
| 920 | DLIBSSL=../libssl.a | ||
| 921 | DSATEST=dsatest | ||
| 922 | EXE=bntest ideatest md2test md5test hmactest rc2test rc4test rc5test destest shatest sha1test mdc2test rmdtest randtest dhtest bftest casttest ssltest exptest dsatest | ||
| 923 | EXHEADER= | ||
| 924 | EXPTEST=exptest | ||
| 925 | EX_LIBS= | ||
| 926 | GENERAL=Makefile.ssl | ||
| 927 | HEADER= | ||
| 928 | HMACTEST=hmactest | ||
| 929 | IDEATEST=ideatest | ||
| 930 | INCLUDES=-I../include | ||
| 931 | INSTALLTOP=/usr/local/ssl | ||
| 932 | LIBCRYPTO=-L.. -lcrypto | ||
| 933 | LIBSSL=-L.. -lssl | ||
| 934 | MAKE=make -f Makefile.ssl | ||
| 935 | MAKEDEPEND=makedepend -fMakefile.ssl | ||
| 936 | MAKEFILE=Makefile.ssl | ||
| 937 | MD2TEST=md2test | ||
| 938 | MD5TEST=md5test | ||
| 939 | MDC2TEST=mdc2test | ||
| 940 | METHTEST=methtest | ||
| 941 | OBJ=bntest.o ideatest.o md2test.o md5test.o hmactest.o rc2test.o rc4test.o rc5test.o destest.o shatest.o sha1test.o mdc2test.o rmdtest.o randtest.o dhtest.o casttest.o bftest.o ssltest.o dsatest.o exptest.o | ||
| 942 | PEX_LIBS= | ||
| 943 | RANDTEST=randtest | ||
| 944 | RC2TEST=rc2test | ||
| 945 | RC4TEST=rc4test | ||
| 946 | RC5TEST=rc5test | ||
| 947 | RMDTEST=rmdtest | ||
| 948 | SHA1TEST=sha1test | ||
| 949 | SHATEST=shatest | ||
| 950 | SRC=bntest.c ideatest.c md2test.c md5test.c hmactest.c rc2test.c rc4test.c rc5test.c destest.c shatest.c sha1test.c mdc2test.c rmdtest.c randtest.c dhtest.c casttest.c bftest.c ssltest.c dsatest.c exptest.c | ||
| 951 | SSLTEST=ssltest | ||
| 952 | TOP=.. | ||
| 953 | RELATIVE_DIRECTORY= | ||
| 954 | RELATIVE_DIRECTORY=tools | ||
| 955 | APPS=c_hash c_info c_issuer c_name c_rehash | ||
| 956 | CC=cc | ||
| 957 | CFLAG=-g | ||
| 958 | CFLAGS=-I.. -I../../include -g | ||
| 959 | DIR=tools | ||
| 960 | GENERAL=Makefile.ssl | ||
| 961 | INCLUDES=-I.. -I../../include | ||
| 962 | INSTALLTOP=/usr/local/ssl | ||
| 963 | MAKE=make -f Makefile.ssl | ||
| 964 | MAKEDEPEND=makedepend -f Makefile.ssl | ||
| 965 | MAKEFILE=Makefile.ssl | ||
| 966 | TEST= | ||
| 967 | TOP=.. | ||
| 968 | RELATIVE_DIRECTORY= | ||
diff --git a/src/lib/libssl/src/Makefile.ssl b/src/lib/libssl/src/Makefile.ssl new file mode 100644 index 0000000000..da7f885985 --- /dev/null +++ b/src/lib/libssl/src/Makefile.ssl | |||
| @@ -0,0 +1,331 @@ | |||
| 1 | # | ||
| 2 | # Makefile for all the SSL related library routines and utilities | ||
| 3 | VERSION = 0.9.0a | ||
| 4 | # | ||
| 5 | # make install will install: | ||
| 6 | # libraries into $INSTALLTOP/lib | ||
| 7 | # headers into $INSTALLTOP/include | ||
| 8 | # utilities into $INSTALLTOP/bin | ||
| 9 | # | ||
| 10 | # By default INSTALLTOP is set to /usr/local/ssl | ||
| 11 | # If you want things install elsewere, consider running | ||
| 12 | # perl util/ssldir.pl /new/path | ||
| 13 | # | ||
| 14 | # Interesting Mailing Lists: | ||
| 15 | # ssl-bugs@mincom.oz.au | ||
| 16 | # ssl-users@mincom.oz.au | ||
| 17 | # | ||
| 18 | # To join the Mailing Lists: | ||
| 19 | # ssl-bugs-request@mincom.oz.au | ||
| 20 | # ssl-users-request@mincom.oz.au | ||
| 21 | # | ||
| 22 | # If you must get hold of people directly (we much prefer the above | ||
| 23 | # lists to be used if the question is of general interest!): | ||
| 24 | # Eric Young <eay@cryptsoft.com> | ||
| 25 | # Tim Hudson <tjh@cryptsoft.com> | ||
| 26 | # or both <ssleay@cryptsoft.com> | ||
| 27 | # | ||
| 28 | # The primary distribution of SSLeay is from | ||
| 29 | # ftp://ftp.psy.uq.oz.au/pub/Crypto/SSL | ||
| 30 | # | ||
| 31 | # NOCONST - Define for C compilers that don't like the const key word. | ||
| 32 | # NOPROTO - Define in if your compiler does not support prototypes. | ||
| 33 | # RSAref - Define if we are to link with RSAref. | ||
| 34 | # NO_IDEA - Define to build without the IDEA algorithm | ||
| 35 | # NO_RC4 - Define to build without the RC4 algorithm | ||
| 36 | # NO_RC2 - Define to build without the RC2 algorithm | ||
| 37 | # THREADS - Define when building with threads, you will probably also need any | ||
| 38 | # system defines as well, i.e. _REENTERANT for Solaris 2.[34] | ||
| 39 | # TERMIO - Define the termio terminal subsystem, needed if sgtty is missing. | ||
| 40 | # TERMIOS - Define the termios terminal subsystem, Silicon Graphics. | ||
| 41 | # LONGCRYPT - Define to use HPUX 10.x's long password modification to crypt(3). | ||
| 42 | # DEVRANDOM - Give this the value of the 'random device' if your OS supports | ||
| 43 | # one. 32 bytes will be read from this when the random | ||
| 44 | # number generator is initalised. | ||
| 45 | # SSL_ALLOW_ADH - define if you want the server to be able to use the | ||
| 46 | # SSLv3 anon-DH ciphers. | ||
| 47 | # SSL_ALLOW_ENULL - define if you want the server to be able to use the | ||
| 48 | # NULL encryption ciphers. | ||
| 49 | # | ||
| 50 | # LOCK_DEBUG - turns on lots of lock debug output :-) | ||
| 51 | # REF_CHECK - turn on some xyz_free() assertions. | ||
| 52 | # REF_PRINT - prints some stuff on structure free. | ||
| 53 | # CRYPTO_MDEBUG - turns on my 'memory leak' detecting stuff | ||
| 54 | # MFUNC - Make all Malloc/Free/Realloc calls call | ||
| 55 | # CRYPTO_malloc/CRYPTO_free/CRYPTO_realloc which can be setup to | ||
| 56 | # call application defined callbacks via CRYPTO_set_mem_functions() | ||
| 57 | # MD5_ASM needs to be defined to use the x86 assembler for MD5 | ||
| 58 | # SHA1_ASM needs to be defined to use the x86 assembler for SHA1 | ||
| 59 | # RMD160_ASM needs to be defined to use the x86 assembler for RIPEMD160 | ||
| 60 | |||
| 61 | |||
| 62 | CC= gcc | ||
| 63 | #CFLAG= -DL_ENDIAN -DTERMIO -O3 -fomit-frame-pointer -m486 -Wall -Wuninitialized -DMD5_ASM -DSHA1_ASM -DRMD160_ASM | ||
| 64 | CFLAG= -DNO_IDEA -DTERMIOS -DBN_ASM -DL_ENDIAN -D_ANSI_SOURCE -fomit-frame-pointer -O3 -m486 -Wall -DSHA1_ASM -DMD5_ASM -DRMD160_ASM | ||
| 65 | PEX_LIBS= -L. -L.. -L../.. -L../../.. | ||
| 66 | EX_LIBS= | ||
| 67 | AR=ar r | ||
| 68 | |||
| 69 | # Set BN_MULW to bn_mulw.o if you want to use the C version | ||
| 70 | BN_MULW= asm/bn86-out.o | ||
| 71 | #BN_MULW= bn_mulw.o | ||
| 72 | #BN_MULW= asm/bn86-elf.o # elf, linux-elf | ||
| 73 | #BN_MULW= asm/bn86-sol.o # solaris | ||
| 74 | #BN_MULW= asm/bn86-out.o # a.out, FreeBSD | ||
| 75 | #BN_MULW= asm/bn86bsdi.o # bsdi | ||
| 76 | #BN_MULW= asm/alpha.o # DEC Alpha | ||
| 77 | #BN_MULW= asm/pa-risc2.o # HP-UX PA-RISC | ||
| 78 | #BN_MULW= asm/r3000.o # SGI MIPS cpu | ||
| 79 | #BN_MULW= asm/sparc.o # Sun solaris/SunOS | ||
| 80 | #BN_MULW= asm/bn-win32.o # Windows 95/NT | ||
| 81 | #BN_MULW= asm/x86w16.o # 16 bit code for Windows 3.1/DOS | ||
| 82 | #BN_MULW= asm/x86w32.o # 32 bit code for Windows 3.1 | ||
| 83 | |||
| 84 | # Set DES_ENC to des_enc.o if you want to use the C version | ||
| 85 | #There are 4 x86 assember options. | ||
| 86 | DES_ENC= asm/dx86-out.o asm/yx86-out.o | ||
| 87 | #DES_ENC= des_enc.o fcrypt_b.o # C | ||
| 88 | #DES_ENC= asm/dx86-elf.o asm/yx86-elf.o # elf | ||
| 89 | #DES_ENC= asm/dx86-sol.o asm/yx86-sol.o # solaris | ||
| 90 | #DES_ENC= asm/dx86-out.o asm/yx86-out.o # a.out, FreeBSD | ||
| 91 | #DES_ENC= asm/dx86bsdi.o asm/yx86bsdi.o # bsdi | ||
| 92 | |||
| 93 | # Set BF_ENC to bf_enc.o if you want to use the C version | ||
| 94 | #There are 4 x86 assember options. | ||
| 95 | BF_ENC= asm/bx86-out.o | ||
| 96 | #BF_ENC= bf_enc.o | ||
| 97 | #BF_ENC= asm/bx86-elf.o # elf | ||
| 98 | #BF_ENC= asm/bx86-sol.o # solaris | ||
| 99 | #BF_ENC= asm/bx86-out.o # a.out, FreeBSD | ||
| 100 | #BF_ENC= asm/bx86bsdi.o # bsdi | ||
| 101 | |||
| 102 | # Set CAST_ENC to c_enc.o if you want to use the C version | ||
| 103 | #There are 4 x86 assember options. | ||
| 104 | CAST_ENC= asm/cx86-out.o | ||
| 105 | #CAST_ENC= c_enc.o | ||
| 106 | #CAST_ENC= asm/cx86-elf.o # elf | ||
| 107 | #CAST_ENC= asm/cx86-sol.o # solaris | ||
| 108 | #CAST_ENC= asm/cx86-out.o # a.out, FreeBSD | ||
| 109 | #CAST_ENC= asm/cx86bsdi.o # bsdi | ||
| 110 | |||
| 111 | # Set RC4_ENC to rc4_enc.o if you want to use the C version | ||
| 112 | #There are 4 x86 assember options. | ||
| 113 | RC4_ENC= asm/rx86-out.o | ||
| 114 | #RC4_ENC= rc4_enc.o | ||
| 115 | #RC4_ENC= asm/rx86-elf.o # elf | ||
| 116 | #RC4_ENC= asm/rx86-sol.o # solaris | ||
| 117 | #RC4_ENC= asm/rx86-out.o # a.out, FreeBSD | ||
| 118 | #RC4_ENC= asm/rx86bsdi.o # bsdi | ||
| 119 | |||
| 120 | # Set RC5_ENC to rc5_enc.o if you want to use the C version | ||
| 121 | #There are 4 x86 assember options. | ||
| 122 | RC5_ENC= asm/r586-out.o | ||
| 123 | #RC5_ENC= rc5_enc.o | ||
| 124 | #RC5_ENC= asm/r586-elf.o # elf | ||
| 125 | #RC5_ENC= asm/r586-sol.o # solaris | ||
| 126 | #RC5_ENC= asm/r586-out.o # a.out, FreeBSD | ||
| 127 | #RC5_ENC= asm/r586bsdi.o # bsdi | ||
| 128 | |||
| 129 | # Also need MD5_ASM defined | ||
| 130 | MD5_ASM_OBJ= asm/mx86-out.o | ||
| 131 | #MD5_ASM_OBJ= asm/mx86-elf.o # elf | ||
| 132 | #MD5_ASM_OBJ= asm/mx86-sol.o # solaris | ||
| 133 | #MD5_ASM_OBJ= asm/mx86-out.o # a.out, FreeBSD | ||
| 134 | #MD5_ASM_OBJ= asm/mx86bsdi.o # bsdi | ||
| 135 | |||
| 136 | # Also need SHA1_ASM defined | ||
| 137 | SHA1_ASM_OBJ= asm/sx86-out.o | ||
| 138 | #SHA1_ASM_OBJ= asm/sx86-elf.o # elf | ||
| 139 | #SHA1_ASM_OBJ= asm/sx86-sol.o # solaris | ||
| 140 | #SHA1_ASM_OBJ= asm/sx86-out.o # a.out, FreeBSD | ||
| 141 | #SHA1_ASM_OBJ= asm/sx86bsdi.o # bsdi | ||
| 142 | |||
| 143 | # Also need RMD160_ASM defined | ||
| 144 | RMD160_ASM_OBJ= asm/rm86-out.o | ||
| 145 | #RMD160_ASM_OBJ= asm/rm86-elf.o # elf | ||
| 146 | #RMD160_ASM_OBJ= asm/rm86-sol.o # solaris | ||
| 147 | #RMD160_ASM_OBJ= asm/rm86-out.o # a.out, FreeBSD | ||
| 148 | #RMD160_ASM_OBJ= asm/rm86bsdi.o # bsdi | ||
| 149 | |||
| 150 | DIRS= crypto ssl rsaref apps test tools | ||
| 151 | # dirs in crypto to build | ||
| 152 | SDIRS= \ | ||
| 153 | md2 md5 sha mdc2 hmac ripemd \ | ||
| 154 | des rc2 rc4 rc5 idea bf cast \ | ||
| 155 | bn rsa dsa dh \ | ||
| 156 | buffer bio stack lhash rand err objects \ | ||
| 157 | evp pem asn1 x509 conf txt_db pkcs7 | ||
| 158 | |||
| 159 | # If you change the INSTALLTOP, make sure to also change the values | ||
| 160 | # in crypto/location.h | ||
| 161 | INSTALLTOP=/usr/ssl | ||
| 162 | |||
| 163 | MAKEFILE= Makefile.ssl | ||
| 164 | MAKE= make -f Makefile.ssl | ||
| 165 | |||
| 166 | MAN1=1 | ||
| 167 | MAN3=3 | ||
| 168 | SHELL=/bin/sh | ||
| 169 | |||
| 170 | TOP= . | ||
| 171 | ONEDIRS=out tmp | ||
| 172 | EDIRS= times doc bugs util include certs ms shlib mt demos perl dep | ||
| 173 | MISC= COPYRIGHT Configure HISTORY.066 INSTALL Makefile.ssl Makefile \ | ||
| 174 | README TODO HISTORY README.066 README.080 README.090 \ | ||
| 175 | VERSION PROBLEMS MINFO makefile.one e_os.h \ | ||
| 176 | MICROSOFT makevms.com config PATENTS | ||
| 177 | WDIRS= windows | ||
| 178 | LIBS= libcrypto.a libssl.a | ||
| 179 | |||
| 180 | GENERAL= Makefile | ||
| 181 | BASENAME= SSLeay | ||
| 182 | NAME= $(BASENAME)-$(VERSION) | ||
| 183 | TARFILE= $(NAME).tar | ||
| 184 | WTARFILE= $(NAME)-win.tar | ||
| 185 | EXHEADER= e_os.h | ||
| 186 | HEADER= e_os.h | ||
| 187 | |||
| 188 | all: | ||
| 189 | @for i in $(DIRS) ;\ | ||
| 190 | do \ | ||
| 191 | (cd $$i; echo "making $$i..."; \ | ||
| 192 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' SDIRS='${SDIRS}' AR='${AR}' all ); \ | ||
| 193 | done; | ||
| 194 | |||
| 195 | sub_all: | ||
| 196 | @for i in $(DIRS) ;\ | ||
| 197 | do \ | ||
| 198 | (cd $$i; echo "making $$i..."; \ | ||
| 199 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' SDIRS='$(SDIRS)' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' all ); \ | ||
| 200 | done; | ||
| 201 | |||
| 202 | clean: | ||
| 203 | /bin/rm -f shlib/*.o *.o core a.out fluff *.map | ||
| 204 | @for i in $(DIRS) ;\ | ||
| 205 | do \ | ||
| 206 | (cd $$i; echo "cleaning $$i..."; \ | ||
| 207 | $(MAKE) SDIRS='${SDIRS}' clean ); \ | ||
| 208 | /bin/rm -f $(LIBS); \ | ||
| 209 | done; | ||
| 210 | /bin/rm -f *.a *.o speed.* *.map *.so .pure core | ||
| 211 | /bin/rm -f $(TARFILE) | ||
| 212 | @for i in $(ONEDIRS) ;\ | ||
| 213 | do \ | ||
| 214 | /bin/rm -fr $$i/*; \ | ||
| 215 | done | ||
| 216 | |||
| 217 | makefile.one: files | ||
| 218 | perl util/mk1mf.pl >makefile.one; \ | ||
| 219 | sh util/do_ms.sh | ||
| 220 | |||
| 221 | files: MINFO | ||
| 222 | perl $(TOP)/util/files.pl Makefile.ssl > $(TOP)/MINFO | ||
| 223 | @for i in $(DIRS) ;\ | ||
| 224 | do \ | ||
| 225 | (cd $$i; echo "making 'files' in $$i..."; \ | ||
| 226 | $(MAKE) SDIRS='${SDIRS}' files ); \ | ||
| 227 | done; | ||
| 228 | |||
| 229 | links: | ||
| 230 | /bin/rm -f Makefile; | ||
| 231 | ./util/point.sh Makefile.ssl Makefile; | ||
| 232 | $(TOP)/util/mklink.sh include $(EXHEADER) ; | ||
| 233 | @for i in $(DIRS) ;\ | ||
| 234 | do \ | ||
| 235 | (cd $$i; echo "making links in $$i..."; \ | ||
| 236 | $(MAKE) SDIRS='${SDIRS}' links ); \ | ||
| 237 | done; | ||
| 238 | # @(cd apps; sh ./mklinks) | ||
| 239 | @( SSLEAY="`pwd`/apps/ssleay"; export SSLEAY; sh tools/c_rehash certs ) | ||
| 240 | |||
| 241 | dclean: | ||
| 242 | /bin/rm -f *.bak | ||
| 243 | @for i in $(DIRS) ;\ | ||
| 244 | do \ | ||
| 245 | (cd $$i; echo "undoing makedepend in $$i..."; \ | ||
| 246 | $(MAKE) SDIRS='${SDIRS}' dclean ); \ | ||
| 247 | done; | ||
| 248 | |||
| 249 | rehash: | ||
| 250 | @(PATH="`pwd`/apps:${PATH}"; sh tools/c_rehash certs) | ||
| 251 | |||
| 252 | test: tests | ||
| 253 | |||
| 254 | tests: | ||
| 255 | (cd test; echo "testing $$i..."; \ | ||
| 256 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' SDIRS='${SDIRS}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' AR='${AR}' tests ); | ||
| 257 | @apps/ssleay version -a | ||
| 258 | |||
| 259 | depend: | ||
| 260 | @for i in $(DIRS) ;\ | ||
| 261 | do \ | ||
| 262 | (cd $$i; echo "making dependancies $$i..."; \ | ||
| 263 | $(MAKE) SDIRS='${SDIRS}' depend ); \ | ||
| 264 | done; | ||
| 265 | |||
| 266 | lint: | ||
| 267 | @for i in $(DIRS) ;\ | ||
| 268 | do \ | ||
| 269 | (cd $$i; echo "making lint $$i..."; \ | ||
| 270 | $(MAKE) SDIRS='${SDIRS}' lint ); \ | ||
| 271 | done; | ||
| 272 | |||
| 273 | tags: | ||
| 274 | @for i in $(DIRS) ;\ | ||
| 275 | do \ | ||
| 276 | (cd $$i; echo "making tags $$i..."; \ | ||
| 277 | $(MAKE) SDIRS='${SDIRS}' tags ); \ | ||
| 278 | done; | ||
| 279 | |||
| 280 | errors: | ||
| 281 | @for i in $(DIRS) ;\ | ||
| 282 | do \ | ||
| 283 | (cd $$i; echo "making errors in $$i..."; \ | ||
| 284 | $(MAKE) SDIRS='${SDIRS}' errors ); \ | ||
| 285 | done; | ||
| 286 | |||
| 287 | tar: | ||
| 288 | @(cd ..;\ | ||
| 289 | mv $(BASENAME) $(NAME); \ | ||
| 290 | export STUFF; \ | ||
| 291 | for i in $(MISC) $(DIRS) $(EDIRS) $(ONEDIRS) ;\ | ||
| 292 | do \ | ||
| 293 | STUFF="$$STUFF $(NAME)/$$i"; \ | ||
| 294 | done; \ | ||
| 295 | tar cf $(NAME)/$(TARFILE) $$STUFF; \ | ||
| 296 | mv $(NAME) $(BASENAME) ) | ||
| 297 | gzip -f $(TARFILE) | ||
| 298 | |||
| 299 | dist: | ||
| 300 | perl Configure dist | ||
| 301 | perl util/up_ver.pl ${VERSION} | ||
| 302 | @$(MAKE) dist_pem_h | ||
| 303 | @$(MAKE) SDIRS='${SDIRS}' clean | ||
| 304 | @$(MAKE) SDIRS='${SDIRS}' dclean | ||
| 305 | @(cd apps; sh ./rmlinks) | ||
| 306 | @$(MAKE) makefile.one | ||
| 307 | @$(MAKE) tar | ||
| 308 | |||
| 309 | dist_pem_h: | ||
| 310 | (cd crypto/pem; $(MAKE) SDIRS='${SDIRS}' CFLAG='${CFLAG}' pem.h; $(MAKE) clean) | ||
| 311 | |||
| 312 | install: all | ||
| 313 | @-mkdir -p $(INSTALLTOP)/bin 2>/dev/null | ||
| 314 | @-mkdir -p $(INSTALLTOP)/lib 2>/dev/null | ||
| 315 | @-mkdir -p $(INSTALLTOP)/include 2>/dev/null | ||
| 316 | @-mkdir -p $(INSTALLTOP)/certs 2>/dev/null | ||
| 317 | @-mkdir -p $(INSTALLTOP)/private 2>/dev/null | ||
| 318 | @for i in $(DIRS) ;\ | ||
| 319 | do \ | ||
| 320 | (cd $$i; echo "installing $$i..."; \ | ||
| 321 | $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' EX_LIBS='${EX_LIBS}' SDIRS='${SDIRS}' install ); \ | ||
| 322 | done | ||
| 323 | @for i in $(LIBS) ;\ | ||
| 324 | do \ | ||
| 325 | ( echo installing $$i; \ | ||
| 326 | cp $$i $(INSTALLTOP)/lib; \ | ||
| 327 | sh util/ranlib.sh $(INSTALLTOP)/lib/$$i; \ | ||
| 328 | chmod 644 $(INSTALLTOP)/lib/$$i ); \ | ||
| 329 | done | ||
| 330 | |||
| 331 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/PATENTS b/src/lib/libssl/src/PATENTS new file mode 100644 index 0000000000..61423d03c8 --- /dev/null +++ b/src/lib/libssl/src/PATENTS | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | RSA Data Security holds software patents on the RSA and RC5 algorithms. | ||
| 2 | If there ciphers are used used inside the USA (and Japan?), you must contact | ||
| 3 | RSA Data Security for licencing conditions. | ||
| 4 | |||
| 5 | The IDEA algorithm is patented by XXXX and they should be contacted if that | ||
| 6 | algorithm is to be used. | ||
| 7 | |||
| 8 | RC4 is a trademark of RSA Data Security, so use of this label should perhaps | ||
| 9 | only me used with RSA Data Security's permission. | ||
diff --git a/src/lib/libssl/src/README.066 b/src/lib/libssl/src/README.066 new file mode 100644 index 0000000000..d8e086d0b4 --- /dev/null +++ b/src/lib/libssl/src/README.066 | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | |||
| 2 | SSLeay 0.6.6 13-Jan-1997 | ||
| 3 | |||
| 4 | The main additions are | ||
| 5 | |||
| 6 | - assember for x86 DES improvments. | ||
| 7 | From 191,000 per second on a pentium 100, I now get 281,000. The inner | ||
| 8 | loop and the IP/FP modifications are from | ||
| 9 | Svend Olaf Mikkelsen <svolaf@inet.uni-c.dk>. Many thanks for his | ||
| 10 | contribution. | ||
| 11 | - The 'DES macros' introduced in 0.6.5 now have 3 types. | ||
| 12 | DES_PTR1, DES_PTR2 and 'normal'. As per before, des_opts reports which | ||
| 13 | is best and there is a summery of mine in crypto/des/options.txt | ||
| 14 | - A few bug fixes. | ||
| 15 | - Added blowfish. It is not used by SSL but all the other stuff that | ||
| 16 | deals with ciphers can use it in either ecb, cbc, cfb64 or ofb64 modes. | ||
| 17 | There are 3 options for optimising Blowfish. BF_PTR, BF_PTR2 and 'normal'. | ||
| 18 | BF_PTR2 is pentium/x86 specific. The correct option is setup in | ||
| 19 | the 'Configure' script. | ||
| 20 | - There is now a 'get client certificate' callback which can be | ||
| 21 | 'non-blocking'. If more details are required, let me know. It will | ||
| 22 | documented more in SSLv3 when I finish it. | ||
| 23 | - Bug fixes from 0.6.5 including the infamous 'ca' bug. The 'make test' | ||
| 24 | now tests the ca program. | ||
| 25 | - Lots of little things modified and tweaked. | ||
| 26 | |||
| 27 | eric | ||
diff --git a/src/lib/libssl/src/README.080 b/src/lib/libssl/src/README.080 new file mode 100644 index 0000000000..155ce1c712 --- /dev/null +++ b/src/lib/libssl/src/README.080 | |||
| @@ -0,0 +1,147 @@ | |||
| 1 | This version of SSLeay has quite a lot of things different from the | ||
| 2 | previous version. | ||
| 3 | |||
| 4 | Basically check all callback parameters, I will be producing documentation | ||
| 5 | about how to use things in th future. Currently I'm just getting 080 out | ||
| 6 | the door. Please not that there are several ways to do everything, and | ||
| 7 | most of the applications in the apps directory are hybrids, some using old | ||
| 8 | methods and some using new methods. | ||
| 9 | |||
| 10 | Have a look in demos/bio for some very simple programs and | ||
| 11 | apps/s_client.c and apps/s_server.c for some more advanced versions. | ||
| 12 | Notes are definitly needed but they are a week or so away. | ||
| 13 | |||
| 14 | Anyway, some quick nots from Tim Hudson (tjh@cryptsoft.com) | ||
| 15 | --- | ||
| 16 | Quick porting notes for moving from SSLeay-0.6.x to SSLeay-0.8.x to | ||
| 17 | get those people that want to move to using the new code base off to | ||
| 18 | a quick start. | ||
| 19 | |||
| 20 | Note that Eric has tidied up a lot of the areas of the API that were | ||
| 21 | less than desirable and renamed quite a few things (as he had to break | ||
| 22 | the API in lots of places anyrate). There are a whole pile of additional | ||
| 23 | functions for making dealing with (and creating) certificates a lot | ||
| 24 | cleaner. | ||
| 25 | |||
| 26 | 01-Jul-97 | ||
| 27 | Tim Hudson | ||
| 28 | tjh@cryptsoft.com | ||
| 29 | |||
| 30 | ---8<--- | ||
| 31 | |||
| 32 | To maintain code that uses both SSLeay-0.6.x and SSLeay-0.8.x you could | ||
| 33 | use something like the following (assuming you #include "crypto.h" which | ||
| 34 | is something that you really should be doing). | ||
| 35 | |||
| 36 | #if SSLEAY_VERSION_NUMBER >= 0x0800 | ||
| 37 | #define SSLEAY8 | ||
| 38 | #endif | ||
| 39 | |||
| 40 | buffer.h -> splits into buffer.h and bio.h so you need to include bio.h | ||
| 41 | too if you are working with BIO internal stuff (as distinct | ||
| 42 | from simply using the interface in an opaque manner) | ||
| 43 | |||
| 44 | #include "bio.h" - required along with "buffer.h" if you write | ||
| 45 | your own BIO routines as the buffer and bio | ||
| 46 | stuff that was intermixed has been separated | ||
| 47 | out | ||
| 48 | |||
| 49 | envelope.h -> evp.h (which should have been done ages ago) | ||
| 50 | |||
| 51 | Initialisation ... don't forget these or you end up with code that | ||
| 52 | is missing the bits required to do useful things (like ciphers): | ||
| 53 | |||
| 54 | SSLeay_add_ssl_algorithms() | ||
| 55 | (probably also want SSL_load_error_strings() too but you should have | ||
| 56 | already had that call in place) | ||
| 57 | |||
| 58 | SSL_CTX_new() - requires an extra method parameter | ||
| 59 | SSL_CTX_new(SSLv23_method()) | ||
| 60 | SSL_CTX_new(SSLv2_method()) | ||
| 61 | SSL_CTX_new(SSLv3_method()) | ||
| 62 | |||
| 63 | OR to only have the server or the client code | ||
| 64 | SSL_CTX_new(SSLv23_server_method()) | ||
| 65 | SSL_CTX_new(SSLv2_server_method()) | ||
| 66 | SSL_CTX_new(SSLv3_server_method()) | ||
| 67 | or | ||
| 68 | SSL_CTX_new(SSLv23_client_method()) | ||
| 69 | SSL_CTX_new(SSLv2_client_method()) | ||
| 70 | SSL_CTX_new(SSLv3_client_method()) | ||
| 71 | |||
| 72 | SSL_set_default_verify_paths() ... renamed to the more appropriate | ||
| 73 | SSL_CTX_set_default_verify_paths() | ||
| 74 | |||
| 75 | If you want to use client certificates then you have to add in a bit | ||
| 76 | of extra stuff in that a SSLv3 server sends a list of those CAs that | ||
| 77 | it will accept certificates from ... so you have to provide a list to | ||
| 78 | SSLeay otherwise certain browsers will not send client certs. | ||
| 79 | |||
| 80 | SSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file(s_cert_file)); | ||
| 81 | |||
| 82 | |||
| 83 | X509_NAME_oneline(X) -> X509_NAME_oneline(X,NULL,0) | ||
| 84 | or provide a buffer and size to copy the | ||
| 85 | result into | ||
| 86 | |||
| 87 | X509_add_cert -> X509_STORE_add_cert (and you might want to read the | ||
| 88 | notes on X509_NAME structure changes too) | ||
| 89 | |||
| 90 | |||
| 91 | VERIFICATION CODE | ||
| 92 | ================= | ||
| 93 | |||
| 94 | The codes have all be renamed from VERIFY_ERR_* to X509_V_ERR_* to | ||
| 95 | more accurately reflect things. | ||
| 96 | |||
| 97 | The verification callback args are now packaged differently so that | ||
| 98 | extra fields for verification can be added easily in future without | ||
| 99 | having to break things by adding extra parameters each release :-) | ||
| 100 | |||
| 101 | X509_cert_verify_error_string -> X509_verify_cert_error_string | ||
| 102 | |||
| 103 | |||
| 104 | BIO INTERNALS | ||
| 105 | ============= | ||
| 106 | |||
| 107 | Eric has fixed things so that extra flags can be introduced in | ||
| 108 | the BIO layer in future without having to play with all the BIO | ||
| 109 | modules by adding in some macros. | ||
| 110 | |||
| 111 | The ugly stuff using | ||
| 112 | b->flags ~= (BIO_FLAGS_RW|BIO_FLAGS_SHOULD_RETRY) | ||
| 113 | becomes | ||
| 114 | BIO_clear_retry_flags(b) | ||
| 115 | |||
| 116 | b->flags |= (BIO_FLAGS_READ|BIO_FLAGS_SHOULD_RETRY) | ||
| 117 | becomes | ||
| 118 | BIO_set_retry_read(b) | ||
| 119 | |||
| 120 | Also ... BIO_get_retry_flags(b), BIO_set_flags(b) | ||
| 121 | |||
| 122 | |||
| 123 | |||
| 124 | OTHER THINGS | ||
| 125 | ============ | ||
| 126 | |||
| 127 | X509_NAME has been altered so that it isn't just a STACK ... the STACK | ||
| 128 | is now in the "entries" field ... and there are a pile of nice functions | ||
| 129 | for getting at the details in a much cleaner manner. | ||
| 130 | |||
| 131 | SSL_CTX has been altered ... "cert" is no longer a direct member of this | ||
| 132 | structure ... things are now down under "cert_store" (see x509_vfy.h) and | ||
| 133 | things are no longer in a CERTIFICATE_CTX but instead in a X509_STORE. | ||
| 134 | If your code "knows" about this level of detail then it will need some | ||
| 135 | surgery. | ||
| 136 | |||
| 137 | If you depending on the incorrect spelling of a number of the error codes | ||
| 138 | then you will have to change your code as these have been fixed. | ||
| 139 | |||
| 140 | ENV_CIPHER "type" got renamed to "nid" and as that is what it actually | ||
| 141 | has been all along so this makes things clearer. | ||
| 142 | ify_cert_error_string(ctx->error)); | ||
| 143 | |||
| 144 | SSL_R_NO_CIPHER_WE_TRUST -> SSL_R_NO_CIPHER_LIST | ||
| 145 | and SSL_R_REUSE_CIPHER_LIST_NOT_ZERO | ||
| 146 | |||
| 147 | |||
diff --git a/src/lib/libssl/src/README.090 b/src/lib/libssl/src/README.090 new file mode 100644 index 0000000000..634870d5f1 --- /dev/null +++ b/src/lib/libssl/src/README.090 | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | 10-Apr-1998 | ||
| 2 | I said the next version would go out at easter, and so it shall. | ||
| 3 | I expect a 0.9.1 will follow with portability fixes in the next few weeks. | ||
| 4 | |||
| 5 | This is a quick, meet the deadline. Look to ssl-users for comments on what | ||
| 6 | is new etc. | ||
| 7 | |||
| 8 | The state of play | ||
| 9 | - TLSv1 - I need to do some explaining about how the methods interact. | ||
| 10 | The bad news is that SSLeay 0.8.x application will not roll back to | ||
| 11 | SSLv3, I suffed up. 0.8.x is rather pedantic about the '3.0' version | ||
| 12 | number. Look at the 'no-tls' options in applications in the apps directory. | ||
| 13 | - The perl5 stuff is very rough. The SSL part does not work due to | ||
| 14 | reference count hassles in the BIO stuff. I just have not had time to | ||
| 15 | look at it. The cipher, digest and bignum stuff works though. I just | ||
| 16 | need to clean up the API. | ||
| 17 | - Lots of x86 assember. I now have it for des, 3des, rc4, rc5, blowfish, | ||
| 18 | cast, md5, sha1 and ripemd160. It has been tested on win32, linux (elf) | ||
| 19 | and FreeBSD (a.out). | ||
| 20 | - As mentioned above, cast, rc5 and ripemd160 have been added. | ||
| 21 | - A simple HMAC set of functions. | ||
| 22 | - EX_DATA strucutre, which can be used by applications or other libraries | ||
| 23 | to tack arbitarty data against strucutures that include it. | ||
| 24 | You will probably have to see examples to see how to use it, and I will | ||
| 25 | elaberate on the ssl-users mailing list | ||
| 26 | - RSA blinding. If you fear timing attacks on RSA, you can turn on | ||
| 27 | blinding which defeats it. | ||
| 28 | - From Tim Hudson, try running 'sh config' instead of 'perl Configure'. | ||
| 29 | I makes an educated guess as to what you are and then runs 'perl Configure' | ||
| 30 | - The error stuff has been modified so arbitary strings can be taged | ||
| 31 | against an error message. It is used in a few places to elaberate on | ||
| 32 | parameters that caused the error. | ||
| 33 | |||
| 34 | Areas of work | ||
| 35 | - The 16bit big-num assember needs a routine added. The WIN16 and | ||
| 36 | WIN32 stuff is ok, but MS-DOS or 286 builds need the update. | ||
| 37 | - Most of the bignum assember will not work. There will be a function | ||
| 38 | missing, bn_add_words(). I need people to send me the C compiler output | ||
| 39 | for platforms I don't already have. Currently, the assember is correct for | ||
| 40 | x86, win32, win16(386+), linux elf, FreeBSD a.out and sparc. | ||
| 41 | - PKCS7, I have delusions of s/MIME. I need to do a BIO interface. | ||
| 42 | - perl5, it needs finishing | ||
| 43 | - X509v3 extension. I have some ideas, I just need to | ||
| 44 | implement them :-) | ||
| 45 | - Public key methods. I need to clean up the library internally so | ||
| 46 | public key methods are loaded is a similar way to symetric ciphers | ||
| 47 | and digests. I also need to seperate out the digests from public | ||
| 48 | key methods. This stuff is needed to support sortware patents, smaller | ||
| 49 | code size and hardware tokens. | ||
| 50 | |||
| 51 | Anyway, this release gets out the bug fixes and TLS, but be warned, until | ||
| 52 | all those old SSLeay 0.8.x based server get upgraded, you will need to | ||
| 53 | connect with SSLv3 if TLSv1 fails. | ||
| 54 | |||
| 55 | eric (about to go bushwalking for the 4 day easter break :-) | ||
| 56 | |||
| 57 | PS Common problems | ||
| 58 | - For Win32 build, use /MD to specify your libraries, or build SSLeay with | ||
| 59 | the same flags as your application. Visual C stuffs up the malloc routines | ||
| 60 | if memory allocated by one memory model is freed by another. FILE pointers | ||
| 61 | are a major cause of these problem. | ||
| 62 | - If you are trying to use non-blocking IO and it is not working, | ||
| 63 | try 'ssleay s_client -help' and see if the -nbio option is listed. | ||
| 64 | For unixware, it has the non-block IO define in 'differnt' header file | ||
| 65 | and SSLeay will silently build without non-blocking IO calls (but for | ||
| 66 | unixware, the special header has been included). | ||
| 67 | - -DL_ENDIAN. For the message digests, some code needs to be turned off | ||
| 68 | in the C code when assember is used. For x86, this means the L_ENDIAN | ||
| 69 | needs to defined when x86 -DSHA1_ASM is defined. The reasons this is | ||
| 70 | not automagically done is because non-x86 assember could be bigendian. | ||
| 71 | For pure C code builds, the B_ENDIAN/L_ENDIAN flags are optional. | ||
diff --git a/src/lib/libssl/src/TODO b/src/lib/libssl/src/TODO new file mode 100644 index 0000000000..1c3da41cdf --- /dev/null +++ b/src/lib/libssl/src/TODO | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | - The loading of the netscape RC4 encrypted key is a crock of pig pellets. | ||
| 2 | It will be reworked along with a nice general mechanism for encrypting | ||
| 3 | ASN.1 stuff. [ Jun 96 ] I've cleaned up private keys internally but | ||
| 4 | still have not done PKCS#8 support. | ||
| 5 | |||
| 6 | - Winsock support in s_client/s_server for windows nt/3.1 is a crock. | ||
| 7 | I will probably not get this fixed for a while, it is just there so | ||
| 8 | I could test things. | ||
| 9 | |||
| 10 | - Be able to generate DSS certificates. | ||
| 11 | |||
| 12 | - Add CRL to the X509 verification stuff, this will probably be added with | ||
| 13 | SSLv3. | ||
| 14 | |||
| 15 | + X509 callback. I need to callback the application to retrieve certificates | ||
| 16 | and CRL. | ||
| 17 | |||
| 18 | *<- designates the things I'm activly working on. | ||
| 19 | +<- designates that which I have next in the queue. | ||
| 20 | |||
| 21 | ==== | ||
| 22 | |||
| 23 | X509v3 extensions | ||
| 24 | verify certificate chains | ||
| 25 | X509 cert lookup methods | ||
| 26 | RSA/DSA/DH methods mostly for smart cards | ||
| 27 | dsa cert generation | ||
| 28 | |||
diff --git a/src/lib/libssl/src/VERSION b/src/lib/libssl/src/VERSION new file mode 100644 index 0000000000..5555e9a3af --- /dev/null +++ b/src/lib/libssl/src/VERSION | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | SSLeay 0.8.1 | ||
| 2 | - Mostly bug fixes. There is an Ephemeral DH cipher problem which | ||
| 3 | is fixed. | ||
| 4 | |||
| 5 | SSLeay 0.8.0 | ||
| 6 | - New release, for those that are wondering what happend to | ||
| 7 | 0.7.x, call it our internal development version :-) | ||
| 8 | - There have been lots of changes, mostly the addition of SSLv3. | ||
| 9 | - There have been many additions from people and amongst | ||
| 10 | others, C2Net has assisted greatly. | ||
| 11 | |||
| 12 | SSLeay 0.6.6 | ||
| 13 | SSLeay 0.8.0 is not upward compatable with SSLeay 0.6.6, so | ||
| 14 | if your application requires 0.6.6, use it. There have been | ||
| 15 | lots of bug fixes to 0.8.x that have not been applied to 0.6.6 | ||
| 16 | so use 0.8.0+ in preference. | ||
| 17 | |||
| 18 | PORTING 0.6.6 to 0.8.0 | ||
| 19 | I'll be documenting this over the next few weeks but as | ||
| 20 | pressures have been increasing for making SSLv3 support | ||
| 21 | available I'm shipping it without this documentation as I | ||
| 22 | basically have not had time to write it (too busy earning a | ||
| 23 | living :-) | ||
| 24 | |||
diff --git a/src/lib/libssl/src/apps/Makefile.ssl b/src/lib/libssl/src/apps/Makefile.ssl new file mode 100644 index 0000000000..1cace40ab7 --- /dev/null +++ b/src/lib/libssl/src/apps/Makefile.ssl | |||
| @@ -0,0 +1,144 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/apps/Makefile.ssl | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= apps | ||
| 6 | TOP= .. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I../include | ||
| 9 | CFLAG= -g -static | ||
| 10 | INSTALLTOP= /usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | RM= /bin/rm -f | ||
| 15 | |||
| 16 | PEX_LIBS= | ||
| 17 | EX_LIBS= | ||
| 18 | |||
| 19 | CFLAGS= -DMONOLITH $(INCLUDES) $(CFLAG) | ||
| 20 | |||
| 21 | GENERAL=Makefile | ||
| 22 | |||
| 23 | DLIBCRYPTO=../libcrypto.a | ||
| 24 | DLIBSSL=../libssl.a | ||
| 25 | LIBCRYPTO=-L.. -lcrypto | ||
| 26 | LIBSSL=-L.. -lssl | ||
| 27 | |||
| 28 | SSLEAY= ssleay | ||
| 29 | |||
| 30 | SCRIPTS=CA.sh der_chop | ||
| 31 | |||
| 32 | EXE= $(SSLEAY) | ||
| 33 | |||
| 34 | E_EXE= verify asn1pars req dgst dh enc gendh errstr ca crl \ | ||
| 35 | rsa dsa dsaparam \ | ||
| 36 | x509 genrsa s_server s_client speed \ | ||
| 37 | s_time version pkcs7 crl2pkcs7 sess_id ciphers | ||
| 38 | |||
| 39 | PROGS= $(SSLEAY).c | ||
| 40 | |||
| 41 | A_OBJ=apps.o | ||
| 42 | A_SRC=apps.c | ||
| 43 | S_OBJ= s_cb.o s_socket.o | ||
| 44 | S_SRC= s_cb.c s_socket.c | ||
| 45 | |||
| 46 | E_OBJ= verify.o asn1pars.o req.o dgst.o dh.o enc.o gendh.o errstr.o ca.o \ | ||
| 47 | pkcs7.o crl2p7.o crl.o \ | ||
| 48 | rsa.o dsa.o dsaparam.o \ | ||
| 49 | x509.o genrsa.o s_server.o s_client.o speed.o \ | ||
| 50 | s_time.o $(A_OBJ) $(S_OBJ) version.o sess_id.o \ | ||
| 51 | ciphers.o | ||
| 52 | |||
| 53 | # pem_mail.o | ||
| 54 | |||
| 55 | E_SRC= verify.c asn1pars.c req.c dgst.c dh.c enc.c gendh.c errstr.c ca.c \ | ||
| 56 | pkcs7.c crl2p7.c crl.c \ | ||
| 57 | rsa.c dsa.c dsaparam.c \ | ||
| 58 | x509.c genrsa.c s_server.c s_client.c speed.c \ | ||
| 59 | s_time.c $(A_SRC) $(S_SRC) version.c sess_id.c \ | ||
| 60 | ciphers.c | ||
| 61 | |||
| 62 | # pem_mail.c | ||
| 63 | |||
| 64 | SRC=$(E_SRC) | ||
| 65 | |||
| 66 | EXHEADER= | ||
| 67 | HEADER= apps.h progs.h s_apps.h \ | ||
| 68 | testdsa.h testrsa.h \ | ||
| 69 | $(EXHEADER) | ||
| 70 | |||
| 71 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 72 | |||
| 73 | top: | ||
| 74 | @(cd ..; $(MAKE) DIRS=$(DIR) all) | ||
| 75 | |||
| 76 | all: exe | ||
| 77 | |||
| 78 | exe: $(EXE) | ||
| 79 | |||
| 80 | req: sreq.o $(A_OBJ) $(DLIBCRYPTO) | ||
| 81 | $(CC) -o req $(CFLAG) sreq.o $(A_OBJ) $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 82 | |||
| 83 | sreq.o: req.c | ||
| 84 | $(CC) -c $(INCLUDES) $(CFLAG) -o sreq.o req.c | ||
| 85 | |||
| 86 | files: | ||
| 87 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 88 | |||
| 89 | install: mklinks | ||
| 90 | @for i in $(EXE) $(SCRIPTS) mklinks; \ | ||
| 91 | do \ | ||
| 92 | (echo installing $$i; \ | ||
| 93 | cp $$i $(INSTALLTOP)/bin/$$i; \ | ||
| 94 | chmod 755 $(INSTALLTOP)/bin/$$i ); \ | ||
| 95 | done; \ | ||
| 96 | cp ssleay.cnf $(INSTALLTOP)/lib | ||
| 97 | chmod 644 $(INSTALLTOP)/lib/ssleay.cnf | ||
| 98 | cd $(INSTALLTOP)/bin; \ | ||
| 99 | /bin/sh ./mklinks; \ | ||
| 100 | /bin/rm -f ./mklinks | ||
| 101 | |||
| 102 | tags: | ||
| 103 | ctags $(SRC) | ||
| 104 | |||
| 105 | tests: | ||
| 106 | |||
| 107 | links: | ||
| 108 | /bin/rm -f Makefile | ||
| 109 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 110 | |||
| 111 | lint: | ||
| 112 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 113 | |||
| 114 | depend: | ||
| 115 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC) | ||
| 116 | |||
| 117 | dclean: | ||
| 118 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 119 | mv -f Makefile.new $(MAKEFILE) | ||
| 120 | |||
| 121 | errors: | ||
| 122 | |||
| 123 | clean: | ||
| 124 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) | ||
| 125 | /bin/rm -f req | ||
| 126 | |||
| 127 | $(DLIBSSL): | ||
| 128 | (cd ../ssl; $(MAKE)) | ||
| 129 | |||
| 130 | $(DLIBCRYPTO): | ||
| 131 | (cd ../crypto; $(MAKE)) | ||
| 132 | |||
| 133 | $(SSLEAY): progs.h $(E_OBJ) $(SSLEAY).o $(DLIBCRYPTO) $(DLIBSSL) | ||
| 134 | $(RM) $(SSLEAY) | ||
| 135 | $(CC) -o $(SSLEAY) $(CFLAGS) $(SSLEAY).o $(E_OBJ) $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | ||
| 136 | |||
| 137 | progs.h: | ||
| 138 | perl ./g_ssleay.pl $(E_EXE) >progs.h | ||
| 139 | $(RM) $(SSLEAY).o | ||
| 140 | |||
| 141 | mklinks: | ||
| 142 | perl ./g_ssleay.pl $(E_EXE) >progs.h | ||
| 143 | |||
| 144 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/apps/der_chop b/src/lib/libssl/src/apps/der_chop new file mode 100644 index 0000000000..4639330c10 --- /dev/null +++ b/src/lib/libssl/src/apps/der_chop | |||
| @@ -0,0 +1,305 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | # | ||
| 3 | # der_chop ... this is one total hack that Eric is really not proud of | ||
| 4 | # so don't look at it and don't ask for support | ||
| 5 | # | ||
| 6 | # The "documentation" for this (i.e. all the comments) are my fault --tjh | ||
| 7 | # | ||
| 8 | # This program takes the "raw" output of derparse/asn1parse and | ||
| 9 | # converts it into tokens and then runs regular expression matches | ||
| 10 | # to try to figure out what to grab to get the things that are needed | ||
| 11 | # and it is possible that this will do the wrong thing as it is a *hack* | ||
| 12 | # | ||
| 13 | # SSLeay 0.5.2+ should have direct read support for x509 (via -inform NET) | ||
| 14 | # [I know ... promises promises :-)] | ||
| 15 | # | ||
| 16 | # To convert a Netscape Certificate: | ||
| 17 | # der_chop < ServerCert.der > cert.pem | ||
| 18 | # To convert a Netscape Key (and encrypt it again to protect it) | ||
| 19 | # rsa -inform NET -in ServerKey.der -des > key.pem | ||
| 20 | # | ||
| 21 | # 23-Apr-96 eay Added the extra ASN.1 string types, I still think this | ||
| 22 | # is an evil hack. If nothing else the parsing should | ||
| 23 | # be relative, not absolute. | ||
| 24 | # 19-Apr-96 tjh hacked (with eay) into 0.5.x format | ||
| 25 | # | ||
| 26 | # Tim Hudson | ||
| 27 | # tjh@cryptsoft.com | ||
| 28 | # | ||
| 29 | |||
| 30 | |||
| 31 | require 'getopts.pl'; | ||
| 32 | |||
| 33 | $debug=0; | ||
| 34 | |||
| 35 | # this was the 0.4.x way of doing things ... | ||
| 36 | $cmd="derparse"; | ||
| 37 | $x509_cmd="x509"; | ||
| 38 | $crl_cmd="crl"; | ||
| 39 | $rc4_cmd="rc4"; | ||
| 40 | $md2_cmd="md2"; | ||
| 41 | $md4_cmd="md4"; | ||
| 42 | $rsa_cmd="rsa -des -inform der "; | ||
| 43 | |||
| 44 | # this was the 0.5.x way of doing things ... | ||
| 45 | $cmd="ssleay asn1parse"; | ||
| 46 | $x509_cmd="ssleay x509"; | ||
| 47 | $crl_cmd="ssleay crl"; | ||
| 48 | $rc4_cmd="ssleay rc4"; | ||
| 49 | $md2_cmd="ssleay md2"; | ||
| 50 | $md4_cmd="ssleay md4"; | ||
| 51 | $rsa_cmd="ssleay rsa -des -inform der "; | ||
| 52 | |||
| 53 | &Getopts('vd:') || die "usage:$0 [-v] [-d num] file"; | ||
| 54 | $depth=($opt_d =~ /^\d+$/)?$opt_d:0; | ||
| 55 | |||
| 56 | &init_der(); | ||
| 57 | |||
| 58 | if ($#ARGV != -1) | ||
| 59 | { | ||
| 60 | foreach $file (@ARGV) | ||
| 61 | { | ||
| 62 | print STDERR "doing $file\n"; | ||
| 63 | &dofile($file); | ||
| 64 | } | ||
| 65 | } | ||
| 66 | else | ||
| 67 | { | ||
| 68 | $file="/tmp/a$$.DER"; | ||
| 69 | open(OUT,">$file") || die "unable to open $file:$!\n"; | ||
| 70 | for (;;) | ||
| 71 | { | ||
| 72 | $i=sysread(STDIN,$b,1024*10); | ||
| 73 | last if ($i <= 0); | ||
| 74 | $i=syswrite(OUT,$b,$i); | ||
| 75 | } | ||
| 76 | &dofile($file); | ||
| 77 | unlink($file); | ||
| 78 | } | ||
| 79 | |||
| 80 | sub dofile | ||
| 81 | { | ||
| 82 | local($file)=@_; | ||
| 83 | local(@p); | ||
| 84 | |||
| 85 | $b=&load_file($file); | ||
| 86 | @p=&load_file_parse($file); | ||
| 87 | |||
| 88 | foreach $_ (@p) | ||
| 89 | { | ||
| 90 | ($off,$d,$hl,$len)=&parse_line($_); | ||
| 91 | $d-=$depth; | ||
| 92 | next if ($d != 0); | ||
| 93 | next if ($len == 0); | ||
| 94 | |||
| 95 | $o=substr($b,$off,$len+$hl); | ||
| 96 | ($str,@data)=&der_str($o); | ||
| 97 | print "$str\n" if ($opt_v); | ||
| 98 | if ($str =~ /^$crl/) | ||
| 99 | { | ||
| 100 | open(OUT,"|$crl_cmd -inform d -hash -issuer") || | ||
| 101 | die "unable to run $crl_cmd:$!\n"; | ||
| 102 | print OUT $o; | ||
| 103 | close(OUT); | ||
| 104 | } | ||
| 105 | elsif ($str =~ /^$x509/) | ||
| 106 | { | ||
| 107 | open(OUT,"|$x509_cmd -inform d -hash -subject -issuer") | ||
| 108 | || die "unable to run $x509_cmd:$!\n"; | ||
| 109 | print OUT $o; | ||
| 110 | close(OUT); | ||
| 111 | } | ||
| 112 | elsif ($str =~ /^$rsa/) | ||
| 113 | { | ||
| 114 | ($type)=($data[3] =~ /OBJECT_IDENTIFIER :(.*)\s*$/); | ||
| 115 | next unless ($type eq "rsaEncryption"); | ||
| 116 | ($off,$d,$hl,$len)=&parse_line($data[5]); | ||
| 117 | $os=substr($o,$off+$hl,$len); | ||
| 118 | open(OUT,"|$rsa_cmd") | ||
| 119 | || die "unable to run $rsa_cmd:$!\n"; | ||
| 120 | print OUT $os; | ||
| 121 | close(OUT); | ||
| 122 | } | ||
| 123 | elsif ($str =~ /^0G-1D-1G/) | ||
| 124 | { | ||
| 125 | ($off,$d,$hl,$len)=&parse_line($data[1]); | ||
| 126 | $os=substr($o,$off+$hl,$len); | ||
| 127 | print STDERR "<$os>\n" if $opt_v; | ||
| 128 | &do_certificate($o,@data) | ||
| 129 | if (($os eq "certificate") && | ||
| 130 | ($str =! /^0G-1D-1G-2G-3F-3E-2D/)); | ||
| 131 | &do_private_key($o,@data) | ||
| 132 | if (($os eq "private-key") && | ||
| 133 | ($str =! /^0G-1D-1G-2G-3F-3E-2D/)); | ||
| 134 | } | ||
| 135 | } | ||
| 136 | } | ||
| 137 | |||
| 138 | sub der_str | ||
| 139 | { | ||
| 140 | local($str)=@_; | ||
| 141 | local(*OUT,*IN,@a,$t,$d,$ret); | ||
| 142 | local($file)="/tmp/b$$.DER"; | ||
| 143 | local(@ret); | ||
| 144 | |||
| 145 | open(OUT,">$file"); | ||
| 146 | print OUT $str; | ||
| 147 | close(OUT); | ||
| 148 | open(IN,"$cmd -inform 'd' -in $file |") || | ||
| 149 | die "unable to run $cmd:$!\n"; | ||
| 150 | $ret=""; | ||
| 151 | while (<IN>) | ||
| 152 | { | ||
| 153 | chop; | ||
| 154 | push(@ret,$_); | ||
| 155 | |||
| 156 | print STDERR "$_\n" if ($debug); | ||
| 157 | |||
| 158 | @a=split(/\s*:\s*/); | ||
| 159 | ($d)=($a[1] =~ /d=\s*(\d+)/); | ||
| 160 | $a[2] =~ s/\s+$//; | ||
| 161 | $t=$DER_s2i{$a[2]}; | ||
| 162 | $ret.="$d$t-"; | ||
| 163 | } | ||
| 164 | close(IN); | ||
| 165 | unlink($file); | ||
| 166 | chop $ret; | ||
| 167 | $ret =~ s/(-3H(-4G-5F-5[IJKMQRS])+)+/-NAME/g; | ||
| 168 | $ret =~ s/(-3G-4B-4L)+/-RCERT/g; | ||
| 169 | return($ret,@ret); | ||
| 170 | } | ||
| 171 | |||
| 172 | sub init_der | ||
| 173 | { | ||
| 174 | $crl= "0G-1G-2G-3F-3E-2G-NAME-2L-2L-2G-RCERT-1G-2F-2E-1C"; | ||
| 175 | $x509="0G-1G-2B-2G-3F-3E-2G-NAME-2G-3L-3L-2G-NAME-2G-3G-4F-4E-3C-1G-2F-2E-1C"; | ||
| 176 | $rsa= "0G-1B-1G-2F-2E-1D"; | ||
| 177 | |||
| 178 | %DER_i2s=( | ||
| 179 | # SSLeay 0.4.x has this list | ||
| 180 | "A","EOC", | ||
| 181 | "B","INTEGER", | ||
| 182 | "C","BIT STRING", | ||
| 183 | "D","OCTET STRING", | ||
| 184 | "E","NULL", | ||
| 185 | "F","OBJECT", | ||
| 186 | "G","SEQUENCE", | ||
| 187 | "H","SET", | ||
| 188 | "I","PRINTABLESTRING", | ||
| 189 | "J","T61STRING", | ||
| 190 | "K","IA5STRING", | ||
| 191 | "L","UTCTIME", | ||
| 192 | "M","NUMERICSTRING", | ||
| 193 | "N","VIDEOTEXSTRING", | ||
| 194 | "O","GENERALIZEDTIME", | ||
| 195 | "P","GRAPHICSTRING", | ||
| 196 | "Q","ISO64STRING", | ||
| 197 | "R","GENERALSTRING", | ||
| 198 | "S","UNIVERSALSTRING", | ||
| 199 | |||
| 200 | # SSLeay 0.5.x changed some things ... and I'm | ||
| 201 | # leaving in the old stuff but adding in these | ||
| 202 | # to handle the new as well --tjh | ||
| 203 | # - Well I've just taken them out and added the extra new | ||
| 204 | # ones :-) - eay | ||
| 205 | ); | ||
| 206 | |||
| 207 | foreach (keys %DER_i2s) | ||
| 208 | { $DER_s2i{$DER_i2s{$_}}=$_; } | ||
| 209 | } | ||
| 210 | |||
| 211 | sub parse_line | ||
| 212 | { | ||
| 213 | local($_)=@_; | ||
| 214 | |||
| 215 | return(/\s*(\d+):d=\s*(\d+)\s+hl=\s*(\d+)\s+l=\s*(\d+|inf)\s/); | ||
| 216 | } | ||
| 217 | |||
| 218 | # 0:d=0 hl=4 l=377 cons: univ: SEQUENCE | ||
| 219 | # 4:d=1 hl=2 l= 11 prim: univ: OCTET_STRING | ||
| 220 | # 17:d=1 hl=4 l=360 cons: univ: SEQUENCE | ||
| 221 | # 21:d=2 hl=2 l= 12 cons: univ: SEQUENCE | ||
| 222 | # 23:d=3 hl=2 l= 8 prim: univ: OBJECT_IDENTIFIER :rc4 | ||
| 223 | # 33:d=3 hl=2 l= 0 prim: univ: NULL | ||
| 224 | # 35:d=2 hl=4 l=342 prim: univ: OCTET_STRING | ||
| 225 | sub do_private_key | ||
| 226 | { | ||
| 227 | local($data,@struct)=@_; | ||
| 228 | local($file)="/tmp/b$$.DER"; | ||
| 229 | local($off,$d,$hl,$len,$_,$b,@p,$s); | ||
| 230 | |||
| 231 | ($type)=($struct[4] =~ /OBJECT_IDENTIFIER :(.*)\s*$/); | ||
| 232 | if ($type eq "rc4") | ||
| 233 | { | ||
| 234 | ($off,$d,$hl,$len)=&parse_line($struct[6]); | ||
| 235 | open(OUT,"|$rc4_cmd >$file") || | ||
| 236 | die "unable to run $rc4_cmd:$!\n"; | ||
| 237 | print OUT substr($data,$off+$hl,$len); | ||
| 238 | close(OUT); | ||
| 239 | |||
| 240 | $b=&load_file($file); | ||
| 241 | unlink($file); | ||
| 242 | |||
| 243 | ($s,@p)=&der_str($b); | ||
| 244 | die "unknown rsa key type\n$s\n" | ||
| 245 | if ($s ne '0G-1B-1G-2F-2E-1D'); | ||
| 246 | local($off,$d,$hl,$len)=&parse_line($p[5]); | ||
| 247 | $b=substr($b,$off+$hl,$len); | ||
| 248 | ($s,@p)=&der_str($b); | ||
| 249 | open(OUT,"|$rsa_cmd") || die "unable to run $rsa_cmd:$!\n"; | ||
| 250 | print OUT $b; | ||
| 251 | close(OUT); | ||
| 252 | } | ||
| 253 | else | ||
| 254 | { | ||
| 255 | print "'$type' is unknown\n"; | ||
| 256 | exit(1); | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 260 | sub do_certificate | ||
| 261 | { | ||
| 262 | local($data,@struct)=@_; | ||
| 263 | local($file)="/tmp/b$$.DER"; | ||
| 264 | local($off,$d,$hl,$len,$_,$b,@p,$s); | ||
| 265 | |||
| 266 | ($off,$d,$hl,$len)=&parse_line($struct[2]); | ||
| 267 | $b=substr($data,$off,$len+$hl); | ||
| 268 | |||
| 269 | open(OUT,"|$x509_cmd -inform d") || die "unable to run $x509_cmd:$!\n"; | ||
| 270 | print OUT $b; | ||
| 271 | close(OUT); | ||
| 272 | } | ||
| 273 | |||
| 274 | sub load_file | ||
| 275 | { | ||
| 276 | local($file)=@_; | ||
| 277 | local(*IN,$r,$b,$i); | ||
| 278 | |||
| 279 | $r=""; | ||
| 280 | open(IN,"<$file") || die "unable to open $file:$!\n"; | ||
| 281 | for (;;) | ||
| 282 | { | ||
| 283 | $i=sysread(IN,$b,10240); | ||
| 284 | last if ($i <= 0); | ||
| 285 | $r.=$b; | ||
| 286 | } | ||
| 287 | close(IN); | ||
| 288 | return($r); | ||
| 289 | } | ||
| 290 | |||
| 291 | sub load_file_parse | ||
| 292 | { | ||
| 293 | local($file)=@_; | ||
| 294 | local(*IN,$r,@ret,$_,$i,$n,$b); | ||
| 295 | |||
| 296 | open(IN,"$cmd -inform d -in $file|") | ||
| 297 | || die "unable to run der_parse\n"; | ||
| 298 | while (<IN>) | ||
| 299 | { | ||
| 300 | chop; | ||
| 301 | push(@ret,$_); | ||
| 302 | } | ||
| 303 | return($r,@ret); | ||
| 304 | } | ||
| 305 | |||
diff --git a/src/lib/libssl/src/apps/eay.c b/src/lib/libssl/src/apps/eay.c new file mode 100644 index 0000000000..37d5dcbd30 --- /dev/null +++ b/src/lib/libssl/src/apps/eay.c | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | /* apps/eay.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 <stdlib.h> | ||
| 61 | #include <string.h> | ||
| 62 | |||
| 63 | #define MONOLITH | ||
| 64 | #define USE_SOCKETS | ||
| 65 | #include "../e_os.h" | ||
| 66 | |||
| 67 | #include "bio.h" | ||
| 68 | #include "stack.h" | ||
| 69 | #include "lhash.h" | ||
| 70 | |||
| 71 | #include "err.h" | ||
| 72 | |||
| 73 | #include "bn.h" | ||
| 74 | |||
| 75 | #include "evp.h" | ||
| 76 | |||
| 77 | #include "rand.h" | ||
| 78 | #include "conf.h" | ||
| 79 | #include "txt_db.h" | ||
| 80 | |||
| 81 | #include "err.h" | ||
| 82 | |||
| 83 | #include "x509.h" | ||
| 84 | #include "pkcs7.h" | ||
| 85 | #include "pem.h" | ||
| 86 | #include "asn1.h" | ||
| 87 | #include "objects.h" | ||
| 88 | |||
| 89 | #define MONOLITH | ||
| 90 | |||
| 91 | #include "ssleay.c" | ||
| 92 | #include "apps.c" | ||
| 93 | #include "asn1pars.c" | ||
| 94 | #ifndef NO_RSA | ||
| 95 | #include "ca.c" | ||
| 96 | #include "genrsa.c" | ||
| 97 | #include "req.c" | ||
| 98 | #include "rsa.c" | ||
| 99 | #endif | ||
| 100 | #ifndef NO_DH | ||
| 101 | #include "gendh.c" | ||
| 102 | #include "dh.c" | ||
| 103 | #endif | ||
| 104 | #include "crl.c" | ||
| 105 | #include "crl2p7.c" | ||
| 106 | #include "dgst.c" | ||
| 107 | #include "enc.c" | ||
| 108 | #include "errstr.c" | ||
| 109 | #if !defined(NO_SSL2) || !defined(NO_SSL3) | ||
| 110 | #ifndef NO_SOCK | ||
| 111 | #include "s_cb.c" | ||
| 112 | #include "s_client.c" | ||
| 113 | #include "s_server.c" | ||
| 114 | #include "s_socket.c" | ||
| 115 | #include "s_time.c" | ||
| 116 | #endif | ||
| 117 | #endif | ||
| 118 | #include "speed.c" | ||
| 119 | #include "verify.c" | ||
| 120 | #include "version.c" | ||
| 121 | #include "x509.c" | ||
| 122 | #include "ciphers.c" | ||
| 123 | #include "sess_id.c" | ||
| 124 | #include "pkcs7.c" | ||
| 125 | #ifndef NO_DSA | ||
| 126 | #include "dsaparam.c" | ||
| 127 | #include "dsa.c" | ||
| 128 | #include "gendsa.c" | ||
| 129 | #endif | ||
| 130 | |||
diff --git a/src/lib/libssl/src/apps/ext.v3 b/src/lib/libssl/src/apps/ext.v3 new file mode 100644 index 0000000000..87ee8e6173 --- /dev/null +++ b/src/lib/libssl/src/apps/ext.v3 | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | 2.99999.3 SET.ex3 SET x509v3 extension 3 | ||
| 2 | |||
diff --git a/src/lib/libssl/src/apps/g_ssleay.pl b/src/lib/libssl/src/apps/g_ssleay.pl new file mode 100644 index 0000000000..bd5621dcab --- /dev/null +++ b/src/lib/libssl/src/apps/g_ssleay.pl | |||
| @@ -0,0 +1,114 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | $mkprog='mklinks'; | ||
| 4 | $rmprog='rmlinks'; | ||
| 5 | |||
| 6 | print "#ifndef NOPROTO\n"; | ||
| 7 | |||
| 8 | grep(s/^asn1pars$/asn1parse/,@ARGV); | ||
| 9 | |||
| 10 | foreach (@ARGV) | ||
| 11 | { printf "extern int %s_main(int argc,char *argv[]);\n",$_; } | ||
| 12 | print "#else\n"; | ||
| 13 | foreach (@ARGV) | ||
| 14 | { printf "extern int %s_main();\n",$_; } | ||
| 15 | print "#endif\n"; | ||
| 16 | |||
| 17 | |||
| 18 | print <<'EOF'; | ||
| 19 | |||
| 20 | #ifdef SSLEAY_SRC | ||
| 21 | |||
| 22 | #define FUNC_TYPE_GENERAL 1 | ||
| 23 | #define FUNC_TYPE_MD 2 | ||
| 24 | #define FUNC_TYPE_CIPHER 3 | ||
| 25 | |||
| 26 | typedef struct { | ||
| 27 | int type; | ||
| 28 | char *name; | ||
| 29 | int (*func)(); | ||
| 30 | } FUNCTION; | ||
| 31 | |||
| 32 | FUNCTION functions[] = { | ||
| 33 | EOF | ||
| 34 | |||
| 35 | foreach (@ARGV) | ||
| 36 | { | ||
| 37 | push(@files,$_); | ||
| 38 | $str="\t{FUNC_TYPE_GENERAL,\"$_\",${_}_main},\n"; | ||
| 39 | if (($_ =~ /^s_/) || ($_ =~ /^ciphers$/)) | ||
| 40 | { print "#if !defined(NO_SOCK) && !(defined(NO_SSL2) && defined(O_SSL3))\n${str}#endif\n"; } | ||
| 41 | elsif ( ($_ =~ /^rsa$/) || ($_ =~ /^genrsa$/) || | ||
| 42 | ($_ =~ /^req$/) || ($_ =~ /^ca$/) || ($_ =~ /^x509$/)) | ||
| 43 | { print "#ifndef NO_RSA\n${str}#endif\n"; } | ||
| 44 | elsif ( ($_ =~ /^dsa$/) || ($_ =~ /^gendsa$/) || ($_ =~ /^dsaparam$/)) | ||
| 45 | { print "#ifndef NO_DSA\n${str}#endif\n"; } | ||
| 46 | elsif ( ($_ =~ /^dh$/) || ($_ =~ /^gendh$/)) | ||
| 47 | { print "#ifndef NO_DH\n${str}#endif\n"; } | ||
| 48 | else | ||
| 49 | { print $str; } | ||
| 50 | } | ||
| 51 | |||
| 52 | foreach ("md2","md5","sha","sha1","mdc2") | ||
| 53 | { | ||
| 54 | push(@files,$_); | ||
| 55 | printf "\t{FUNC_TYPE_MD,\"%s\",dgst_main},\n",$_; | ||
| 56 | } | ||
| 57 | |||
| 58 | foreach ( | ||
| 59 | "base64", | ||
| 60 | "des", "des3", "desx", "idea", "rc4", "rc2","bf","cast","rc5", | ||
| 61 | "des-ecb", "des-ede", "des-ede3", | ||
| 62 | "des-cbc", "des-ede-cbc","des-ede3-cbc", | ||
| 63 | "des-cfb", "des-ede-cfb","des-ede3-cfb", | ||
| 64 | "des-ofb", "des-ede-ofb","des-ede3-ofb", | ||
| 65 | "idea-cbc","idea-ecb", "idea-cfb", "idea-ofb", | ||
| 66 | "rc2-cbc", "rc2-ecb", "rc2-cfb", "rc2-ofb", | ||
| 67 | "bf-cbc", "bf-ecb", "bf-cfb", "bf-ofb", | ||
| 68 | "cast5-cbc","cast5-ecb", "cast5-cfb","cast5-ofb", | ||
| 69 | "cast-cbc", "rc5-cbc", "rc5-ecb", "rc5-cfb", "rc5-ofb") | ||
| 70 | { | ||
| 71 | push(@files,$_); | ||
| 72 | |||
| 73 | $t=sprintf("\t{FUNC_TYPE_CIPHER,\"%s\",enc_main},\n",$_); | ||
| 74 | if ($_ =~ /des/) { $t="#ifndef NO_DES\n${t}#endif\n"; } | ||
| 75 | elsif ($_ =~ /idea/) { $t="#ifndef NO_IDEA\n${t}#endif\n"; } | ||
| 76 | elsif ($_ =~ /rc4/) { $t="#ifndef NO_RC4\n${t}#endif\n"; } | ||
| 77 | elsif ($_ =~ /rc2/) { $t="#ifndef NO_RC2\n${t}#endif\n"; } | ||
| 78 | elsif ($_ =~ /bf/) { $t="#ifndef NO_BLOWFISH\n${t}#endif\n"; } | ||
| 79 | elsif ($_ =~ /cast/) { $t="#ifndef NO_CAST\n${t}#endif\n"; } | ||
| 80 | elsif ($_ =~ /rc5/) { $t="#ifndef NO_RC5\n${t}#endif\n"; } | ||
| 81 | print $t; | ||
| 82 | } | ||
| 83 | |||
| 84 | print "\t{0,NULL,NULL}\n\t};\n"; | ||
| 85 | print "#endif\n\n"; | ||
| 86 | |||
| 87 | open(OUT,">$mkprog") || die "unable to open '$prog':$!\n"; | ||
| 88 | print OUT "#!/bin/sh\nfor i in "; | ||
| 89 | foreach (@files) | ||
| 90 | { print OUT $_." "; } | ||
| 91 | print OUT <<'EOF'; | ||
| 92 | |||
| 93 | do | ||
| 94 | echo making symlink for $i | ||
| 95 | /bin/rm -f $i | ||
| 96 | ln -s ssleay $i | ||
| 97 | done | ||
| 98 | EOF | ||
| 99 | close(OUT); | ||
| 100 | chmod(0755,$mkprog); | ||
| 101 | |||
| 102 | open(OUT,">$rmprog") || die "unable to open '$prog':$!\n"; | ||
| 103 | print OUT "#!/bin/sh\nfor i in "; | ||
| 104 | foreach (@files) | ||
| 105 | { print OUT $_." "; } | ||
| 106 | print OUT <<'EOF'; | ||
| 107 | |||
| 108 | do | ||
| 109 | echo removing $i | ||
| 110 | /bin/rm -f $i | ||
| 111 | done | ||
| 112 | EOF | ||
| 113 | close(OUT); | ||
| 114 | chmod(0755,$rmprog); | ||
diff --git a/src/lib/libssl/src/apps/mklinks b/src/lib/libssl/src/apps/mklinks new file mode 100644 index 0000000000..55a56b399e --- /dev/null +++ b/src/lib/libssl/src/apps/mklinks | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | for i in verify asn1parse req dgst dh enc gendh errstr ca crl rsa dsa dsaparam x509 genrsa s_server s_client speed s_time version pkcs7 crl2pkcs7 sess_id ciphers md2 md5 sha sha1 mdc2 base64 des des3 desx idea rc4 rc2 bf cast rc5 des-ecb des-ede des-ede3 des-cbc des-ede-cbc des-ede3-cbc des-cfb des-ede-cfb des-ede3-cfb des-ofb des-ede-ofb des-ede3-ofb idea-cbc idea-ecb idea-cfb idea-ofb rc2-cbc rc2-ecb rc2-cfb rc2-ofb bf-cbc bf-ecb bf-cfb bf-ofb cast5-cbc cast5-ecb cast5-cfb cast5-ofb cast-cbc rc5-cbc rc5-ecb rc5-cfb rc5-ofb | ||
| 3 | do | ||
| 4 | echo making symlink for $i | ||
| 5 | /bin/rm -f $i | ||
| 6 | ln -s ssleay $i | ||
| 7 | done | ||
diff --git a/src/lib/libssl/src/apps/pem_mail.c b/src/lib/libssl/src/apps/pem_mail.c new file mode 100644 index 0000000000..64e04acb52 --- /dev/null +++ b/src/lib/libssl/src/apps/pem_mail.c | |||
| @@ -0,0 +1,170 @@ | |||
| 1 | /* apps/pem_mail.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 "rsa.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | #include "x509.h" | ||
| 64 | #include "err.h" | ||
| 65 | #include "pem.h" | ||
| 66 | #include "apps.h" | ||
| 67 | |||
| 68 | #undef PROG | ||
| 69 | #define PROG pem_mail_main | ||
| 70 | |||
| 71 | static char *usage[]={ | ||
| 72 | "usage: pem_mail args\n", | ||
| 73 | "\n", | ||
| 74 | " -in arg - input file - default stdin\n", | ||
| 75 | " -out arg - output file - default stdout\n", | ||
| 76 | " -cert arg - the certificate to use\n", | ||
| 77 | " -key arg - the private key to use\n", | ||
| 78 | " -MIC - sign the message\n", | ||
| 79 | " -enc arg - encrypt with one of cbc-des\n", | ||
| 80 | NULL | ||
| 81 | }; | ||
| 82 | |||
| 83 | |||
| 84 | typedef struct lines_St | ||
| 85 | { | ||
| 86 | char *line; | ||
| 87 | struct lines_st *next; | ||
| 88 | } LINES; | ||
| 89 | |||
| 90 | int main(argc, argv) | ||
| 91 | int argc; | ||
| 92 | char **argv; | ||
| 93 | { | ||
| 94 | FILE *in; | ||
| 95 | RSA *rsa=NULL; | ||
| 96 | EVP_MD_CTX ctx; | ||
| 97 | unsigned int mic=0,i,n; | ||
| 98 | unsigned char buf[1024*15]; | ||
| 99 | char *prog,*infile=NULL,*outfile=NULL,*key=NULL; | ||
| 100 | int badops=0; | ||
| 101 | |||
| 102 | apps_startup(); | ||
| 103 | |||
| 104 | prog=argv[0]; | ||
| 105 | argc--; | ||
| 106 | argv++; | ||
| 107 | while (argc >= 1) | ||
| 108 | { | ||
| 109 | if (strcmp(*argv,"-key") == 0) | ||
| 110 | { | ||
| 111 | if (--argc < 1) goto bad; | ||
| 112 | key= *(++argv); | ||
| 113 | } | ||
| 114 | else if (strcmp(*argv,"-in") == 0) | ||
| 115 | { | ||
| 116 | if (--argc < 1) goto bad; | ||
| 117 | infile= *(++argv); | ||
| 118 | } | ||
| 119 | else if (strcmp(*argv,"-out") == 0) | ||
| 120 | { | ||
| 121 | if (--argc < 1) goto bad; | ||
| 122 | outfile= *(++argv); | ||
| 123 | } | ||
| 124 | else if (strcmp(*argv,"-mic") == 0) | ||
| 125 | mic=1; | ||
| 126 | else | ||
| 127 | { | ||
| 128 | BIO_printf(bio_err,"unknown option %s\n",*argv); | ||
| 129 | badops=1; | ||
| 130 | break; | ||
| 131 | } | ||
| 132 | argc--; | ||
| 133 | argv++; | ||
| 134 | } | ||
| 135 | |||
| 136 | if (badops) | ||
| 137 | { | ||
| 138 | bad: | ||
| 139 | BIO_printf(bio_err,"%s [options] <infile >outfile\n",prog); | ||
| 140 | BIO_printf(bio_err,"where options are\n"); | ||
| 141 | EXIT(1); | ||
| 142 | } | ||
| 143 | |||
| 144 | if (key == NULL) | ||
| 145 | { BIO_printf(bio_err,"you need to specify a key\n"); EXIT(1); } | ||
| 146 | in=fopen(key,"r"); | ||
| 147 | if (in == NULL) { perror(key); EXIT(1); } | ||
| 148 | rsa=PEM_read_RSAPrivateKey(in,NULL,NULL); | ||
| 149 | if (rsa == NULL) | ||
| 150 | { | ||
| 151 | BIO_printf(bio_err,"unable to load Private Key\n"); | ||
| 152 | ERR_print_errors(bio_err); | ||
| 153 | EXIT(1); | ||
| 154 | } | ||
| 155 | fclose(in); | ||
| 156 | |||
| 157 | PEM_SignInit(&ctx,EVP_md5()); | ||
| 158 | for (;;) | ||
| 159 | { | ||
| 160 | i=fread(buf,1,1024*10,stdin); | ||
| 161 | if (i <= 0) break; | ||
| 162 | PEM_SignUpdate(&ctx,buf,i); | ||
| 163 | } | ||
| 164 | if (!PEM_SignFinal(&ctx,buf,&n,rsa)) goto err; | ||
| 165 | BIO_printf(bio_err,"%s\n",buf); | ||
| 166 | EXIT(0); | ||
| 167 | err: | ||
| 168 | ERR_print_errors(bio_err); | ||
| 169 | EXIT(1); | ||
| 170 | } | ||
diff --git a/src/lib/libssl/src/apps/rmlinks b/src/lib/libssl/src/apps/rmlinks new file mode 100644 index 0000000000..7c4f8983ba --- /dev/null +++ b/src/lib/libssl/src/apps/rmlinks | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | for i in verify asn1parse req dgst dh enc gendh errstr ca crl rsa dsa dsaparam x509 genrsa s_server s_client speed s_time version pkcs7 crl2pkcs7 sess_id ciphers md2 md5 sha sha1 mdc2 base64 des des3 desx idea rc4 rc2 bf cast rc5 des-ecb des-ede des-ede3 des-cbc des-ede-cbc des-ede3-cbc des-cfb des-ede-cfb des-ede3-cfb des-ofb des-ede-ofb des-ede3-ofb idea-cbc idea-ecb idea-cfb idea-ofb rc2-cbc rc2-ecb rc2-cfb rc2-ofb bf-cbc bf-ecb bf-cfb bf-ofb cast5-cbc cast5-ecb cast5-cfb cast5-ofb cast-cbc rc5-cbc rc5-ecb rc5-cfb rc5-ofb | ||
| 3 | do | ||
| 4 | echo removing $i | ||
| 5 | /bin/rm -f $i | ||
| 6 | done | ||
diff --git a/src/lib/libssl/src/apps/ssleay.c b/src/lib/libssl/src/apps/ssleay.c new file mode 100644 index 0000000000..eac411b854 --- /dev/null +++ b/src/lib/libssl/src/apps/ssleay.c | |||
| @@ -0,0 +1,342 @@ | |||
| 1 | /* apps/ssleay.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 DEBUG | ||
| 60 | #undef DEBUG | ||
| 61 | #endif | ||
| 62 | |||
| 63 | #include <stdio.h> | ||
| 64 | #include <string.h> | ||
| 65 | #include <stdlib.h> | ||
| 66 | #include "bio.h" | ||
| 67 | #include "crypto.h" | ||
| 68 | #include "lhash.h" | ||
| 69 | #include "conf.h" | ||
| 70 | #include "x509.h" | ||
| 71 | #include "pem.h" | ||
| 72 | #include "ssl.h" | ||
| 73 | #define SSLEAY /* turn off a few special case MONOLITH macros */ | ||
| 74 | #define USE_SOCKETS /* needed for the _O_BINARY defs in the MS world */ | ||
| 75 | #define SSLEAY_SRC | ||
| 76 | #include "apps.h" | ||
| 77 | #include "s_apps.h" | ||
| 78 | #include "err.h" | ||
| 79 | |||
| 80 | /* | ||
| 81 | #ifdef WINDOWS | ||
| 82 | #include "bss_file.c" | ||
| 83 | #endif | ||
| 84 | */ | ||
| 85 | |||
| 86 | #ifndef NOPROTO | ||
| 87 | static unsigned long MS_CALLBACK hash(FUNCTION *a); | ||
| 88 | static int MS_CALLBACK cmp(FUNCTION *a,FUNCTION *b); | ||
| 89 | static LHASH *prog_init(void ); | ||
| 90 | static int do_cmd(LHASH *prog,int argc,char *argv[]); | ||
| 91 | #else | ||
| 92 | static unsigned long MS_CALLBACK hash(); | ||
| 93 | static int MS_CALLBACK cmp(); | ||
| 94 | static LHASH *prog_init(); | ||
| 95 | static int do_cmd(); | ||
| 96 | #endif | ||
| 97 | |||
| 98 | LHASH *config=NULL; | ||
| 99 | char *default_config_file=NULL; | ||
| 100 | |||
| 101 | #ifdef DEBUG | ||
| 102 | static void sig_stop(i) | ||
| 103 | int i; | ||
| 104 | { | ||
| 105 | char *a=NULL; | ||
| 106 | |||
| 107 | *a='\0'; | ||
| 108 | } | ||
| 109 | #endif | ||
| 110 | |||
| 111 | /* Make sure there is only one when MONOLITH is defined */ | ||
| 112 | #ifdef MONOLITH | ||
| 113 | BIO *bio_err=NULL; | ||
| 114 | #endif | ||
| 115 | |||
| 116 | int main(Argc,Argv) | ||
| 117 | int Argc; | ||
| 118 | char *Argv[]; | ||
| 119 | { | ||
| 120 | ARGS arg; | ||
| 121 | #define PROG_NAME_SIZE 16 | ||
| 122 | char pname[PROG_NAME_SIZE]; | ||
| 123 | FUNCTION f,*fp; | ||
| 124 | MS_STATIC char *prompt,buf[1024],config_name[256]; | ||
| 125 | int n,i,ret=0; | ||
| 126 | int argc; | ||
| 127 | char **argv,*p; | ||
| 128 | LHASH *prog=NULL; | ||
| 129 | long errline; | ||
| 130 | |||
| 131 | arg.data=NULL; | ||
| 132 | arg.count=0; | ||
| 133 | |||
| 134 | /* SSLeay_add_ssl_algorithms(); is called in apps_startup() */ | ||
| 135 | apps_startup(); | ||
| 136 | |||
| 137 | #if defined(DEBUG) && !defined(WINDOWS) && !defined(MSDOS) | ||
| 138 | #ifdef SIGBUS | ||
| 139 | signal(SIGBUS,sig_stop); | ||
| 140 | #endif | ||
| 141 | #ifdef SIGSEGV | ||
| 142 | signal(SIGSEGV,sig_stop); | ||
| 143 | #endif | ||
| 144 | #endif | ||
| 145 | |||
| 146 | if (bio_err == NULL) | ||
| 147 | if ((bio_err=BIO_new(BIO_s_file())) != NULL) | ||
| 148 | BIO_set_fp(bio_err,stderr,BIO_NOCLOSE|BIO_FP_TEXT); | ||
| 149 | |||
| 150 | CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON); | ||
| 151 | |||
| 152 | ERR_load_crypto_strings(); | ||
| 153 | |||
| 154 | /* Lets load up our environment a little */ | ||
| 155 | p=getenv("SSLEAY_CONF"); | ||
| 156 | if (p == NULL) | ||
| 157 | { | ||
| 158 | strcpy(config_name,X509_get_default_cert_area()); | ||
| 159 | strcat(config_name,"/lib/"); | ||
| 160 | strcat(config_name,SSLEAY_CONF); | ||
| 161 | p=config_name; | ||
| 162 | } | ||
| 163 | |||
| 164 | default_config_file=p; | ||
| 165 | |||
| 166 | config=CONF_load(config,p,&errline); | ||
| 167 | if (config == NULL) ERR_clear_error(); | ||
| 168 | |||
| 169 | prog=prog_init(); | ||
| 170 | |||
| 171 | /* first check the program name */ | ||
| 172 | program_name(Argv[0],pname,PROG_NAME_SIZE); | ||
| 173 | |||
| 174 | f.name=pname; | ||
| 175 | fp=(FUNCTION *)lh_retrieve(prog,(char *)&f); | ||
| 176 | if (fp != NULL) | ||
| 177 | { | ||
| 178 | Argv[0]=pname; | ||
| 179 | ret=fp->func(Argc,Argv); | ||
| 180 | goto end; | ||
| 181 | } | ||
| 182 | |||
| 183 | /* ok, now check that there are not arguments, if there are, | ||
| 184 | * run with them, shifting the ssleay off the front */ | ||
| 185 | if (Argc != 1) | ||
| 186 | { | ||
| 187 | Argc--; | ||
| 188 | Argv++; | ||
| 189 | ret=do_cmd(prog,Argc,Argv); | ||
| 190 | if (ret < 0) ret=0; | ||
| 191 | goto end; | ||
| 192 | } | ||
| 193 | |||
| 194 | /* ok, lets enter the old 'SSLeay>' mode */ | ||
| 195 | |||
| 196 | for (;;) | ||
| 197 | { | ||
| 198 | ret=0; | ||
| 199 | p=buf; | ||
| 200 | n=1024; | ||
| 201 | i=0; | ||
| 202 | for (;;) | ||
| 203 | { | ||
| 204 | p[0]='\0'; | ||
| 205 | if (i++) | ||
| 206 | prompt=">"; | ||
| 207 | else prompt="SSLeay>"; | ||
| 208 | fputs(prompt,stdout); | ||
| 209 | fflush(stdout); | ||
| 210 | fgets(p,n,stdin); | ||
| 211 | if (p[0] == '\0') goto end; | ||
| 212 | i=strlen(p); | ||
| 213 | if (i <= 1) break; | ||
| 214 | if (p[i-2] != '\\') break; | ||
| 215 | i-=2; | ||
| 216 | p+=i; | ||
| 217 | n-=i; | ||
| 218 | } | ||
| 219 | if (!chopup_args(&arg,buf,&argc,&argv)) break; | ||
| 220 | |||
| 221 | ret=do_cmd(prog,argc,argv); | ||
| 222 | if (ret < 0) | ||
| 223 | { | ||
| 224 | ret=0; | ||
| 225 | goto end; | ||
| 226 | } | ||
| 227 | if (ret != 0) | ||
| 228 | BIO_printf(bio_err,"error in %s\n",argv[0]); | ||
| 229 | BIO_flush(bio_err); | ||
| 230 | } | ||
| 231 | BIO_printf(bio_err,"bad exit\n"); | ||
| 232 | ret=1; | ||
| 233 | end: | ||
| 234 | if (config != NULL) | ||
| 235 | { | ||
| 236 | CONF_free(config); | ||
| 237 | config=NULL; | ||
| 238 | } | ||
| 239 | if (prog != NULL) lh_free(prog); | ||
| 240 | if (arg.data != NULL) Free(arg.data); | ||
| 241 | ERR_remove_state(0); | ||
| 242 | |||
| 243 | EVP_cleanup(); | ||
| 244 | |||
| 245 | CRYPTO_mem_leaks(bio_err); | ||
| 246 | if (bio_err != NULL) | ||
| 247 | { | ||
| 248 | BIO_free(bio_err); | ||
| 249 | bio_err=NULL; | ||
| 250 | } | ||
| 251 | EXIT(ret); | ||
| 252 | } | ||
| 253 | |||
| 254 | static int do_cmd(prog,argc,argv) | ||
| 255 | LHASH *prog; | ||
| 256 | int argc; | ||
| 257 | char *argv[]; | ||
| 258 | { | ||
| 259 | FUNCTION f,*fp; | ||
| 260 | int i,ret=1,tp,nl; | ||
| 261 | |||
| 262 | if ((argc <= 0) || (argv[0] == NULL)) | ||
| 263 | { ret=0; goto end; } | ||
| 264 | f.name=argv[0]; | ||
| 265 | fp=(FUNCTION *)lh_retrieve(prog,(char *)&f); | ||
| 266 | if (fp != NULL) | ||
| 267 | { | ||
| 268 | ret=fp->func(argc,argv); | ||
| 269 | } | ||
| 270 | else if ((strcmp(argv[0],"quit") == 0) || | ||
| 271 | (strcmp(argv[0],"q") == 0) || | ||
| 272 | (strcmp(argv[0],"exit") == 0) || | ||
| 273 | (strcmp(argv[0],"bye") == 0)) | ||
| 274 | { | ||
| 275 | ret= -1; | ||
| 276 | goto end; | ||
| 277 | } | ||
| 278 | else | ||
| 279 | { | ||
| 280 | BIO_printf(bio_err,"'%s' is a bad command, valid commands are", | ||
| 281 | argv[0]); | ||
| 282 | i=0; | ||
| 283 | fp=functions; | ||
| 284 | tp=0; | ||
| 285 | for (fp=functions; fp->name != NULL; fp++) | ||
| 286 | { | ||
| 287 | nl=0; | ||
| 288 | if (((i++) % 5) == 0) | ||
| 289 | { | ||
| 290 | BIO_printf(bio_err,"\n"); | ||
| 291 | nl=1; | ||
| 292 | } | ||
| 293 | if (fp->type != tp) | ||
| 294 | { | ||
| 295 | tp=fp->type; | ||
| 296 | if (!nl) BIO_printf(bio_err,"\n"); | ||
| 297 | if (tp == FUNC_TYPE_MD) | ||
| 298 | { | ||
| 299 | i=1; | ||
| 300 | BIO_printf(bio_err, | ||
| 301 | "Message Digest commands - see the dgst command for more details\n"); | ||
| 302 | } | ||
| 303 | else if (tp == FUNC_TYPE_CIPHER) | ||
| 304 | { | ||
| 305 | i=1; | ||
| 306 | BIO_printf(bio_err,"Cipher commands - see the enc command for more details\n"); | ||
| 307 | } | ||
| 308 | } | ||
| 309 | BIO_printf(bio_err,"%-15s",fp->name); | ||
| 310 | } | ||
| 311 | BIO_printf(bio_err,"\nquit\n"); | ||
| 312 | ret=0; | ||
| 313 | } | ||
| 314 | end: | ||
| 315 | return(ret); | ||
| 316 | } | ||
| 317 | |||
| 318 | static LHASH *prog_init() | ||
| 319 | { | ||
| 320 | LHASH *ret; | ||
| 321 | FUNCTION *f; | ||
| 322 | |||
| 323 | if ((ret=lh_new(hash,cmp)) == NULL) return(NULL); | ||
| 324 | |||
| 325 | for (f=functions; f->name != NULL; f++) | ||
| 326 | lh_insert(ret,(char *)f); | ||
| 327 | return(ret); | ||
| 328 | } | ||
| 329 | |||
| 330 | static int MS_CALLBACK cmp(a,b) | ||
| 331 | FUNCTION *a,*b; | ||
| 332 | { | ||
| 333 | return(strncmp(a->name,b->name,8)); | ||
| 334 | } | ||
| 335 | |||
| 336 | static unsigned long MS_CALLBACK hash(a) | ||
| 337 | FUNCTION *a; | ||
| 338 | { | ||
| 339 | return(lh_strhash(a->name)); | ||
| 340 | } | ||
| 341 | |||
| 342 | #undef SSLEAY | ||
diff --git a/src/lib/libssl/src/apps/ssleay.cnf b/src/lib/libssl/src/apps/ssleay.cnf new file mode 100644 index 0000000000..0b3bfa64f8 --- /dev/null +++ b/src/lib/libssl/src/apps/ssleay.cnf | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | # | ||
| 2 | # SSLeay example configuration file. | ||
| 3 | # This is mostly being used for generation of certificate requests. | ||
| 4 | # | ||
| 5 | |||
| 6 | RANDFILE = $ENV::HOME/.rnd | ||
| 7 | |||
| 8 | #################################################################### | ||
| 9 | [ ca ] | ||
| 10 | default_ca = CA_default # The default ca section | ||
| 11 | |||
| 12 | #################################################################### | ||
| 13 | [ CA_default ] | ||
| 14 | |||
| 15 | dir = ./demoCA # Where everything is kept | ||
| 16 | certs = $dir/certs # Where the issued certs are kept | ||
| 17 | crl_dir = $dir/crl # Where the issued crl are kept | ||
| 18 | database = $dir/index.txt # database index file. | ||
| 19 | new_certs_dir = $dir/newcerts # default place for new certs. | ||
| 20 | |||
| 21 | certificate = $dir/cacert.pem # The CA certificate | ||
| 22 | serial = $dir/serial # The current serial number | ||
| 23 | crl = $dir/crl.pem # The current CRL | ||
| 24 | private_key = $dir/private/cakey.pem# The private key | ||
| 25 | RANDFILE = $dir/private/.rand # private random number file | ||
| 26 | |||
| 27 | x509_extensions = x509v3_extensions # The extentions to add to the cert | ||
| 28 | default_days = 365 # how long to certify for | ||
| 29 | default_crl_days= 30 # how long before next CRL | ||
| 30 | default_md = md5 # which md to use. | ||
| 31 | preserve = no # keep passed DN ordering | ||
| 32 | |||
| 33 | # A few difference way of specifying how similar the request should look | ||
| 34 | # For type CA, the listed attributes must be the same, and the optional | ||
| 35 | # and supplied fields are just that :-) | ||
| 36 | policy = policy_match | ||
| 37 | |||
| 38 | # For the CA policy | ||
| 39 | [ policy_match ] | ||
| 40 | countryName = match | ||
| 41 | stateOrProvinceName = match | ||
| 42 | organizationName = match | ||
| 43 | organizationalUnitName = optional | ||
| 44 | commonName = supplied | ||
| 45 | emailAddress = optional | ||
| 46 | |||
| 47 | # For the 'anything' policy | ||
| 48 | # At this point in time, you must list all acceptable 'object' | ||
| 49 | # types. | ||
| 50 | [ policy_anything ] | ||
| 51 | countryName = optional | ||
| 52 | stateOrProvinceName = optional | ||
| 53 | localityName = optional | ||
| 54 | organizationName = optional | ||
| 55 | organizationalUnitName = optional | ||
| 56 | commonName = supplied | ||
| 57 | emailAddress = optional | ||
| 58 | |||
| 59 | #################################################################### | ||
| 60 | [ req ] | ||
| 61 | default_bits = 1024 | ||
| 62 | default_keyfile = privkey.pem | ||
| 63 | distinguished_name = req_distinguished_name | ||
| 64 | attributes = req_attributes | ||
| 65 | |||
| 66 | [ req_distinguished_name ] | ||
| 67 | countryName = Country Name (2 letter code) | ||
| 68 | countryName_default = AU | ||
| 69 | countryName_min = 2 | ||
| 70 | countryName_max = 2 | ||
| 71 | |||
| 72 | stateOrProvinceName = State or Province Name (full name) | ||
| 73 | stateOrProvinceName_default = Some-State | ||
| 74 | |||
| 75 | localityName = Locality Name (eg, city) | ||
| 76 | |||
| 77 | 0.organizationName = Organization Name (eg, company) | ||
| 78 | 0.organizationName_default = Internet Widgits Pty Ltd | ||
| 79 | |||
| 80 | # we can do this but it is not needed normally :-) | ||
| 81 | #1.organizationName = Second Organization Name (eg, company) | ||
| 82 | #1.organizationName_default = CryptSoft Pty Ltd | ||
| 83 | |||
| 84 | organizationalUnitName = Organizational Unit Name (eg, section) | ||
| 85 | #organizationalUnitName_default = | ||
| 86 | |||
| 87 | commonName = Common Name (eg, YOUR name) | ||
| 88 | commonName_max = 64 | ||
| 89 | |||
| 90 | emailAddress = Email Address | ||
| 91 | emailAddress_max = 40 | ||
| 92 | |||
| 93 | [ req_attributes ] | ||
| 94 | challengePassword = A challenge password | ||
| 95 | challengePassword_min = 4 | ||
| 96 | challengePassword_max = 20 | ||
| 97 | |||
| 98 | unstructuredName = An optional company name | ||
| 99 | |||
| 100 | [ x509v3_extensions ] | ||
| 101 | |||
| 102 | nsCaRevocationUrl = http://www.cryptsoft.com/ca-crl.pem | ||
| 103 | nsComment = "This is a comment" | ||
| 104 | |||
| 105 | # under ASN.1, the 0 bit would be encoded as 80 | ||
| 106 | nsCertType = 0x40 | ||
| 107 | |||
| 108 | #nsBaseUrl | ||
| 109 | #nsRevocationUrl | ||
| 110 | #nsRenewalUrl | ||
| 111 | #nsCaPolicyUrl | ||
| 112 | #nsSslServerName | ||
| 113 | #nsCertSequence | ||
| 114 | #nsCertExt | ||
| 115 | #nsDataType | ||
| 116 | |||
diff --git a/src/lib/libssl/src/apps/tkca b/src/lib/libssl/src/apps/tkca new file mode 100644 index 0000000000..bdaf21606a --- /dev/null +++ b/src/lib/libssl/src/apps/tkca | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | #!/usr/local/bin/perl5 | ||
| 2 | # | ||
| 3 | # This is only something I'm playing with, it does not work :-) | ||
| 4 | # | ||
| 5 | |||
| 6 | use Tk; | ||
| 7 | |||
| 8 | my $main=MainWindow->new(); | ||
| 9 | my $f=$main->Frame(-relief => "ridge", -borderwidth => 2); | ||
| 10 | $f->pack(-fill => 'x'); | ||
| 11 | |||
| 12 | my $ff=$f->Frame; | ||
| 13 | $ff->pack(-fill => 'x'); | ||
| 14 | my $l=$ff->Label(-text => "TkCA - SSLeay", | ||
| 15 | -relief => "ridge", -borderwidth => 2); | ||
| 16 | $l->pack(-fill => 'x', -ipady => 5); | ||
| 17 | |||
| 18 | my $l=$ff->Button(-text => "Certify"); | ||
| 19 | $l->pack(-fill => 'x', -ipady => 5); | ||
| 20 | |||
| 21 | my $l=$ff->Button(-text => "Review"); | ||
| 22 | $l->pack(-fill => 'x', -ipady => 5); | ||
| 23 | |||
| 24 | my $l=$ff->Button(-text => "Revoke"); | ||
| 25 | $l->pack(-fill => 'x', -ipady => 5); | ||
| 26 | |||
| 27 | my $l=$ff->Button(-text => "Generate CRL"); | ||
| 28 | $l->pack(-fill => 'x', -ipady => 5); | ||
| 29 | |||
| 30 | my($db)=&load_db("demoCA/index.txt"); | ||
| 31 | |||
| 32 | MainLoop; | ||
| 33 | |||
| 34 | sub load_db | ||
| 35 | { | ||
| 36 | my(%ret); | ||
| 37 | my($file)=@_; | ||
| 38 | my(*IN); | ||
| 39 | my(%db_serial,%db_name,@f,@db_s); | ||
| 40 | |||
| 41 | $ret{'serial'}=\%db_serial; | ||
| 42 | $ret{'name'}=\%db_name; | ||
| 43 | |||
| 44 | open(IN,"<$file") || die "unable to open $file:$!\n"; | ||
| 45 | while (<IN>) | ||
| 46 | { | ||
| 47 | chop; | ||
| 48 | s/([^\\])\t/\1\t\t/g; | ||
| 49 | my(@f)=split(/\t\t/); | ||
| 50 | die "wrong number of fields in $file, line $.\n" | ||
| 51 | if ($#f != 5); | ||
| 52 | |||
| 53 | my(%f); | ||
| 54 | $f{'type'}=$f[0]; | ||
| 55 | $f{'exp'}=$f[1]; | ||
| 56 | $f{'rev'}=$f[2]; | ||
| 57 | $f{'serial'}=$f[3]; | ||
| 58 | $f{'file'}=$f[4]; | ||
| 59 | $f{'name'}=$f[5]; | ||
| 60 | die "serial number $f{'serial'} appears twice (line $.)\n" | ||
| 61 | if (defined($db{$f{'serial'}})) | ||
| 62 | $db_serial{$f{'serial'}}=\%f; | ||
| 63 | $db_name{$f{'name'}}.=$f{'serial'}." "; | ||
| 64 | } | ||
| 65 | return \%ret; | ||
| 66 | } | ||
diff --git a/src/lib/libssl/src/certs/ICE-CA.pem b/src/lib/libssl/src/certs/ICE-CA.pem new file mode 100644 index 0000000000..75652366c2 --- /dev/null +++ b/src/lib/libssl/src/certs/ICE-CA.pem | |||
| @@ -0,0 +1,59 @@ | |||
| 1 | Certificate: | ||
| 2 | Data: | ||
| 3 | Version: 3 (0x2) | ||
| 4 | Serial Number: 1 (0x1) | ||
| 5 | Signature Algorithm: md5WithRSAEncryption | ||
| 6 | Issuer: O=European ICE-TEL project, OU=V3-Certification Authority | ||
| 7 | Validity | ||
| 8 | Not Before: Apr 2 17:35:53 1997 GMT | ||
| 9 | Not After : Apr 2 17:35:53 1998 GMT | ||
| 10 | Subject: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt | ||
| 11 | Subject Public Key Info: | ||
| 12 | Public Key Algorithm: rsa | ||
| 13 | RSA Public Key: (512 bit) | ||
| 14 | Modulus (512 bit): | ||
| 15 | 00:82:75:ba:f6:d1:60:b5:f9:15:b3:6a:dd:29:8f: | ||
| 16 | 8b:a4:6f:1a:88:e0:50:43:40:0b:79:41:d5:d3:16: | ||
| 17 | 44:7d:74:65:17:42:06:52:0b:e9:50:c8:10:cd:24: | ||
| 18 | e2:ae:8d:22:30:73:e6:b4:b7:93:1f:e5:6e:a2:ae: | ||
| 19 | 49:11:a5:c9:45 | ||
| 20 | Exponent: 65537 (0x10001) | ||
| 21 | X509v3 extensions: | ||
| 22 | X509v3 Authority Key Identifier: | ||
| 23 | 0.........z.."p......e.. | ||
| 24 | X509v3 Subject Key Identifier: | ||
| 25 | ..~r..:..B.44fu......3 | ||
| 26 | X509v3 Key Usage: critical | ||
| 27 | .... | ||
| 28 | X509v3 Certificate Policies: critical | ||
| 29 | 0.0...*... | ||
| 30 | X509v3 Subject Alternative Name: | ||
| 31 | 0!..secude-support@darmstadt.gmd.de | ||
| 32 | X509v3 Issuer Alternative Name: | ||
| 33 | 0I..ice-tel-ca@darmstadt.gmd.de.*http://www.darmstadt.gmd.de/ice-tel/euroca | ||
| 34 | X509v3 Basic Constraints: critical | ||
| 35 | 0.... | ||
| 36 | X509v3 CRL Distribution Points: | ||
| 37 | 0200...,.*http://www.darmstadt.gmd.de/ice-tel/euroca | ||
| 38 | Signature Algorithm: md5WithRSAEncryption | ||
| 39 | 17:a2:88:b7:99:5a:05:41:e4:13:34:67:e6:1f:3e:26:ec:4b: | ||
| 40 | 69:f9:3e:28:22:be:9d:1c:ab:41:6f:0c:00:85:fe:45:74:f6: | ||
| 41 | 98:f0:ce:9b:65:53:4a:50:42:c7:d4:92:bd:d7:a2:a8:3d:98: | ||
| 42 | 88:73:cd:60:28:79:a3:fc:48:7a | ||
| 43 | -----BEGIN CERTIFICATE----- | ||
| 44 | MIICzDCCAnagAwIBAgIBATANBgkqhkiG9w0BAQQFADBIMSEwHwYDVQQKExhFdXJv | ||
| 45 | cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g | ||
| 46 | QXV0aG9yaXR5MB4XDTk3MDQwMjE3MzU1M1oXDTk4MDQwMjE3MzU1M1owXDEhMB8G | ||
| 47 | A1UEChMYRXVyb3BlYW4gSUNFLVRFTCBwcm9qZWN0MSMwIQYDVQQLExpWMy1DZXJ0 | ||
| 48 | aWZpY2F0aW9uIEF1dGhvcml0eTESMBAGA1UEBxMJRGFybXN0YWR0MFkwCgYEVQgB | ||
| 49 | AQICAgADSwAwSAJBAIJ1uvbRYLX5FbNq3SmPi6RvGojgUENAC3lB1dMWRH10ZRdC | ||
| 50 | BlIL6VDIEM0k4q6NIjBz5rS3kx/lbqKuSRGlyUUCAwEAAaOCATgwggE0MB8GA1Ud | ||
| 51 | IwQYMBaAFIr3yNUOx3ro1yJw4AuJ1bbsZbzPMB0GA1UdDgQWBBR+cvL4OoacQog0 | ||
| 52 | NGZ1w9T80aIRMzAOBgNVHQ8BAf8EBAMCAfYwFAYDVR0gAQH/BAowCDAGBgQqAwQF | ||
| 53 | MCoGA1UdEQQjMCGBH3NlY3VkZS1zdXBwb3J0QGRhcm1zdGFkdC5nbWQuZGUwUgYD | ||
| 54 | VR0SBEswSYEbaWNlLXRlbC1jYUBkYXJtc3RhZHQuZ21kLmRlhipodHRwOi8vd3d3 | ||
| 55 | LmRhcm1zdGFkdC5nbWQuZGUvaWNlLXRlbC9ldXJvY2EwDwYDVR0TAQH/BAUwAwEB | ||
| 56 | /zA7BgNVHR8ENDAyMDCgLqAshipodHRwOi8vd3d3LmRhcm1zdGFkdC5nbWQuZGUv | ||
| 57 | aWNlLXRlbC9ldXJvY2EwDQYJKoZIhvcNAQEEBQADQQAXooi3mVoFQeQTNGfmHz4m | ||
| 58 | 7Etp+T4oIr6dHKtBbwwAhf5FdPaY8M6bZVNKUELH1JK916KoPZiIc81gKHmj/Eh6 | ||
| 59 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/certs/ICE-root.pem b/src/lib/libssl/src/certs/ICE-root.pem new file mode 100644 index 0000000000..fa991599c9 --- /dev/null +++ b/src/lib/libssl/src/certs/ICE-root.pem | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | Certificate: | ||
| 2 | Data: | ||
| 3 | Version: 3 (0x2) | ||
| 4 | Serial Number: 0 (0x0) | ||
| 5 | Signature Algorithm: md5WithRSAEncryption | ||
| 6 | Issuer: O=European ICE-TEL project, OU=V3-Certification Authority | ||
| 7 | Validity | ||
| 8 | Not Before: Apr 2 17:33:36 1997 GMT | ||
| 9 | Not After : Apr 2 17:33:36 1998 GMT | ||
| 10 | Subject: O=European ICE-TEL project, OU=V3-Certification Authority | ||
| 11 | Subject Public Key Info: | ||
| 12 | Public Key Algorithm: rsa | ||
| 13 | RSA Public Key: (512 bit) | ||
| 14 | Modulus (512 bit): | ||
| 15 | 00:80:3e:eb:ae:47:a9:fe:10:54:0b:81:8b:9c:2b: | ||
| 16 | 82:ab:3a:61:36:65:8b:f3:73:9f:ac:ac:7a:15:a7: | ||
| 17 | 13:8f:b4:c4:ba:a3:0f:bc:a5:58:8d:cc:b1:93:31: | ||
| 18 | 9e:81:9e:8c:19:61:86:fa:52:73:54:d1:97:76:22: | ||
| 19 | e7:c7:9f:41:cd | ||
| 20 | Exponent: 65537 (0x10001) | ||
| 21 | X509v3 extensions: | ||
| 22 | X509v3 Subject Key Identifier: | ||
| 23 | ........z.."p......e.. | ||
| 24 | X509v3 Key Usage: critical | ||
| 25 | .... | ||
| 26 | X509v3 Subject Alternative Name: | ||
| 27 | 0I.*http://www.darmstadt.gmd.de/ice-tel/euroca..ice-tel-ca@darmstadt.gmd.de | ||
| 28 | X509v3 Basic Constraints: critical | ||
| 29 | 0.... | ||
| 30 | Signature Algorithm: md5WithRSAEncryption | ||
| 31 | 76:69:61:db:b7:cf:8b:06:9e:d8:8c:96:53:d2:4d:a8:23:a6: | ||
| 32 | 03:44:e8:8f:24:a5:c0:84:a8:4b:77:d4:2d:2b:7d:37:91:67: | ||
| 33 | f2:2c:ce:02:31:4c:6b:cc:ce:f2:68:a6:11:11:ab:7d:88:b8: | ||
| 34 | 7e:22:9f:25:06:60:bd:79:30:3d | ||
| 35 | -----BEGIN CERTIFICATE----- | ||
| 36 | MIICFjCCAcCgAwIBAgIBADANBgkqhkiG9w0BAQQFADBIMSEwHwYDVQQKExhFdXJv | ||
| 37 | cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g | ||
| 38 | QXV0aG9yaXR5MB4XDTk3MDQwMjE3MzMzNloXDTk4MDQwMjE3MzMzNlowSDEhMB8G | ||
| 39 | A1UEChMYRXVyb3BlYW4gSUNFLVRFTCBwcm9qZWN0MSMwIQYDVQQLExpWMy1DZXJ0 | ||
| 40 | aWZpY2F0aW9uIEF1dGhvcml0eTBZMAoGBFUIAQECAgIAA0sAMEgCQQCAPuuuR6n+ | ||
| 41 | EFQLgYucK4KrOmE2ZYvzc5+srHoVpxOPtMS6ow+8pViNzLGTMZ6BnowZYYb6UnNU | ||
| 42 | 0Zd2IufHn0HNAgMBAAGjgZcwgZQwHQYDVR0OBBYEFIr3yNUOx3ro1yJw4AuJ1bbs | ||
| 43 | ZbzPMA4GA1UdDwEB/wQEAwIB9jBSBgNVHREESzBJhipodHRwOi8vd3d3LmRhcm1z | ||
| 44 | dGFkdC5nbWQuZGUvaWNlLXRlbC9ldXJvY2GBG2ljZS10ZWwtY2FAZGFybXN0YWR0 | ||
| 45 | LmdtZC5kZTAPBgNVHRMBAf8EBTADAQH/MA0GCSqGSIb3DQEBBAUAA0EAdmlh27fP | ||
| 46 | iwae2IyWU9JNqCOmA0TojySlwISoS3fULSt9N5Fn8izOAjFMa8zO8mimERGrfYi4 | ||
| 47 | fiKfJQZgvXkwPQ== | ||
| 48 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/certs/ICE-user.pem b/src/lib/libssl/src/certs/ICE-user.pem new file mode 100644 index 0000000000..28065fd37d --- /dev/null +++ b/src/lib/libssl/src/certs/ICE-user.pem | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | Certificate: | ||
| 2 | Data: | ||
| 3 | Version: 3 (0x2) | ||
| 4 | Serial Number: 1 (0x1) | ||
| 5 | Signature Algorithm: md5WithRSAEncryption | ||
| 6 | Issuer: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt | ||
| 7 | Validity | ||
| 8 | Not Before: Apr 2 17:35:59 1997 GMT | ||
| 9 | Not After : Apr 2 17:35:59 1998 GMT | ||
| 10 | Subject: O=European ICE-TEL project, OU=V3-Certification Authority, L=Darmstadt, CN=USER | ||
| 11 | Subject Public Key Info: | ||
| 12 | Public Key Algorithm: rsa | ||
| 13 | RSA Public Key: (512 bit) | ||
| 14 | Modulus (512 bit): | ||
| 15 | 00:a8:a8:53:63:49:1b:93:c3:c3:0b:6c:88:11:55: | ||
| 16 | de:7e:6a:e2:f9:52:a0:dc:69:25:c4:c8:bf:55:e1: | ||
| 17 | 31:a8:ce:e4:a9:29:85:99:8a:15:9a:de:f6:2f:e1: | ||
| 18 | b4:50:5f:5e:04:75:a6:f4:76:dc:3c:0e:39:dc:3a: | ||
| 19 | be:3e:a4:61:8b | ||
| 20 | Exponent: 65537 (0x10001) | ||
| 21 | X509v3 extensions: | ||
| 22 | X509v3 Authority Key Identifier: | ||
| 23 | 0...~r..:..B.44fu......3 | ||
| 24 | X509v3 Subject Key Identifier: | ||
| 25 | ...... .*...1.*....... | ||
| 26 | X509v3 Key Usage: critical | ||
| 27 | .... | ||
| 28 | X509v3 Certificate Policies: critical | ||
| 29 | 0.0...*...0....... | ||
| 30 | X509v3 Subject Alternative Name: | ||
| 31 | 0:..user@darmstadt.gmd.de.!http://www.darmstadt.gmd.de/~user | ||
| 32 | X509v3 Issuer Alternative Name: | ||
| 33 | 0....gmdca@gmd.de..http://www.gmd.de..saturn.darmstadt.gmd.de.\1!0...U. | ||
| 34 | ..European ICE-TEL project1#0!..U....V3-Certification Authority1.0...U....Darmstadt..141.12.62.26 | ||
| 35 | X509v3 Basic Constraints: critical | ||
| 36 | 0. | ||
| 37 | X509v3 CRL Distribution Points: | ||
| 38 | 0.0.......gmdca@gmd.de | ||
| 39 | Signature Algorithm: md5WithRSAEncryption | ||
| 40 | 69:0c:e1:b7:a7:f2:d8:fb:e8:69:c0:13:cd:37:ad:21:06:22: | ||
| 41 | 4d:e8:c6:db:f1:04:0b:b7:e0:b3:d6:0c:81:03:ce:c3:6a:3e: | ||
| 42 | c7:e7:24:24:a4:92:64:c2:83:83:06:42:53:0e:6f:09:1e:84: | ||
| 43 | 9a:f7:6f:63:9b:94:99:83:d6:a4 | ||
| 44 | -----BEGIN CERTIFICATE----- | ||
| 45 | MIIDTzCCAvmgAwIBAgIBATANBgkqhkiG9w0BAQQFADBcMSEwHwYDVQQKExhFdXJv | ||
| 46 | cGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24g | ||
| 47 | QXV0aG9yaXR5MRIwEAYDVQQHEwlEYXJtc3RhZHQwHhcNOTcwNDAyMTczNTU5WhcN | ||
| 48 | OTgwNDAyMTczNTU5WjBrMSEwHwYDVQQKExhFdXJvcGVhbiBJQ0UtVEVMIHByb2pl | ||
| 49 | Y3QxIzAhBgNVBAsTGlYzLUNlcnRpZmljYXRpb24gQXV0aG9yaXR5MRIwEAYDVQQH | ||
| 50 | EwlEYXJtc3RhZHQxDTALBgNVBAMTBFVTRVIwWTAKBgRVCAEBAgICAANLADBIAkEA | ||
| 51 | qKhTY0kbk8PDC2yIEVXefmri+VKg3GklxMi/VeExqM7kqSmFmYoVmt72L+G0UF9e | ||
| 52 | BHWm9HbcPA453Dq+PqRhiwIDAQABo4IBmDCCAZQwHwYDVR0jBBgwFoAUfnLy+DqG | ||
| 53 | nEKINDRmdcPU/NGiETMwHQYDVR0OBBYEFJfc4B8gjSoRmLUx4Sq/ucIYiMrPMA4G | ||
| 54 | A1UdDwEB/wQEAwIB8DAcBgNVHSABAf8EEjAQMAYGBCoDBAUwBgYECQgHBjBDBgNV | ||
| 55 | HREEPDA6gRV1c2VyQGRhcm1zdGFkdC5nbWQuZGWGIWh0dHA6Ly93d3cuZGFybXN0 | ||
| 56 | YWR0LmdtZC5kZS9+dXNlcjCBsQYDVR0SBIGpMIGmgQxnbWRjYUBnbWQuZGWGEWh0 | ||
| 57 | dHA6Ly93d3cuZ21kLmRlghdzYXR1cm4uZGFybXN0YWR0LmdtZC5kZaRcMSEwHwYD | ||
| 58 | VQQKExhFdXJvcGVhbiBJQ0UtVEVMIHByb2plY3QxIzAhBgNVBAsTGlYzLUNlcnRp | ||
| 59 | ZmljYXRpb24gQXV0aG9yaXR5MRIwEAYDVQQHEwlEYXJtc3RhZHSHDDE0MS4xMi42 | ||
| 60 | Mi4yNjAMBgNVHRMBAf8EAjAAMB0GA1UdHwQWMBQwEqAQoA6BDGdtZGNhQGdtZC5k | ||
| 61 | ZTANBgkqhkiG9w0BAQQFAANBAGkM4ben8tj76GnAE803rSEGIk3oxtvxBAu34LPW | ||
| 62 | DIEDzsNqPsfnJCSkkmTCg4MGQlMObwkehJr3b2OblJmD1qQ= | ||
| 63 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/certs/ICE.crl b/src/lib/libssl/src/certs/ICE.crl new file mode 100644 index 0000000000..21939e8cc4 --- /dev/null +++ b/src/lib/libssl/src/certs/ICE.crl | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | -----BEGIN X509 CRL----- | ||
| 2 | MIIBNDCBnjANBgkqhkiG9w0BAQIFADBFMSEwHwYDVQQKExhFdXJvcGVhbiBJQ0Ut | ||
| 3 | VEVMIFByb2plY3QxIDAeBgNVBAsTF0NlcnRpZmljYXRpb24gQXV0aG9yaXR5Fw05 | ||
| 4 | NzA2MDkxNDQyNDNaFw05NzA3MDkxNDQyNDNaMCgwEgIBChcNOTcwMzAzMTQ0MjU0 | ||
| 5 | WjASAgEJFw05NjEwMDIxMjI5MjdaMA0GCSqGSIb3DQEBAgUAA4GBAH4vgWo2Tej/ | ||
| 6 | i7kbiw4Imd30If91iosjClNpBFwvwUDBclPEeMuYimHbLOk4H8Nofc0fw11+U/IO | ||
| 7 | KSNouUDcqG7B64oY7c4SXKn+i1MWOb5OJiWeodX3TehHjBlyWzoNMWCnYA8XqFP1 | ||
| 8 | mOKp8Jla1BibEZf14+/HqCi2hnZUiEXh | ||
| 9 | -----END X509 CRL----- | ||
diff --git a/src/lib/libssl/src/certs/ca-cert.pem b/src/lib/libssl/src/certs/ca-cert.pem new file mode 100644 index 0000000000..6dd974d70d --- /dev/null +++ b/src/lib/libssl/src/certs/ca-cert.pem | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit) | ||
| 2 | subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit) | ||
| 3 | -----BEGIN CERTIFICATE----- | ||
| 4 | MIICJjCCAY8CAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV | ||
| 5 | BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD | ||
| 6 | VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTc0M1oXDTAxMDYw | ||
| 7 | OTEzNTc0M1owWzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY | ||
| 8 | BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYDVQQDExJUZXN0IENBICgxMDI0 | ||
| 9 | IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKO7o8t116VP6cgybTsZ | ||
| 10 | DCZhr95nYlZuya3aCi1IKoztqwWnjbmDFIriOqGFPrZQ+moMETC9D59iRW/dFXSv | ||
| 11 | 1F65ka/XY2hLh9exCCo7XuUcDs53Qp3bI3AmMqHjgzE8oO3ajyJAzJkTTOUecQU2 | ||
| 12 | mw/gI4tMM0LqWMQS7luTy4+xAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAM7achv3v | ||
| 13 | hLQJcv/65eGEpBXM40ZDVoFQFFJWaY5p883HTqLB1x4FdzsXHH0QKBTcKpWwqyu4 | ||
| 14 | YDm3fb8oDugw72bCzfyZK/zVZPR/hVlqI/fvU109Qoc+7oPvIXWky71HfcK6ZBCA | ||
| 15 | q30KIqGM/uoM60INq97qjDmCJapagcNBGQs= | ||
| 16 | -----END CERTIFICATE----- | ||
| 17 | -----BEGIN RSA PRIVATE KEY----- | ||
| 18 | MIICXQIBAAKBgQCju6PLddelT+nIMm07GQwmYa/eZ2JWbsmt2gotSCqM7asFp425 | ||
| 19 | gxSK4jqhhT62UPpqDBEwvQ+fYkVv3RV0r9ReuZGv12NoS4fXsQgqO17lHA7Od0Kd | ||
| 20 | 2yNwJjKh44MxPKDt2o8iQMyZE0zlHnEFNpsP4COLTDNC6ljEEu5bk8uPsQIDAQAB | ||
| 21 | AoGAVZmpFZsDZfr0l2S9tLLwpjRWNOlKATQkno6q2WesT0eGLQufTciY+c8ypfU6 | ||
| 22 | hyio8r5iUl/VhhdjhAtKx1mRpiotftHo/eYf8rtsrnprOnWG0bWjLjtIoMbcxGn2 | ||
| 23 | J3bN6LJmbJMjDs0eJ3KnTu646F3nDUw2oGAwmpzKXA1KAP0CQQDRvQhxk2D3Pehs | ||
| 24 | HvG665u2pB5ipYQngEFlZO7RHJZzJOZEWSLuuMqaF/7pTfA5jiBvWqCgJeCRRInL | ||
| 25 | 21ru4dlPAkEAx9jj7BgKn5TYnMoBSSe0afjsV9oApVpN1Nacb1YDtCwy+scp3++s | ||
| 26 | nFxlv98wxIlSdpwMUn+AUWfjiWR7Tu/G/wJBAJ/KjwZIrFVxewP0x2ILYsTRYLzz | ||
| 27 | MS4PDsO7FB+I0i7DbBOifXS2oNSpd3I0CNMwrxFnUHzynpbOStVfN3ZL5w0CQQCa | ||
| 28 | pwFahxBRhkJKsxhjoFJBX9yl75JoY4Wvm5Tbo9ih6UJaRx3kqfkN14L2BKYcsZgb | ||
| 29 | KY9vmDOYy6iNfjDeWTfJAkBkfPUb8oTJ/nSP5zN6sqGxSY4krc4xLxpRmxoJ8HL2 | ||
| 30 | XfhqXkTzbU13RX9JJ/NZ8vQN9Vm2NhxRGJocQkmcdVtJ | ||
| 31 | -----END RSA PRIVATE KEY----- | ||
diff --git a/src/lib/libssl/src/certs/dsa-ca.pem b/src/lib/libssl/src/certs/dsa-ca.pem new file mode 100644 index 0000000000..9eb08f3ddd --- /dev/null +++ b/src/lib/libssl/src/certs/dsa-ca.pem | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | -----BEGIN DSA PRIVATE KEY----- | ||
| 2 | Proc-Type: 4,ENCRYPTED | ||
| 3 | DEK-Info: DES-EDE3-CBC,C5B6C7CC9E1FE2C0 | ||
| 4 | |||
| 5 | svCXBcBRhMuU22UXOfiKZA+thmz6KYXpt1Yg5Rd+TYQcQ1MdvNy0B0tkP1SxzDq0 | ||
| 6 | Xh1eMeTML9/9/0rKakgNXXXbpi5RB8t6BmwRSyej89F7nn1mtR3qzoyPRpp15SDl | ||
| 7 | Tn67C+2v+HDF3MFk88hiNCYkNbcmi7TWvChsl8N1r7wdZwtIox56yXdgxw6ZIpa/ | ||
| 8 | par0oUCzN7fiavPgCWz1kfPNSaBQSdxwH7TZi5tMHAr0J3C7a7QRnZfE09R59Uqr | ||
| 9 | zslrq+ndIw1BZAxoY0SlBu+iFOVaBVlwToC4AsHkv7j7l8ITtr7f42YbBa44D9TO | ||
| 10 | uOhONmkk/v3Fso4RaOEzdKZC+hnmmzvHs6TiTWm6yzJgSFwyOUK0eGmKEeVxpcH5 | ||
| 11 | rUOlHOwzen+FFtocZDZAfdFnb7QY7L/boQvyA5A+ZbRG4DUpmBQeQsSaICHM5Rxx | ||
| 12 | 1QaLF413VNPXTLPbW0ilSc2H8x2iZTIVKfd33oSO6NhXPtSYQgfecEF4BvNHY5c4 | ||
| 13 | HovjT4mckbK95bcBzoCHu43vuSQkmZzdYo/ydSZt6zoPavbBLueTpgSbdXiDi827 | ||
| 14 | MVqOsYxGCb+kez0FoDSTgw== | ||
| 15 | -----END DSA PRIVATE KEY----- | ||
| 16 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 17 | MIICUjCCAhECAQAwUjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx | ||
| 18 | ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDELMAkGA1UEAxMCQ0Ew | ||
| 19 | ggG0MIIBKQYFKw4DAgwwggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaW | ||
| 20 | sxXgUy6P4FmCc5A+dTGZR3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5m | ||
| 21 | rmuINvvsKNzC16W75Sw5JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHk | ||
| 22 | cJVbUM1JAhUA9wcx7fpsBgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVo | ||
| 23 | bzDjaeHls12YuyiGSPzemQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqR | ||
| 24 | CZ228U2cVA9YBu5JdAfOVX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxB | ||
| 25 | F5WS6wG1c6Vqftgy7Q4CuAOBhAACgYAapll6iqz9XrZFlk2GCVcB+KihxWnH7IuH | ||
| 26 | vSLw9YUrJahcBHmbpvt494lF4gC5w3WPM+vXJofbusk4GoQEEsQNMDaah4m49uUq | ||
| 27 | AylOVFJJJXuirVJ+o+0TtOFDITEAl+YZZariXOD7tdOSOl9RLMPC6+daHKS9e68u | ||
| 28 | 3enxhqnDGaAAMAkGBSsOAwIbBQADMAAwLQIVAJGVuFsG/0DBuSZ0jF7ypdU0/G0v | ||
| 29 | AhQfeF5BoMMDbX/kidUVpQ6gadPlZA== | ||
| 30 | -----END CERTIFICATE REQUEST----- | ||
| 31 | -----BEGIN CERTIFICATE----- | ||
| 32 | MIIBrjCCAWwCAQswCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK | ||
| 33 | U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww | ||
| 34 | CgYDVQQDEwNQQ0EwHhcNOTcwNjE1MDIxNDI5WhcNOTcwNzE1MDIxNDI5WjBSMQsw | ||
| 35 | CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu | ||
| 36 | ZXQgV2lkZ2l0cyBQdHkgTHRkMQswCQYDVQQDEwJDQTCBkjAJBgUrDgMCDAUAA4GE | ||
| 37 | AAKBgBqmWXqKrP1etkWWTYYJVwH4qKHFacfsi4e9IvD1hSslqFwEeZum+3j3iUXi | ||
| 38 | ALnDdY8z69cmh9u6yTgahAQSxA0wNpqHibj25SoDKU5UUkkle6KtUn6j7RO04UMh | ||
| 39 | MQCX5hllquJc4Pu105I6X1Esw8Lr51ocpL17ry7d6fGGqcMZMAkGBSsOAwIbBQAD | ||
| 40 | MQAwLgIVAJ4wtQsANPxHo7Q4IQZYsL12SKdbAhUAjJ9n38zxT+iai2164xS+LIfa | ||
| 41 | C1Q= | ||
| 42 | -----END CERTIFICATE----- | ||
| 43 | |||
diff --git a/src/lib/libssl/src/certs/dsa-pca.pem b/src/lib/libssl/src/certs/dsa-pca.pem new file mode 100644 index 0000000000..e3641ad47e --- /dev/null +++ b/src/lib/libssl/src/certs/dsa-pca.pem | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | -----BEGIN DSA PRIVATE KEY----- | ||
| 2 | Proc-Type: 4,ENCRYPTED | ||
| 3 | DEK-Info: DES-EDE3-CBC,F80EEEBEEA7386C4 | ||
| 4 | |||
| 5 | GZ9zgFcHOlnhPoiSbVi/yXc9mGoj44A6IveD4UlpSEUt6Xbse3Fr0KHIUyQ3oGnS | ||
| 6 | mClKoAp/eOTb5Frhto85SzdsxYtac+X1v5XwdzAMy2KowHVk1N8A5jmE2OlkNPNt | ||
| 7 | of132MNlo2cyIRYaa35PPYBGNCmUm7YcYS8O90YtkrQZZTf4+2C4kllhMcdkQwkr | ||
| 8 | FWSWC8YOQ7w0LHb4cX1FejHHom9Nd/0PN3vn3UyySvfOqoR7nbXkrpHXmPIr0hxX | ||
| 9 | RcF0aXcV/CzZ1/nfXWQf4o3+oD0T22SDoVcZY60IzI0oIc3pNCbDV3uKNmgekrFd | ||
| 10 | qOUJ+QW8oWp7oefRx62iBfIeC8DZunohMXaWAQCU0sLQOR4yEdeUCnzCSywe0bG1 | ||
| 11 | diD0KYaEe+Yub1BQH4aLsBgDjardgpJRTQLq0DUvw0/QGO1irKTJzegEDNVBKrVn | ||
| 12 | V4AHOKT1CUKqvGNRP1UnccUDTF6miOAtaj/qpzra7sSk7dkGBvIEeFoAg84kfh9h | ||
| 13 | hVvF1YyzC9bwZepruoqoUwke/WdNIR5ymOVZ/4Liw0JdIOcq+atbdRX08niqIRkf | ||
| 14 | dsZrUj4leo3zdefYUQ7w4N2Ns37yDFq7 | ||
| 15 | -----END DSA PRIVATE KEY----- | ||
| 16 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 17 | MIICVTCCAhMCAQAwUzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx | ||
| 18 | ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEMMAoGA1UEAxMDUENB | ||
| 19 | MIIBtTCCASkGBSsOAwIMMIIBHgKBgQCnP26Fv0FqKX3wn0cZMJCaCR3aajMexT2G | ||
| 20 | lrMV4FMuj+BZgnOQPnUxmUd6UvuF5NmmezibaIqEm4fGHrV+hktTW1nPcWUZiG7O | ||
| 21 | Zq5riDb77Cjcwtelu+UsOSZL2ppwGJU3lRBWI/YV7boEXt45T/23Qx+1pGVvzYAR | ||
| 22 | 5HCVW1DNSQIVAPcHMe36bAYD1YWKHKycZedQZmVvAoGATd9MA6aRivUZb1BGJZnl | ||
| 23 | aG8w42nh5bNdmLsohkj83pkEP1+IDJxzJA0gXbkqmj8YlifkYofBe3RiU/xhJ6h6 | ||
| 24 | kQmdtvFNnFQPWAbuSXQHzlV+I84W9srcWmEBfslxtU323DQph2j2XiCTs9v15Als | ||
| 25 | QReVkusBtXOlan7YMu0OArgDgYUAAoGBAKbtuR5AdW+ICjCFe2ixjUiJJzM2IKwe | ||
| 26 | 6NZEMXg39+HQ1UTPTmfLZLps+rZfolHDXuRKMXbGFdSF0nXYzotPCzi7GauwEJTZ | ||
| 27 | yr27ZZjA1C6apGSQ9GzuwNvZ4rCXystVEagAS8OQ4H3D4dWS17Zg31ICb5o4E5r0 | ||
| 28 | z09o/Uz46u0VoAAwCQYFKw4DAhsFAAMxADAuAhUArRubTxsbIXy3AhtjQ943AbNB | ||
| 29 | nSICFQCu+g1iW3jwF+gOcbroD4S/ZcvB3w== | ||
| 30 | -----END CERTIFICATE REQUEST----- | ||
| 31 | -----BEGIN CERTIFICATE----- | ||
| 32 | MIIC0zCCApECAQAwCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK | ||
| 33 | U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww | ||
| 34 | CgYDVQQDEwNQQ0EwHhcNOTcwNjE0MjI1NDQ1WhcNOTcwNzE0MjI1NDQ1WjBTMQsw | ||
| 35 | CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu | ||
| 36 | ZXQgV2lkZ2l0cyBQdHkgTHRkMQwwCgYDVQQDEwNQQ0EwggG1MIIBKQYFKw4DAgww | ||
| 37 | ggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaWsxXgUy6P4FmCc5A+dTGZ | ||
| 38 | R3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5mrmuINvvsKNzC16W75Sw5 | ||
| 39 | JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHkcJVbUM1JAhUA9wcx7fps | ||
| 40 | BgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVobzDjaeHls12YuyiGSPze | ||
| 41 | mQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqRCZ228U2cVA9YBu5JdAfO | ||
| 42 | VX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxBF5WS6wG1c6Vqftgy7Q4C | ||
| 43 | uAOBhQACgYEApu25HkB1b4gKMIV7aLGNSIknMzYgrB7o1kQxeDf34dDVRM9OZ8tk | ||
| 44 | umz6tl+iUcNe5EoxdsYV1IXSddjOi08LOLsZq7AQlNnKvbtlmMDULpqkZJD0bO7A | ||
| 45 | 29nisJfKy1URqABLw5DgfcPh1ZLXtmDfUgJvmjgTmvTPT2j9TPjq7RUwCQYFKw4D | ||
| 46 | AhsFAAMxADAuAhUAvtv6AkMolix1Jvy3UnVEIUqdCUICFQC+jq8P49mwrY9oJ24n | ||
| 47 | 5rKUjNBhSg== | ||
| 48 | -----END CERTIFICATE----- | ||
| 49 | |||
diff --git a/src/lib/libssl/src/certs/factory.pem b/src/lib/libssl/src/certs/factory.pem new file mode 100644 index 0000000000..8e28b391b2 --- /dev/null +++ b/src/lib/libssl/src/certs/factory.pem | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | -----BEGIN CERTIFICATE----- | ||
| 2 | MIICTTCCAbagAwIBAgIBADANBgkqhkiG9w0BAQQFADBMMQswCQYDVQQGEwJHQjEM | ||
| 3 | MAoGA1UEChMDVUNMMRgwFgYDVQQLEw9JQ0UtVEVMIFByb2plY3QxFTATBgNVBAMT | ||
| 4 | DFRydXN0RmFjdG9yeTAeFw05NzA0MjIxNDM5MTRaFw05ODA0MjIxNDM5MTRaMEwx | ||
| 5 | CzAJBgNVBAYTAkdCMQwwCgYDVQQKEwNVQ0wxGDAWBgNVBAsTD0lDRS1URUwgUHJv | ||
| 6 | amVjdDEVMBMGA1UEAxMMVHJ1c3RGYWN0b3J5MIGcMAoGBFUIAQECAgQAA4GNADCB | ||
| 7 | iQKBgQCEieR8NcXkUW1f0G6aC6u0i8q/98JqS6RxK5YmHIGKCkuTWAUjzLfUa4dt | ||
| 8 | U9igGCjTuxaDqlzEim+t/02pmiBZT9HaX++35MjQPUWmsChcYU5WyzGErXi+rQaw | ||
| 9 | zlwS73zM8qiPj/97lXYycWhgL0VaiDSPxRXEUdWoaGruom4mNQIDAQABo0IwQDAd | ||
| 10 | BgNVHQ4EFgQUHal1LZr7oVg5z6lYzrhTgZRCmcUwDgYDVR0PAQH/BAQDAgH2MA8G | ||
| 11 | A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAfaggfl6FZoioecjv0dq8 | ||
| 12 | /DXo/u11iMZvXn08gjX/zl2b4wtPbShOSY5FhkSm8GeySasz+/Nwb/uzfnIhokWi | ||
| 13 | lfPZHtlCWtXbIy/TN51eJyq04ceDCQDWvLC2enVg9KB+GJ34b5c5VaPRzq8MBxsA | ||
| 14 | S7ELuYGtmYgYm9NZOIr7yU0= | ||
| 15 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/certs/nortelCA.pem b/src/lib/libssl/src/certs/nortelCA.pem new file mode 100644 index 0000000000..207f34ab3a --- /dev/null +++ b/src/lib/libssl/src/certs/nortelCA.pem | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | -----BEGIN CERTIFICATE----- | ||
| 2 | MIICajCCAdMCBDGA0QUwDQYJKoZIhvcNAQEEBQAwfTELMAkGA1UEBhMCQ2ExDzAN | ||
| 3 | BgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmlsaXR5IEFjY2VwdGVkMR8w | ||
| 4 | HQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRwwGgYDVQQDExNFbnRydXN0 | ||
| 5 | IERlbW8gV2ViIENBMB4XDTk2MDQyNjEzMzUwMVoXDTA2MDQyNjEzMzUwMVowfTEL | ||
| 6 | MAkGA1UEBhMCQ2ExDzANBgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmls | ||
| 7 | aXR5IEFjY2VwdGVkMR8wHQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRww | ||
| 8 | GgYDVQQDExNFbnRydXN0IERlbW8gV2ViIENBMIGdMA0GCSqGSIb3DQEBAQUAA4GL | ||
| 9 | ADCBhwKBgQCaroS7O1DA0hm4IefNYU1cx/nqOmzEnk291d1XqznDeF4wEgakbkCc | ||
| 10 | zTKxK791yNpXG5RmngqH7cygDRTHZJ6mfCRn0wGC+AI00F2vYTGqPGRQL1N3lZT0 | ||
| 11 | YDKFC0SQeMMjFIZ1aeQigroFQnHo0VB3zWIMpNkka8PY9lxHZAmWwQIBAzANBgkq | ||
| 12 | hkiG9w0BAQQFAAOBgQBAx0UMVA1s54lMQyXjMX5kj99FJN5itb8bK1Rk+cegPQPF | ||
| 13 | cWO9SEWyEjjBjIkjjzAwBkaEszFsNGxemxtXvwjIm1xEUMTVlPEWTs2qnDvAUA9W | ||
| 14 | YqhWbhH0toGT36236QAsqCZ76rbTRVSSX2BHyJwJMG2tCRv7kRJ//NIgxj3H4w== | ||
| 15 | -----END CERTIFICATE----- | ||
| 16 | |||
diff --git a/src/lib/libssl/src/certs/pca-cert.pem b/src/lib/libssl/src/certs/pca-cert.pem new file mode 100644 index 0000000000..140e9a6b43 --- /dev/null +++ b/src/lib/libssl/src/certs/pca-cert.pem | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit) | ||
| 2 | subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit) | ||
| 3 | -----BEGIN CERTIFICATE----- | ||
| 4 | MIICJzCCAZACAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV | ||
| 5 | BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD | ||
| 6 | VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTczN1oXDTAxMDYw | ||
| 7 | OTEzNTczN1owXDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY | ||
| 8 | BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYDVQQDExNUZXN0IFBDQSAoMTAy | ||
| 9 | NCBiaXQpMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdoWk/3+WcMlfjIrkg | ||
| 10 | 40ketmnQaEogQe1LLcuOJV6rKfUSAsPgwgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp | ||
| 11 | 22Jp85PmemiDzyUIStwk72qhp1imbANZvlmlCFKiQrjUyuDfu4TABmn+kkt3vR1Y | ||
| 12 | BEOGt+IFye1UBVSATVdRJ2UVhwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABNA1u/S | ||
| 13 | Cg/LJZWb7GliiKJsvuhxlE4E5JxQF2zMub/CSNbF97//tYSyj96sxeFQxZXbcjm9 | ||
| 14 | xt6mr/xNLA4szNQMJ4P+L7b5e/jC5DSqlwS+CUYJgaFs/SP+qJoCSu1bR3IM9XWO | ||
| 15 | cRBpDmcBbYLkSyB92WURvsZ1LtjEcn+cdQVI | ||
| 16 | -----END CERTIFICATE----- | ||
| 17 | -----BEGIN RSA PRIVATE KEY----- | ||
| 18 | MIICXAIBAAKBgQCdoWk/3+WcMlfjIrkg40ketmnQaEogQe1LLcuOJV6rKfUSAsPg | ||
| 19 | wgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp22Jp85PmemiDzyUIStwk72qhp1imbANZ | ||
| 20 | vlmlCFKiQrjUyuDfu4TABmn+kkt3vR1YBEOGt+IFye1UBVSATVdRJ2UVhwIDAQAB | ||
| 21 | AoGAba4fTtuap5l7/8ZsbE7Z1O32KJY4ZcOZukLOLUUhXxXduT+FTgGWujc0/rgc | ||
| 22 | z9qYCLlNZHOouMYTgtSfYvuMuLZ11VIt0GYH+nRioLShE59Yy+zCRyC+gPigS1kz | ||
| 23 | xvo14AsOIPYV14Tk/SsHyq6E0eTk7VzaIE197giiINUERPECQQDSKmtPTh/lRKw7 | ||
| 24 | HSZSM0I1mFWn/1zqrAbontRQY5w98QWIOe5qmzYyFbPXYT3d9BzlsMyhgiRNoBbD | ||
| 25 | yvohSHXJAkEAwAHx6ezAZeWWzD5yXD36nyjpkVCw7Tk7TSmOceLJMWt1QcrCfqlS | ||
| 26 | xA5jjpQ6Z8suU5DdtWAryM2sAir1WisYzwJAd6Zcx56jvAQ3xcPXsE6scBTVFzrj | ||
| 27 | 7FqZ6E+cclPzfLQ+QQsyOBE7bpI6e/FJppY26XGZXo3YGzV8IGXrt40oOQJALETG | ||
| 28 | h86EFXo3qGOFbmsDy4pdP5nBERCu8X1xUCSfintiD4c2DInxgS5oGclnJeMcjTvL | ||
| 29 | QjQoJCX3UJCi/OUO1QJBAKgcDHWjMvt+l1pjJBsSEZ0HX9AAIIVx0RQmbFGS+F2Q | ||
| 30 | hhu5l77WnnZOQ9vvhV5u7NPCUF9nhU3jh60qWWO8mkc= | ||
| 31 | -----END RSA PRIVATE KEY----- | ||
diff --git a/src/lib/libssl/src/certs/rsa-cca.pem b/src/lib/libssl/src/certs/rsa-cca.pem new file mode 100644 index 0000000000..69f5c1c84c --- /dev/null +++ b/src/lib/libssl/src/certs/rsa-cca.pem | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | subject=/C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority | ||
| 2 | issuer= /C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority | ||
| 3 | notBefore=941104185834Z | ||
| 4 | notAfter =991103185834Z | ||
| 5 | -----BEGIN X509 CERTIFICATE----- | ||
| 6 | |||
| 7 | MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw | ||
| 8 | HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy | ||
| 9 | Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05 | ||
| 10 | OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT | ||
| 11 | ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u | ||
| 12 | IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o | ||
| 13 | 975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/ | ||
| 14 | touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE | ||
| 15 | 7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j | ||
| 16 | 9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI | ||
| 17 | 0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb | ||
| 18 | MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU= | ||
| 19 | -----END X509 CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/certs/rsa-ssca.pem b/src/lib/libssl/src/certs/rsa-ssca.pem new file mode 100644 index 0000000000..c9403212d1 --- /dev/null +++ b/src/lib/libssl/src/certs/rsa-ssca.pem | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | subject=/C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority | ||
| 2 | issuer= /C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority | ||
| 3 | notBefore=941109235417Z | ||
| 4 | notAfter =991231235417Z | ||
| 5 | -----BEGIN X509 CERTIFICATE----- | ||
| 6 | |||
| 7 | MIICKTCCAZYCBQJBAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMSAw | ||
| 8 | HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJl | ||
| 9 | IFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDkyMzU0MTda | ||
| 10 | Fw05OTEyMzEyMzU0MTdaMF8xCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0 | ||
| 11 | YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJlIFNlcnZlciBDZXJ0aWZp | ||
| 12 | Y2F0aW9uIEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCSznrB | ||
| 13 | roM+WqqJg1esJQF2DK2ujiw3zus1eGRUA+WEQFHJv48I4oqCCNIWhjdV6bEhAq12 | ||
| 14 | aIGaBaJLyUslZiJWbIgHj/eBWW2EB2VwE3F2Ppt3TONQiVaYSLkdpykaEy5KEVmc | ||
| 15 | HhXVSVQsczppgrGXOZxtcGdI5d0t1sgeewIDAQABMA0GCSqGSIb3DQEBAgUAA34A | ||
| 16 | iNHReSHO4ovo+MF9NFM/YYPZtgs4F7boviGNjwC4i1N+RGceIr2XJ+CchcxK9oU7 | ||
| 17 | suK+ktPlDemvXA4MRpX/oRxePug2WHpzpgr4IhFrwwk4fia7c+8AvQKk8xQNMD9h | ||
| 18 | cHsg/jKjn7P0Z1LctO6EjJY2IN6BCINxIYoPnqk= | ||
| 19 | -----END X509 CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/certs/timCA.pem b/src/lib/libssl/src/certs/timCA.pem new file mode 100644 index 0000000000..9c8d5bf9c6 --- /dev/null +++ b/src/lib/libssl/src/certs/timCA.pem | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | Tims test GCI CA | ||
| 2 | |||
| 3 | -----BEGIN CERTIFICATE----- | ||
| 4 | MIIB8DCCAZoCAQAwDQYJKoZIhvcNAQEEBQAwgYIxCzAJBgNVBAYTAkFVMRMwEQYD | ||
| 5 | VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5 | ||
| 6 | cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2RldmVsb3BtZW50MRkwFwYDVQQDExBD | ||
| 7 | cnlwdFNvZnQgRGV2IENBMB4XDTk3MDMyMjEzMzQwNFoXDTk4MDMyMjEzMzQwNFow | ||
| 8 | gYIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhC | ||
| 9 | cmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2Rl | ||
| 10 | dmVsb3BtZW50MRkwFwYDVQQDExBDcnlwdFNvZnQgRGV2IENBMFwwDQYJKoZIhvcN | ||
| 11 | AQEBBQADSwAwSAJBAOAOAqogG5QwAmLhzyO4CoRnx/wVy4NZP4dxJy83O1EnL0rw | ||
| 12 | OdsamJKvPOLHgSXo3gDu9uVyvCf/QJmZAmC5ml8CAwEAATANBgkqhkiG9w0BAQQF | ||
| 13 | AANBADRRS/GVdd7rAqRW6SdmgLJduOU2yq3avBu99kRqbp9A/dLu6r6jU+eP4oOA | ||
| 14 | TfdbFZtAAD2Hx9jUtY3tfdrJOb8= | ||
| 15 | -----END CERTIFICATE----- | ||
| 16 | |||
diff --git a/src/lib/libssl/src/certs/tjhCA.pem b/src/lib/libssl/src/certs/tjhCA.pem new file mode 100644 index 0000000000..67bee1b200 --- /dev/null +++ b/src/lib/libssl/src/certs/tjhCA.pem | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | -----BEGIN CERTIFICATE----- | ||
| 2 | MIICVjCCAgACAQAwDQYJKoZIhvcNAQEEBQAwgbUxCzAJBgNVBAYTAkFVMRMwEQYD | ||
| 3 | VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5 | ||
| 4 | cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsTI1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9O | ||
| 5 | IEFVVEhPUklUSUVTMTQwMgYDVQQDEytaRVJPIFZBTFVFIENBIC0gREVNT05TVFJB | ||
| 6 | VElPTiBQVVJQT1NFUyBPTkxZMB4XDTk3MDQwMzEzMjI1NFoXDTk4MDQwMzEzMjI1 | ||
| 7 | NFowgbUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH | ||
| 8 | EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsT | ||
| 9 | I1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9OIEFVVEhPUklUSUVTMTQwMgYDVQQDEyta | ||
| 10 | RVJPIFZBTFVFIENBIC0gREVNT05TVFJBVElPTiBQVVJQT1NFUyBPTkxZMFwwDQYJ | ||
| 11 | KoZIhvcNAQEBBQADSwAwSAJBAOZ7T7yqP/tyspcko3yPY1y0Cm2EmwNvzW4QgVXR | ||
| 12 | Fjs3HmJ4xtSpXdo6mwcGezL3Abt/aQXaxv9PU8xt+Jr0OFUCAwEAATANBgkqhkiG | ||
| 13 | 9w0BAQQFAANBAOQpYmGgyCqCy1OljgJhCqQOu627oVlHzK1L+t9vBaMfn40AVUR4 | ||
| 14 | WzQVWO31KTgi5vTK1U+3h46fgUWqQ0h+6rU= | ||
| 15 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/certs/vsign2.pem b/src/lib/libssl/src/certs/vsign2.pem new file mode 100644 index 0000000000..2386e149d0 --- /dev/null +++ b/src/lib/libssl/src/certs/vsign2.pem | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | subject=/L=Internet/O=VeriSign, Inc./OU=VeriSign Class 2 CA - Individual Subscriber | ||
| 2 | issuer= /L=Internet/O=VeriSign, Inc./OU=VeriSign Class 2 CA - Individual Subscriber | ||
| 3 | |||
| 4 | -----BEGIN CERTIFICATE----- | ||
| 5 | MIIEkzCCA/ygAwIBAgIRANDTUpSRL3nTFeMrMayFSPAwDQYJKoZIhvcNAQECBQAw | ||
| 6 | YjERMA8GA1UEBxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQw | ||
| 7 | MgYDVQQLEytWZXJpU2lnbiBDbGFzcyAyIENBIC0gSW5kaXZpZHVhbCBTdWJzY3Jp | ||
| 8 | YmVyMB4XDTk2MDYwNDAwMDAwMFoXDTk4MDYwNDIzNTk1OVowYjERMA8GA1UEBxMI | ||
| 9 | SW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJp | ||
| 10 | U2lnbiBDbGFzcyAyIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMIGfMA0GCSqG | ||
| 11 | SIb3DQEBAQUAA4GNADCBiQKBgQC6A+2czKGRcYMfm8gdnk+0de99TDDzsqo0v5nb | ||
| 12 | RsbUmMcdRQ7nsMbRWe0SAb/9QoLTZ/cJ0iOBqdrkz7UpqqKarVoTSdlSMVM92tWp | ||
| 13 | 3bJncZHQD1t4xd6lQVdI1/T6R+5J0T1ukOdsI9Jmf+F28S6g3R3L1SFwiHKeZKZv | ||
| 14 | z+793wIDAQABo4ICRzCCAkMwggIpBgNVHQMBAf8EggIdMIICGTCCAhUwggIRBgtg | ||
| 15 | hkgBhvhFAQcBATCCAgAWggGrVGhpcyBjZXJ0aWZpY2F0ZSBpbmNvcnBvcmF0ZXMg | ||
| 16 | YnkgcmVmZXJlbmNlLCBhbmQgaXRzIHVzZSBpcyBzdHJpY3RseSBzdWJqZWN0IHRv | ||
| 17 | LCB0aGUgVmVyaVNpZ24gQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0ZW1lbnQg | ||
| 18 | KENQUyksIGF2YWlsYWJsZSBhdDogaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL0NQ | ||
| 19 | Uy0xLjA7IGJ5IEUtbWFpbCBhdCBDUFMtcmVxdWVzdHNAdmVyaXNpZ24uY29tOyBv | ||
| 20 | ciBieSBtYWlsIGF0IFZlcmlTaWduLCBJbmMuLCAyNTkzIENvYXN0IEF2ZS4sIE1v | ||
| 21 | dW50YWluIFZpZXcsIENBIDk0MDQzIFVTQSBUZWwuICsxICg0MTUpIDk2MS04ODMw | ||
| 22 | IENvcHlyaWdodCAoYykgMTk5NiBWZXJpU2lnbiwgSW5jLiAgQWxsIFJpZ2h0cyBS | ||
| 23 | ZXNlcnZlZC4gQ0VSVEFJTiBXQVJSQU5USUVTIERJU0NMQUlNRUQgYW5kIExJQUJJ | ||
| 24 | TElUWSBMSU1JVEVELqAOBgxghkgBhvhFAQcBAQGhDgYMYIZIAYb4RQEHAQECMC8w | ||
| 25 | LRYraHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEuMDAU | ||
| 26 | BglghkgBhvhCAQEBAf8EBAMCAgQwDQYJKoZIhvcNAQECBQADgYEApRJRkNBqLLgs | ||
| 27 | 53IR/d18ODdLOWMTZ+QOOxBrq460iBEdUwgF8vmPRX1ku7UiDeNzaLlurE6eFqHq | ||
| 28 | 2zPyK5j60zfTLVJMWKcQWwTJLjHtXrW8pxhNtFc6Fdvy5ZkHnC/9NIl7/t4U6WqB | ||
| 29 | p4y+p7SdMIkEwIZfds0VbnQyX5MRUJY= | ||
| 30 | -----END CERTIFICATE----- | ||
| 31 | |||
diff --git a/src/lib/libssl/src/certs/vsign4.pem b/src/lib/libssl/src/certs/vsign4.pem new file mode 100644 index 0000000000..b5bcef4d0d --- /dev/null +++ b/src/lib/libssl/src/certs/vsign4.pem | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | subject=/C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority | ||
| 2 | issuer= /C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority | ||
| 3 | -----BEGIN CERTIFICATE----- | ||
| 4 | MIICMTCCAZoCBQKmAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw | ||
| 5 | FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMg | ||
| 6 | UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa | ||
| 7 | Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln | ||
| 8 | biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp | ||
| 9 | Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ1 | ||
| 10 | 9njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVj | ||
| 11 | IIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pd | ||
| 12 | O92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIF | ||
| 13 | AAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZ | ||
| 14 | g9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/Am | ||
| 15 | yY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q== | ||
| 16 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/crypto/Makefile.ssl b/src/lib/libssl/src/crypto/Makefile.ssl new file mode 100644 index 0000000000..efdbba38ac --- /dev/null +++ b/src/lib/libssl/src/crypto/Makefile.ssl | |||
| @@ -0,0 +1,161 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= crypto | ||
| 6 | TOP= .. | ||
| 7 | CC= cc | ||
| 8 | INCLUDE= -I. -I../include | ||
| 9 | INCLUDES= -I.. -I../../include | ||
| 10 | CFLAG= -g | ||
| 11 | INSTALLTOP= /usr/local/ssl | ||
| 12 | MAKE= make -f Makefile.ssl | ||
| 13 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 14 | MAKEFILE= Makefile.ssl | ||
| 15 | RM= /bin/rm -f | ||
| 16 | AR= ar r | ||
| 17 | |||
| 18 | MAKE= make -f Makefile.ssl | ||
| 19 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 20 | MAKEFILE= Makefile.ssl | ||
| 21 | |||
| 22 | PEX_LIBS= | ||
| 23 | EX_LIBS= | ||
| 24 | |||
| 25 | CFLAGS= $(INCLUDE) $(CFLAG) -DCFLAGS=" \"$(CC) $(CFLAG)\" " | ||
| 26 | |||
| 27 | ERR=crypto | ||
| 28 | ERRC=cpt_err | ||
| 29 | |||
| 30 | LIBS= | ||
| 31 | |||
| 32 | SDIRS= md2 md5 sha mdc2 hmac ripemd \ | ||
| 33 | des rc2 rc4 rc5 idea bf cast \ | ||
| 34 | bn rsa dsa dh \ | ||
| 35 | buffer bio stack lhash rand err objects \ | ||
| 36 | evp pem x509 \ | ||
| 37 | asn1 conf txt_db pkcs7 | ||
| 38 | |||
| 39 | GENERAL=Makefile README | ||
| 40 | |||
| 41 | LIB= $(TOP)/libcrypto.a | ||
| 42 | LIBSRC= cryptlib.c mem.c cversion.c ex_data.c $(ERRC).c | ||
| 43 | LIBOBJ= cryptlib.o mem.o cversion.o ex_data.o $(ERRC).o | ||
| 44 | |||
| 45 | SRC= $(LIBSRC) | ||
| 46 | |||
| 47 | EXHEADER= crypto.h cryptall.h | ||
| 48 | HEADER= cryptlib.h date.h $(EXHEADER) | ||
| 49 | |||
| 50 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 51 | |||
| 52 | top: | ||
| 53 | @(cd ..; $(MAKE) DIRS=$(DIR) all) | ||
| 54 | |||
| 55 | all: date.h lib subdirs | ||
| 56 | |||
| 57 | date.h: ../Makefile.ssl ../VERSION | ||
| 58 | echo "#define DATE \"`date`\"" >date.h | ||
| 59 | |||
| 60 | subdirs: | ||
| 61 | @for i in $(SDIRS) ;\ | ||
| 62 | do \ | ||
| 63 | (cd $$i; echo "making all in $$i..."; \ | ||
| 64 | $(MAKE) CC='$(CC)' INCLUDES='${INCLUDES}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' BN_MULW='${BN_MULW}' DES_ENC='${DES_ENC}' SHA1_ASM_OBJ='${SHA1_ASM_OBJ}' MD5_ASM_OBJ='${MD5_ASM_OBJ}' RMD160_ASM_OBJ='${RMD160_ASM_OBJ}' BF_ENC='${BF_ENC}' CAST_ENC='${CAST_ENC}' RC4_ENC='${RC4_ENC}' RC5_ENC='${RC5_ENC}' AR='${AR}' all ); \ | ||
| 65 | done; | ||
| 66 | |||
| 67 | files: | ||
| 68 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 69 | @for i in $(SDIRS) ;\ | ||
| 70 | do \ | ||
| 71 | (cd $$i; echo "making 'files' in $$i..."; \ | ||
| 72 | $(MAKE) files ); \ | ||
| 73 | done; | ||
| 74 | |||
| 75 | links: | ||
| 76 | /bin/rm -f Makefile | ||
| 77 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 78 | $(TOP)/util/mklink.sh ../include $(HEADER) ; | ||
| 79 | $(TOP)/util/mklink.sh ../test $(TEST) ; | ||
| 80 | $(TOP)/util/mklink.sh ../apps $(APPS) ; | ||
| 81 | $(TOP)/util/point.sh Makefile.ssl Makefile; | ||
| 82 | @for i in $(SDIRS) ;\ | ||
| 83 | do \ | ||
| 84 | (cd $$i; echo "making links in $$i..."; \ | ||
| 85 | $(MAKE) links ); \ | ||
| 86 | done; | ||
| 87 | |||
| 88 | lib: $(LIBOBJ) | ||
| 89 | $(AR) $(LIB) $(LIBOBJ) | ||
| 90 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 91 | @touch lib | ||
| 92 | |||
| 93 | libs: | ||
| 94 | @for i in $(SDIRS) ;\ | ||
| 95 | do \ | ||
| 96 | (cd $$i; echo "making libs in $$i..."; \ | ||
| 97 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' lib ); \ | ||
| 98 | done; | ||
| 99 | |||
| 100 | tests: | ||
| 101 | @for i in $(SDIRS) ;\ | ||
| 102 | do \ | ||
| 103 | (cd $$i; echo "making tests in $$i..."; \ | ||
| 104 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' AR='${AR}' tests ); \ | ||
| 105 | done; | ||
| 106 | |||
| 107 | install: | ||
| 108 | @for i in $(EXHEADER) ;\ | ||
| 109 | do \ | ||
| 110 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 111 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 112 | done; | ||
| 113 | @for i in $(SDIRS) ;\ | ||
| 114 | do \ | ||
| 115 | (cd $$i; echo "making install in $$i..."; \ | ||
| 116 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' install ); \ | ||
| 117 | done; | ||
| 118 | |||
| 119 | lint: | ||
| 120 | @for i in $(SDIRS) ;\ | ||
| 121 | do \ | ||
| 122 | (cd $$i; echo "making lint in $$i..."; \ | ||
| 123 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' lint ); \ | ||
| 124 | done; | ||
| 125 | |||
| 126 | depend: | ||
| 127 | $(MAKEDEPEND) $(INCLUDE) $(PROGS) $(LIBSRC) | ||
| 128 | @for i in $(SDIRS) ;\ | ||
| 129 | do \ | ||
| 130 | (cd $$i; echo "making depend in $$i..."; \ | ||
| 131 | $(MAKE) MAKEFILE='${MAKEFILE}' INCLUDES='${INCLUDES}' MAKEDEPEND='${MAKEDEPEND}' depend ); \ | ||
| 132 | done; | ||
| 133 | |||
| 134 | clean: | ||
| 135 | /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 136 | @for i in $(SDIRS) ;\ | ||
| 137 | do \ | ||
| 138 | (cd $$i; echo "making clean in $$i..."; \ | ||
| 139 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' clean ); \ | ||
| 140 | done; | ||
| 141 | |||
| 142 | dclean: | ||
| 143 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 144 | mv -f Makefile.new $(MAKEFILE) | ||
| 145 | @for i in $(SDIRS) ;\ | ||
| 146 | do \ | ||
| 147 | (cd $$i; echo "making dclean in $$i..."; \ | ||
| 148 | $(MAKE) CC='$(CC)' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' dclean ); \ | ||
| 149 | done; | ||
| 150 | |||
| 151 | errors: | ||
| 152 | perl ./err/err_code.pl -conf err/ssleay.ec *.c */*.c ../ssl/*.c ../rsaref/*.c | ||
| 153 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 154 | perl err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 155 | @for i in $(SDIRS) ;\ | ||
| 156 | do \ | ||
| 157 | (cd $$i; echo "making errors in $$i..."; \ | ||
| 158 | $(MAKE) errors ); \ | ||
| 159 | done; | ||
| 160 | |||
| 161 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/asn1/Makefile.ssl b/src/lib/libssl/src/crypto/asn1/Makefile.ssl new file mode 100644 index 0000000000..30751bd156 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/Makefile.ssl | |||
| @@ -0,0 +1,120 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/asn1/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= asn1 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=asn1 | ||
| 19 | ERRC=asn1_err | ||
| 20 | GENERAL=Makefile README | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= a_object.c a_bitstr.c a_utctm.c a_int.c a_octet.c a_print.c \ | ||
| 26 | a_type.c a_set.c a_dup.c a_d2i_fp.c a_i2d_fp.c \ | ||
| 27 | a_sign.c a_digest.c a_verify.c \ | ||
| 28 | x_algor.c x_val.c x_pubkey.c x_sig.c x_req.c x_attrib.c \ | ||
| 29 | x_name.c x_cinf.c x_x509.c x_crl.c x_info.c x_spki.c \ | ||
| 30 | d2i_r_pr.c i2d_r_pr.c d2i_r_pu.c i2d_r_pu.c \ | ||
| 31 | d2i_s_pr.c i2d_s_pr.c d2i_s_pu.c i2d_s_pu.c \ | ||
| 32 | d2i_pu.c d2i_pr.c i2d_pu.c i2d_pr.c\ | ||
| 33 | t_req.c t_x509.c t_pkey.c \ | ||
| 34 | p7_i_s.c p7_signi.c p7_signd.c p7_recip.c p7_enc_c.c p7_evp.c \ | ||
| 35 | p7_dgst.c p7_s_e.c p7_enc.c p7_lib.c \ | ||
| 36 | f_int.c f_string.c i2d_dhp.c i2d_dsap.c d2i_dhp.c d2i_dsap.c n_pkey.c \ | ||
| 37 | a_hdr.c x_pkey.c a_bool.c x_exten.c \ | ||
| 38 | asn1_par.c asn1_lib.c $(ERRC).c a_meth.c a_bytes.c \ | ||
| 39 | evp_asn1.c | ||
| 40 | LIBOBJ= a_object.o a_bitstr.o a_utctm.o a_int.o a_octet.o a_print.o \ | ||
| 41 | a_type.o a_set.o a_dup.o a_d2i_fp.o a_i2d_fp.o \ | ||
| 42 | a_sign.o a_digest.o a_verify.o \ | ||
| 43 | x_algor.o x_val.o x_pubkey.o x_sig.o x_req.o x_attrib.o \ | ||
| 44 | x_name.o x_cinf.o x_x509.o x_crl.o x_info.o x_spki.o \ | ||
| 45 | d2i_r_pr.o i2d_r_pr.o d2i_r_pu.o i2d_r_pu.o \ | ||
| 46 | d2i_s_pr.o i2d_s_pr.o d2i_s_pu.o i2d_s_pu.o \ | ||
| 47 | d2i_pu.o d2i_pr.o i2d_pu.o i2d_pr.o \ | ||
| 48 | t_req.o t_x509.o t_pkey.o \ | ||
| 49 | p7_i_s.o p7_signi.o p7_signd.o p7_recip.o p7_enc_c.o p7_evp.o \ | ||
| 50 | p7_dgst.o p7_s_e.o p7_enc.o p7_lib.o \ | ||
| 51 | f_int.o f_string.o i2d_dhp.o i2d_dsap.o d2i_dhp.o d2i_dsap.o n_pkey.o \ | ||
| 52 | a_hdr.o x_pkey.o a_bool.o x_exten.o \ | ||
| 53 | asn1_par.o asn1_lib.o $(ERRC).o a_meth.o a_bytes.o \ | ||
| 54 | evp_asn1.o | ||
| 55 | |||
| 56 | SRC= $(LIBSRC) | ||
| 57 | |||
| 58 | EXHEADER= asn1.h asn1_mac.h | ||
| 59 | HEADER= $(EXHEADER) | ||
| 60 | |||
| 61 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 62 | |||
| 63 | top: | ||
| 64 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 65 | |||
| 66 | test: test.c | ||
| 67 | cc -g -I../../include -c test.c | ||
| 68 | cc -g -I../../include -o test test.o -L../.. -lcrypto | ||
| 69 | |||
| 70 | pk: pk.c | ||
| 71 | cc -g -I../../include -c pk.c | ||
| 72 | cc -g -I../../include -o pk pk.o -L../.. -lcrypto | ||
| 73 | |||
| 74 | all: lib | ||
| 75 | |||
| 76 | lib: $(LIBOBJ) | ||
| 77 | $(AR) $(LIB) $(LIBOBJ) | ||
| 78 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 79 | @touch lib | ||
| 80 | |||
| 81 | files: | ||
| 82 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 83 | |||
| 84 | links: | ||
| 85 | /bin/rm -f Makefile | ||
| 86 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 87 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 88 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 89 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 90 | |||
| 91 | install: | ||
| 92 | @for i in $(EXHEADER) ; \ | ||
| 93 | do \ | ||
| 94 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 95 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 96 | done; | ||
| 97 | |||
| 98 | tags: | ||
| 99 | ctags $(SRC) | ||
| 100 | |||
| 101 | tests: | ||
| 102 | |||
| 103 | lint: | ||
| 104 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 105 | |||
| 106 | depend: | ||
| 107 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 108 | |||
| 109 | dclean: | ||
| 110 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 111 | mv -f Makefile.new $(MAKEFILE) | ||
| 112 | |||
| 113 | clean: | ||
| 114 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 115 | |||
| 116 | errors: | ||
| 117 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 118 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 119 | |||
| 120 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/asn1/a_bmp.c b/src/lib/libssl/src/crypto/asn1/a_bmp.c new file mode 100644 index 0000000000..774502b1fc --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/a_bmp.c | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | /* crypto/asn1/a_bmp.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 "asn1.h" | ||
| 62 | |||
| 63 | /* ASN1err(ASN1_F_D2I_ASN1_INTEGER,ASN1_R_EXPECTING_AN_INTEGER); | ||
| 64 | */ | ||
| 65 | |||
| 66 | int i2d_ASN1_BMPSTRING(a, pp) | ||
| 67 | ASN1_BMPSTRING *a; | ||
| 68 | unsigned char **pp; | ||
| 69 | { | ||
| 70 | return(i2d_ASN1_bytes((ASN1_STRING *)a,pp, | ||
| 71 | V_ASN1_BMPSTRING,V_ASN1_UNIVERSAL)); | ||
| 72 | } | ||
| 73 | |||
| 74 | ASN1_BMPSTRING *d2i_ASN1_BMPSTRING(a, pp, length) | ||
| 75 | ASN1_BMPSTRING **a; | ||
| 76 | unsigned char **pp; | ||
| 77 | long length; | ||
| 78 | { | ||
| 79 | ASN1_BMPSTRING *ret=NULL; | ||
| 80 | |||
| 81 | ret=(ASN1_BMPSTRING *)d2i_ASN1_bytes((ASN1_STRING **)a, | ||
| 82 | pp,length,V_ASN1_BMPSTRING,V_ASN1_UNIVERSAL); | ||
| 83 | if (ret == NULL) | ||
| 84 | { | ||
| 85 | ASN1err(ASN1_F_D2I_ASN1_BMPSTRING,ASN1_R_ERROR_STACK); | ||
| 86 | return(NULL); | ||
| 87 | } | ||
| 88 | return(ret); | ||
| 89 | } | ||
| 90 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/asn1.err b/src/lib/libssl/src/crypto/asn1/asn1.err new file mode 100644 index 0000000000..c8b7011488 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/asn1.err | |||
| @@ -0,0 +1,182 @@ | |||
| 1 | /* Error codes for the ASN1 functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define ASN1_F_A2D_ASN1_OBJECT 100 | ||
| 5 | #define ASN1_F_A2I_ASN1_INTEGER 101 | ||
| 6 | #define ASN1_F_A2I_ASN1_STRING 102 | ||
| 7 | #define ASN1_F_ASN1_COLLATE_PRIMATIVE 103 | ||
| 8 | #define ASN1_F_ASN1_D2I_BIO 104 | ||
| 9 | #define ASN1_F_ASN1_D2I_FP 105 | ||
| 10 | #define ASN1_F_ASN1_DUP 106 | ||
| 11 | #define ASN1_F_ASN1_GET_OBJECT 107 | ||
| 12 | #define ASN1_F_ASN1_HEADER_NEW 108 | ||
| 13 | #define ASN1_F_ASN1_I2D_BIO 109 | ||
| 14 | #define ASN1_F_ASN1_I2D_FP 110 | ||
| 15 | #define ASN1_F_ASN1_INTEGER_SET 111 | ||
| 16 | #define ASN1_F_ASN1_INTEGER_TO_BN 112 | ||
| 17 | #define ASN1_F_ASN1_OBJECT_NEW 113 | ||
| 18 | #define ASN1_F_ASN1_SIGN 114 | ||
| 19 | #define ASN1_F_ASN1_STRING_NEW 115 | ||
| 20 | #define ASN1_F_ASN1_STRING_TYPE_NEW 116 | ||
| 21 | #define ASN1_F_ASN1_TYPE_GET_INT_OCTETSTRING 117 | ||
| 22 | #define ASN1_F_ASN1_TYPE_GET_OCTETSTRING 118 | ||
| 23 | #define ASN1_F_ASN1_TYPE_NEW 119 | ||
| 24 | #define ASN1_F_ASN1_UTCTIME_NEW 120 | ||
| 25 | #define ASN1_F_ASN1_VERIFY 121 | ||
| 26 | #define ASN1_F_BN_TO_ASN1_INTEGER 122 | ||
| 27 | #define ASN1_F_D2I_ASN1_BIT_STRING 123 | ||
| 28 | #define ASN1_F_D2I_ASN1_BMPSTRING 124 | ||
| 29 | #define ASN1_F_D2I_ASN1_BOOLEAN 125 | ||
| 30 | #define ASN1_F_D2I_ASN1_BYTES 126 | ||
| 31 | #define ASN1_F_D2I_ASN1_HEADER 127 | ||
| 32 | #define ASN1_F_D2I_ASN1_INTEGER 128 | ||
| 33 | #define ASN1_F_D2I_ASN1_OBJECT 129 | ||
| 34 | #define ASN1_F_D2I_ASN1_OCTET_STRING 130 | ||
| 35 | #define ASN1_F_D2I_ASN1_PRINT_TYPE 131 | ||
| 36 | #define ASN1_F_D2I_ASN1_SET 132 | ||
| 37 | #define ASN1_F_D2I_ASN1_TYPE 133 | ||
| 38 | #define ASN1_F_D2I_ASN1_TYPE_BYTES 134 | ||
| 39 | #define ASN1_F_D2I_ASN1_UTCTIME 135 | ||
| 40 | #define ASN1_F_D2I_DHPARAMS 136 | ||
| 41 | #define ASN1_F_D2I_DSAPARAMS 137 | ||
| 42 | #define ASN1_F_D2I_DSAPRIVATEKEY 138 | ||
| 43 | #define ASN1_F_D2I_DSAPUBLICKEY 139 | ||
| 44 | #define ASN1_F_D2I_NETSCAPE_PKEY 140 | ||
| 45 | #define ASN1_F_D2I_NETSCAPE_RSA 141 | ||
| 46 | #define ASN1_F_D2I_NETSCAPE_RSA_2 142 | ||
| 47 | #define ASN1_F_D2I_NETSCAPE_SPKAC 143 | ||
| 48 | #define ASN1_F_D2I_NETSCAPE_SPKI 144 | ||
| 49 | #define ASN1_F_D2I_PKCS7 145 | ||
| 50 | #define ASN1_F_D2I_PKCS7_DIGEST 146 | ||
| 51 | #define ASN1_F_D2I_PKCS7_ENCRYPT 147 | ||
| 52 | #define ASN1_F_D2I_PKCS7_ENC_CONTENT 148 | ||
| 53 | #define ASN1_F_D2I_PKCS7_ENVELOPE 149 | ||
| 54 | #define ASN1_F_D2I_PKCS7_ISSUER_AND_SERIAL 150 | ||
| 55 | #define ASN1_F_D2I_PKCS7_RECIP_INFO 151 | ||
| 56 | #define ASN1_F_D2I_PKCS7_SIGNED 152 | ||
| 57 | #define ASN1_F_D2I_PKCS7_SIGNER_INFO 153 | ||
| 58 | #define ASN1_F_D2I_PKCS7_SIGN_ENVELOPE 154 | ||
| 59 | #define ASN1_F_D2I_PRIVATEKEY 155 | ||
| 60 | #define ASN1_F_D2I_PUBLICKEY 156 | ||
| 61 | #define ASN1_F_D2I_RSAPRIVATEKEY 157 | ||
| 62 | #define ASN1_F_D2I_RSAPUBLICKEY 158 | ||
| 63 | #define ASN1_F_D2I_X509 159 | ||
| 64 | #define ASN1_F_D2I_X509_ALGOR 160 | ||
| 65 | #define ASN1_F_D2I_X509_ATTRIBUTE 161 | ||
| 66 | #define ASN1_F_D2I_X509_CINF 162 | ||
| 67 | #define ASN1_F_D2I_X509_CRL 163 | ||
| 68 | #define ASN1_F_D2I_X509_CRL_INFO 164 | ||
| 69 | #define ASN1_F_D2I_X509_EXTENSION 165 | ||
| 70 | #define ASN1_F_D2I_X509_KEY 166 | ||
| 71 | #define ASN1_F_D2I_X509_NAME 167 | ||
| 72 | #define ASN1_F_D2I_X509_NAME_ENTRY 168 | ||
| 73 | #define ASN1_F_D2I_X509_PKEY 169 | ||
| 74 | #define ASN1_F_D2I_X509_PUBKEY 170 | ||
| 75 | #define ASN1_F_D2I_X509_REQ 171 | ||
| 76 | #define ASN1_F_D2I_X509_REQ_INFO 172 | ||
| 77 | #define ASN1_F_D2I_X509_REVOKED 173 | ||
| 78 | #define ASN1_F_D2I_X509_SIG 174 | ||
| 79 | #define ASN1_F_D2I_X509_VAL 175 | ||
| 80 | #define ASN1_F_I2D_ASN1_HEADER 176 | ||
| 81 | #define ASN1_F_I2D_DHPARAMS 177 | ||
| 82 | #define ASN1_F_I2D_DSAPARAMS 178 | ||
| 83 | #define ASN1_F_I2D_DSAPRIVATEKEY 179 | ||
| 84 | #define ASN1_F_I2D_DSAPUBLICKEY 180 | ||
| 85 | #define ASN1_F_I2D_NETSCAPE_RSA 181 | ||
| 86 | #define ASN1_F_I2D_PKCS7 182 | ||
| 87 | #define ASN1_F_I2D_PRIVATEKEY 183 | ||
| 88 | #define ASN1_F_I2D_PUBLICKEY 184 | ||
| 89 | #define ASN1_F_I2D_RSAPRIVATEKEY 185 | ||
| 90 | #define ASN1_F_I2D_RSAPUBLICKEY 186 | ||
| 91 | #define ASN1_F_I2D_X509_ATTRIBUTE 187 | ||
| 92 | #define ASN1_F_I2T_ASN1_OBJECT 188 | ||
| 93 | #define ASN1_F_NETSCAPE_PKEY_NEW 189 | ||
| 94 | #define ASN1_F_NETSCAPE_SPKAC_NEW 190 | ||
| 95 | #define ASN1_F_NETSCAPE_SPKI_NEW 191 | ||
| 96 | #define ASN1_F_PKCS7_DIGEST_NEW 192 | ||
| 97 | #define ASN1_F_PKCS7_ENCRYPT_NEW 193 | ||
| 98 | #define ASN1_F_PKCS7_ENC_CONTENT_NEW 194 | ||
| 99 | #define ASN1_F_PKCS7_ENVELOPE_NEW 195 | ||
| 100 | #define ASN1_F_PKCS7_ISSUER_AND_SERIAL_NEW 196 | ||
| 101 | #define ASN1_F_PKCS7_NEW 197 | ||
| 102 | #define ASN1_F_PKCS7_RECIP_INFO_NEW 198 | ||
| 103 | #define ASN1_F_PKCS7_SIGNED_NEW 199 | ||
| 104 | #define ASN1_F_PKCS7_SIGNER_INFO_NEW 200 | ||
| 105 | #define ASN1_F_PKCS7_SIGN_ENVELOPE_NEW 201 | ||
| 106 | #define ASN1_F_X509_ALGOR_NEW 202 | ||
| 107 | #define ASN1_F_X509_ATTRIBUTE_NEW 203 | ||
| 108 | #define ASN1_F_X509_CINF_NEW 204 | ||
| 109 | #define ASN1_F_X509_CRL_INFO_NEW 205 | ||
| 110 | #define ASN1_F_X509_CRL_NEW 206 | ||
| 111 | #define ASN1_F_X509_DHPARAMS_NEW 207 | ||
| 112 | #define ASN1_F_X509_EXTENSION_NEW 208 | ||
| 113 | #define ASN1_F_X509_INFO_NEW 209 | ||
| 114 | #define ASN1_F_X509_KEY_NEW 210 | ||
| 115 | #define ASN1_F_X509_NAME_ENTRY_NEW 211 | ||
| 116 | #define ASN1_F_X509_NAME_NEW 212 | ||
| 117 | #define ASN1_F_X509_NEW 213 | ||
| 118 | #define ASN1_F_X509_PKEY_NEW 214 | ||
| 119 | #define ASN1_F_X509_PUBKEY_NEW 215 | ||
| 120 | #define ASN1_F_X509_REQ_INFO_NEW 216 | ||
| 121 | #define ASN1_F_X509_REQ_NEW 217 | ||
| 122 | #define ASN1_F_X509_REVOKED_NEW 218 | ||
| 123 | #define ASN1_F_X509_SIG_NEW 219 | ||
| 124 | #define ASN1_F_X509_VAL_FREE 220 | ||
| 125 | #define ASN1_F_X509_VAL_NEW 221 | ||
| 126 | |||
| 127 | /* Reason codes. */ | ||
| 128 | #define ASN1_R_BAD_CLASS 100 | ||
| 129 | #define ASN1_R_BAD_GET_OBJECT 101 | ||
| 130 | #define ASN1_R_BAD_OBJECT_HEADER 102 | ||
| 131 | #define ASN1_R_BAD_PASSWORD_READ 103 | ||
| 132 | #define ASN1_R_BAD_PKCS7_CONTENT 104 | ||
| 133 | #define ASN1_R_BAD_PKCS7_TYPE 105 | ||
| 134 | #define ASN1_R_BAD_TAG 106 | ||
| 135 | #define ASN1_R_BAD_TYPE 107 | ||
| 136 | #define ASN1_R_BN_LIB 108 | ||
| 137 | #define ASN1_R_BOOLEAN_IS_WRONG_LENGTH 109 | ||
| 138 | #define ASN1_R_BUFFER_TOO_SMALL 110 | ||
| 139 | #define ASN1_R_DATA_IS_WRONG 111 | ||
| 140 | #define ASN1_R_DECODING_ERROR 112 | ||
| 141 | #define ASN1_R_ERROR_STACK 113 | ||
| 142 | #define ASN1_R_EXPECTING_AN_INTEGER 114 | ||
| 143 | #define ASN1_R_EXPECTING_AN_OBJECT 115 | ||
| 144 | #define ASN1_R_EXPECTING_AN_OCTET_STRING 116 | ||
| 145 | #define ASN1_R_EXPECTING_A_BIT_STRING 117 | ||
| 146 | #define ASN1_R_EXPECTING_A_BOOLEAN 118 | ||
| 147 | #define ASN1_R_EXPECTING_A_SEQUENCE 119 | ||
| 148 | #define ASN1_R_EXPECTING_A_UTCTIME 120 | ||
| 149 | #define ASN1_R_FIRST_NUM_TOO_LARGE 121 | ||
| 150 | #define ASN1_R_HEADER_TOO_LONG 122 | ||
| 151 | #define ASN1_R_INVALID_DIGIT 123 | ||
| 152 | #define ASN1_R_INVALID_SEPARATOR 124 | ||
| 153 | #define ASN1_R_INVALID_TIME_FORMAT 125 | ||
| 154 | #define ASN1_R_IV_TOO_LARGE 126 | ||
| 155 | #define ASN1_R_LENGTH_ERROR 127 | ||
| 156 | #define ASN1_R_LENGTH_MISMATCH 128 | ||
| 157 | #define ASN1_R_MISSING_EOS 129 | ||
| 158 | #define ASN1_R_MISSING_SECOND_NUMBER 130 | ||
| 159 | #define ASN1_R_NON_HEX_CHARACTERS 131 | ||
| 160 | #define ASN1_R_NOT_ENOUGH_DATA 132 | ||
| 161 | #define ASN1_R_ODD_NUMBER_OF_CHARS 133 | ||
| 162 | #define ASN1_R_PARSING 134 | ||
| 163 | #define ASN1_R_PRIVATE_KEY_HEADER_MISSING 135 | ||
| 164 | #define ASN1_R_SECOND_NUMBER_TOO_LARGE 136 | ||
| 165 | #define ASN1_R_SHORT_LINE 137 | ||
| 166 | #define ASN1_R_STRING_TOO_SHORT 138 | ||
| 167 | #define ASN1_R_TAG_VALUE_TOO_HIGH 139 | ||
| 168 | #define ASN1_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 140 | ||
| 169 | #define ASN1_R_TOO_LONG 141 | ||
| 170 | #define ASN1_R_UNABLE_TO_DECODE_RSA_KEY 142 | ||
| 171 | #define ASN1_R_UNABLE_TO_DECODE_RSA_PRIVATE_KEY 143 | ||
| 172 | #define ASN1_R_UNKNOWN_ATTRIBUTE_TYPE 144 | ||
| 173 | #define ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM 145 | ||
| 174 | #define ASN1_R_UNKNOWN_OBJECT_TYPE 146 | ||
| 175 | #define ASN1_R_UNKNOWN_PUBLIC_KEY_TYPE 147 | ||
| 176 | #define ASN1_R_UNSUPPORTED_CIPHER 148 | ||
| 177 | #define ASN1_R_UNSUPPORTED_ENCRYPTION_ALGORITHM 149 | ||
| 178 | #define ASN1_R_UNSUPPORTED_PUBLIC_KEY_TYPE 150 | ||
| 179 | #define ASN1_R_UTCTIME_TOO_LONG 151 | ||
| 180 | #define ASN1_R_WRONG_PRINTABLE_TYPE 152 | ||
| 181 | #define ASN1_R_WRONG_TAG 153 | ||
| 182 | #define ASN1_R_WRONG_TYPE 154 | ||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_dhp.c b/src/lib/libssl/src/crypto/asn1/d2i_dhp.c new file mode 100644 index 0000000000..616a308100 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/d2i_dhp.c | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | /* crypto/asn1/d2i_dhp.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 "bn.h" | ||
| 62 | #include "dh.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "asn1_mac.h" | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ASN1err(ASN1_F_D2I_DHPARAMS,ASN1_R_LENGTH_MISMATCH); | ||
| 68 | * ASN1err(ASN1_F_I2D_DHPARAMS,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 69 | */ | ||
| 70 | |||
| 71 | DH *d2i_DHparams(a,pp,length) | ||
| 72 | DH **a; | ||
| 73 | unsigned char **pp; | ||
| 74 | long length; | ||
| 75 | { | ||
| 76 | int i=ASN1_R_ERROR_STACK; | ||
| 77 | ASN1_INTEGER *bs=NULL; | ||
| 78 | long v=0; | ||
| 79 | M_ASN1_D2I_vars(a,DH *,DH_new); | ||
| 80 | |||
| 81 | M_ASN1_D2I_Init(); | ||
| 82 | M_ASN1_D2I_start_sequence(); | ||
| 83 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 84 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 85 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 86 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 87 | |||
| 88 | if (!M_ASN1_D2I_end_sequence()) | ||
| 89 | { | ||
| 90 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 91 | for (i=0; i<bs->length; i++) | ||
| 92 | v=(v<<8)|(bs->data[i]); | ||
| 93 | ret->length=(int)v; | ||
| 94 | } | ||
| 95 | |||
| 96 | ASN1_BIT_STRING_free(bs); | ||
| 97 | |||
| 98 | M_ASN1_D2I_Finish_2(a); | ||
| 99 | |||
| 100 | err_bn: | ||
| 101 | i=ERR_R_BN_LIB; | ||
| 102 | err: | ||
| 103 | ASN1err(ASN1_F_D2I_DHPARAMS,i); | ||
| 104 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DH_free(ret); | ||
| 105 | if (bs != NULL) ASN1_BIT_STRING_free(bs); | ||
| 106 | return(NULL); | ||
| 107 | } | ||
| 108 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_dsap.c b/src/lib/libssl/src/crypto/asn1/d2i_dsap.c new file mode 100644 index 0000000000..2c8ac7bbcf --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/d2i_dsap.c | |||
| @@ -0,0 +1,101 @@ | |||
| 1 | /* crypto/asn1/d2i_dsap.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 "bn.h" | ||
| 62 | #include "dsa.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "asn1_mac.h" | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ASN1err(ASN1_F_D2I_DSAPARAMS,ASN1_R_LENGTH_MISMATCH); | ||
| 68 | * ASN1err(ASN1_F_I2D_DSAPARAMS,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 69 | */ | ||
| 70 | |||
| 71 | DSA *d2i_DSAparams(a,pp,length) | ||
| 72 | DSA **a; | ||
| 73 | unsigned char **pp; | ||
| 74 | long length; | ||
| 75 | { | ||
| 76 | int i=ASN1_R_ERROR_STACK; | ||
| 77 | ASN1_INTEGER *bs=NULL; | ||
| 78 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 79 | |||
| 80 | M_ASN1_D2I_Init(); | ||
| 81 | M_ASN1_D2I_start_sequence(); | ||
| 82 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 83 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 84 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 85 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 86 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 87 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 88 | |||
| 89 | ASN1_BIT_STRING_free(bs); | ||
| 90 | |||
| 91 | M_ASN1_D2I_Finish_2(a); | ||
| 92 | |||
| 93 | err_bn: | ||
| 94 | i=ERR_R_BN_LIB; | ||
| 95 | err: | ||
| 96 | ASN1err(ASN1_F_D2I_DSAPARAMS,i); | ||
| 97 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 98 | if (bs != NULL) ASN1_BIT_STRING_free(bs); | ||
| 99 | return(NULL); | ||
| 100 | } | ||
| 101 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_r_pr.c b/src/lib/libssl/src/crypto/asn1/d2i_r_pr.c new file mode 100644 index 0000000000..0c53aa94bf --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/d2i_r_pr.c | |||
| @@ -0,0 +1,129 @@ | |||
| 1 | /* crypto/asn1/d2i_r_pr.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 "bn.h" | ||
| 62 | #include "rsa.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "asn1_mac.h" | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ASN1err(ASN1_F_D2I_RSAPRIVATEKEY,ASN1_R_LENGTH_MISMATCH); | ||
| 68 | * ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 69 | * ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ASN1_R_PARSING); | ||
| 70 | */ | ||
| 71 | |||
| 72 | static ASN1_METHOD method={ | ||
| 73 | (int (*)()) i2d_RSAPrivateKey, | ||
| 74 | (char *(*)())d2i_RSAPrivateKey, | ||
| 75 | (char *(*)())RSA_new, | ||
| 76 | (void (*)()) RSA_free}; | ||
| 77 | |||
| 78 | ASN1_METHOD *RSAPrivateKey_asn1_meth() | ||
| 79 | { | ||
| 80 | return(&method); | ||
| 81 | } | ||
| 82 | |||
| 83 | RSA *d2i_RSAPrivateKey(a,pp,length) | ||
| 84 | RSA **a; | ||
| 85 | unsigned char **pp; | ||
| 86 | long length; | ||
| 87 | { | ||
| 88 | int i=ASN1_R_PARSING; | ||
| 89 | ASN1_INTEGER *bs=NULL; | ||
| 90 | M_ASN1_D2I_vars(a,RSA *,RSA_new); | ||
| 91 | |||
| 92 | M_ASN1_D2I_Init(); | ||
| 93 | M_ASN1_D2I_start_sequence(); | ||
| 94 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 95 | if (bs->length == 0) | ||
| 96 | ret->version=0; | ||
| 97 | else ret->version=bs->data[0]; | ||
| 98 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 99 | if ((ret->n=BN_bin2bn(bs->data,bs->length,ret->n)) == NULL) goto err_bn; | ||
| 100 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 101 | if ((ret->e=BN_bin2bn(bs->data,bs->length,ret->e)) == NULL) goto err_bn; | ||
| 102 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 103 | if ((ret->d=BN_bin2bn(bs->data,bs->length,ret->d)) == NULL) goto err_bn; | ||
| 104 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 105 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 106 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 107 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 108 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 109 | if ((ret->dmp1=BN_bin2bn(bs->data,bs->length,ret->dmp1)) == NULL) | ||
| 110 | goto err_bn; | ||
| 111 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 112 | if ((ret->dmq1=BN_bin2bn(bs->data,bs->length,ret->dmq1)) == NULL) | ||
| 113 | goto err_bn; | ||
| 114 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 115 | if ((ret->iqmp=BN_bin2bn(bs->data,bs->length,ret->iqmp)) == NULL) | ||
| 116 | goto err_bn; | ||
| 117 | |||
| 118 | ASN1_INTEGER_free(bs); | ||
| 119 | |||
| 120 | M_ASN1_D2I_Finish_2(a); | ||
| 121 | err_bn: | ||
| 122 | i=ERR_R_BN_LIB; | ||
| 123 | err: | ||
| 124 | ASN1err(ASN1_F_D2I_RSAPRIVATEKEY,i); | ||
| 125 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) RSA_free(ret); | ||
| 126 | if (bs != NULL) ASN1_INTEGER_free(bs); | ||
| 127 | return(NULL); | ||
| 128 | } | ||
| 129 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c new file mode 100644 index 0000000000..778b792b1e --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/d2i_r_pu.c | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | /* crypto/asn1/d2i_r_pu.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 "bn.h" | ||
| 62 | #include "rsa.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "asn1_mac.h" | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ASN1err(ASN1_F_D2I_RSAPUBLICKEY,ASN1_R_LENGTH_MISMATCH); | ||
| 68 | * ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 69 | */ | ||
| 70 | |||
| 71 | RSA *d2i_RSAPublicKey(a,pp,length) | ||
| 72 | RSA **a; | ||
| 73 | unsigned char **pp; | ||
| 74 | long length; | ||
| 75 | { | ||
| 76 | int i=ASN1_R_PARSING; | ||
| 77 | ASN1_INTEGER *bs=NULL; | ||
| 78 | M_ASN1_D2I_vars(a,RSA *,RSA_new); | ||
| 79 | |||
| 80 | M_ASN1_D2I_Init(); | ||
| 81 | M_ASN1_D2I_start_sequence(); | ||
| 82 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 83 | if ((ret->n=BN_bin2bn(bs->data,bs->length,ret->n)) == NULL) goto err_bn; | ||
| 84 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 85 | if ((ret->e=BN_bin2bn(bs->data,bs->length,ret->e)) == NULL) goto err_bn; | ||
| 86 | |||
| 87 | ASN1_INTEGER_free(bs); | ||
| 88 | bs=NULL; | ||
| 89 | |||
| 90 | M_ASN1_D2I_Finish_2(a); | ||
| 91 | |||
| 92 | err_bn: | ||
| 93 | i=ERR_R_BN_LIB; | ||
| 94 | err: | ||
| 95 | ASN1err(ASN1_F_D2I_RSAPUBLICKEY,i); | ||
| 96 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) RSA_free(ret); | ||
| 97 | if (bs != NULL) ASN1_INTEGER_free(bs); | ||
| 98 | return(NULL); | ||
| 99 | } | ||
| 100 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c b/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c new file mode 100644 index 0000000000..32ff8ba4b3 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/d2i_s_pr.c | |||
| @@ -0,0 +1,113 @@ | |||
| 1 | /* crypto/asn1/d2i_s_pr.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 | /* Origional version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "bn.h" | ||
| 64 | #include "dsa.h" | ||
| 65 | #include "objects.h" | ||
| 66 | #include "asn1_mac.h" | ||
| 67 | |||
| 68 | /* | ||
| 69 | * ASN1err(ASN1_F_D2I_DSAPRIVATEKEY,ASN1_R_LENGTH_MISMATCH); | ||
| 70 | * ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 71 | * ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_PARSING); | ||
| 72 | */ | ||
| 73 | |||
| 74 | DSA *d2i_DSAPrivateKey(a,pp,length) | ||
| 75 | DSA **a; | ||
| 76 | unsigned char **pp; | ||
| 77 | long length; | ||
| 78 | { | ||
| 79 | int i=ASN1_R_PARSING; | ||
| 80 | ASN1_INTEGER *bs=NULL; | ||
| 81 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 82 | |||
| 83 | M_ASN1_D2I_Init(); | ||
| 84 | M_ASN1_D2I_start_sequence(); | ||
| 85 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 86 | if (bs->length == 0) | ||
| 87 | ret->version=0; | ||
| 88 | else ret->version=bs->data[0]; | ||
| 89 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 90 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) goto err_bn; | ||
| 91 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 92 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) goto err_bn; | ||
| 93 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 94 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) goto err_bn; | ||
| 95 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 96 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 97 | == NULL) goto err_bn; | ||
| 98 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 99 | if ((ret->priv_key=BN_bin2bn(bs->data,bs->length,ret->priv_key)) | ||
| 100 | == NULL) goto err_bn; | ||
| 101 | |||
| 102 | ASN1_INTEGER_free(bs); | ||
| 103 | |||
| 104 | M_ASN1_D2I_Finish_2(a); | ||
| 105 | err_bn: | ||
| 106 | i=ERR_R_BN_LIB; | ||
| 107 | err: | ||
| 108 | ASN1err(ASN1_F_D2I_DSAPRIVATEKEY,i); | ||
| 109 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 110 | if (bs != NULL) ASN1_INTEGER_free(bs); | ||
| 111 | return(NULL); | ||
| 112 | } | ||
| 113 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c b/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c new file mode 100644 index 0000000000..1002f41cd8 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/d2i_s_pu.c | |||
| @@ -0,0 +1,124 @@ | |||
| 1 | /* crypto/asn1/d2i_s_pu.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 | /* Origional version from Steven Schoch <schoch@sheba.arc.nasa.gov> */ | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "bn.h" | ||
| 64 | #include "dsa.h" | ||
| 65 | #include "objects.h" | ||
| 66 | #include "asn1_mac.h" | ||
| 67 | |||
| 68 | /* | ||
| 69 | * ASN1err(ASN1_F_D2I_DSAPUBLICKEY,ASN1_R_LENGTH_MISMATCH); | ||
| 70 | * ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 71 | */ | ||
| 72 | |||
| 73 | DSA *d2i_DSAPublicKey(a,pp,length) | ||
| 74 | DSA **a; | ||
| 75 | unsigned char **pp; | ||
| 76 | long length; | ||
| 77 | { | ||
| 78 | int i=ASN1_R_PARSING; | ||
| 79 | ASN1_INTEGER *bs=NULL; | ||
| 80 | M_ASN1_D2I_vars(a,DSA *,DSA_new); | ||
| 81 | |||
| 82 | M_ASN1_D2I_Init(); | ||
| 83 | if ((length != 0) && ((M_ASN1_next & (~V_ASN1_CONSTRUCTED)) | ||
| 84 | == (V_ASN1_UNIVERSAL|(V_ASN1_INTEGER)))) | ||
| 85 | { | ||
| 86 | c.slen=length; | ||
| 87 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 88 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 89 | == NULL) | ||
| 90 | goto err_bn; | ||
| 91 | ret->write_params=0; | ||
| 92 | } | ||
| 93 | else | ||
| 94 | { | ||
| 95 | M_ASN1_D2I_start_sequence(); | ||
| 96 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 97 | if ((ret->pub_key=BN_bin2bn(bs->data,bs->length,ret->pub_key)) | ||
| 98 | == NULL) | ||
| 99 | goto err_bn; | ||
| 100 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 101 | if ((ret->p=BN_bin2bn(bs->data,bs->length,ret->p)) == NULL) | ||
| 102 | goto err_bn; | ||
| 103 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 104 | if ((ret->q=BN_bin2bn(bs->data,bs->length,ret->q)) == NULL) | ||
| 105 | goto err_bn; | ||
| 106 | M_ASN1_D2I_get(bs,d2i_ASN1_INTEGER); | ||
| 107 | if ((ret->g=BN_bin2bn(bs->data,bs->length,ret->g)) == NULL) | ||
| 108 | goto err_bn; | ||
| 109 | |||
| 110 | ret->write_params=1; | ||
| 111 | } | ||
| 112 | |||
| 113 | ASN1_INTEGER_free(bs); | ||
| 114 | bs=NULL; | ||
| 115 | M_ASN1_D2I_Finish_2(a); | ||
| 116 | err_bn: | ||
| 117 | i=ERR_R_BN_LIB; | ||
| 118 | err: | ||
| 119 | ASN1err(ASN1_F_D2I_DSAPUBLICKEY,i); | ||
| 120 | if ((ret != NULL) && ((a == NULL) || (*a != ret))) DSA_free(ret); | ||
| 121 | if (bs != NULL) ASN1_INTEGER_free(bs); | ||
| 122 | return(NULL); | ||
| 123 | } | ||
| 124 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/f.c b/src/lib/libssl/src/crypto/asn1/f.c new file mode 100644 index 0000000000..2ab3a262ac --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/f.c | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | /* crypto/asn1/f.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 | #include <stdio.h> | ||
| 59 | #include "asn1.h" | ||
| 60 | #include "err.h" | ||
| 61 | |||
| 62 | main() | ||
| 63 | { | ||
| 64 | ASN1_TYPE *at; | ||
| 65 | char buf[512]; | ||
| 66 | int n; | ||
| 67 | long l; | ||
| 68 | |||
| 69 | at=ASN1_TYPE_new(); | ||
| 70 | |||
| 71 | n=ASN1_TYPE_set_int_octetstring(at,98736,"01234567",8); | ||
| 72 | printf("%d\n",n); | ||
| 73 | n=ASN1_TYPE_get_int_octetstring(at,&l,buf,8); | ||
| 74 | buf[8]='\0'; | ||
| 75 | printf("%ld %d %d\n",l,n,buf[8]); | ||
| 76 | buf[8]='\0'; | ||
| 77 | printf("%s\n",buf); | ||
| 78 | ERR_load_crypto_strings(); | ||
| 79 | ERR_print_errors_fp(stderr); | ||
| 80 | } | ||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_dhp.c b/src/lib/libssl/src/crypto/asn1/i2d_dhp.c new file mode 100644 index 0000000000..a454025ce3 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/i2d_dhp.c | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | /* crypto/asn1/i2d_dhp.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 "bn.h" | ||
| 62 | #include "asn1_mac.h" | ||
| 63 | #include "dh.h" | ||
| 64 | |||
| 65 | /* | ||
| 66 | * ASN1err(ASN1_F_D2I_DHPARAMS,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | * ASN1err(ASN1_F_X509_DHPARAMS_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 68 | */ | ||
| 69 | |||
| 70 | int i2d_DHparams(a,pp) | ||
| 71 | DH *a; | ||
| 72 | unsigned char **pp; | ||
| 73 | { | ||
| 74 | BIGNUM *num[3]; | ||
| 75 | ASN1_INTEGER bs; | ||
| 76 | unsigned int j,i,tot=0,len,max=0; | ||
| 77 | int t,ret= -1; | ||
| 78 | unsigned char *p; | ||
| 79 | |||
| 80 | if (a == NULL) return(0); | ||
| 81 | num[0]=a->p; | ||
| 82 | num[1]=a->g; | ||
| 83 | if (a->length != 0) | ||
| 84 | { | ||
| 85 | if ((num[2]=BN_new()) == NULL) goto err; | ||
| 86 | if (!BN_set_word(num[2],a->length)) goto err; | ||
| 87 | } | ||
| 88 | else | ||
| 89 | num[2]=NULL; | ||
| 90 | |||
| 91 | for (i=0; i<3; i++) | ||
| 92 | { | ||
| 93 | if (num[i] == NULL) continue; | ||
| 94 | j=BN_num_bits(num[i]); | ||
| 95 | len=((j == 0)?0:((j/8)+1)); | ||
| 96 | if (len > max) max=len; | ||
| 97 | len=ASN1_object_size(0,len, | ||
| 98 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 99 | tot+=len; | ||
| 100 | } | ||
| 101 | |||
| 102 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 103 | if (pp == NULL) return(t); | ||
| 104 | |||
| 105 | p= *pp; | ||
| 106 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 107 | |||
| 108 | bs.type=V_ASN1_INTEGER; | ||
| 109 | bs.data=(unsigned char *)Malloc(max+4); | ||
| 110 | if (bs.data == NULL) | ||
| 111 | { | ||
| 112 | ASN1err(ASN1_F_I2D_DHPARAMS,ERR_R_MALLOC_FAILURE); | ||
| 113 | goto err; | ||
| 114 | } | ||
| 115 | |||
| 116 | for (i=0; i<3; i++) | ||
| 117 | { | ||
| 118 | if (num[i] == NULL) continue; | ||
| 119 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 120 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 121 | } | ||
| 122 | Free((char *)bs.data); | ||
| 123 | ret=t; | ||
| 124 | err: | ||
| 125 | if (num[2] != NULL) BN_free(num[2]); | ||
| 126 | *pp=p; | ||
| 127 | return(ret); | ||
| 128 | } | ||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_dsap.c b/src/lib/libssl/src/crypto/asn1/i2d_dsap.c new file mode 100644 index 0000000000..94ecff1525 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/i2d_dsap.c | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | /* crypto/asn1/i2d_dsap.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 "bn.h" | ||
| 62 | #include "asn1_mac.h" | ||
| 63 | #include "dsa.h" | ||
| 64 | |||
| 65 | /* | ||
| 66 | * ASN1err(ASN1_F_D2I_DSAPARAMS,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_DSAparams(a,pp) | ||
| 70 | DSA *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | BIGNUM *num[3]; | ||
| 74 | ASN1_INTEGER bs; | ||
| 75 | unsigned int j,i,tot=0,len,max=0; | ||
| 76 | int t,ret= -1; | ||
| 77 | unsigned char *p; | ||
| 78 | |||
| 79 | if (a == NULL) return(0); | ||
| 80 | num[0]=a->p; | ||
| 81 | num[1]=a->q; | ||
| 82 | num[2]=a->g; | ||
| 83 | |||
| 84 | for (i=0; i<3; i++) | ||
| 85 | { | ||
| 86 | if (num[i] == NULL) continue; | ||
| 87 | j=BN_num_bits(num[i]); | ||
| 88 | len=((j == 0)?0:((j/8)+1)); | ||
| 89 | if (len > max) max=len; | ||
| 90 | len=ASN1_object_size(0,len, | ||
| 91 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 92 | tot+=len; | ||
| 93 | } | ||
| 94 | |||
| 95 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 96 | if (pp == NULL) return(t); | ||
| 97 | |||
| 98 | p= *pp; | ||
| 99 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 100 | |||
| 101 | bs.type=V_ASN1_INTEGER; | ||
| 102 | bs.data=(unsigned char *)Malloc(max+4); | ||
| 103 | if (bs.data == NULL) | ||
| 104 | { | ||
| 105 | ASN1err(ASN1_F_I2D_DSAPARAMS,ERR_R_MALLOC_FAILURE); | ||
| 106 | goto err; | ||
| 107 | } | ||
| 108 | |||
| 109 | for (i=0; i<3; i++) | ||
| 110 | { | ||
| 111 | if (num[i] == NULL) continue; | ||
| 112 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 113 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 114 | } | ||
| 115 | Free((char *)bs.data); | ||
| 116 | ret=t; | ||
| 117 | err: | ||
| 118 | *pp=p; | ||
| 119 | return(ret); | ||
| 120 | } | ||
| 121 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c b/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c new file mode 100644 index 0000000000..aadbb92d8e --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/i2d_r_pr.c | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | /* crypto/asn1/i2d_r_pr.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 "bn.h" | ||
| 62 | #include "rsa.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "asn1_mac.h" | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ASN1err(ASN1_F_D2I_RSAPRIVATEKEY,ASN1_R_LENGTH_MISMATCH); | ||
| 68 | * ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 69 | */ | ||
| 70 | |||
| 71 | int i2d_RSAPrivateKey(a,pp) | ||
| 72 | RSA *a; | ||
| 73 | unsigned char **pp; | ||
| 74 | { | ||
| 75 | BIGNUM *num[9]; | ||
| 76 | unsigned char data[1]; | ||
| 77 | ASN1_INTEGER bs; | ||
| 78 | unsigned int j,i,tot,t,len,max=0; | ||
| 79 | unsigned char *p; | ||
| 80 | |||
| 81 | if (a == NULL) return(0); | ||
| 82 | |||
| 83 | num[1]=a->n; | ||
| 84 | num[2]=a->e; | ||
| 85 | num[3]=a->d; | ||
| 86 | num[4]=a->p; | ||
| 87 | num[5]=a->q; | ||
| 88 | num[6]=a->dmp1; | ||
| 89 | num[7]=a->dmq1; | ||
| 90 | num[8]=a->iqmp; | ||
| 91 | |||
| 92 | bs.length=1; | ||
| 93 | bs.data=data; | ||
| 94 | bs.type=V_ASN1_INTEGER; | ||
| 95 | data[0]=a->version&0x7f; | ||
| 96 | |||
| 97 | tot=i2d_ASN1_INTEGER(&(bs),NULL); | ||
| 98 | for (i=1; i<9; i++) | ||
| 99 | { | ||
| 100 | j=BN_num_bits(num[i]); | ||
| 101 | len=((j == 0)?0:((j/8)+1)); | ||
| 102 | if (len > max) max=len; | ||
| 103 | len=ASN1_object_size(0,len, | ||
| 104 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 105 | tot+=len; | ||
| 106 | } | ||
| 107 | |||
| 108 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 109 | if (pp == NULL) return(t); | ||
| 110 | |||
| 111 | p= *pp; | ||
| 112 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 113 | |||
| 114 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 115 | |||
| 116 | bs.data=(unsigned char *)Malloc(max+4); | ||
| 117 | if (bs.data == NULL) | ||
| 118 | { | ||
| 119 | ASN1err(ASN1_F_I2D_RSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); | ||
| 120 | return(-1); | ||
| 121 | } | ||
| 122 | |||
| 123 | for (i=1; i<9; i++) | ||
| 124 | { | ||
| 125 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 126 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 127 | } | ||
| 128 | Free((char *)bs.data); | ||
| 129 | *pp=p; | ||
| 130 | return(t); | ||
| 131 | } | ||
| 132 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c b/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c new file mode 100644 index 0000000000..3c54f6709d --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/i2d_r_pu.c | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | /* crypto/asn1/i2d_r_pu.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 "bn.h" | ||
| 62 | #include "rsa.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "asn1_mac.h" | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ASN1err(ASN1_F_D2I_RSAPUBLICKEY,ASN1_R_LENGTH_MISMATCH); | ||
| 68 | * ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 69 | */ | ||
| 70 | |||
| 71 | int i2d_RSAPublicKey(a,pp) | ||
| 72 | RSA *a; | ||
| 73 | unsigned char **pp; | ||
| 74 | { | ||
| 75 | BIGNUM *num[2]; | ||
| 76 | ASN1_INTEGER bs; | ||
| 77 | unsigned int j,i,tot=0,len,max=0,t; | ||
| 78 | unsigned char *p; | ||
| 79 | |||
| 80 | if (a == NULL) return(0); | ||
| 81 | |||
| 82 | num[0]=a->n; | ||
| 83 | num[1]=a->e; | ||
| 84 | |||
| 85 | for (i=0; i<2; i++) | ||
| 86 | { | ||
| 87 | j=BN_num_bits(num[i]); | ||
| 88 | len=((j == 0)?0:((j/8)+1)); | ||
| 89 | if (len > max) max=len; | ||
| 90 | len=ASN1_object_size(0,len, | ||
| 91 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 92 | tot+=len; | ||
| 93 | } | ||
| 94 | |||
| 95 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 96 | if (pp == NULL) return(t); | ||
| 97 | |||
| 98 | p= *pp; | ||
| 99 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 100 | |||
| 101 | bs.type=V_ASN1_INTEGER; | ||
| 102 | bs.data=(unsigned char *)Malloc(max+4); | ||
| 103 | if (bs.data == NULL) | ||
| 104 | { | ||
| 105 | ASN1err(ASN1_F_I2D_RSAPUBLICKEY,ERR_R_MALLOC_FAILURE); | ||
| 106 | return(-1); | ||
| 107 | } | ||
| 108 | |||
| 109 | for (i=0; i<2; i++) | ||
| 110 | { | ||
| 111 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 112 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 113 | } | ||
| 114 | Free((char *)bs.data); | ||
| 115 | *pp=p; | ||
| 116 | return(t); | ||
| 117 | } | ||
| 118 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c b/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c new file mode 100644 index 0000000000..6e95305548 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/i2d_s_pr.c | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | /* crypto/asn1/i2d_s_pr.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 "bn.h" | ||
| 62 | #include "dsa.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "asn1_mac.h" | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 68 | */ | ||
| 69 | |||
| 70 | int i2d_DSAPrivateKey(a,pp) | ||
| 71 | DSA *a; | ||
| 72 | unsigned char **pp; | ||
| 73 | { | ||
| 74 | BIGNUM *num[6]; | ||
| 75 | unsigned char data[1]; | ||
| 76 | ASN1_INTEGER bs; | ||
| 77 | unsigned int j,i,tot,t,len,max=0; | ||
| 78 | unsigned char *p; | ||
| 79 | |||
| 80 | if (a == NULL) return(0); | ||
| 81 | |||
| 82 | num[1]=a->p; | ||
| 83 | num[2]=a->q; | ||
| 84 | num[3]=a->g; | ||
| 85 | num[4]=a->pub_key; | ||
| 86 | num[5]=a->priv_key; | ||
| 87 | |||
| 88 | bs.length=1; | ||
| 89 | bs.data=data; | ||
| 90 | bs.type=V_ASN1_INTEGER; | ||
| 91 | data[0]=a->version&0x7f; | ||
| 92 | |||
| 93 | tot=i2d_ASN1_INTEGER(&(bs),NULL); | ||
| 94 | for (i=1; i<6; i++) | ||
| 95 | { | ||
| 96 | j=BN_num_bits(num[i]); | ||
| 97 | len=((j == 0)?0:((j/8)+1)); | ||
| 98 | if (len > max) max=len; | ||
| 99 | len=ASN1_object_size(0,len, | ||
| 100 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 101 | tot+=len; | ||
| 102 | } | ||
| 103 | |||
| 104 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 105 | if (pp == NULL) return(t); | ||
| 106 | |||
| 107 | p= *pp; | ||
| 108 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 109 | |||
| 110 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 111 | |||
| 112 | bs.data=(unsigned char *)Malloc(max+4); | ||
| 113 | if (bs.data == NULL) | ||
| 114 | { | ||
| 115 | ASN1err(ASN1_F_I2D_DSAPRIVATEKEY,ERR_R_MALLOC_FAILURE); | ||
| 116 | return(-1); | ||
| 117 | } | ||
| 118 | |||
| 119 | for (i=1; i<6; i++) | ||
| 120 | { | ||
| 121 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 122 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 123 | } | ||
| 124 | Free((char *)bs.data); | ||
| 125 | *pp=p; | ||
| 126 | return(t); | ||
| 127 | } | ||
| 128 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c b/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c new file mode 100644 index 0000000000..5cf2877069 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/i2d_s_pu.c | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | /* crypto/asn1/i2d_s_pu.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 "bn.h" | ||
| 62 | #include "dsa.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "asn1_mac.h" | ||
| 65 | |||
| 66 | /* | ||
| 67 | * ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ASN1_R_UNKNOWN_ATTRIBUTE_TYPE); | ||
| 68 | */ | ||
| 69 | |||
| 70 | int i2d_DSAPublicKey(a,pp) | ||
| 71 | DSA *a; | ||
| 72 | unsigned char **pp; | ||
| 73 | { | ||
| 74 | BIGNUM *num[4]; | ||
| 75 | ASN1_INTEGER bs; | ||
| 76 | unsigned int j,i,tot=0,len,max=0,t=0,all,n=1; | ||
| 77 | unsigned char *p; | ||
| 78 | |||
| 79 | if (a == NULL) return(0); | ||
| 80 | |||
| 81 | all=a->write_params; | ||
| 82 | |||
| 83 | num[0]=a->pub_key; | ||
| 84 | if (all) | ||
| 85 | { | ||
| 86 | num[1]=a->p; | ||
| 87 | num[2]=a->q; | ||
| 88 | num[3]=a->g; | ||
| 89 | n=4; | ||
| 90 | } | ||
| 91 | |||
| 92 | for (i=0; i<n; i++) | ||
| 93 | { | ||
| 94 | j=BN_num_bits(num[i]); | ||
| 95 | len=((j == 0)?0:((j/8)+1)); | ||
| 96 | if (len > max) max=len; | ||
| 97 | len=ASN1_object_size(0,len, | ||
| 98 | (num[i]->neg)?V_ASN1_NEG_INTEGER:V_ASN1_INTEGER); | ||
| 99 | tot+=len; | ||
| 100 | } | ||
| 101 | |||
| 102 | if (all) | ||
| 103 | { | ||
| 104 | t=ASN1_object_size(1,tot,V_ASN1_SEQUENCE); | ||
| 105 | if (pp == NULL) return(t); | ||
| 106 | } | ||
| 107 | else | ||
| 108 | { | ||
| 109 | if (pp == NULL) return(tot); | ||
| 110 | } | ||
| 111 | |||
| 112 | p= *pp; | ||
| 113 | if (all) | ||
| 114 | ASN1_put_object(&p,1,tot,V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 115 | |||
| 116 | bs.type=V_ASN1_INTEGER; | ||
| 117 | bs.data=(unsigned char *)Malloc(max+4); | ||
| 118 | if (bs.data == NULL) | ||
| 119 | { | ||
| 120 | ASN1err(ASN1_F_I2D_DSAPUBLICKEY,ERR_R_MALLOC_FAILURE); | ||
| 121 | return(-1); | ||
| 122 | } | ||
| 123 | |||
| 124 | for (i=0; i<n; i++) | ||
| 125 | { | ||
| 126 | bs.length=BN_bn2bin(num[i],bs.data); | ||
| 127 | i2d_ASN1_INTEGER(&bs,&p); | ||
| 128 | } | ||
| 129 | Free((char *)bs.data); | ||
| 130 | *pp=p; | ||
| 131 | return(t); | ||
| 132 | } | ||
| 133 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_dgst.c b/src/lib/libssl/src/crypto/asn1/p7_dgst.c new file mode 100644 index 0000000000..f71ed8eb1d --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_dgst.c | |||
| @@ -0,0 +1,130 @@ | |||
| 1 | /* crypto/asn1/p7_dgst.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 "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_DIGEST_NEW,ASN1_R_MISSING_EOS); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_DIGEST,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_DIGEST(a,pp) | ||
| 70 | PKCS7_DIGEST *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_len(a->md,i2d_X509_ALGOR); | ||
| 77 | M_ASN1_I2D_len(a->contents,i2d_PKCS7); | ||
| 78 | M_ASN1_I2D_len(a->digest,i2d_ASN1_OCTET_STRING); | ||
| 79 | |||
| 80 | M_ASN1_I2D_seq_total(); | ||
| 81 | |||
| 82 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 83 | M_ASN1_I2D_put(a->md,i2d_X509_ALGOR); | ||
| 84 | M_ASN1_I2D_put(a->contents,i2d_PKCS7); | ||
| 85 | M_ASN1_I2D_put(a->digest,i2d_ASN1_OCTET_STRING); | ||
| 86 | |||
| 87 | M_ASN1_I2D_finish(); | ||
| 88 | } | ||
| 89 | |||
| 90 | PKCS7_DIGEST *d2i_PKCS7_DIGEST(a,pp,length) | ||
| 91 | PKCS7_DIGEST **a; | ||
| 92 | unsigned char **pp; | ||
| 93 | long length; | ||
| 94 | { | ||
| 95 | M_ASN1_D2I_vars(a,PKCS7_DIGEST *,PKCS7_DIGEST_new); | ||
| 96 | |||
| 97 | M_ASN1_D2I_Init(); | ||
| 98 | M_ASN1_D2I_start_sequence(); | ||
| 99 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 100 | M_ASN1_D2I_get(ret->md,d2i_X509_ALGOR); | ||
| 101 | M_ASN1_D2I_get(ret->contents,d2i_PKCS7); | ||
| 102 | M_ASN1_D2I_get(ret->digest,d2i_ASN1_OCTET_STRING); | ||
| 103 | |||
| 104 | M_ASN1_D2I_Finish(a,PKCS7_DIGEST_free,ASN1_F_D2I_PKCS7_DIGEST); | ||
| 105 | } | ||
| 106 | |||
| 107 | PKCS7_DIGEST *PKCS7_DIGEST_new() | ||
| 108 | { | ||
| 109 | PKCS7_DIGEST *ret=NULL; | ||
| 110 | |||
| 111 | M_ASN1_New_Malloc(ret,PKCS7_DIGEST); | ||
| 112 | M_ASN1_New(ret->version,ASN1_INTEGER_new); | ||
| 113 | M_ASN1_New(ret->md,X509_ALGOR_new); | ||
| 114 | M_ASN1_New(ret->contents,PKCS7_new); | ||
| 115 | M_ASN1_New(ret->digest,ASN1_OCTET_STRING_new); | ||
| 116 | return(ret); | ||
| 117 | M_ASN1_New_Error(ASN1_F_PKCS7_DIGEST_NEW); | ||
| 118 | } | ||
| 119 | |||
| 120 | void PKCS7_DIGEST_free(a) | ||
| 121 | PKCS7_DIGEST *a; | ||
| 122 | { | ||
| 123 | if (a == NULL) return; | ||
| 124 | ASN1_INTEGER_free(a->version); | ||
| 125 | X509_ALGOR_free(a->md); | ||
| 126 | PKCS7_free(a->contents); | ||
| 127 | ASN1_OCTET_STRING_free(a->digest); | ||
| 128 | Free((char *)a); | ||
| 129 | } | ||
| 130 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_enc.c b/src/lib/libssl/src/crypto/asn1/p7_enc.c new file mode 100644 index 0000000000..874dd78389 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_enc.c | |||
| @@ -0,0 +1,120 @@ | |||
| 1 | /* crypto/asn1/p7_enc.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 "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_ENCRYPT_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_ENCRYPT,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_ENCRYPT(a,pp) | ||
| 70 | PKCS7_ENCRYPT *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 77 | |||
| 78 | M_ASN1_I2D_seq_total(); | ||
| 79 | |||
| 80 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 81 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 82 | |||
| 83 | M_ASN1_I2D_finish(); | ||
| 84 | } | ||
| 85 | |||
| 86 | PKCS7_ENCRYPT *d2i_PKCS7_ENCRYPT(a,pp,length) | ||
| 87 | PKCS7_ENCRYPT **a; | ||
| 88 | unsigned char **pp; | ||
| 89 | long length; | ||
| 90 | { | ||
| 91 | M_ASN1_D2I_vars(a,PKCS7_ENCRYPT *,PKCS7_ENCRYPT_new); | ||
| 92 | |||
| 93 | M_ASN1_D2I_Init(); | ||
| 94 | M_ASN1_D2I_start_sequence(); | ||
| 95 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 96 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 97 | |||
| 98 | M_ASN1_D2I_Finish(a,PKCS7_ENCRYPT_free,ASN1_F_D2I_PKCS7_ENCRYPT); | ||
| 99 | } | ||
| 100 | |||
| 101 | PKCS7_ENCRYPT *PKCS7_ENCRYPT_new() | ||
| 102 | { | ||
| 103 | PKCS7_ENCRYPT *ret=NULL; | ||
| 104 | |||
| 105 | M_ASN1_New_Malloc(ret,PKCS7_ENCRYPT); | ||
| 106 | M_ASN1_New(ret->version,ASN1_INTEGER_new); | ||
| 107 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 108 | return(ret); | ||
| 109 | M_ASN1_New_Error(ASN1_F_PKCS7_ENCRYPT_NEW); | ||
| 110 | } | ||
| 111 | |||
| 112 | void PKCS7_ENCRYPT_free(a) | ||
| 113 | PKCS7_ENCRYPT *a; | ||
| 114 | { | ||
| 115 | if (a == NULL) return; | ||
| 116 | ASN1_INTEGER_free(a->version); | ||
| 117 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 118 | Free((char *)a); | ||
| 119 | } | ||
| 120 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_enc_c.c b/src/lib/libssl/src/crypto/asn1/p7_enc_c.c new file mode 100644 index 0000000000..2860d3e925 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_enc_c.c | |||
| @@ -0,0 +1,127 @@ | |||
| 1 | /* crypto/asn1/p7_enc_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_ENC_CONTENT_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_ENC_CONTENT,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_ENC_CONTENT(a,pp) | ||
| 70 | PKCS7_ENC_CONTENT *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->content_type,i2d_ASN1_OBJECT); | ||
| 76 | M_ASN1_I2D_len(a->algorithm,i2d_X509_ALGOR); | ||
| 77 | M_ASN1_I2D_len_IMP_opt(a->enc_data,i2d_ASN1_OCTET_STRING); | ||
| 78 | |||
| 79 | M_ASN1_I2D_seq_total(); | ||
| 80 | |||
| 81 | M_ASN1_I2D_put(a->content_type,i2d_ASN1_OBJECT); | ||
| 82 | M_ASN1_I2D_put(a->algorithm,i2d_X509_ALGOR); | ||
| 83 | M_ASN1_I2D_put_IMP_opt(a->enc_data,i2d_ASN1_OCTET_STRING,0); | ||
| 84 | |||
| 85 | M_ASN1_I2D_finish(); | ||
| 86 | } | ||
| 87 | |||
| 88 | PKCS7_ENC_CONTENT *d2i_PKCS7_ENC_CONTENT(a,pp,length) | ||
| 89 | PKCS7_ENC_CONTENT **a; | ||
| 90 | unsigned char **pp; | ||
| 91 | long length; | ||
| 92 | { | ||
| 93 | M_ASN1_D2I_vars(a,PKCS7_ENC_CONTENT *,PKCS7_ENC_CONTENT_new); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Init(); | ||
| 96 | M_ASN1_D2I_start_sequence(); | ||
| 97 | M_ASN1_D2I_get(ret->content_type,d2i_ASN1_OBJECT); | ||
| 98 | M_ASN1_D2I_get(ret->algorithm,d2i_X509_ALGOR); | ||
| 99 | M_ASN1_D2I_get_IMP_opt(ret->enc_data,d2i_ASN1_OCTET_STRING,0, | ||
| 100 | V_ASN1_OCTET_STRING); | ||
| 101 | |||
| 102 | M_ASN1_D2I_Finish(a,PKCS7_ENC_CONTENT_free, | ||
| 103 | ASN1_F_D2I_PKCS7_ENC_CONTENT); | ||
| 104 | } | ||
| 105 | |||
| 106 | PKCS7_ENC_CONTENT *PKCS7_ENC_CONTENT_new() | ||
| 107 | { | ||
| 108 | PKCS7_ENC_CONTENT *ret=NULL; | ||
| 109 | |||
| 110 | M_ASN1_New_Malloc(ret,PKCS7_ENC_CONTENT); | ||
| 111 | M_ASN1_New(ret->content_type,ASN1_OBJECT_new); | ||
| 112 | M_ASN1_New(ret->algorithm,X509_ALGOR_new); | ||
| 113 | ret->enc_data=NULL; | ||
| 114 | return(ret); | ||
| 115 | M_ASN1_New_Error(ASN1_F_PKCS7_ENC_CONTENT_NEW); | ||
| 116 | } | ||
| 117 | |||
| 118 | void PKCS7_ENC_CONTENT_free(a) | ||
| 119 | PKCS7_ENC_CONTENT *a; | ||
| 120 | { | ||
| 121 | if (a == NULL) return; | ||
| 122 | ASN1_OBJECT_free(a->content_type); | ||
| 123 | X509_ALGOR_free(a->algorithm); | ||
| 124 | ASN1_OCTET_STRING_free(a->enc_data); | ||
| 125 | Free((char *)a); | ||
| 126 | } | ||
| 127 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_evp.c b/src/lib/libssl/src/crypto/asn1/p7_evp.c new file mode 100644 index 0000000000..4db0a7fe62 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_evp.c | |||
| @@ -0,0 +1,125 @@ | |||
| 1 | /* crypto/asn1/p7_evp.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 "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_ENVELOPE_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_ENVELOPE,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_ENVELOPE(a,pp) | ||
| 70 | PKCS7_ENVELOPE *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_len_SET(a->recipientinfo,i2d_PKCS7_RECIP_INFO); | ||
| 77 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 78 | |||
| 79 | M_ASN1_I2D_seq_total(); | ||
| 80 | |||
| 81 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 82 | M_ASN1_I2D_put_SET(a->recipientinfo,i2d_PKCS7_RECIP_INFO); | ||
| 83 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 84 | |||
| 85 | M_ASN1_I2D_finish(); | ||
| 86 | } | ||
| 87 | |||
| 88 | PKCS7_ENVELOPE *d2i_PKCS7_ENVELOPE(a,pp,length) | ||
| 89 | PKCS7_ENVELOPE **a; | ||
| 90 | unsigned char **pp; | ||
| 91 | long length; | ||
| 92 | { | ||
| 93 | M_ASN1_D2I_vars(a,PKCS7_ENVELOPE *,PKCS7_ENVELOPE_new); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Init(); | ||
| 96 | M_ASN1_D2I_start_sequence(); | ||
| 97 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 98 | M_ASN1_D2I_get_set(ret->recipientinfo,d2i_PKCS7_RECIP_INFO); | ||
| 99 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 100 | |||
| 101 | M_ASN1_D2I_Finish(a,PKCS7_ENVELOPE_free,ASN1_F_D2I_PKCS7_ENVELOPE); | ||
| 102 | } | ||
| 103 | |||
| 104 | PKCS7_ENVELOPE *PKCS7_ENVELOPE_new() | ||
| 105 | { | ||
| 106 | PKCS7_ENVELOPE *ret=NULL; | ||
| 107 | |||
| 108 | M_ASN1_New_Malloc(ret,PKCS7_ENVELOPE); | ||
| 109 | M_ASN1_New(ret->version,ASN1_INTEGER_new); | ||
| 110 | M_ASN1_New(ret->recipientinfo,sk_new_null); | ||
| 111 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 112 | return(ret); | ||
| 113 | M_ASN1_New_Error(ASN1_F_PKCS7_ENVELOPE_NEW); | ||
| 114 | } | ||
| 115 | |||
| 116 | void PKCS7_ENVELOPE_free(a) | ||
| 117 | PKCS7_ENVELOPE *a; | ||
| 118 | { | ||
| 119 | if (a == NULL) return; | ||
| 120 | ASN1_INTEGER_free(a->version); | ||
| 121 | sk_pop_free(a->recipientinfo,PKCS7_RECIP_INFO_free); | ||
| 122 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 123 | Free((char *)a); | ||
| 124 | } | ||
| 125 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_i_s.c b/src/lib/libssl/src/crypto/asn1/p7_i_s.c new file mode 100644 index 0000000000..9b00c556d9 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_i_s.c | |||
| @@ -0,0 +1,120 @@ | |||
| 1 | /* crypto/asn1/p7_i_s.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 "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_ISSUER_AND_SERIAL_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_ISSUER_AND_SERIAL,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_ISSUER_AND_SERIAL(a,pp) | ||
| 70 | PKCS7_ISSUER_AND_SERIAL *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->issuer,i2d_X509_NAME); | ||
| 76 | M_ASN1_I2D_len(a->serial,i2d_ASN1_INTEGER); | ||
| 77 | |||
| 78 | M_ASN1_I2D_seq_total(); | ||
| 79 | |||
| 80 | M_ASN1_I2D_put(a->issuer,i2d_X509_NAME); | ||
| 81 | M_ASN1_I2D_put(a->serial,i2d_ASN1_INTEGER); | ||
| 82 | |||
| 83 | M_ASN1_I2D_finish(); | ||
| 84 | } | ||
| 85 | |||
| 86 | PKCS7_ISSUER_AND_SERIAL *d2i_PKCS7_ISSUER_AND_SERIAL(a,pp,length) | ||
| 87 | PKCS7_ISSUER_AND_SERIAL **a; | ||
| 88 | unsigned char **pp; | ||
| 89 | long length; | ||
| 90 | { | ||
| 91 | M_ASN1_D2I_vars(a,PKCS7_ISSUER_AND_SERIAL *,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 92 | |||
| 93 | M_ASN1_D2I_Init(); | ||
| 94 | M_ASN1_D2I_start_sequence(); | ||
| 95 | M_ASN1_D2I_get(ret->issuer,d2i_X509_NAME); | ||
| 96 | M_ASN1_D2I_get(ret->serial,d2i_ASN1_INTEGER); | ||
| 97 | M_ASN1_D2I_Finish(a,PKCS7_ISSUER_AND_SERIAL_free, | ||
| 98 | ASN1_F_D2I_PKCS7_ISSUER_AND_SERIAL); | ||
| 99 | } | ||
| 100 | |||
| 101 | PKCS7_ISSUER_AND_SERIAL *PKCS7_ISSUER_AND_SERIAL_new() | ||
| 102 | { | ||
| 103 | PKCS7_ISSUER_AND_SERIAL *ret=NULL; | ||
| 104 | |||
| 105 | M_ASN1_New_Malloc(ret,PKCS7_ISSUER_AND_SERIAL); | ||
| 106 | M_ASN1_New(ret->issuer,X509_NAME_new); | ||
| 107 | M_ASN1_New(ret->serial,ASN1_INTEGER_new); | ||
| 108 | return(ret); | ||
| 109 | M_ASN1_New_Error(ASN1_F_PKCS7_ISSUER_AND_SERIAL_NEW); | ||
| 110 | } | ||
| 111 | |||
| 112 | void PKCS7_ISSUER_AND_SERIAL_free(a) | ||
| 113 | PKCS7_ISSUER_AND_SERIAL *a; | ||
| 114 | { | ||
| 115 | if (a == NULL) return; | ||
| 116 | X509_NAME_free(a->issuer); | ||
| 117 | ASN1_INTEGER_free(a->serial); | ||
| 118 | Free((char *)a); | ||
| 119 | } | ||
| 120 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_lib.c b/src/lib/libssl/src/crypto/asn1/p7_lib.c new file mode 100644 index 0000000000..2134e0974a --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_lib.c | |||
| @@ -0,0 +1,299 @@ | |||
| 1 | /* crypto/asn1/p7_lib.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 "asn1_mac.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | /* ASN1err(ASN1_F_D2I_PKCS7,ASN1_R_BAD_PKCS7_CONTENT); | ||
| 65 | * ASN1err(ASN1_F_I2D_PKCS7,ASN1_R_BAD_PKCS7_TYPE); | ||
| 66 | * ASN1err(ASN1_F_PKCS7_NEW,ASN1_R_BAD_PKCS7_TYPE); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7(a,pp) | ||
| 70 | PKCS7 *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | if (a->asn1 != NULL) | ||
| 76 | { | ||
| 77 | if (pp == NULL) | ||
| 78 | return((int)a->length); | ||
| 79 | memcpy(*pp,a->asn1,(int)a->length); | ||
| 80 | *pp+=a->length; | ||
| 81 | return((int)a->length); | ||
| 82 | } | ||
| 83 | |||
| 84 | ret+=4; /* sequence, BER header plus '0 0' end padding */ | ||
| 85 | M_ASN1_I2D_len(a->type,i2d_ASN1_OBJECT); | ||
| 86 | if (a->d.ptr != NULL) | ||
| 87 | { | ||
| 88 | ret+=4; /* explicit tag [ 0 ] BER plus '0 0' */ | ||
| 89 | switch (OBJ_obj2nid(a->type)) | ||
| 90 | { | ||
| 91 | case NID_pkcs7_data: | ||
| 92 | M_ASN1_I2D_len(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 93 | break; | ||
| 94 | case NID_pkcs7_signed: | ||
| 95 | M_ASN1_I2D_len(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 96 | break; | ||
| 97 | case NID_pkcs7_enveloped: | ||
| 98 | M_ASN1_I2D_len(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 99 | break; | ||
| 100 | case NID_pkcs7_signedAndEnveloped: | ||
| 101 | M_ASN1_I2D_len(a->d.signed_and_enveloped, | ||
| 102 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 103 | break; | ||
| 104 | case NID_pkcs7_digest: | ||
| 105 | M_ASN1_I2D_len(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 106 | break; | ||
| 107 | case NID_pkcs7_encrypted: | ||
| 108 | M_ASN1_I2D_len(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 109 | break; | ||
| 110 | default: | ||
| 111 | break; | ||
| 112 | } | ||
| 113 | } | ||
| 114 | r=ret; | ||
| 115 | if (pp == NULL) return(r); | ||
| 116 | p= *pp; | ||
| 117 | M_ASN1_I2D_INF_seq_start(V_ASN1_SEQUENCE,V_ASN1_UNIVERSAL); | ||
| 118 | M_ASN1_I2D_put(a->type,i2d_ASN1_OBJECT); | ||
| 119 | |||
| 120 | if (a->d.ptr != NULL) | ||
| 121 | { | ||
| 122 | M_ASN1_I2D_INF_seq_start(0,V_ASN1_CONTEXT_SPECIFIC); | ||
| 123 | switch (OBJ_obj2nid(a->type)) | ||
| 124 | { | ||
| 125 | case NID_pkcs7_data: | ||
| 126 | M_ASN1_I2D_put(a->d.data,i2d_ASN1_OCTET_STRING); | ||
| 127 | break; | ||
| 128 | case NID_pkcs7_signed: | ||
| 129 | M_ASN1_I2D_put(a->d.sign,i2d_PKCS7_SIGNED); | ||
| 130 | break; | ||
| 131 | case NID_pkcs7_enveloped: | ||
| 132 | M_ASN1_I2D_put(a->d.enveloped,i2d_PKCS7_ENVELOPE); | ||
| 133 | break; | ||
| 134 | case NID_pkcs7_signedAndEnveloped: | ||
| 135 | M_ASN1_I2D_put(a->d.signed_and_enveloped, | ||
| 136 | i2d_PKCS7_SIGN_ENVELOPE); | ||
| 137 | break; | ||
| 138 | case NID_pkcs7_digest: | ||
| 139 | M_ASN1_I2D_put(a->d.digest,i2d_PKCS7_DIGEST); | ||
| 140 | break; | ||
| 141 | case NID_pkcs7_encrypted: | ||
| 142 | M_ASN1_I2D_put(a->d.encrypted,i2d_PKCS7_ENCRYPT); | ||
| 143 | break; | ||
| 144 | default: | ||
| 145 | break; | ||
| 146 | } | ||
| 147 | M_ASN1_I2D_INF_seq_end(); | ||
| 148 | } | ||
| 149 | M_ASN1_I2D_INF_seq_end(); | ||
| 150 | M_ASN1_I2D_finish(); | ||
| 151 | } | ||
| 152 | |||
| 153 | PKCS7 *d2i_PKCS7(a,pp,length) | ||
| 154 | PKCS7 **a; | ||
| 155 | unsigned char **pp; | ||
| 156 | long length; | ||
| 157 | { | ||
| 158 | M_ASN1_D2I_vars(a,PKCS7 *,PKCS7_new); | ||
| 159 | |||
| 160 | if ((a != NULL) && ((*a) != NULL)) | ||
| 161 | { | ||
| 162 | if ((*a)->asn1 != NULL) | ||
| 163 | { | ||
| 164 | Free((char *)(*a)->asn1); | ||
| 165 | (*a)->asn1=NULL; | ||
| 166 | } | ||
| 167 | (*a)->length=0; | ||
| 168 | } | ||
| 169 | |||
| 170 | M_ASN1_D2I_Init(); | ||
| 171 | M_ASN1_D2I_start_sequence(); | ||
| 172 | M_ASN1_D2I_get(ret->type,d2i_ASN1_OBJECT); | ||
| 173 | if (!M_ASN1_D2I_end_sequence()) | ||
| 174 | { | ||
| 175 | int Tinf,Ttag,Tclass; | ||
| 176 | long Tlen; | ||
| 177 | |||
| 178 | if (M_ASN1_next != (V_ASN1_CONSTRUCTED| | ||
| 179 | V_ASN1_CONTEXT_SPECIFIC|0)) | ||
| 180 | { | ||
| 181 | c.error=ASN1_R_BAD_PKCS7_CONTENT; | ||
| 182 | goto err; | ||
| 183 | } | ||
| 184 | |||
| 185 | ret->detached=0; | ||
| 186 | |||
| 187 | c.q=c.p; | ||
| 188 | Tinf=ASN1_get_object(&c.p,&Tlen,&Ttag,&Tclass, | ||
| 189 | (c.inf & 1)?(length+ *pp-c.q):c.slen); | ||
| 190 | if (Tinf & 0x80) goto err; | ||
| 191 | c.slen-=(c.p-c.q); | ||
| 192 | |||
| 193 | switch (OBJ_obj2nid(ret->type)) | ||
| 194 | { | ||
| 195 | case NID_pkcs7_data: | ||
| 196 | M_ASN1_D2I_get(ret->d.data,d2i_ASN1_OCTET_STRING); | ||
| 197 | break; | ||
| 198 | case NID_pkcs7_signed: | ||
| 199 | M_ASN1_D2I_get(ret->d.sign,d2i_PKCS7_SIGNED); | ||
| 200 | if (ret->d.sign->contents->d.ptr == NULL) | ||
| 201 | ret->detached=1; | ||
| 202 | break; | ||
| 203 | case NID_pkcs7_enveloped: | ||
| 204 | M_ASN1_D2I_get(ret->d.enveloped,d2i_PKCS7_ENVELOPE); | ||
| 205 | break; | ||
| 206 | case NID_pkcs7_signedAndEnveloped: | ||
| 207 | M_ASN1_D2I_get(ret->d.signed_and_enveloped, | ||
| 208 | d2i_PKCS7_SIGN_ENVELOPE); | ||
| 209 | break; | ||
| 210 | case NID_pkcs7_digest: | ||
| 211 | M_ASN1_D2I_get(ret->d.digest,d2i_PKCS7_DIGEST); | ||
| 212 | break; | ||
| 213 | case NID_pkcs7_encrypted: | ||
| 214 | M_ASN1_D2I_get(ret->d.encrypted,d2i_PKCS7_ENCRYPT); | ||
| 215 | break; | ||
| 216 | default: | ||
| 217 | c.error=ASN1_R_BAD_PKCS7_TYPE; | ||
| 218 | goto err; | ||
| 219 | break; | ||
| 220 | } | ||
| 221 | if (Tinf == (1|V_ASN1_CONSTRUCTED)) | ||
| 222 | { | ||
| 223 | if (!ASN1_check_infinite_end(&c.p,c.slen)) | ||
| 224 | { | ||
| 225 | c.error=ASN1_R_MISSING_EOS; | ||
| 226 | goto err; | ||
| 227 | } | ||
| 228 | } | ||
| 229 | } | ||
| 230 | else | ||
| 231 | ret->detached=1; | ||
| 232 | |||
| 233 | M_ASN1_D2I_Finish(a,PKCS7_free,ASN1_F_D2I_PKCS7); | ||
| 234 | } | ||
| 235 | |||
| 236 | PKCS7 *PKCS7_new() | ||
| 237 | { | ||
| 238 | PKCS7 *ret=NULL; | ||
| 239 | |||
| 240 | M_ASN1_New_Malloc(ret,PKCS7); | ||
| 241 | ret->type=ASN1_OBJECT_new(); | ||
| 242 | ret->asn1=NULL; | ||
| 243 | ret->length=0; | ||
| 244 | ret->detached=0; | ||
| 245 | ret->d.ptr=NULL; | ||
| 246 | return(ret); | ||
| 247 | M_ASN1_New_Error(ASN1_F_PKCS7_NEW); | ||
| 248 | } | ||
| 249 | |||
| 250 | void PKCS7_free(a) | ||
| 251 | PKCS7 *a; | ||
| 252 | { | ||
| 253 | if (a == NULL) return; | ||
| 254 | |||
| 255 | PKCS7_content_free(a); | ||
| 256 | if (a->type != NULL) | ||
| 257 | { | ||
| 258 | ASN1_OBJECT_free(a->type); | ||
| 259 | } | ||
| 260 | Free((char *)(char *)a); | ||
| 261 | } | ||
| 262 | |||
| 263 | void PKCS7_content_free(a) | ||
| 264 | PKCS7 *a; | ||
| 265 | { | ||
| 266 | if (a->asn1 != NULL) Free((char *)a->asn1); | ||
| 267 | |||
| 268 | if (a->d.ptr != NULL) | ||
| 269 | { | ||
| 270 | if (a->type == NULL) return; | ||
| 271 | |||
| 272 | switch (OBJ_obj2nid(a->type)) | ||
| 273 | { | ||
| 274 | case NID_pkcs7_data: | ||
| 275 | ASN1_OCTET_STRING_free(a->d.data); | ||
| 276 | break; | ||
| 277 | case NID_pkcs7_signed: | ||
| 278 | PKCS7_SIGNED_free(a->d.sign); | ||
| 279 | break; | ||
| 280 | case NID_pkcs7_enveloped: | ||
| 281 | PKCS7_ENVELOPE_free(a->d.enveloped); | ||
| 282 | break; | ||
| 283 | case NID_pkcs7_signedAndEnveloped: | ||
| 284 | PKCS7_SIGN_ENVELOPE_free(a->d.signed_and_enveloped); | ||
| 285 | break; | ||
| 286 | case NID_pkcs7_digest: | ||
| 287 | PKCS7_DIGEST_free(a->d.digest); | ||
| 288 | break; | ||
| 289 | case NID_pkcs7_encrypted: | ||
| 290 | PKCS7_ENCRYPT_free(a->d.encrypted); | ||
| 291 | break; | ||
| 292 | default: | ||
| 293 | /* MEMORY LEAK */ | ||
| 294 | break; | ||
| 295 | } | ||
| 296 | } | ||
| 297 | a->d.ptr=NULL; | ||
| 298 | } | ||
| 299 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_recip.c b/src/lib/libssl/src/crypto/asn1/p7_recip.c new file mode 100644 index 0000000000..f02233f5a8 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_recip.c | |||
| @@ -0,0 +1,132 @@ | |||
| 1 | /* crypto/asn1/p7_recip.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 "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_RECIP_INFO_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_RECIP_INFO,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_RECIP_INFO(a,pp) | ||
| 70 | PKCS7_RECIP_INFO *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_len(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 77 | M_ASN1_I2D_len(a->key_enc_algor,i2d_X509_ALGOR); | ||
| 78 | M_ASN1_I2D_len(a->enc_key,i2d_ASN1_OCTET_STRING); | ||
| 79 | |||
| 80 | M_ASN1_I2D_seq_total(); | ||
| 81 | |||
| 82 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 83 | M_ASN1_I2D_put(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 84 | M_ASN1_I2D_put(a->key_enc_algor,i2d_X509_ALGOR); | ||
| 85 | M_ASN1_I2D_put(a->enc_key,i2d_ASN1_OCTET_STRING); | ||
| 86 | |||
| 87 | M_ASN1_I2D_finish(); | ||
| 88 | } | ||
| 89 | |||
| 90 | PKCS7_RECIP_INFO *d2i_PKCS7_RECIP_INFO(a,pp,length) | ||
| 91 | PKCS7_RECIP_INFO **a; | ||
| 92 | unsigned char **pp; | ||
| 93 | long length; | ||
| 94 | { | ||
| 95 | M_ASN1_D2I_vars(a,PKCS7_RECIP_INFO *,PKCS7_RECIP_INFO_new); | ||
| 96 | |||
| 97 | M_ASN1_D2I_Init(); | ||
| 98 | M_ASN1_D2I_start_sequence(); | ||
| 99 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 100 | M_ASN1_D2I_get(ret->issuer_and_serial,d2i_PKCS7_ISSUER_AND_SERIAL); | ||
| 101 | M_ASN1_D2I_get(ret->key_enc_algor,d2i_X509_ALGOR); | ||
| 102 | M_ASN1_D2I_get(ret->enc_key,d2i_ASN1_OCTET_STRING); | ||
| 103 | |||
| 104 | M_ASN1_D2I_Finish(a,PKCS7_RECIP_INFO_free,ASN1_F_D2I_PKCS7_RECIP_INFO); | ||
| 105 | } | ||
| 106 | |||
| 107 | PKCS7_RECIP_INFO *PKCS7_RECIP_INFO_new() | ||
| 108 | { | ||
| 109 | PKCS7_RECIP_INFO *ret=NULL; | ||
| 110 | |||
| 111 | M_ASN1_New_Malloc(ret,PKCS7_RECIP_INFO); | ||
| 112 | M_ASN1_New(ret->version,ASN1_INTEGER_new); | ||
| 113 | M_ASN1_New(ret->issuer_and_serial,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 114 | M_ASN1_New(ret->key_enc_algor,X509_ALGOR_new); | ||
| 115 | M_ASN1_New(ret->enc_key,ASN1_OCTET_STRING_new); | ||
| 116 | ret->cert=NULL; | ||
| 117 | return(ret); | ||
| 118 | M_ASN1_New_Error(ASN1_F_PKCS7_RECIP_INFO_NEW); | ||
| 119 | } | ||
| 120 | |||
| 121 | void PKCS7_RECIP_INFO_free(a) | ||
| 122 | PKCS7_RECIP_INFO *a; | ||
| 123 | { | ||
| 124 | if (a == NULL) return; | ||
| 125 | ASN1_INTEGER_free(a->version); | ||
| 126 | PKCS7_ISSUER_AND_SERIAL_free(a->issuer_and_serial); | ||
| 127 | X509_ALGOR_free(a->key_enc_algor); | ||
| 128 | ASN1_OCTET_STRING_free(a->enc_key); | ||
| 129 | if (a->cert != NULL) X509_free(a->cert); | ||
| 130 | Free((char *)a); | ||
| 131 | } | ||
| 132 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_s_e.c b/src/lib/libssl/src/crypto/asn1/p7_s_e.c new file mode 100644 index 0000000000..d344211456 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_s_e.c | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | /* crypto/asn1/p7_s_e.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 "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_SIGN_ENVELOPE_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_SIGN_ENVELOPE,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_SIGN_ENVELOPE(a,pp) | ||
| 70 | PKCS7_SIGN_ENVELOPE *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_len_SET(a->recipientinfo,i2d_PKCS7_RECIP_INFO); | ||
| 77 | M_ASN1_I2D_len_SET(a->md_algs,i2d_X509_ALGOR); | ||
| 78 | M_ASN1_I2D_len(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 79 | M_ASN1_I2D_len_IMP_set_opt(a->cert,i2d_X509,0); | ||
| 80 | M_ASN1_I2D_len_IMP_set_opt(a->crl,i2d_X509_CRL,1); | ||
| 81 | M_ASN1_I2D_len_SET(a->signer_info,i2d_PKCS7_SIGNER_INFO); | ||
| 82 | |||
| 83 | M_ASN1_I2D_seq_total(); | ||
| 84 | |||
| 85 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 86 | M_ASN1_I2D_put_SET(a->recipientinfo,i2d_PKCS7_RECIP_INFO); | ||
| 87 | M_ASN1_I2D_put_SET(a->md_algs,i2d_X509_ALGOR); | ||
| 88 | M_ASN1_I2D_put(a->enc_data,i2d_PKCS7_ENC_CONTENT); | ||
| 89 | M_ASN1_I2D_put_IMP_set_opt(a->cert,i2d_X509,0); | ||
| 90 | M_ASN1_I2D_put_IMP_set_opt(a->crl,i2d_X509_CRL,1); | ||
| 91 | M_ASN1_I2D_put_SET(a->signer_info,i2d_PKCS7_SIGNER_INFO); | ||
| 92 | |||
| 93 | M_ASN1_I2D_finish(); | ||
| 94 | } | ||
| 95 | |||
| 96 | PKCS7_SIGN_ENVELOPE *d2i_PKCS7_SIGN_ENVELOPE(a,pp,length) | ||
| 97 | PKCS7_SIGN_ENVELOPE **a; | ||
| 98 | unsigned char **pp; | ||
| 99 | long length; | ||
| 100 | { | ||
| 101 | M_ASN1_D2I_vars(a,PKCS7_SIGN_ENVELOPE *,PKCS7_SIGN_ENVELOPE_new); | ||
| 102 | |||
| 103 | M_ASN1_D2I_Init(); | ||
| 104 | M_ASN1_D2I_start_sequence(); | ||
| 105 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 106 | M_ASN1_D2I_get_set(ret->recipientinfo,d2i_PKCS7_RECIP_INFO); | ||
| 107 | M_ASN1_D2I_get_set(ret->md_algs,d2i_X509_ALGOR); | ||
| 108 | M_ASN1_D2I_get(ret->enc_data,d2i_PKCS7_ENC_CONTENT); | ||
| 109 | M_ASN1_D2I_get_IMP_set_opt(ret->cert,d2i_X509,0); | ||
| 110 | M_ASN1_D2I_get_IMP_set_opt(ret->crl,d2i_X509_CRL,1); | ||
| 111 | M_ASN1_D2I_get_set(ret->signer_info,d2i_PKCS7_SIGNER_INFO); | ||
| 112 | |||
| 113 | M_ASN1_D2I_Finish(a,PKCS7_SIGN_ENVELOPE_free, | ||
| 114 | ASN1_F_D2I_PKCS7_SIGN_ENVELOPE); | ||
| 115 | } | ||
| 116 | |||
| 117 | PKCS7_SIGN_ENVELOPE *PKCS7_SIGN_ENVELOPE_new() | ||
| 118 | { | ||
| 119 | PKCS7_SIGN_ENVELOPE *ret=NULL; | ||
| 120 | |||
| 121 | M_ASN1_New_Malloc(ret,PKCS7_SIGN_ENVELOPE); | ||
| 122 | M_ASN1_New(ret->version,ASN1_INTEGER_new); | ||
| 123 | M_ASN1_New(ret->recipientinfo,sk_new_null); | ||
| 124 | M_ASN1_New(ret->md_algs,sk_new_null); | ||
| 125 | M_ASN1_New(ret->enc_data,PKCS7_ENC_CONTENT_new); | ||
| 126 | ret->cert=NULL; | ||
| 127 | ret->crl=NULL; | ||
| 128 | M_ASN1_New(ret->signer_info,sk_new_null); | ||
| 129 | return(ret); | ||
| 130 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGN_ENVELOPE_NEW); | ||
| 131 | } | ||
| 132 | |||
| 133 | void PKCS7_SIGN_ENVELOPE_free(a) | ||
| 134 | PKCS7_SIGN_ENVELOPE *a; | ||
| 135 | { | ||
| 136 | if (a == NULL) return; | ||
| 137 | ASN1_INTEGER_free(a->version); | ||
| 138 | sk_pop_free(a->recipientinfo,PKCS7_RECIP_INFO_free); | ||
| 139 | sk_pop_free(a->md_algs,X509_ALGOR_free); | ||
| 140 | PKCS7_ENC_CONTENT_free(a->enc_data); | ||
| 141 | sk_pop_free(a->cert,X509_free); | ||
| 142 | sk_pop_free(a->crl,X509_CRL_free); | ||
| 143 | sk_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); | ||
| 144 | Free((char *)a); | ||
| 145 | } | ||
| 146 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_signd.c b/src/lib/libssl/src/crypto/asn1/p7_signd.c new file mode 100644 index 0000000000..40f9a44fa8 --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_signd.c | |||
| @@ -0,0 +1,140 @@ | |||
| 1 | /* crypto/asn1/p7_signd.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 "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_SIGNED_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_SIGNED,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_SIGNED(a,pp) | ||
| 70 | PKCS7_SIGNED *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_len_SET(a->md_algs,i2d_X509_ALGOR); | ||
| 77 | M_ASN1_I2D_len(a->contents,i2d_PKCS7); | ||
| 78 | M_ASN1_I2D_len_IMP_set_opt(a->cert,i2d_X509,0); | ||
| 79 | M_ASN1_I2D_len_IMP_set_opt(a->crl,i2d_X509_CRL,1); | ||
| 80 | M_ASN1_I2D_len_SET(a->signer_info,i2d_PKCS7_SIGNER_INFO); | ||
| 81 | |||
| 82 | M_ASN1_I2D_seq_total(); | ||
| 83 | |||
| 84 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 85 | M_ASN1_I2D_put_SET(a->md_algs,i2d_X509_ALGOR); | ||
| 86 | M_ASN1_I2D_put(a->contents,i2d_PKCS7); | ||
| 87 | M_ASN1_I2D_put_IMP_set_opt(a->cert,i2d_X509,0); | ||
| 88 | M_ASN1_I2D_put_IMP_set_opt(a->crl,i2d_X509_CRL,1); | ||
| 89 | M_ASN1_I2D_put_SET(a->signer_info,i2d_PKCS7_SIGNER_INFO); | ||
| 90 | |||
| 91 | M_ASN1_I2D_finish(); | ||
| 92 | } | ||
| 93 | |||
| 94 | PKCS7_SIGNED *d2i_PKCS7_SIGNED(a,pp,length) | ||
| 95 | PKCS7_SIGNED **a; | ||
| 96 | unsigned char **pp; | ||
| 97 | long length; | ||
| 98 | { | ||
| 99 | M_ASN1_D2I_vars(a,PKCS7_SIGNED *,PKCS7_SIGNED_new); | ||
| 100 | |||
| 101 | M_ASN1_D2I_Init(); | ||
| 102 | M_ASN1_D2I_start_sequence(); | ||
| 103 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 104 | M_ASN1_D2I_get_set(ret->md_algs,d2i_X509_ALGOR); | ||
| 105 | M_ASN1_D2I_get(ret->contents,d2i_PKCS7); | ||
| 106 | M_ASN1_D2I_get_IMP_set_opt(ret->cert,d2i_X509,0); | ||
| 107 | M_ASN1_D2I_get_IMP_set_opt(ret->crl,d2i_X509_CRL,1); | ||
| 108 | M_ASN1_D2I_get_set(ret->signer_info,d2i_PKCS7_SIGNER_INFO); | ||
| 109 | |||
| 110 | M_ASN1_D2I_Finish(a,PKCS7_SIGNED_free,ASN1_F_D2I_PKCS7_SIGNED); | ||
| 111 | } | ||
| 112 | |||
| 113 | PKCS7_SIGNED *PKCS7_SIGNED_new() | ||
| 114 | { | ||
| 115 | PKCS7_SIGNED *ret=NULL; | ||
| 116 | |||
| 117 | M_ASN1_New_Malloc(ret,PKCS7_SIGNED); | ||
| 118 | M_ASN1_New(ret->version,ASN1_INTEGER_new); | ||
| 119 | M_ASN1_New(ret->md_algs,sk_new_null); | ||
| 120 | M_ASN1_New(ret->contents,PKCS7_new); | ||
| 121 | ret->cert=NULL; | ||
| 122 | ret->crl=NULL; | ||
| 123 | M_ASN1_New(ret->signer_info,sk_new_null); | ||
| 124 | return(ret); | ||
| 125 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGNED_NEW); | ||
| 126 | } | ||
| 127 | |||
| 128 | void PKCS7_SIGNED_free(a) | ||
| 129 | PKCS7_SIGNED *a; | ||
| 130 | { | ||
| 131 | if (a == NULL) return; | ||
| 132 | ASN1_INTEGER_free(a->version); | ||
| 133 | sk_pop_free(a->md_algs,X509_ALGOR_free); | ||
| 134 | PKCS7_free(a->contents); | ||
| 135 | sk_pop_free(a->cert,X509_free); | ||
| 136 | sk_pop_free(a->crl,X509_CRL_free); | ||
| 137 | sk_pop_free(a->signer_info,PKCS7_SIGNER_INFO_free); | ||
| 138 | Free((char *)a); | ||
| 139 | } | ||
| 140 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/p7_signi.c b/src/lib/libssl/src/crypto/asn1/p7_signi.c new file mode 100644 index 0000000000..0da92169fc --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/p7_signi.c | |||
| @@ -0,0 +1,149 @@ | |||
| 1 | /* crypto/asn1/p7_signi.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 "asn1_mac.h" | ||
| 62 | #include "x509.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_PKCS7_SIGNER_INFO_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_D2I_PKCS7_SIGNER_INFO,ASN1_R_LENGTH_MISMATCH); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_PKCS7_SIGNER_INFO(a,pp) | ||
| 70 | PKCS7_SIGNER_INFO *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->version,i2d_ASN1_INTEGER); | ||
| 76 | M_ASN1_I2D_len(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 77 | M_ASN1_I2D_len(a->digest_alg,i2d_X509_ALGOR); | ||
| 78 | M_ASN1_I2D_len_IMP_set_opt(a->auth_attr,i2d_X509_ATTRIBUTE,0); | ||
| 79 | M_ASN1_I2D_len(a->digest_enc_alg,i2d_X509_ALGOR); | ||
| 80 | M_ASN1_I2D_len(a->enc_digest,i2d_ASN1_OCTET_STRING); | ||
| 81 | M_ASN1_I2D_len_IMP_set_opt(a->unauth_attr,i2d_X509_ATTRIBUTE,1); | ||
| 82 | |||
| 83 | M_ASN1_I2D_seq_total(); | ||
| 84 | |||
| 85 | M_ASN1_I2D_put(a->version,i2d_ASN1_INTEGER); | ||
| 86 | M_ASN1_I2D_put(a->issuer_and_serial,i2d_PKCS7_ISSUER_AND_SERIAL); | ||
| 87 | M_ASN1_I2D_put(a->digest_alg,i2d_X509_ALGOR); | ||
| 88 | M_ASN1_I2D_put_IMP_set_opt(a->auth_attr,i2d_X509_ATTRIBUTE,0); | ||
| 89 | M_ASN1_I2D_put(a->digest_enc_alg,i2d_X509_ALGOR); | ||
| 90 | M_ASN1_I2D_put(a->enc_digest,i2d_ASN1_OCTET_STRING); | ||
| 91 | M_ASN1_I2D_put_IMP_set_opt(a->unauth_attr,i2d_X509_ATTRIBUTE,1); | ||
| 92 | |||
| 93 | M_ASN1_I2D_finish(); | ||
| 94 | } | ||
| 95 | |||
| 96 | PKCS7_SIGNER_INFO *d2i_PKCS7_SIGNER_INFO(a,pp,length) | ||
| 97 | PKCS7_SIGNER_INFO **a; | ||
| 98 | unsigned char **pp; | ||
| 99 | long length; | ||
| 100 | { | ||
| 101 | M_ASN1_D2I_vars(a,PKCS7_SIGNER_INFO *,PKCS7_SIGNER_INFO_new); | ||
| 102 | |||
| 103 | M_ASN1_D2I_Init(); | ||
| 104 | M_ASN1_D2I_start_sequence(); | ||
| 105 | M_ASN1_D2I_get(ret->version,d2i_ASN1_INTEGER); | ||
| 106 | M_ASN1_D2I_get(ret->issuer_and_serial,d2i_PKCS7_ISSUER_AND_SERIAL); | ||
| 107 | M_ASN1_D2I_get(ret->digest_alg,d2i_X509_ALGOR); | ||
| 108 | M_ASN1_D2I_get_IMP_set_opt(ret->auth_attr,d2i_X509_ATTRIBUTE,0); | ||
| 109 | M_ASN1_D2I_get(ret->digest_enc_alg,d2i_X509_ALGOR); | ||
| 110 | M_ASN1_D2I_get(ret->enc_digest,d2i_ASN1_OCTET_STRING); | ||
| 111 | M_ASN1_D2I_get_IMP_set_opt(ret->unauth_attr,d2i_X509_ATTRIBUTE,1); | ||
| 112 | |||
| 113 | M_ASN1_D2I_Finish(a,PKCS7_SIGNER_INFO_free, | ||
| 114 | ASN1_F_D2I_PKCS7_SIGNER_INFO); | ||
| 115 | } | ||
| 116 | |||
| 117 | PKCS7_SIGNER_INFO *PKCS7_SIGNER_INFO_new() | ||
| 118 | { | ||
| 119 | PKCS7_SIGNER_INFO *ret=NULL; | ||
| 120 | |||
| 121 | M_ASN1_New_Malloc(ret,PKCS7_SIGNER_INFO); | ||
| 122 | M_ASN1_New(ret->version,ASN1_INTEGER_new); | ||
| 123 | M_ASN1_New(ret->issuer_and_serial,PKCS7_ISSUER_AND_SERIAL_new); | ||
| 124 | M_ASN1_New(ret->digest_alg,X509_ALGOR_new); | ||
| 125 | ret->auth_attr=NULL; | ||
| 126 | M_ASN1_New(ret->digest_enc_alg,X509_ALGOR_new); | ||
| 127 | M_ASN1_New(ret->enc_digest,ASN1_OCTET_STRING_new); | ||
| 128 | ret->unauth_attr=NULL; | ||
| 129 | ret->pkey=NULL; | ||
| 130 | return(ret); | ||
| 131 | M_ASN1_New_Error(ASN1_F_PKCS7_SIGNER_INFO_NEW); | ||
| 132 | } | ||
| 133 | |||
| 134 | void PKCS7_SIGNER_INFO_free(a) | ||
| 135 | PKCS7_SIGNER_INFO *a; | ||
| 136 | { | ||
| 137 | if (a == NULL) return; | ||
| 138 | ASN1_INTEGER_free(a->version); | ||
| 139 | PKCS7_ISSUER_AND_SERIAL_free(a->issuer_and_serial); | ||
| 140 | X509_ALGOR_free(a->digest_alg); | ||
| 141 | sk_pop_free(a->auth_attr,X509_ATTRIBUTE_free); | ||
| 142 | X509_ALGOR_free(a->digest_enc_alg); | ||
| 143 | ASN1_OCTET_STRING_free(a->enc_digest); | ||
| 144 | sk_pop_free(a->unauth_attr,X509_ATTRIBUTE_free); | ||
| 145 | if (a->pkey != NULL) | ||
| 146 | EVP_PKEY_free(a->pkey); | ||
| 147 | Free((char *)a); | ||
| 148 | } | ||
| 149 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/pkcs8.c b/src/lib/libssl/src/crypto/asn1/pkcs8.c new file mode 100644 index 0000000000..03fdadd51a --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/pkcs8.c | |||
| @@ -0,0 +1,142 @@ | |||
| 1 | /* crypto/asn1/pkcs8.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 "asn1_mac.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | /* | ||
| 65 | * ASN1err(ASN1_F_D2I_X509_KEY,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | * ASN1err(ASN1_F_X509_KEY_NEW,ASN1_R_BAD_GET_OBJECT); | ||
| 67 | */ | ||
| 68 | |||
| 69 | int i2d_X509_KEY(a,pp) | ||
| 70 | X509 *a; | ||
| 71 | unsigned char **pp; | ||
| 72 | { | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len(a->cert_info, i2d_X509_CINF); | ||
| 76 | M_ASN1_I2D_len(a->sig_alg, i2d_X509_ALGOR); | ||
| 77 | M_ASN1_I2D_len(a->signature, i2d_ASN1_BIT_STRING); | ||
| 78 | |||
| 79 | M_ASN1_I2D_seq_total(); | ||
| 80 | |||
| 81 | M_ASN1_I2D_put(a->cert_info, i2d_X509_CINF); | ||
| 82 | M_ASN1_I2D_put(a->sig_alg, i2d_X509_ALGOR); | ||
| 83 | M_ASN1_I2D_put(a->signature, i2d_ASN1_BIT_STRING); | ||
| 84 | |||
| 85 | M_ASN1_I2D_finish(); | ||
| 86 | } | ||
| 87 | |||
| 88 | X509 *d2i_X509_KEY(a,pp,length) | ||
| 89 | X509 **a; | ||
| 90 | unsigned char **pp; | ||
| 91 | long length; | ||
| 92 | { | ||
| 93 | M_ASN1_D2I_vars(a,X509 *,X509_new); | ||
| 94 | |||
| 95 | M_ASN1_D2I_Init(); | ||
| 96 | M_ASN1_D2I_start_sequence(); | ||
| 97 | M_ASN1_D2I_get(ret->cert_info,d2i_X509_CINF); | ||
| 98 | M_ASN1_D2I_get(ret->sig_alg,d2i_X509_ALGOR); | ||
| 99 | M_ASN1_D2I_get(ret->signature,d2i_ASN1_BIT_STRING); | ||
| 100 | M_ASN1_D2I_Finish(a,X509_free,ASN1_F_D2I_X509); | ||
| 101 | } | ||
| 102 | |||
| 103 | X509 *X509_KEY_new() | ||
| 104 | { | ||
| 105 | X509_KEY *ret=NULL; | ||
| 106 | |||
| 107 | M_ASN1_New_Malloc(ret,X509_KEY); | ||
| 108 | ret->references=1; | ||
| 109 | ret->type=NID | ||
| 110 | M_ASN1_New(ret->cert_info,X509_CINF_new); | ||
| 111 | M_ASN1_New(ret->sig_alg,X509_ALGOR_new); | ||
| 112 | M_ASN1_New(ret->signature,ASN1_BIT_STRING_new); | ||
| 113 | return(ret); | ||
| 114 | M_ASN1_New_Error(ASN1_F_X509_NEW); | ||
| 115 | } | ||
| 116 | |||
| 117 | void X509_KEY_free(a) | ||
| 118 | X509 *a; | ||
| 119 | { | ||
| 120 | int i; | ||
| 121 | |||
| 122 | if (a == NULL) return; | ||
| 123 | |||
| 124 | i=CRYPTO_add_lock(&a->references,-1,CRYPTO_LOCK_X509_KEY); | ||
| 125 | #ifdef REF_PRINT | ||
| 126 | REF_PRINT("X509_KEY",a); | ||
| 127 | #endif | ||
| 128 | if (i > 0) return; | ||
| 129 | #ifdef REF_CHECK | ||
| 130 | if (i < 0) | ||
| 131 | { | ||
| 132 | fprintf(stderr,"X509_KEY_free, bad reference count\n"); | ||
| 133 | abort(); | ||
| 134 | } | ||
| 135 | #endif | ||
| 136 | |||
| 137 | X509_CINF_free(a->cert_info); | ||
| 138 | X509_ALGOR_free(a->sig_alg); | ||
| 139 | ASN1_BIT_STRING_free(a->signature); | ||
| 140 | Free((char *)a); | ||
| 141 | } | ||
| 142 | |||
diff --git a/src/lib/libssl/src/crypto/asn1/x_cinf.c b/src/lib/libssl/src/crypto/asn1/x_cinf.c new file mode 100644 index 0000000000..4fc2cc9f6e --- /dev/null +++ b/src/lib/libssl/src/crypto/asn1/x_cinf.c | |||
| @@ -0,0 +1,197 @@ | |||
| 1 | /* crypto/asn1/x_cinf.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 "asn1_mac.h" | ||
| 62 | |||
| 63 | /* | ||
| 64 | * ASN1err(ASN1_F_D2I_X509_CINF,ASN1_R_LENGTH_MISMATCH); | ||
| 65 | * ASN1err(ASN1_F_X509_CINF_NEW,ASN1_R_LENGTH_MISMATCH); | ||
| 66 | */ | ||
| 67 | |||
| 68 | int i2d_X509_CINF(a,pp) | ||
| 69 | X509_CINF *a; | ||
| 70 | unsigned char **pp; | ||
| 71 | { | ||
| 72 | int v1=0,v2=0; | ||
| 73 | M_ASN1_I2D_vars(a); | ||
| 74 | |||
| 75 | M_ASN1_I2D_len_EXP_opt(a->version,i2d_ASN1_INTEGER,0,v1); | ||
| 76 | M_ASN1_I2D_len(a->serialNumber, i2d_ASN1_INTEGER); | ||
| 77 | M_ASN1_I2D_len(a->signature, i2d_X509_ALGOR); | ||
| 78 | M_ASN1_I2D_len(a->issuer, i2d_X509_NAME); | ||
| 79 | M_ASN1_I2D_len(a->validity, i2d_X509_VAL); | ||
| 80 | M_ASN1_I2D_len(a->subject, i2d_X509_NAME); | ||
| 81 | M_ASN1_I2D_len(a->key, i2d_X509_PUBKEY); | ||
| 82 | M_ASN1_I2D_len_IMP_opt(a->issuerUID, i2d_ASN1_BIT_STRING); | ||
| 83 | M_ASN1_I2D_len_IMP_opt(a->subjectUID, i2d_ASN1_BIT_STRING); | ||
| 84 | M_ASN1_I2D_len_EXP_set_opt(a->extensions,i2d_X509_EXTENSION,3,V_ASN1_SEQUENCE,v2); | ||
| 85 | |||
| 86 | M_ASN1_I2D_seq_total(); | ||
| 87 | |||
| 88 | M_ASN1_I2D_put_EXP_opt(a->version,i2d_ASN1_INTEGER,0,v1); | ||
| 89 | M_ASN1_I2D_put(a->serialNumber, i2d_ASN1_INTEGER); | ||
| 90 | M_ASN1_I2D_put(a->signature, i2d_X509_ALGOR); | ||
| 91 | M_ASN1_I2D_put(a->issuer, i2d_X509_NAME); | ||
| 92 | M_ASN1_I2D_put(a->validity, i2d_X509_VAL); | ||
| 93 | M_ASN1_I2D_put(a->subject, i2d_X509_NAME); | ||
| 94 | M_ASN1_I2D_put(a->key, i2d_X509_PUBKEY); | ||
| 95 | M_ASN1_I2D_put_IMP_opt(a->issuerUID, i2d_ASN1_BIT_STRING,1); | ||
| 96 | M_ASN1_I2D_put_IMP_opt(a->subjectUID, i2d_ASN1_BIT_STRING,2); | ||
| 97 | M_ASN1_I2D_put_EXP_set_opt(a->extensions,i2d_X509_EXTENSION,3,V_ASN1_SEQUENCE,v2); | ||
| 98 | |||
| 99 | M_ASN1_I2D_finish(); | ||
| 100 | } | ||
| 101 | |||
| 102 | X509_CINF *d2i_X509_CINF(a,pp,length) | ||
| 103 | X509_CINF **a; | ||
| 104 | unsigned char **pp; | ||
| 105 | long length; | ||
| 106 | { | ||
| 107 | int ver=0; | ||
| 108 | M_ASN1_D2I_vars(a,X509_CINF *,X509_CINF_new); | ||
| 109 | |||
| 110 | M_ASN1_D2I_Init(); | ||
| 111 | M_ASN1_D2I_start_sequence(); | ||
| 112 | /* we have the optional version field */ | ||
| 113 | if (M_ASN1_next == (V_ASN1_CONTEXT_SPECIFIC | V_ASN1_CONSTRUCTED | 0)) | ||
| 114 | { | ||
| 115 | M_ASN1_D2I_get_EXP_opt(ret->version,d2i_ASN1_INTEGER,0); | ||
| 116 | if (ret->version->data != NULL) | ||
| 117 | ver=ret->version->data[0]; | ||
| 118 | } | ||
| 119 | else | ||
| 120 | { | ||
| 121 | if (ret->version != NULL) | ||
| 122 | { | ||
| 123 | ASN1_INTEGER_free(ret->version); | ||
| 124 | ret->version=NULL; | ||
| 125 | } | ||
| 126 | } | ||
| 127 | M_ASN1_D2I_get(ret->serialNumber,d2i_ASN1_INTEGER); | ||
| 128 | M_ASN1_D2I_get(ret->signature,d2i_X509_ALGOR); | ||
| 129 | M_ASN1_D2I_get(ret->issuer,d2i_X509_NAME); | ||
| 130 | M_ASN1_D2I_get(ret->validity,d2i_X509_VAL); | ||
| 131 | M_ASN1_D2I_get(ret->subject,d2i_X509_NAME); | ||
| 132 | M_ASN1_D2I_get(ret->key,d2i_X509_PUBKEY); | ||
| 133 | if (ver >= 1) /* version 2 extensions */ | ||
| 134 | { | ||
| 135 | if (ret->issuerUID != NULL) | ||
| 136 | { | ||
| 137 | ASN1_BIT_STRING_free(ret->issuerUID); | ||
| 138 | ret->issuerUID=NULL; | ||
| 139 | } | ||
| 140 | if (ret->subjectUID != NULL) | ||
| 141 | { | ||
| 142 | ASN1_BIT_STRING_free(ret->subjectUID); | ||
| 143 | ret->issuerUID=NULL; | ||
| 144 | } | ||
| 145 | M_ASN1_D2I_get_IMP_opt(ret->issuerUID,d2i_ASN1_BIT_STRING, 1, | ||
| 146 | V_ASN1_BIT_STRING); | ||
| 147 | M_ASN1_D2I_get_IMP_opt(ret->subjectUID,d2i_ASN1_BIT_STRING, 2, | ||
| 148 | V_ASN1_BIT_STRING); | ||
| 149 | } | ||
| 150 | if (ver >= 2) /* version 3 extensions */ | ||
| 151 | { | ||
| 152 | if (ret->extensions != NULL) | ||
| 153 | while (sk_num(ret->extensions)) | ||
| 154 | X509_EXTENSION_free((X509_EXTENSION *) | ||
| 155 | sk_pop(ret->extensions)); | ||
| 156 | M_ASN1_D2I_get_EXP_set_opt(ret->extensions,d2i_X509_EXTENSION,3, | ||
| 157 | V_ASN1_SEQUENCE); | ||
| 158 | } | ||
| 159 | M_ASN1_D2I_Finish(a,X509_CINF_free,ASN1_F_D2I_X509_CINF); | ||
| 160 | } | ||
| 161 | |||
| 162 | X509_CINF *X509_CINF_new() | ||
| 163 | { | ||
| 164 | X509_CINF *ret=NULL; | ||
| 165 | |||
| 166 | M_ASN1_New_Malloc(ret,X509_CINF); | ||
| 167 | ret->version=NULL; | ||
| 168 | M_ASN1_New(ret->serialNumber,ASN1_INTEGER_new); | ||
| 169 | M_ASN1_New(ret->signature,X509_ALGOR_new); | ||
| 170 | M_ASN1_New(ret->issuer,X509_NAME_new); | ||
| 171 | M_ASN1_New(ret->validity,X509_VAL_new); | ||
| 172 | M_ASN1_New(ret->subject,X509_NAME_new); | ||
| 173 | M_ASN1_New(ret->key,X509_PUBKEY_new); | ||
| 174 | ret->issuerUID=NULL; | ||
| 175 | ret->subjectUID=NULL; | ||
| 176 | ret->extensions=NULL; | ||
| 177 | return(ret); | ||
| 178 | M_ASN1_New_Error(ASN1_F_X509_CINF_NEW); | ||
| 179 | } | ||
| 180 | |||
| 181 | void X509_CINF_free(a) | ||
| 182 | X509_CINF *a; | ||
| 183 | { | ||
| 184 | if (a == NULL) return; | ||
| 185 | ASN1_INTEGER_free(a->version); | ||
| 186 | ASN1_INTEGER_free(a->serialNumber); | ||
| 187 | X509_ALGOR_free(a->signature); | ||
| 188 | X509_NAME_free(a->issuer); | ||
| 189 | X509_VAL_free(a->validity); | ||
| 190 | X509_NAME_free(a->subject); | ||
| 191 | X509_PUBKEY_free(a->key); | ||
| 192 | ASN1_BIT_STRING_free(a->issuerUID); | ||
| 193 | ASN1_BIT_STRING_free(a->subjectUID); | ||
| 194 | sk_pop_free(a->extensions,X509_EXTENSION_free); | ||
| 195 | Free((char *)a); | ||
| 196 | } | ||
| 197 | |||
diff --git a/src/lib/libssl/src/crypto/bf/Makefile.ssl b/src/lib/libssl/src/crypto/bf/Makefile.ssl new file mode 100644 index 0000000000..236671f238 --- /dev/null +++ b/src/lib/libssl/src/crypto/bf/Makefile.ssl | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/blowfish/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= bf | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | CPP= $(CC) -E | ||
| 9 | INCLUDES= | ||
| 10 | CFLAG=-g | ||
| 11 | INSTALLTOP=/usr/local/ssl | ||
| 12 | MAKE= make -f Makefile.ssl | ||
| 13 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 14 | MAKEFILE= Makefile.ssl | ||
| 15 | AR= ar r | ||
| 16 | |||
| 17 | BF_ENC= bf_enc.o | ||
| 18 | # or use | ||
| 19 | #DES_ENC= bx86-elf.o | ||
| 20 | |||
| 21 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 22 | |||
| 23 | GENERAL=Makefile | ||
| 24 | TEST=bftest.c | ||
| 25 | APPS= | ||
| 26 | |||
| 27 | LIB=$(TOP)/libcrypto.a | ||
| 28 | LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c | ||
| 29 | LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o | ||
| 30 | |||
| 31 | SRC= $(LIBSRC) | ||
| 32 | |||
| 33 | EXHEADER= blowfish.h | ||
| 34 | HEADER= bf_pi.h bf_locl.h $(EXHEADER) | ||
| 35 | |||
| 36 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 37 | |||
| 38 | top: | ||
| 39 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 40 | |||
| 41 | all: lib | ||
| 42 | |||
| 43 | lib: $(LIBOBJ) | ||
| 44 | $(AR) $(LIB) $(LIBOBJ) | ||
| 45 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 46 | @touch lib | ||
| 47 | |||
| 48 | # elf | ||
| 49 | asm/bx86-elf.o: asm/bx86unix.cpp | ||
| 50 | $(CPP) -DELF asm/bx86unix.cpp | as -o asm/bx86-elf.o | ||
| 51 | |||
| 52 | # solaris | ||
| 53 | asm/bx86-sol.o: asm/bx86unix.cpp | ||
| 54 | $(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s | ||
| 55 | as -o asm/bx86-sol.o asm/bx86-sol.s | ||
| 56 | rm -f asm/bx86-sol.s | ||
| 57 | |||
| 58 | # a.out | ||
| 59 | asm/bx86-out.o: asm/bx86unix.cpp | ||
| 60 | $(CPP) -DOUT asm/bx86unix.cpp | as -o asm/bx86-out.o | ||
| 61 | |||
| 62 | # bsdi | ||
| 63 | asm/bx86bsdi.o: asm/bx86unix.cpp | ||
| 64 | $(CPP) -DBSDI asm/bx86unix.cpp | as -o asm/bx86bsdi.o | ||
| 65 | |||
| 66 | asm/bx86unix.cpp: | ||
| 67 | (cd asm; perl bf-586.pl cpp >bx86unix.cpp) | ||
| 68 | |||
| 69 | files: | ||
| 70 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 71 | |||
| 72 | links: | ||
| 73 | /bin/rm -f Makefile | ||
| 74 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 75 | $(TOP)/util/point.sh ../../doc/blowfish.doc blowfish.doc ; | ||
| 76 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 77 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 78 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 79 | |||
| 80 | install: | ||
| 81 | @for i in $(EXHEADER) ; \ | ||
| 82 | do \ | ||
| 83 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 84 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 85 | done; | ||
| 86 | |||
| 87 | tags: | ||
| 88 | ctags $(SRC) | ||
| 89 | |||
| 90 | tests: | ||
| 91 | |||
| 92 | lint: | ||
| 93 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 94 | |||
| 95 | depend: | ||
| 96 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 97 | |||
| 98 | dclean: | ||
| 99 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 100 | mv -f Makefile.new $(MAKEFILE) | ||
| 101 | |||
| 102 | clean: | ||
| 103 | /bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 104 | |||
| 105 | errors: | ||
| 106 | |||
| 107 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/bf/Makefile.uni b/src/lib/libssl/src/crypto/bf/Makefile.uni new file mode 100644 index 0000000000..9ba5b0c854 --- /dev/null +++ b/src/lib/libssl/src/crypto/bf/Makefile.uni | |||
| @@ -0,0 +1,169 @@ | |||
| 1 | # Targets | ||
| 2 | # make - twidle the options yourself :-) | ||
| 3 | # make cc - standard cc options | ||
| 4 | # make gcc - standard gcc options | ||
| 5 | # make x86-elf - linux-elf etc | ||
| 6 | # make x86-out - linux-a.out, FreeBSD etc | ||
| 7 | # make x86-solaris | ||
| 8 | # make x86-bdsi | ||
| 9 | |||
| 10 | DIR= bf | ||
| 11 | TOP= . | ||
| 12 | # use BF_PTR2 for intel boxes, | ||
| 13 | # BF_PTR for sparc and MIPS/SGI | ||
| 14 | # use nothing for Alpha and HP. | ||
| 15 | |||
| 16 | # There are 3 possible performance options, experiment :-) | ||
| 17 | #OPTS= -DBF_PTR # usr for sparc and MIPS/SGI | ||
| 18 | #OPTS= -DBF_PTR2 # use for pentium | ||
| 19 | OPTS= # use for pentium pro, Alpha and HP | ||
| 20 | |||
| 21 | MAKE=make -f Makefile | ||
| 22 | #CC=cc | ||
| 23 | #CFLAG= -O | ||
| 24 | |||
| 25 | CC=gcc | ||
| 26 | #CFLAG= -O4 -funroll-loops -fomit-frame-pointer | ||
| 27 | CFLAG= -O3 -fomit-frame-pointer | ||
| 28 | |||
| 29 | CFLAGS=$(OPTS) $(CFLAG) | ||
| 30 | CPP=$(CC) -E | ||
| 31 | AS=as | ||
| 32 | |||
| 33 | # Assember version of bf_encrypt(). | ||
| 34 | BF_ENC=bf_enc.o # normal C version | ||
| 35 | #BF_ENC=asm/bx86-elf.o # elf format x86 | ||
| 36 | #BF_ENC=asm/bx86-out.o # a.out format x86 | ||
| 37 | #BF_ENC=asm/bx86-sol.o # solaris format x86 | ||
| 38 | #BF_ENC=asm/bx86bsdi.o # bsdi format x86 | ||
| 39 | |||
| 40 | LIBDIR=/usr/local/lib | ||
| 41 | BINDIR=/usr/local/bin | ||
| 42 | INCDIR=/usr/local/include | ||
| 43 | MANDIR=/usr/local/man | ||
| 44 | MAN1=1 | ||
| 45 | MAN3=3 | ||
| 46 | SHELL=/bin/sh | ||
| 47 | LIBOBJ=bf_skey.o bf_ecb.o $(BF_ENC) bf_cfb64.o bf_ofb64.o | ||
| 48 | LIBSRC=bf_skey.c bf_ecb.c bf_enc.c bf_cfb64.c bf_ofb64.c | ||
| 49 | |||
| 50 | GENERAL=Makefile Makefile.ssl Makefile.uni asm bf_locl.org README \ | ||
| 51 | COPYRIGHT blowfish.doc INSTALL | ||
| 52 | |||
| 53 | TESTING= bftest bfspeed bf_opts | ||
| 54 | TESTING_SRC=bftest.c bfspeed.c bf_opts.c | ||
| 55 | HEADERS=bf_locl.h blowfish.h bf_pi.h | ||
| 56 | |||
| 57 | ALL= $(GENERAL) $(TESTING_SRC) $(LIBSRC) $(HEADERS) | ||
| 58 | |||
| 59 | BLIB= libblowfish.a | ||
| 60 | |||
| 61 | all: $(BLIB) $(TESTING) | ||
| 62 | |||
| 63 | cc: | ||
| 64 | $(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all | ||
| 65 | |||
| 66 | gcc: | ||
| 67 | $(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all | ||
| 68 | |||
| 69 | x86-elf: | ||
| 70 | $(MAKE) BF_ENC='asm/bx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all | ||
| 71 | |||
| 72 | x86-out: | ||
| 73 | $(MAKE) BF_ENC='asm/bx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all | ||
| 74 | |||
| 75 | x86-solaris: | ||
| 76 | $(MAKE) BF_ENC='asm/bx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all | ||
| 77 | |||
| 78 | x86-bsdi: | ||
| 79 | $(MAKE) BF_ENC='asm/bx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all | ||
| 80 | |||
| 81 | # elf | ||
| 82 | asm/bx86-elf.o: asm/bx86unix.cpp | ||
| 83 | $(CPP) -DELF asm/bx86unix.cpp | $(AS) -o asm/bx86-elf.o | ||
| 84 | |||
| 85 | # solaris | ||
| 86 | asm/bx86-sol.o: asm/bx86unix.cpp | ||
| 87 | $(CC) -E -DSOL asm/bx86unix.cpp | sed 's/^#.*//' > asm/bx86-sol.s | ||
| 88 | as -o asm/bx86-sol.o asm/bx86-sol.s | ||
| 89 | rm -f asm/bx86-sol.s | ||
| 90 | |||
| 91 | # a.out | ||
| 92 | asm/bx86-out.o: asm/bx86unix.cpp | ||
| 93 | $(CPP) -DOUT asm/bx86unix.cpp | $(AS) -o asm/bx86-out.o | ||
| 94 | |||
| 95 | # bsdi | ||
| 96 | asm/bx86bsdi.o: asm/bx86unix.cpp | ||
| 97 | $(CPP) -DBSDI asm/bx86unix.cpp | $(AS) -o asm/bx86bsdi.o | ||
| 98 | |||
| 99 | asm/bx86unix.cpp: | ||
| 100 | (cd asm; perl bf-586.pl cpp >bx86unix.cpp) | ||
| 101 | |||
| 102 | test: all | ||
| 103 | ./bftest | ||
| 104 | |||
| 105 | $(BLIB): $(LIBOBJ) | ||
| 106 | /bin/rm -f $(BLIB) | ||
| 107 | ar cr $(BLIB) $(LIBOBJ) | ||
| 108 | -if test -s /bin/ranlib; then /bin/ranlib $(BLIB); \ | ||
| 109 | else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(BLIB); \ | ||
| 110 | else exit 0; fi; fi | ||
| 111 | |||
| 112 | bftest: bftest.o $(BLIB) | ||
| 113 | $(CC) $(CFLAGS) -o bftest bftest.o $(BLIB) | ||
| 114 | |||
| 115 | bfspeed: bfspeed.o $(BLIB) | ||
| 116 | $(CC) $(CFLAGS) -o bfspeed bfspeed.o $(BLIB) | ||
| 117 | |||
| 118 | bf_opts: bf_opts.o $(BLIB) | ||
| 119 | $(CC) $(CFLAGS) -o bf_opts bf_opts.o $(BLIB) | ||
| 120 | |||
| 121 | tags: | ||
| 122 | ctags $(TESTING_SRC) $(LIBBF) | ||
| 123 | |||
| 124 | tar: | ||
| 125 | tar chf libbf.tar $(ALL) | ||
| 126 | |||
| 127 | shar: | ||
| 128 | shar $(ALL) >libbf.shar | ||
| 129 | |||
| 130 | depend: | ||
| 131 | makedepend $(LIBBF) $(TESTING_SRC) | ||
| 132 | |||
| 133 | clean: | ||
| 134 | /bin/rm -f *.o tags core $(TESTING) $(BLIB) .nfs* *.old *.bak asm/*.o | ||
| 135 | |||
| 136 | dclean: | ||
| 137 | sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new | ||
| 138 | mv -f Makefile.new Makefile | ||
| 139 | |||
| 140 | # Eric is probably going to choke when he next looks at this --tjh | ||
| 141 | install: $(BLIB) | ||
| 142 | if test $(INSTALLTOP); then \ | ||
| 143 | echo SSL style install; \ | ||
| 144 | cp $(BLIB) $(INSTALLTOP)/lib; \ | ||
| 145 | if test -s /bin/ranlib; then \ | ||
| 146 | /bin/ranlib $(INSTALLTOP)/lib/$(BLIB); \ | ||
| 147 | else \ | ||
| 148 | if test -s /usr/bin/ranlib; then \ | ||
| 149 | /usr/bin/ranlib $(INSTALLTOP)/lib/$(BLIB); \ | ||
| 150 | fi; fi; \ | ||
| 151 | chmod 644 $(INSTALLTOP)/lib/$(BLIB); \ | ||
| 152 | cp blowfish.h $(INSTALLTOP)/include; \ | ||
| 153 | chmod 644 $(INSTALLTOP)/include/blowfish.h; \ | ||
| 154 | else \ | ||
| 155 | echo Standalone install; \ | ||
| 156 | cp $(BLIB) $(LIBDIR)/$(BLIB); \ | ||
| 157 | if test -s /bin/ranlib; then \ | ||
| 158 | /bin/ranlib $(LIBDIR)/$(BLIB); \ | ||
| 159 | else \ | ||
| 160 | if test -s /usr/bin/ranlib; then \ | ||
| 161 | /usr/bin/ranlib $(LIBDIR)/$(BLIB); \ | ||
| 162 | fi; \ | ||
| 163 | fi; \ | ||
| 164 | chmod 644 $(LIBDIR)/$(BLIB); \ | ||
| 165 | cp blowfish.h $(INCDIR)/blowfish.h; \ | ||
| 166 | chmod 644 $(INCDIR)/blowfish.h; \ | ||
| 167 | fi | ||
| 168 | |||
| 169 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/bf/asm/b-win32.asm b/src/lib/libssl/src/crypto/bf/asm/b-win32.asm new file mode 100644 index 0000000000..138c99d0aa --- /dev/null +++ b/src/lib/libssl/src/crypto/bf/asm/b-win32.asm | |||
| @@ -0,0 +1,906 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by bf-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE bf-586.asm | ||
| 8 | .486 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _BF_encrypt | ||
| 12 | |||
| 13 | _BF_encrypt PROC NEAR | ||
| 14 | ; | ||
| 15 | push ebp | ||
| 16 | push ebx | ||
| 17 | mov ebx, DWORD PTR 12[esp] | ||
| 18 | mov ebp, DWORD PTR 16[esp] | ||
| 19 | push esi | ||
| 20 | push edi | ||
| 21 | ; Load the 2 words | ||
| 22 | mov edi, DWORD PTR [ebx] | ||
| 23 | mov esi, DWORD PTR 4[ebx] | ||
| 24 | xor eax, eax | ||
| 25 | mov ebx, DWORD PTR [ebp] | ||
| 26 | xor ecx, ecx | ||
| 27 | xor edi, ebx | ||
| 28 | ; | ||
| 29 | ; Round 0 | ||
| 30 | mov edx, DWORD PTR 4[ebp] | ||
| 31 | mov ebx, edi | ||
| 32 | xor esi, edx | ||
| 33 | shr ebx, 16 | ||
| 34 | mov edx, edi | ||
| 35 | mov al, bh | ||
| 36 | and ebx, 255 | ||
| 37 | mov cl, dh | ||
| 38 | and edx, 255 | ||
| 39 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 40 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 41 | add ebx, eax | ||
| 42 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 43 | xor ebx, eax | ||
| 44 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 45 | add ebx, edx | ||
| 46 | xor eax, eax | ||
| 47 | xor esi, ebx | ||
| 48 | ; | ||
| 49 | ; Round 1 | ||
| 50 | mov edx, DWORD PTR 8[ebp] | ||
| 51 | mov ebx, esi | ||
| 52 | xor edi, edx | ||
| 53 | shr ebx, 16 | ||
| 54 | mov edx, esi | ||
| 55 | mov al, bh | ||
| 56 | and ebx, 255 | ||
| 57 | mov cl, dh | ||
| 58 | and edx, 255 | ||
| 59 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 60 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 61 | add ebx, eax | ||
| 62 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 63 | xor ebx, eax | ||
| 64 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 65 | add ebx, edx | ||
| 66 | xor eax, eax | ||
| 67 | xor edi, ebx | ||
| 68 | ; | ||
| 69 | ; Round 2 | ||
| 70 | mov edx, DWORD PTR 12[ebp] | ||
| 71 | mov ebx, edi | ||
| 72 | xor esi, edx | ||
| 73 | shr ebx, 16 | ||
| 74 | mov edx, edi | ||
| 75 | mov al, bh | ||
| 76 | and ebx, 255 | ||
| 77 | mov cl, dh | ||
| 78 | and edx, 255 | ||
| 79 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 80 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 81 | add ebx, eax | ||
| 82 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 83 | xor ebx, eax | ||
| 84 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 85 | add ebx, edx | ||
| 86 | xor eax, eax | ||
| 87 | xor esi, ebx | ||
| 88 | ; | ||
| 89 | ; Round 3 | ||
| 90 | mov edx, DWORD PTR 16[ebp] | ||
| 91 | mov ebx, esi | ||
| 92 | xor edi, edx | ||
| 93 | shr ebx, 16 | ||
| 94 | mov edx, esi | ||
| 95 | mov al, bh | ||
| 96 | and ebx, 255 | ||
| 97 | mov cl, dh | ||
| 98 | and edx, 255 | ||
| 99 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 100 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 101 | add ebx, eax | ||
| 102 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 103 | xor ebx, eax | ||
| 104 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 105 | add ebx, edx | ||
| 106 | xor eax, eax | ||
| 107 | xor edi, ebx | ||
| 108 | ; | ||
| 109 | ; Round 4 | ||
| 110 | mov edx, DWORD PTR 20[ebp] | ||
| 111 | mov ebx, edi | ||
| 112 | xor esi, edx | ||
| 113 | shr ebx, 16 | ||
| 114 | mov edx, edi | ||
| 115 | mov al, bh | ||
| 116 | and ebx, 255 | ||
| 117 | mov cl, dh | ||
| 118 | and edx, 255 | ||
| 119 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 120 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 121 | add ebx, eax | ||
| 122 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 123 | xor ebx, eax | ||
| 124 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 125 | add ebx, edx | ||
| 126 | xor eax, eax | ||
| 127 | xor esi, ebx | ||
| 128 | ; | ||
| 129 | ; Round 5 | ||
| 130 | mov edx, DWORD PTR 24[ebp] | ||
| 131 | mov ebx, esi | ||
| 132 | xor edi, edx | ||
| 133 | shr ebx, 16 | ||
| 134 | mov edx, esi | ||
| 135 | mov al, bh | ||
| 136 | and ebx, 255 | ||
| 137 | mov cl, dh | ||
| 138 | and edx, 255 | ||
| 139 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 140 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 141 | add ebx, eax | ||
| 142 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 143 | xor ebx, eax | ||
| 144 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 145 | add ebx, edx | ||
| 146 | xor eax, eax | ||
| 147 | xor edi, ebx | ||
| 148 | ; | ||
| 149 | ; Round 6 | ||
| 150 | mov edx, DWORD PTR 28[ebp] | ||
| 151 | mov ebx, edi | ||
| 152 | xor esi, edx | ||
| 153 | shr ebx, 16 | ||
| 154 | mov edx, edi | ||
| 155 | mov al, bh | ||
| 156 | and ebx, 255 | ||
| 157 | mov cl, dh | ||
| 158 | and edx, 255 | ||
| 159 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 160 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 161 | add ebx, eax | ||
| 162 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 163 | xor ebx, eax | ||
| 164 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 165 | add ebx, edx | ||
| 166 | xor eax, eax | ||
| 167 | xor esi, ebx | ||
| 168 | ; | ||
| 169 | ; Round 7 | ||
| 170 | mov edx, DWORD PTR 32[ebp] | ||
| 171 | mov ebx, esi | ||
| 172 | xor edi, edx | ||
| 173 | shr ebx, 16 | ||
| 174 | mov edx, esi | ||
| 175 | mov al, bh | ||
| 176 | and ebx, 255 | ||
| 177 | mov cl, dh | ||
| 178 | and edx, 255 | ||
| 179 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 180 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 181 | add ebx, eax | ||
| 182 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 183 | xor ebx, eax | ||
| 184 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 185 | add ebx, edx | ||
| 186 | xor eax, eax | ||
| 187 | xor edi, ebx | ||
| 188 | ; | ||
| 189 | ; Round 8 | ||
| 190 | mov edx, DWORD PTR 36[ebp] | ||
| 191 | mov ebx, edi | ||
| 192 | xor esi, edx | ||
| 193 | shr ebx, 16 | ||
| 194 | mov edx, edi | ||
| 195 | mov al, bh | ||
| 196 | and ebx, 255 | ||
| 197 | mov cl, dh | ||
| 198 | and edx, 255 | ||
| 199 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 200 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 201 | add ebx, eax | ||
| 202 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 203 | xor ebx, eax | ||
| 204 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 205 | add ebx, edx | ||
| 206 | xor eax, eax | ||
| 207 | xor esi, ebx | ||
| 208 | ; | ||
| 209 | ; Round 9 | ||
| 210 | mov edx, DWORD PTR 40[ebp] | ||
| 211 | mov ebx, esi | ||
| 212 | xor edi, edx | ||
| 213 | shr ebx, 16 | ||
| 214 | mov edx, esi | ||
| 215 | mov al, bh | ||
| 216 | and ebx, 255 | ||
| 217 | mov cl, dh | ||
| 218 | and edx, 255 | ||
| 219 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 220 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 221 | add ebx, eax | ||
| 222 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 223 | xor ebx, eax | ||
| 224 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 225 | add ebx, edx | ||
| 226 | xor eax, eax | ||
| 227 | xor edi, ebx | ||
| 228 | ; | ||
| 229 | ; Round 10 | ||
| 230 | mov edx, DWORD PTR 44[ebp] | ||
| 231 | mov ebx, edi | ||
| 232 | xor esi, edx | ||
| 233 | shr ebx, 16 | ||
| 234 | mov edx, edi | ||
| 235 | mov al, bh | ||
| 236 | and ebx, 255 | ||
| 237 | mov cl, dh | ||
| 238 | and edx, 255 | ||
| 239 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 240 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 241 | add ebx, eax | ||
| 242 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 243 | xor ebx, eax | ||
| 244 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 245 | add ebx, edx | ||
| 246 | xor eax, eax | ||
| 247 | xor esi, ebx | ||
| 248 | ; | ||
| 249 | ; Round 11 | ||
| 250 | mov edx, DWORD PTR 48[ebp] | ||
| 251 | mov ebx, esi | ||
| 252 | xor edi, edx | ||
| 253 | shr ebx, 16 | ||
| 254 | mov edx, esi | ||
| 255 | mov al, bh | ||
| 256 | and ebx, 255 | ||
| 257 | mov cl, dh | ||
| 258 | and edx, 255 | ||
| 259 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 260 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 261 | add ebx, eax | ||
| 262 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 263 | xor ebx, eax | ||
| 264 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 265 | add ebx, edx | ||
| 266 | xor eax, eax | ||
| 267 | xor edi, ebx | ||
| 268 | ; | ||
| 269 | ; Round 12 | ||
| 270 | mov edx, DWORD PTR 52[ebp] | ||
| 271 | mov ebx, edi | ||
| 272 | xor esi, edx | ||
| 273 | shr ebx, 16 | ||
| 274 | mov edx, edi | ||
| 275 | mov al, bh | ||
| 276 | and ebx, 255 | ||
| 277 | mov cl, dh | ||
| 278 | and edx, 255 | ||
| 279 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 280 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 281 | add ebx, eax | ||
| 282 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 283 | xor ebx, eax | ||
| 284 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 285 | add ebx, edx | ||
| 286 | xor eax, eax | ||
| 287 | xor esi, ebx | ||
| 288 | ; | ||
| 289 | ; Round 13 | ||
| 290 | mov edx, DWORD PTR 56[ebp] | ||
| 291 | mov ebx, esi | ||
| 292 | xor edi, edx | ||
| 293 | shr ebx, 16 | ||
| 294 | mov edx, esi | ||
| 295 | mov al, bh | ||
| 296 | and ebx, 255 | ||
| 297 | mov cl, dh | ||
| 298 | and edx, 255 | ||
| 299 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 300 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 301 | add ebx, eax | ||
| 302 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 303 | xor ebx, eax | ||
| 304 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 305 | add ebx, edx | ||
| 306 | xor eax, eax | ||
| 307 | xor edi, ebx | ||
| 308 | ; | ||
| 309 | ; Round 14 | ||
| 310 | mov edx, DWORD PTR 60[ebp] | ||
| 311 | mov ebx, edi | ||
| 312 | xor esi, edx | ||
| 313 | shr ebx, 16 | ||
| 314 | mov edx, edi | ||
| 315 | mov al, bh | ||
| 316 | and ebx, 255 | ||
| 317 | mov cl, dh | ||
| 318 | and edx, 255 | ||
| 319 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 320 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 321 | add ebx, eax | ||
| 322 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 323 | xor ebx, eax | ||
| 324 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 325 | add ebx, edx | ||
| 326 | xor eax, eax | ||
| 327 | xor esi, ebx | ||
| 328 | ; | ||
| 329 | ; Round 15 | ||
| 330 | mov edx, DWORD PTR 64[ebp] | ||
| 331 | mov ebx, esi | ||
| 332 | xor edi, edx | ||
| 333 | shr ebx, 16 | ||
| 334 | mov edx, esi | ||
| 335 | mov al, bh | ||
| 336 | and ebx, 255 | ||
| 337 | mov cl, dh | ||
| 338 | and edx, 255 | ||
| 339 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 340 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 341 | add ebx, eax | ||
| 342 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 343 | xor ebx, eax | ||
| 344 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 345 | add ebx, edx | ||
| 346 | ; Load parameter 0 (16) enc=1 | ||
| 347 | mov eax, DWORD PTR 20[esp] | ||
| 348 | xor edi, ebx | ||
| 349 | mov edx, DWORD PTR 68[ebp] | ||
| 350 | xor esi, edx | ||
| 351 | mov DWORD PTR 4[eax],edi | ||
| 352 | mov DWORD PTR [eax],esi | ||
| 353 | pop edi | ||
| 354 | pop esi | ||
| 355 | pop ebx | ||
| 356 | pop ebp | ||
| 357 | ret | ||
| 358 | _BF_encrypt ENDP | ||
| 359 | _TEXT ENDS | ||
| 360 | _TEXT SEGMENT | ||
| 361 | PUBLIC _BF_decrypt | ||
| 362 | |||
| 363 | _BF_decrypt PROC NEAR | ||
| 364 | ; | ||
| 365 | push ebp | ||
| 366 | push ebx | ||
| 367 | mov ebx, DWORD PTR 12[esp] | ||
| 368 | mov ebp, DWORD PTR 16[esp] | ||
| 369 | push esi | ||
| 370 | push edi | ||
| 371 | ; Load the 2 words | ||
| 372 | mov edi, DWORD PTR [ebx] | ||
| 373 | mov esi, DWORD PTR 4[ebx] | ||
| 374 | xor eax, eax | ||
| 375 | mov ebx, DWORD PTR 68[ebp] | ||
| 376 | xor ecx, ecx | ||
| 377 | xor edi, ebx | ||
| 378 | ; | ||
| 379 | ; Round 16 | ||
| 380 | mov edx, DWORD PTR 64[ebp] | ||
| 381 | mov ebx, edi | ||
| 382 | xor esi, edx | ||
| 383 | shr ebx, 16 | ||
| 384 | mov edx, edi | ||
| 385 | mov al, bh | ||
| 386 | and ebx, 255 | ||
| 387 | mov cl, dh | ||
| 388 | and edx, 255 | ||
| 389 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 390 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 391 | add ebx, eax | ||
| 392 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 393 | xor ebx, eax | ||
| 394 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 395 | add ebx, edx | ||
| 396 | xor eax, eax | ||
| 397 | xor esi, ebx | ||
| 398 | ; | ||
| 399 | ; Round 15 | ||
| 400 | mov edx, DWORD PTR 60[ebp] | ||
| 401 | mov ebx, esi | ||
| 402 | xor edi, edx | ||
| 403 | shr ebx, 16 | ||
| 404 | mov edx, esi | ||
| 405 | mov al, bh | ||
| 406 | and ebx, 255 | ||
| 407 | mov cl, dh | ||
| 408 | and edx, 255 | ||
| 409 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 410 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 411 | add ebx, eax | ||
| 412 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 413 | xor ebx, eax | ||
| 414 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 415 | add ebx, edx | ||
| 416 | xor eax, eax | ||
| 417 | xor edi, ebx | ||
| 418 | ; | ||
| 419 | ; Round 14 | ||
| 420 | mov edx, DWORD PTR 56[ebp] | ||
| 421 | mov ebx, edi | ||
| 422 | xor esi, edx | ||
| 423 | shr ebx, 16 | ||
| 424 | mov edx, edi | ||
| 425 | mov al, bh | ||
| 426 | and ebx, 255 | ||
| 427 | mov cl, dh | ||
| 428 | and edx, 255 | ||
| 429 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 430 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 431 | add ebx, eax | ||
| 432 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 433 | xor ebx, eax | ||
| 434 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 435 | add ebx, edx | ||
| 436 | xor eax, eax | ||
| 437 | xor esi, ebx | ||
| 438 | ; | ||
| 439 | ; Round 13 | ||
| 440 | mov edx, DWORD PTR 52[ebp] | ||
| 441 | mov ebx, esi | ||
| 442 | xor edi, edx | ||
| 443 | shr ebx, 16 | ||
| 444 | mov edx, esi | ||
| 445 | mov al, bh | ||
| 446 | and ebx, 255 | ||
| 447 | mov cl, dh | ||
| 448 | and edx, 255 | ||
| 449 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 450 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 451 | add ebx, eax | ||
| 452 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 453 | xor ebx, eax | ||
| 454 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 455 | add ebx, edx | ||
| 456 | xor eax, eax | ||
| 457 | xor edi, ebx | ||
| 458 | ; | ||
| 459 | ; Round 12 | ||
| 460 | mov edx, DWORD PTR 48[ebp] | ||
| 461 | mov ebx, edi | ||
| 462 | xor esi, edx | ||
| 463 | shr ebx, 16 | ||
| 464 | mov edx, edi | ||
| 465 | mov al, bh | ||
| 466 | and ebx, 255 | ||
| 467 | mov cl, dh | ||
| 468 | and edx, 255 | ||
| 469 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 470 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 471 | add ebx, eax | ||
| 472 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 473 | xor ebx, eax | ||
| 474 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 475 | add ebx, edx | ||
| 476 | xor eax, eax | ||
| 477 | xor esi, ebx | ||
| 478 | ; | ||
| 479 | ; Round 11 | ||
| 480 | mov edx, DWORD PTR 44[ebp] | ||
| 481 | mov ebx, esi | ||
| 482 | xor edi, edx | ||
| 483 | shr ebx, 16 | ||
| 484 | mov edx, esi | ||
| 485 | mov al, bh | ||
| 486 | and ebx, 255 | ||
| 487 | mov cl, dh | ||
| 488 | and edx, 255 | ||
| 489 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 490 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 491 | add ebx, eax | ||
| 492 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 493 | xor ebx, eax | ||
| 494 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 495 | add ebx, edx | ||
| 496 | xor eax, eax | ||
| 497 | xor edi, ebx | ||
| 498 | ; | ||
| 499 | ; Round 10 | ||
| 500 | mov edx, DWORD PTR 40[ebp] | ||
| 501 | mov ebx, edi | ||
| 502 | xor esi, edx | ||
| 503 | shr ebx, 16 | ||
| 504 | mov edx, edi | ||
| 505 | mov al, bh | ||
| 506 | and ebx, 255 | ||
| 507 | mov cl, dh | ||
| 508 | and edx, 255 | ||
| 509 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 510 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 511 | add ebx, eax | ||
| 512 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 513 | xor ebx, eax | ||
| 514 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 515 | add ebx, edx | ||
| 516 | xor eax, eax | ||
| 517 | xor esi, ebx | ||
| 518 | ; | ||
| 519 | ; Round 9 | ||
| 520 | mov edx, DWORD PTR 36[ebp] | ||
| 521 | mov ebx, esi | ||
| 522 | xor edi, edx | ||
| 523 | shr ebx, 16 | ||
| 524 | mov edx, esi | ||
| 525 | mov al, bh | ||
| 526 | and ebx, 255 | ||
| 527 | mov cl, dh | ||
| 528 | and edx, 255 | ||
| 529 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 530 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 531 | add ebx, eax | ||
| 532 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 533 | xor ebx, eax | ||
| 534 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 535 | add ebx, edx | ||
| 536 | xor eax, eax | ||
| 537 | xor edi, ebx | ||
| 538 | ; | ||
| 539 | ; Round 8 | ||
| 540 | mov edx, DWORD PTR 32[ebp] | ||
| 541 | mov ebx, edi | ||
| 542 | xor esi, edx | ||
| 543 | shr ebx, 16 | ||
| 544 | mov edx, edi | ||
| 545 | mov al, bh | ||
| 546 | and ebx, 255 | ||
| 547 | mov cl, dh | ||
| 548 | and edx, 255 | ||
| 549 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 550 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 551 | add ebx, eax | ||
| 552 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 553 | xor ebx, eax | ||
| 554 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 555 | add ebx, edx | ||
| 556 | xor eax, eax | ||
| 557 | xor esi, ebx | ||
| 558 | ; | ||
| 559 | ; Round 7 | ||
| 560 | mov edx, DWORD PTR 28[ebp] | ||
| 561 | mov ebx, esi | ||
| 562 | xor edi, edx | ||
| 563 | shr ebx, 16 | ||
| 564 | mov edx, esi | ||
| 565 | mov al, bh | ||
| 566 | and ebx, 255 | ||
| 567 | mov cl, dh | ||
| 568 | and edx, 255 | ||
| 569 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 570 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 571 | add ebx, eax | ||
| 572 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 573 | xor ebx, eax | ||
| 574 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 575 | add ebx, edx | ||
| 576 | xor eax, eax | ||
| 577 | xor edi, ebx | ||
| 578 | ; | ||
| 579 | ; Round 6 | ||
| 580 | mov edx, DWORD PTR 24[ebp] | ||
| 581 | mov ebx, edi | ||
| 582 | xor esi, edx | ||
| 583 | shr ebx, 16 | ||
| 584 | mov edx, edi | ||
| 585 | mov al, bh | ||
| 586 | and ebx, 255 | ||
| 587 | mov cl, dh | ||
| 588 | and edx, 255 | ||
| 589 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 590 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 591 | add ebx, eax | ||
| 592 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 593 | xor ebx, eax | ||
| 594 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 595 | add ebx, edx | ||
| 596 | xor eax, eax | ||
| 597 | xor esi, ebx | ||
| 598 | ; | ||
| 599 | ; Round 5 | ||
| 600 | mov edx, DWORD PTR 20[ebp] | ||
| 601 | mov ebx, esi | ||
| 602 | xor edi, edx | ||
| 603 | shr ebx, 16 | ||
| 604 | mov edx, esi | ||
| 605 | mov al, bh | ||
| 606 | and ebx, 255 | ||
| 607 | mov cl, dh | ||
| 608 | and edx, 255 | ||
| 609 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 610 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 611 | add ebx, eax | ||
| 612 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 613 | xor ebx, eax | ||
| 614 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 615 | add ebx, edx | ||
| 616 | xor eax, eax | ||
| 617 | xor edi, ebx | ||
| 618 | ; | ||
| 619 | ; Round 4 | ||
| 620 | mov edx, DWORD PTR 16[ebp] | ||
| 621 | mov ebx, edi | ||
| 622 | xor esi, edx | ||
| 623 | shr ebx, 16 | ||
| 624 | mov edx, edi | ||
| 625 | mov al, bh | ||
| 626 | and ebx, 255 | ||
| 627 | mov cl, dh | ||
| 628 | and edx, 255 | ||
| 629 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 630 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 631 | add ebx, eax | ||
| 632 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 633 | xor ebx, eax | ||
| 634 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 635 | add ebx, edx | ||
| 636 | xor eax, eax | ||
| 637 | xor esi, ebx | ||
| 638 | ; | ||
| 639 | ; Round 3 | ||
| 640 | mov edx, DWORD PTR 12[ebp] | ||
| 641 | mov ebx, esi | ||
| 642 | xor edi, edx | ||
| 643 | shr ebx, 16 | ||
| 644 | mov edx, esi | ||
| 645 | mov al, bh | ||
| 646 | and ebx, 255 | ||
| 647 | mov cl, dh | ||
| 648 | and edx, 255 | ||
| 649 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 650 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 651 | add ebx, eax | ||
| 652 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 653 | xor ebx, eax | ||
| 654 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 655 | add ebx, edx | ||
| 656 | xor eax, eax | ||
| 657 | xor edi, ebx | ||
| 658 | ; | ||
| 659 | ; Round 2 | ||
| 660 | mov edx, DWORD PTR 8[ebp] | ||
| 661 | mov ebx, edi | ||
| 662 | xor esi, edx | ||
| 663 | shr ebx, 16 | ||
| 664 | mov edx, edi | ||
| 665 | mov al, bh | ||
| 666 | and ebx, 255 | ||
| 667 | mov cl, dh | ||
| 668 | and edx, 255 | ||
| 669 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 670 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 671 | add ebx, eax | ||
| 672 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 673 | xor ebx, eax | ||
| 674 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 675 | add ebx, edx | ||
| 676 | xor eax, eax | ||
| 677 | xor esi, ebx | ||
| 678 | ; | ||
| 679 | ; Round 1 | ||
| 680 | mov edx, DWORD PTR 4[ebp] | ||
| 681 | mov ebx, esi | ||
| 682 | xor edi, edx | ||
| 683 | shr ebx, 16 | ||
| 684 | mov edx, esi | ||
| 685 | mov al, bh | ||
| 686 | and ebx, 255 | ||
| 687 | mov cl, dh | ||
| 688 | and edx, 255 | ||
| 689 | mov eax, DWORD PTR 72[eax*4+ebp] | ||
| 690 | mov ebx, DWORD PTR 1096[ebx*4+ebp] | ||
| 691 | add ebx, eax | ||
| 692 | mov eax, DWORD PTR 2120[ecx*4+ebp] | ||
| 693 | xor ebx, eax | ||
| 694 | mov edx, DWORD PTR 3144[edx*4+ebp] | ||
| 695 | add ebx, edx | ||
| 696 | ; Load parameter 0 (1) enc=0 | ||
| 697 | mov eax, DWORD PTR 20[esp] | ||
| 698 | xor edi, ebx | ||
| 699 | mov edx, DWORD PTR [ebp] | ||
| 700 | xor esi, edx | ||
| 701 | mov DWORD PTR 4[eax],edi | ||
| 702 | mov DWORD PTR [eax],esi | ||
| 703 | pop edi | ||
| 704 | pop esi | ||
| 705 | pop ebx | ||
| 706 | pop ebp | ||
| 707 | ret | ||
| 708 | _BF_decrypt ENDP | ||
| 709 | _TEXT ENDS | ||
| 710 | _TEXT SEGMENT | ||
| 711 | PUBLIC _BF_cbc_encrypt | ||
| 712 | |||
| 713 | _BF_cbc_encrypt PROC NEAR | ||
| 714 | ; | ||
| 715 | push ebp | ||
| 716 | push ebx | ||
| 717 | push esi | ||
| 718 | push edi | ||
| 719 | mov ebp, DWORD PTR 28[esp] | ||
| 720 | ; getting iv ptr from parameter 4 | ||
| 721 | mov ebx, DWORD PTR 36[esp] | ||
| 722 | mov esi, DWORD PTR [ebx] | ||
| 723 | mov edi, DWORD PTR 4[ebx] | ||
| 724 | push edi | ||
| 725 | push esi | ||
| 726 | push edi | ||
| 727 | push esi | ||
| 728 | mov ebx, esp | ||
| 729 | mov esi, DWORD PTR 36[esp] | ||
| 730 | mov edi, DWORD PTR 40[esp] | ||
| 731 | ; getting encrypt flag from parameter 5 | ||
| 732 | mov ecx, DWORD PTR 56[esp] | ||
| 733 | ; get and push parameter 3 | ||
| 734 | mov eax, DWORD PTR 48[esp] | ||
| 735 | push eax | ||
| 736 | push ebx | ||
| 737 | cmp ecx, 0 | ||
| 738 | jz $L000decrypt | ||
| 739 | and ebp, 4294967288 | ||
| 740 | mov eax, DWORD PTR 8[esp] | ||
| 741 | mov ebx, DWORD PTR 12[esp] | ||
| 742 | jz $L001encrypt_finish | ||
| 743 | L002encrypt_loop: | ||
| 744 | mov ecx, DWORD PTR [esi] | ||
| 745 | mov edx, DWORD PTR 4[esi] | ||
| 746 | xor eax, ecx | ||
| 747 | xor ebx, edx | ||
| 748 | bswap eax | ||
| 749 | bswap ebx | ||
| 750 | mov DWORD PTR 8[esp],eax | ||
| 751 | mov DWORD PTR 12[esp],ebx | ||
| 752 | call _BF_encrypt | ||
| 753 | mov eax, DWORD PTR 8[esp] | ||
| 754 | mov ebx, DWORD PTR 12[esp] | ||
| 755 | bswap eax | ||
| 756 | bswap ebx | ||
| 757 | mov DWORD PTR [edi],eax | ||
| 758 | mov DWORD PTR 4[edi],ebx | ||
| 759 | add esi, 8 | ||
| 760 | add edi, 8 | ||
| 761 | sub ebp, 8 | ||
| 762 | jnz L002encrypt_loop | ||
| 763 | $L001encrypt_finish: | ||
| 764 | mov ebp, DWORD PTR 52[esp] | ||
| 765 | and ebp, 7 | ||
| 766 | jz $L003finish | ||
| 767 | xor ecx, ecx | ||
| 768 | xor edx, edx | ||
| 769 | mov ebp, DWORD PTR $L004cbc_enc_jmp_table[ebp*4] | ||
| 770 | jmp ebp | ||
| 771 | L005ej7: | ||
| 772 | mov dh, BYTE PTR 6[esi] | ||
| 773 | shl edx, 8 | ||
| 774 | L006ej6: | ||
| 775 | mov dh, BYTE PTR 5[esi] | ||
| 776 | L007ej5: | ||
| 777 | mov dl, BYTE PTR 4[esi] | ||
| 778 | L008ej4: | ||
| 779 | mov ecx, DWORD PTR [esi] | ||
| 780 | jmp $L009ejend | ||
| 781 | L010ej3: | ||
| 782 | mov ch, BYTE PTR 2[esi] | ||
| 783 | shl ecx, 8 | ||
| 784 | L011ej2: | ||
| 785 | mov ch, BYTE PTR 1[esi] | ||
| 786 | L012ej1: | ||
| 787 | mov cl, BYTE PTR [esi] | ||
| 788 | $L009ejend: | ||
| 789 | xor eax, ecx | ||
| 790 | xor ebx, edx | ||
| 791 | bswap eax | ||
| 792 | bswap ebx | ||
| 793 | mov DWORD PTR 8[esp],eax | ||
| 794 | mov DWORD PTR 12[esp],ebx | ||
| 795 | call _BF_encrypt | ||
| 796 | mov eax, DWORD PTR 8[esp] | ||
| 797 | mov ebx, DWORD PTR 12[esp] | ||
| 798 | bswap eax | ||
| 799 | bswap ebx | ||
| 800 | mov DWORD PTR [edi],eax | ||
| 801 | mov DWORD PTR 4[edi],ebx | ||
| 802 | jmp $L003finish | ||
| 803 | $L000decrypt: | ||
| 804 | and ebp, 4294967288 | ||
| 805 | mov eax, DWORD PTR 16[esp] | ||
| 806 | mov ebx, DWORD PTR 20[esp] | ||
| 807 | jz $L013decrypt_finish | ||
| 808 | L014decrypt_loop: | ||
| 809 | mov eax, DWORD PTR [esi] | ||
| 810 | mov ebx, DWORD PTR 4[esi] | ||
| 811 | bswap eax | ||
| 812 | bswap ebx | ||
| 813 | mov DWORD PTR 8[esp],eax | ||
| 814 | mov DWORD PTR 12[esp],ebx | ||
| 815 | call _BF_decrypt | ||
| 816 | mov eax, DWORD PTR 8[esp] | ||
| 817 | mov ebx, DWORD PTR 12[esp] | ||
| 818 | bswap eax | ||
| 819 | bswap ebx | ||
| 820 | mov ecx, DWORD PTR 16[esp] | ||
| 821 | mov edx, DWORD PTR 20[esp] | ||
| 822 | xor ecx, eax | ||
| 823 | xor edx, ebx | ||
| 824 | mov eax, DWORD PTR [esi] | ||
| 825 | mov ebx, DWORD PTR 4[esi] | ||
| 826 | mov DWORD PTR [edi],ecx | ||
| 827 | mov DWORD PTR 4[edi],edx | ||
| 828 | mov DWORD PTR 16[esp],eax | ||
| 829 | mov DWORD PTR 20[esp],ebx | ||
| 830 | add esi, 8 | ||
| 831 | add edi, 8 | ||
| 832 | sub ebp, 8 | ||
| 833 | jnz L014decrypt_loop | ||
| 834 | $L013decrypt_finish: | ||
| 835 | mov ebp, DWORD PTR 52[esp] | ||
| 836 | and ebp, 7 | ||
| 837 | jz $L003finish | ||
| 838 | mov eax, DWORD PTR [esi] | ||
| 839 | mov ebx, DWORD PTR 4[esi] | ||
| 840 | bswap eax | ||
| 841 | bswap ebx | ||
| 842 | mov DWORD PTR 8[esp],eax | ||
| 843 | mov DWORD PTR 12[esp],ebx | ||
| 844 | call _BF_decrypt | ||
| 845 | mov eax, DWORD PTR 8[esp] | ||
| 846 | mov ebx, DWORD PTR 12[esp] | ||
| 847 | bswap eax | ||
| 848 | bswap ebx | ||
| 849 | mov ecx, DWORD PTR 16[esp] | ||
| 850 | mov edx, DWORD PTR 20[esp] | ||
| 851 | xor ecx, eax | ||
| 852 | xor edx, ebx | ||
| 853 | mov eax, DWORD PTR [esi] | ||
| 854 | mov ebx, DWORD PTR 4[esi] | ||
| 855 | L015dj7: | ||
| 856 | ror edx, 16 | ||
| 857 | mov BYTE PTR 6[edi],dl | ||
| 858 | shr edx, 16 | ||
| 859 | L016dj6: | ||
| 860 | mov BYTE PTR 5[edi],dh | ||
| 861 | L017dj5: | ||
| 862 | mov BYTE PTR 4[edi],dl | ||
| 863 | L018dj4: | ||
| 864 | mov DWORD PTR [edi],ecx | ||
| 865 | jmp $L019djend | ||
| 866 | L020dj3: | ||
| 867 | ror ecx, 16 | ||
| 868 | mov BYTE PTR 2[edi],cl | ||
| 869 | shl ecx, 16 | ||
| 870 | L021dj2: | ||
| 871 | mov BYTE PTR 1[esi],ch | ||
| 872 | L022dj1: | ||
| 873 | mov BYTE PTR [esi], cl | ||
| 874 | $L019djend: | ||
| 875 | jmp $L003finish | ||
| 876 | $L003finish: | ||
| 877 | mov ecx, DWORD PTR 60[esp] | ||
| 878 | add esp, 24 | ||
| 879 | mov DWORD PTR [ecx],eax | ||
| 880 | mov DWORD PTR 4[ecx],ebx | ||
| 881 | pop edi | ||
| 882 | pop esi | ||
| 883 | pop ebx | ||
| 884 | pop ebp | ||
| 885 | ret | ||
| 886 | $L004cbc_enc_jmp_table: | ||
| 887 | DD 0 | ||
| 888 | DD L012ej1 | ||
| 889 | DD L011ej2 | ||
| 890 | DD L010ej3 | ||
| 891 | DD L008ej4 | ||
| 892 | DD L007ej5 | ||
| 893 | DD L006ej6 | ||
| 894 | DD L005ej7 | ||
| 895 | L023cbc_dec_jmp_table: | ||
| 896 | DD 0 | ||
| 897 | DD L022dj1 | ||
| 898 | DD L021dj2 | ||
| 899 | DD L020dj3 | ||
| 900 | DD L018dj4 | ||
| 901 | DD L017dj5 | ||
| 902 | DD L016dj6 | ||
| 903 | DD L015dj7 | ||
| 904 | _BF_cbc_encrypt ENDP | ||
| 905 | _TEXT ENDS | ||
| 906 | END | ||
diff --git a/src/lib/libssl/src/crypto/bf/asm/bx86unix.cpp b/src/lib/libssl/src/crypto/bf/asm/bx86unix.cpp new file mode 100644 index 0000000000..cdaa269378 --- /dev/null +++ b/src/lib/libssl/src/crypto/bf/asm/bx86unix.cpp | |||
| @@ -0,0 +1,976 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define BF_encrypt _BF_encrypt | ||
| 13 | #define BF_decrypt _BF_decrypt | ||
| 14 | #define BF_cbc_encrypt _BF_cbc_encrypt | ||
| 15 | |||
| 16 | #endif | ||
| 17 | |||
| 18 | #ifdef OUT | ||
| 19 | #define OK 1 | ||
| 20 | #define ALIGN 4 | ||
| 21 | #endif | ||
| 22 | |||
| 23 | #ifdef BSDI | ||
| 24 | #define OK 1 | ||
| 25 | #define ALIGN 4 | ||
| 26 | #undef SIZE | ||
| 27 | #undef TYPE | ||
| 28 | #define SIZE(a,b) | ||
| 29 | #define TYPE(a,b) | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #if defined(ELF) || defined(SOL) | ||
| 33 | #define OK 1 | ||
| 34 | #define ALIGN 16 | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #ifndef OK | ||
| 38 | You need to define one of | ||
| 39 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 40 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 41 | SOL - solaris systems, which are elf with strange comment lines | ||
| 42 | BSDI - a.out with a very primative version of as. | ||
| 43 | #endif | ||
| 44 | |||
| 45 | /* Let the Assembler begin :-) */ | ||
| 46 | /* Don't even think of reading this code */ | ||
| 47 | /* It was automatically generated by bf-586.pl */ | ||
| 48 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 49 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 50 | /* eric <eay@cryptsoft.com> */ | ||
| 51 | |||
| 52 | .file "bf-586.s" | ||
| 53 | .version "01.01" | ||
| 54 | gcc2_compiled.: | ||
| 55 | .text | ||
| 56 | .align ALIGN | ||
| 57 | .globl BF_encrypt | ||
| 58 | TYPE(BF_encrypt,@function) | ||
| 59 | BF_encrypt: | ||
| 60 | |||
| 61 | pushl %ebp | ||
| 62 | pushl %ebx | ||
| 63 | movl 12(%esp), %ebx | ||
| 64 | movl 16(%esp), %ebp | ||
| 65 | pushl %esi | ||
| 66 | pushl %edi | ||
| 67 | /* Load the 2 words */ | ||
| 68 | movl (%ebx), %edi | ||
| 69 | movl 4(%ebx), %esi | ||
| 70 | xorl %eax, %eax | ||
| 71 | movl (%ebp), %ebx | ||
| 72 | xorl %ecx, %ecx | ||
| 73 | xorl %ebx, %edi | ||
| 74 | |||
| 75 | /* Round 0 */ | ||
| 76 | movl 4(%ebp), %edx | ||
| 77 | movl %edi, %ebx | ||
| 78 | xorl %edx, %esi | ||
| 79 | shrl $16, %ebx | ||
| 80 | movl %edi, %edx | ||
| 81 | movb %bh, %al | ||
| 82 | andl $255, %ebx | ||
| 83 | movb %dh, %cl | ||
| 84 | andl $255, %edx | ||
| 85 | movl 72(%ebp,%eax,4),%eax | ||
| 86 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 87 | addl %eax, %ebx | ||
| 88 | movl 2120(%ebp,%ecx,4),%eax | ||
| 89 | xorl %eax, %ebx | ||
| 90 | movl 3144(%ebp,%edx,4),%edx | ||
| 91 | addl %edx, %ebx | ||
| 92 | xorl %eax, %eax | ||
| 93 | xorl %ebx, %esi | ||
| 94 | |||
| 95 | /* Round 1 */ | ||
| 96 | movl 8(%ebp), %edx | ||
| 97 | movl %esi, %ebx | ||
| 98 | xorl %edx, %edi | ||
| 99 | shrl $16, %ebx | ||
| 100 | movl %esi, %edx | ||
| 101 | movb %bh, %al | ||
| 102 | andl $255, %ebx | ||
| 103 | movb %dh, %cl | ||
| 104 | andl $255, %edx | ||
| 105 | movl 72(%ebp,%eax,4),%eax | ||
| 106 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 107 | addl %eax, %ebx | ||
| 108 | movl 2120(%ebp,%ecx,4),%eax | ||
| 109 | xorl %eax, %ebx | ||
| 110 | movl 3144(%ebp,%edx,4),%edx | ||
| 111 | addl %edx, %ebx | ||
| 112 | xorl %eax, %eax | ||
| 113 | xorl %ebx, %edi | ||
| 114 | |||
| 115 | /* Round 2 */ | ||
| 116 | movl 12(%ebp), %edx | ||
| 117 | movl %edi, %ebx | ||
| 118 | xorl %edx, %esi | ||
| 119 | shrl $16, %ebx | ||
| 120 | movl %edi, %edx | ||
| 121 | movb %bh, %al | ||
| 122 | andl $255, %ebx | ||
| 123 | movb %dh, %cl | ||
| 124 | andl $255, %edx | ||
| 125 | movl 72(%ebp,%eax,4),%eax | ||
| 126 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 127 | addl %eax, %ebx | ||
| 128 | movl 2120(%ebp,%ecx,4),%eax | ||
| 129 | xorl %eax, %ebx | ||
| 130 | movl 3144(%ebp,%edx,4),%edx | ||
| 131 | addl %edx, %ebx | ||
| 132 | xorl %eax, %eax | ||
| 133 | xorl %ebx, %esi | ||
| 134 | |||
| 135 | /* Round 3 */ | ||
| 136 | movl 16(%ebp), %edx | ||
| 137 | movl %esi, %ebx | ||
| 138 | xorl %edx, %edi | ||
| 139 | shrl $16, %ebx | ||
| 140 | movl %esi, %edx | ||
| 141 | movb %bh, %al | ||
| 142 | andl $255, %ebx | ||
| 143 | movb %dh, %cl | ||
| 144 | andl $255, %edx | ||
| 145 | movl 72(%ebp,%eax,4),%eax | ||
| 146 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 147 | addl %eax, %ebx | ||
| 148 | movl 2120(%ebp,%ecx,4),%eax | ||
| 149 | xorl %eax, %ebx | ||
| 150 | movl 3144(%ebp,%edx,4),%edx | ||
| 151 | addl %edx, %ebx | ||
| 152 | xorl %eax, %eax | ||
| 153 | xorl %ebx, %edi | ||
| 154 | |||
| 155 | /* Round 4 */ | ||
| 156 | movl 20(%ebp), %edx | ||
| 157 | movl %edi, %ebx | ||
| 158 | xorl %edx, %esi | ||
| 159 | shrl $16, %ebx | ||
| 160 | movl %edi, %edx | ||
| 161 | movb %bh, %al | ||
| 162 | andl $255, %ebx | ||
| 163 | movb %dh, %cl | ||
| 164 | andl $255, %edx | ||
| 165 | movl 72(%ebp,%eax,4),%eax | ||
| 166 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 167 | addl %eax, %ebx | ||
| 168 | movl 2120(%ebp,%ecx,4),%eax | ||
| 169 | xorl %eax, %ebx | ||
| 170 | movl 3144(%ebp,%edx,4),%edx | ||
| 171 | addl %edx, %ebx | ||
| 172 | xorl %eax, %eax | ||
| 173 | xorl %ebx, %esi | ||
| 174 | |||
| 175 | /* Round 5 */ | ||
| 176 | movl 24(%ebp), %edx | ||
| 177 | movl %esi, %ebx | ||
| 178 | xorl %edx, %edi | ||
| 179 | shrl $16, %ebx | ||
| 180 | movl %esi, %edx | ||
| 181 | movb %bh, %al | ||
| 182 | andl $255, %ebx | ||
| 183 | movb %dh, %cl | ||
| 184 | andl $255, %edx | ||
| 185 | movl 72(%ebp,%eax,4),%eax | ||
| 186 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 187 | addl %eax, %ebx | ||
| 188 | movl 2120(%ebp,%ecx,4),%eax | ||
| 189 | xorl %eax, %ebx | ||
| 190 | movl 3144(%ebp,%edx,4),%edx | ||
| 191 | addl %edx, %ebx | ||
| 192 | xorl %eax, %eax | ||
| 193 | xorl %ebx, %edi | ||
| 194 | |||
| 195 | /* Round 6 */ | ||
| 196 | movl 28(%ebp), %edx | ||
| 197 | movl %edi, %ebx | ||
| 198 | xorl %edx, %esi | ||
| 199 | shrl $16, %ebx | ||
| 200 | movl %edi, %edx | ||
| 201 | movb %bh, %al | ||
| 202 | andl $255, %ebx | ||
| 203 | movb %dh, %cl | ||
| 204 | andl $255, %edx | ||
| 205 | movl 72(%ebp,%eax,4),%eax | ||
| 206 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 207 | addl %eax, %ebx | ||
| 208 | movl 2120(%ebp,%ecx,4),%eax | ||
| 209 | xorl %eax, %ebx | ||
| 210 | movl 3144(%ebp,%edx,4),%edx | ||
| 211 | addl %edx, %ebx | ||
| 212 | xorl %eax, %eax | ||
| 213 | xorl %ebx, %esi | ||
| 214 | |||
| 215 | /* Round 7 */ | ||
| 216 | movl 32(%ebp), %edx | ||
| 217 | movl %esi, %ebx | ||
| 218 | xorl %edx, %edi | ||
| 219 | shrl $16, %ebx | ||
| 220 | movl %esi, %edx | ||
| 221 | movb %bh, %al | ||
| 222 | andl $255, %ebx | ||
| 223 | movb %dh, %cl | ||
| 224 | andl $255, %edx | ||
| 225 | movl 72(%ebp,%eax,4),%eax | ||
| 226 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 227 | addl %eax, %ebx | ||
| 228 | movl 2120(%ebp,%ecx,4),%eax | ||
| 229 | xorl %eax, %ebx | ||
| 230 | movl 3144(%ebp,%edx,4),%edx | ||
| 231 | addl %edx, %ebx | ||
| 232 | xorl %eax, %eax | ||
| 233 | xorl %ebx, %edi | ||
| 234 | |||
| 235 | /* Round 8 */ | ||
| 236 | movl 36(%ebp), %edx | ||
| 237 | movl %edi, %ebx | ||
| 238 | xorl %edx, %esi | ||
| 239 | shrl $16, %ebx | ||
| 240 | movl %edi, %edx | ||
| 241 | movb %bh, %al | ||
| 242 | andl $255, %ebx | ||
| 243 | movb %dh, %cl | ||
| 244 | andl $255, %edx | ||
| 245 | movl 72(%ebp,%eax,4),%eax | ||
| 246 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 247 | addl %eax, %ebx | ||
| 248 | movl 2120(%ebp,%ecx,4),%eax | ||
| 249 | xorl %eax, %ebx | ||
| 250 | movl 3144(%ebp,%edx,4),%edx | ||
| 251 | addl %edx, %ebx | ||
| 252 | xorl %eax, %eax | ||
| 253 | xorl %ebx, %esi | ||
| 254 | |||
| 255 | /* Round 9 */ | ||
| 256 | movl 40(%ebp), %edx | ||
| 257 | movl %esi, %ebx | ||
| 258 | xorl %edx, %edi | ||
| 259 | shrl $16, %ebx | ||
| 260 | movl %esi, %edx | ||
| 261 | movb %bh, %al | ||
| 262 | andl $255, %ebx | ||
| 263 | movb %dh, %cl | ||
| 264 | andl $255, %edx | ||
| 265 | movl 72(%ebp,%eax,4),%eax | ||
| 266 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 267 | addl %eax, %ebx | ||
| 268 | movl 2120(%ebp,%ecx,4),%eax | ||
| 269 | xorl %eax, %ebx | ||
| 270 | movl 3144(%ebp,%edx,4),%edx | ||
| 271 | addl %edx, %ebx | ||
| 272 | xorl %eax, %eax | ||
| 273 | xorl %ebx, %edi | ||
| 274 | |||
| 275 | /* Round 10 */ | ||
| 276 | movl 44(%ebp), %edx | ||
| 277 | movl %edi, %ebx | ||
| 278 | xorl %edx, %esi | ||
| 279 | shrl $16, %ebx | ||
| 280 | movl %edi, %edx | ||
| 281 | movb %bh, %al | ||
| 282 | andl $255, %ebx | ||
| 283 | movb %dh, %cl | ||
| 284 | andl $255, %edx | ||
| 285 | movl 72(%ebp,%eax,4),%eax | ||
| 286 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 287 | addl %eax, %ebx | ||
| 288 | movl 2120(%ebp,%ecx,4),%eax | ||
| 289 | xorl %eax, %ebx | ||
| 290 | movl 3144(%ebp,%edx,4),%edx | ||
| 291 | addl %edx, %ebx | ||
| 292 | xorl %eax, %eax | ||
| 293 | xorl %ebx, %esi | ||
| 294 | |||
| 295 | /* Round 11 */ | ||
| 296 | movl 48(%ebp), %edx | ||
| 297 | movl %esi, %ebx | ||
| 298 | xorl %edx, %edi | ||
| 299 | shrl $16, %ebx | ||
| 300 | movl %esi, %edx | ||
| 301 | movb %bh, %al | ||
| 302 | andl $255, %ebx | ||
| 303 | movb %dh, %cl | ||
| 304 | andl $255, %edx | ||
| 305 | movl 72(%ebp,%eax,4),%eax | ||
| 306 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 307 | addl %eax, %ebx | ||
| 308 | movl 2120(%ebp,%ecx,4),%eax | ||
| 309 | xorl %eax, %ebx | ||
| 310 | movl 3144(%ebp,%edx,4),%edx | ||
| 311 | addl %edx, %ebx | ||
| 312 | xorl %eax, %eax | ||
| 313 | xorl %ebx, %edi | ||
| 314 | |||
| 315 | /* Round 12 */ | ||
| 316 | movl 52(%ebp), %edx | ||
| 317 | movl %edi, %ebx | ||
| 318 | xorl %edx, %esi | ||
| 319 | shrl $16, %ebx | ||
| 320 | movl %edi, %edx | ||
| 321 | movb %bh, %al | ||
| 322 | andl $255, %ebx | ||
| 323 | movb %dh, %cl | ||
| 324 | andl $255, %edx | ||
| 325 | movl 72(%ebp,%eax,4),%eax | ||
| 326 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 327 | addl %eax, %ebx | ||
| 328 | movl 2120(%ebp,%ecx,4),%eax | ||
| 329 | xorl %eax, %ebx | ||
| 330 | movl 3144(%ebp,%edx,4),%edx | ||
| 331 | addl %edx, %ebx | ||
| 332 | xorl %eax, %eax | ||
| 333 | xorl %ebx, %esi | ||
| 334 | |||
| 335 | /* Round 13 */ | ||
| 336 | movl 56(%ebp), %edx | ||
| 337 | movl %esi, %ebx | ||
| 338 | xorl %edx, %edi | ||
| 339 | shrl $16, %ebx | ||
| 340 | movl %esi, %edx | ||
| 341 | movb %bh, %al | ||
| 342 | andl $255, %ebx | ||
| 343 | movb %dh, %cl | ||
| 344 | andl $255, %edx | ||
| 345 | movl 72(%ebp,%eax,4),%eax | ||
| 346 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 347 | addl %eax, %ebx | ||
| 348 | movl 2120(%ebp,%ecx,4),%eax | ||
| 349 | xorl %eax, %ebx | ||
| 350 | movl 3144(%ebp,%edx,4),%edx | ||
| 351 | addl %edx, %ebx | ||
| 352 | xorl %eax, %eax | ||
| 353 | xorl %ebx, %edi | ||
| 354 | |||
| 355 | /* Round 14 */ | ||
| 356 | movl 60(%ebp), %edx | ||
| 357 | movl %edi, %ebx | ||
| 358 | xorl %edx, %esi | ||
| 359 | shrl $16, %ebx | ||
| 360 | movl %edi, %edx | ||
| 361 | movb %bh, %al | ||
| 362 | andl $255, %ebx | ||
| 363 | movb %dh, %cl | ||
| 364 | andl $255, %edx | ||
| 365 | movl 72(%ebp,%eax,4),%eax | ||
| 366 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 367 | addl %eax, %ebx | ||
| 368 | movl 2120(%ebp,%ecx,4),%eax | ||
| 369 | xorl %eax, %ebx | ||
| 370 | movl 3144(%ebp,%edx,4),%edx | ||
| 371 | addl %edx, %ebx | ||
| 372 | xorl %eax, %eax | ||
| 373 | xorl %ebx, %esi | ||
| 374 | |||
| 375 | /* Round 15 */ | ||
| 376 | movl 64(%ebp), %edx | ||
| 377 | movl %esi, %ebx | ||
| 378 | xorl %edx, %edi | ||
| 379 | shrl $16, %ebx | ||
| 380 | movl %esi, %edx | ||
| 381 | movb %bh, %al | ||
| 382 | andl $255, %ebx | ||
| 383 | movb %dh, %cl | ||
| 384 | andl $255, %edx | ||
| 385 | movl 72(%ebp,%eax,4),%eax | ||
| 386 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 387 | addl %eax, %ebx | ||
| 388 | movl 2120(%ebp,%ecx,4),%eax | ||
| 389 | xorl %eax, %ebx | ||
| 390 | movl 3144(%ebp,%edx,4),%edx | ||
| 391 | addl %edx, %ebx | ||
| 392 | /* Load parameter 0 (16) enc=1 */ | ||
| 393 | movl 20(%esp), %eax | ||
| 394 | xorl %ebx, %edi | ||
| 395 | movl 68(%ebp), %edx | ||
| 396 | xorl %edx, %esi | ||
| 397 | movl %edi, 4(%eax) | ||
| 398 | movl %esi, (%eax) | ||
| 399 | popl %edi | ||
| 400 | popl %esi | ||
| 401 | popl %ebx | ||
| 402 | popl %ebp | ||
| 403 | ret | ||
| 404 | .BF_encrypt_end: | ||
| 405 | SIZE(BF_encrypt,.BF_encrypt_end-BF_encrypt) | ||
| 406 | .ident "BF_encrypt" | ||
| 407 | .text | ||
| 408 | .align ALIGN | ||
| 409 | .globl BF_decrypt | ||
| 410 | TYPE(BF_decrypt,@function) | ||
| 411 | BF_decrypt: | ||
| 412 | |||
| 413 | pushl %ebp | ||
| 414 | pushl %ebx | ||
| 415 | movl 12(%esp), %ebx | ||
| 416 | movl 16(%esp), %ebp | ||
| 417 | pushl %esi | ||
| 418 | pushl %edi | ||
| 419 | /* Load the 2 words */ | ||
| 420 | movl (%ebx), %edi | ||
| 421 | movl 4(%ebx), %esi | ||
| 422 | xorl %eax, %eax | ||
| 423 | movl 68(%ebp), %ebx | ||
| 424 | xorl %ecx, %ecx | ||
| 425 | xorl %ebx, %edi | ||
| 426 | |||
| 427 | /* Round 16 */ | ||
| 428 | movl 64(%ebp), %edx | ||
| 429 | movl %edi, %ebx | ||
| 430 | xorl %edx, %esi | ||
| 431 | shrl $16, %ebx | ||
| 432 | movl %edi, %edx | ||
| 433 | movb %bh, %al | ||
| 434 | andl $255, %ebx | ||
| 435 | movb %dh, %cl | ||
| 436 | andl $255, %edx | ||
| 437 | movl 72(%ebp,%eax,4),%eax | ||
| 438 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 439 | addl %eax, %ebx | ||
| 440 | movl 2120(%ebp,%ecx,4),%eax | ||
| 441 | xorl %eax, %ebx | ||
| 442 | movl 3144(%ebp,%edx,4),%edx | ||
| 443 | addl %edx, %ebx | ||
| 444 | xorl %eax, %eax | ||
| 445 | xorl %ebx, %esi | ||
| 446 | |||
| 447 | /* Round 15 */ | ||
| 448 | movl 60(%ebp), %edx | ||
| 449 | movl %esi, %ebx | ||
| 450 | xorl %edx, %edi | ||
| 451 | shrl $16, %ebx | ||
| 452 | movl %esi, %edx | ||
| 453 | movb %bh, %al | ||
| 454 | andl $255, %ebx | ||
| 455 | movb %dh, %cl | ||
| 456 | andl $255, %edx | ||
| 457 | movl 72(%ebp,%eax,4),%eax | ||
| 458 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 459 | addl %eax, %ebx | ||
| 460 | movl 2120(%ebp,%ecx,4),%eax | ||
| 461 | xorl %eax, %ebx | ||
| 462 | movl 3144(%ebp,%edx,4),%edx | ||
| 463 | addl %edx, %ebx | ||
| 464 | xorl %eax, %eax | ||
| 465 | xorl %ebx, %edi | ||
| 466 | |||
| 467 | /* Round 14 */ | ||
| 468 | movl 56(%ebp), %edx | ||
| 469 | movl %edi, %ebx | ||
| 470 | xorl %edx, %esi | ||
| 471 | shrl $16, %ebx | ||
| 472 | movl %edi, %edx | ||
| 473 | movb %bh, %al | ||
| 474 | andl $255, %ebx | ||
| 475 | movb %dh, %cl | ||
| 476 | andl $255, %edx | ||
| 477 | movl 72(%ebp,%eax,4),%eax | ||
| 478 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 479 | addl %eax, %ebx | ||
| 480 | movl 2120(%ebp,%ecx,4),%eax | ||
| 481 | xorl %eax, %ebx | ||
| 482 | movl 3144(%ebp,%edx,4),%edx | ||
| 483 | addl %edx, %ebx | ||
| 484 | xorl %eax, %eax | ||
| 485 | xorl %ebx, %esi | ||
| 486 | |||
| 487 | /* Round 13 */ | ||
| 488 | movl 52(%ebp), %edx | ||
| 489 | movl %esi, %ebx | ||
| 490 | xorl %edx, %edi | ||
| 491 | shrl $16, %ebx | ||
| 492 | movl %esi, %edx | ||
| 493 | movb %bh, %al | ||
| 494 | andl $255, %ebx | ||
| 495 | movb %dh, %cl | ||
| 496 | andl $255, %edx | ||
| 497 | movl 72(%ebp,%eax,4),%eax | ||
| 498 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 499 | addl %eax, %ebx | ||
| 500 | movl 2120(%ebp,%ecx,4),%eax | ||
| 501 | xorl %eax, %ebx | ||
| 502 | movl 3144(%ebp,%edx,4),%edx | ||
| 503 | addl %edx, %ebx | ||
| 504 | xorl %eax, %eax | ||
| 505 | xorl %ebx, %edi | ||
| 506 | |||
| 507 | /* Round 12 */ | ||
| 508 | movl 48(%ebp), %edx | ||
| 509 | movl %edi, %ebx | ||
| 510 | xorl %edx, %esi | ||
| 511 | shrl $16, %ebx | ||
| 512 | movl %edi, %edx | ||
| 513 | movb %bh, %al | ||
| 514 | andl $255, %ebx | ||
| 515 | movb %dh, %cl | ||
| 516 | andl $255, %edx | ||
| 517 | movl 72(%ebp,%eax,4),%eax | ||
| 518 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 519 | addl %eax, %ebx | ||
| 520 | movl 2120(%ebp,%ecx,4),%eax | ||
| 521 | xorl %eax, %ebx | ||
| 522 | movl 3144(%ebp,%edx,4),%edx | ||
| 523 | addl %edx, %ebx | ||
| 524 | xorl %eax, %eax | ||
| 525 | xorl %ebx, %esi | ||
| 526 | |||
| 527 | /* Round 11 */ | ||
| 528 | movl 44(%ebp), %edx | ||
| 529 | movl %esi, %ebx | ||
| 530 | xorl %edx, %edi | ||
| 531 | shrl $16, %ebx | ||
| 532 | movl %esi, %edx | ||
| 533 | movb %bh, %al | ||
| 534 | andl $255, %ebx | ||
| 535 | movb %dh, %cl | ||
| 536 | andl $255, %edx | ||
| 537 | movl 72(%ebp,%eax,4),%eax | ||
| 538 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 539 | addl %eax, %ebx | ||
| 540 | movl 2120(%ebp,%ecx,4),%eax | ||
| 541 | xorl %eax, %ebx | ||
| 542 | movl 3144(%ebp,%edx,4),%edx | ||
| 543 | addl %edx, %ebx | ||
| 544 | xorl %eax, %eax | ||
| 545 | xorl %ebx, %edi | ||
| 546 | |||
| 547 | /* Round 10 */ | ||
| 548 | movl 40(%ebp), %edx | ||
| 549 | movl %edi, %ebx | ||
| 550 | xorl %edx, %esi | ||
| 551 | shrl $16, %ebx | ||
| 552 | movl %edi, %edx | ||
| 553 | movb %bh, %al | ||
| 554 | andl $255, %ebx | ||
| 555 | movb %dh, %cl | ||
| 556 | andl $255, %edx | ||
| 557 | movl 72(%ebp,%eax,4),%eax | ||
| 558 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 559 | addl %eax, %ebx | ||
| 560 | movl 2120(%ebp,%ecx,4),%eax | ||
| 561 | xorl %eax, %ebx | ||
| 562 | movl 3144(%ebp,%edx,4),%edx | ||
| 563 | addl %edx, %ebx | ||
| 564 | xorl %eax, %eax | ||
| 565 | xorl %ebx, %esi | ||
| 566 | |||
| 567 | /* Round 9 */ | ||
| 568 | movl 36(%ebp), %edx | ||
| 569 | movl %esi, %ebx | ||
| 570 | xorl %edx, %edi | ||
| 571 | shrl $16, %ebx | ||
| 572 | movl %esi, %edx | ||
| 573 | movb %bh, %al | ||
| 574 | andl $255, %ebx | ||
| 575 | movb %dh, %cl | ||
| 576 | andl $255, %edx | ||
| 577 | movl 72(%ebp,%eax,4),%eax | ||
| 578 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 579 | addl %eax, %ebx | ||
| 580 | movl 2120(%ebp,%ecx,4),%eax | ||
| 581 | xorl %eax, %ebx | ||
| 582 | movl 3144(%ebp,%edx,4),%edx | ||
| 583 | addl %edx, %ebx | ||
| 584 | xorl %eax, %eax | ||
| 585 | xorl %ebx, %edi | ||
| 586 | |||
| 587 | /* Round 8 */ | ||
| 588 | movl 32(%ebp), %edx | ||
| 589 | movl %edi, %ebx | ||
| 590 | xorl %edx, %esi | ||
| 591 | shrl $16, %ebx | ||
| 592 | movl %edi, %edx | ||
| 593 | movb %bh, %al | ||
| 594 | andl $255, %ebx | ||
| 595 | movb %dh, %cl | ||
| 596 | andl $255, %edx | ||
| 597 | movl 72(%ebp,%eax,4),%eax | ||
| 598 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 599 | addl %eax, %ebx | ||
| 600 | movl 2120(%ebp,%ecx,4),%eax | ||
| 601 | xorl %eax, %ebx | ||
| 602 | movl 3144(%ebp,%edx,4),%edx | ||
| 603 | addl %edx, %ebx | ||
| 604 | xorl %eax, %eax | ||
| 605 | xorl %ebx, %esi | ||
| 606 | |||
| 607 | /* Round 7 */ | ||
| 608 | movl 28(%ebp), %edx | ||
| 609 | movl %esi, %ebx | ||
| 610 | xorl %edx, %edi | ||
| 611 | shrl $16, %ebx | ||
| 612 | movl %esi, %edx | ||
| 613 | movb %bh, %al | ||
| 614 | andl $255, %ebx | ||
| 615 | movb %dh, %cl | ||
| 616 | andl $255, %edx | ||
| 617 | movl 72(%ebp,%eax,4),%eax | ||
| 618 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 619 | addl %eax, %ebx | ||
| 620 | movl 2120(%ebp,%ecx,4),%eax | ||
| 621 | xorl %eax, %ebx | ||
| 622 | movl 3144(%ebp,%edx,4),%edx | ||
| 623 | addl %edx, %ebx | ||
| 624 | xorl %eax, %eax | ||
| 625 | xorl %ebx, %edi | ||
| 626 | |||
| 627 | /* Round 6 */ | ||
| 628 | movl 24(%ebp), %edx | ||
| 629 | movl %edi, %ebx | ||
| 630 | xorl %edx, %esi | ||
| 631 | shrl $16, %ebx | ||
| 632 | movl %edi, %edx | ||
| 633 | movb %bh, %al | ||
| 634 | andl $255, %ebx | ||
| 635 | movb %dh, %cl | ||
| 636 | andl $255, %edx | ||
| 637 | movl 72(%ebp,%eax,4),%eax | ||
| 638 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 639 | addl %eax, %ebx | ||
| 640 | movl 2120(%ebp,%ecx,4),%eax | ||
| 641 | xorl %eax, %ebx | ||
| 642 | movl 3144(%ebp,%edx,4),%edx | ||
| 643 | addl %edx, %ebx | ||
| 644 | xorl %eax, %eax | ||
| 645 | xorl %ebx, %esi | ||
| 646 | |||
| 647 | /* Round 5 */ | ||
| 648 | movl 20(%ebp), %edx | ||
| 649 | movl %esi, %ebx | ||
| 650 | xorl %edx, %edi | ||
| 651 | shrl $16, %ebx | ||
| 652 | movl %esi, %edx | ||
| 653 | movb %bh, %al | ||
| 654 | andl $255, %ebx | ||
| 655 | movb %dh, %cl | ||
| 656 | andl $255, %edx | ||
| 657 | movl 72(%ebp,%eax,4),%eax | ||
| 658 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 659 | addl %eax, %ebx | ||
| 660 | movl 2120(%ebp,%ecx,4),%eax | ||
| 661 | xorl %eax, %ebx | ||
| 662 | movl 3144(%ebp,%edx,4),%edx | ||
| 663 | addl %edx, %ebx | ||
| 664 | xorl %eax, %eax | ||
| 665 | xorl %ebx, %edi | ||
| 666 | |||
| 667 | /* Round 4 */ | ||
| 668 | movl 16(%ebp), %edx | ||
| 669 | movl %edi, %ebx | ||
| 670 | xorl %edx, %esi | ||
| 671 | shrl $16, %ebx | ||
| 672 | movl %edi, %edx | ||
| 673 | movb %bh, %al | ||
| 674 | andl $255, %ebx | ||
| 675 | movb %dh, %cl | ||
| 676 | andl $255, %edx | ||
| 677 | movl 72(%ebp,%eax,4),%eax | ||
| 678 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 679 | addl %eax, %ebx | ||
| 680 | movl 2120(%ebp,%ecx,4),%eax | ||
| 681 | xorl %eax, %ebx | ||
| 682 | movl 3144(%ebp,%edx,4),%edx | ||
| 683 | addl %edx, %ebx | ||
| 684 | xorl %eax, %eax | ||
| 685 | xorl %ebx, %esi | ||
| 686 | |||
| 687 | /* Round 3 */ | ||
| 688 | movl 12(%ebp), %edx | ||
| 689 | movl %esi, %ebx | ||
| 690 | xorl %edx, %edi | ||
| 691 | shrl $16, %ebx | ||
| 692 | movl %esi, %edx | ||
| 693 | movb %bh, %al | ||
| 694 | andl $255, %ebx | ||
| 695 | movb %dh, %cl | ||
| 696 | andl $255, %edx | ||
| 697 | movl 72(%ebp,%eax,4),%eax | ||
| 698 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 699 | addl %eax, %ebx | ||
| 700 | movl 2120(%ebp,%ecx,4),%eax | ||
| 701 | xorl %eax, %ebx | ||
| 702 | movl 3144(%ebp,%edx,4),%edx | ||
| 703 | addl %edx, %ebx | ||
| 704 | xorl %eax, %eax | ||
| 705 | xorl %ebx, %edi | ||
| 706 | |||
| 707 | /* Round 2 */ | ||
| 708 | movl 8(%ebp), %edx | ||
| 709 | movl %edi, %ebx | ||
| 710 | xorl %edx, %esi | ||
| 711 | shrl $16, %ebx | ||
| 712 | movl %edi, %edx | ||
| 713 | movb %bh, %al | ||
| 714 | andl $255, %ebx | ||
| 715 | movb %dh, %cl | ||
| 716 | andl $255, %edx | ||
| 717 | movl 72(%ebp,%eax,4),%eax | ||
| 718 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 719 | addl %eax, %ebx | ||
| 720 | movl 2120(%ebp,%ecx,4),%eax | ||
| 721 | xorl %eax, %ebx | ||
| 722 | movl 3144(%ebp,%edx,4),%edx | ||
| 723 | addl %edx, %ebx | ||
| 724 | xorl %eax, %eax | ||
| 725 | xorl %ebx, %esi | ||
| 726 | |||
| 727 | /* Round 1 */ | ||
| 728 | movl 4(%ebp), %edx | ||
| 729 | movl %esi, %ebx | ||
| 730 | xorl %edx, %edi | ||
| 731 | shrl $16, %ebx | ||
| 732 | movl %esi, %edx | ||
| 733 | movb %bh, %al | ||
| 734 | andl $255, %ebx | ||
| 735 | movb %dh, %cl | ||
| 736 | andl $255, %edx | ||
| 737 | movl 72(%ebp,%eax,4),%eax | ||
| 738 | movl 1096(%ebp,%ebx,4),%ebx | ||
| 739 | addl %eax, %ebx | ||
| 740 | movl 2120(%ebp,%ecx,4),%eax | ||
| 741 | xorl %eax, %ebx | ||
| 742 | movl 3144(%ebp,%edx,4),%edx | ||
| 743 | addl %edx, %ebx | ||
| 744 | /* Load parameter 0 (1) enc=0 */ | ||
| 745 | movl 20(%esp), %eax | ||
| 746 | xorl %ebx, %edi | ||
| 747 | movl (%ebp), %edx | ||
| 748 | xorl %edx, %esi | ||
| 749 | movl %edi, 4(%eax) | ||
| 750 | movl %esi, (%eax) | ||
| 751 | popl %edi | ||
| 752 | popl %esi | ||
| 753 | popl %ebx | ||
| 754 | popl %ebp | ||
| 755 | ret | ||
| 756 | .BF_decrypt_end: | ||
| 757 | SIZE(BF_decrypt,.BF_decrypt_end-BF_decrypt) | ||
| 758 | .ident "BF_decrypt" | ||
| 759 | .text | ||
| 760 | .align ALIGN | ||
| 761 | .globl BF_cbc_encrypt | ||
| 762 | TYPE(BF_cbc_encrypt,@function) | ||
| 763 | BF_cbc_encrypt: | ||
| 764 | |||
| 765 | pushl %ebp | ||
| 766 | pushl %ebx | ||
| 767 | pushl %esi | ||
| 768 | pushl %edi | ||
| 769 | movl 28(%esp), %ebp | ||
| 770 | /* getting iv ptr from parameter 4 */ | ||
| 771 | movl 36(%esp), %ebx | ||
| 772 | movl (%ebx), %esi | ||
| 773 | movl 4(%ebx), %edi | ||
| 774 | pushl %edi | ||
| 775 | pushl %esi | ||
| 776 | pushl %edi | ||
| 777 | pushl %esi | ||
| 778 | movl %esp, %ebx | ||
| 779 | movl 36(%esp), %esi | ||
| 780 | movl 40(%esp), %edi | ||
| 781 | /* getting encrypt flag from parameter 5 */ | ||
| 782 | movl 56(%esp), %ecx | ||
| 783 | /* get and push parameter 3 */ | ||
| 784 | movl 48(%esp), %eax | ||
| 785 | pushl %eax | ||
| 786 | pushl %ebx | ||
| 787 | cmpl $0, %ecx | ||
| 788 | jz .L000decrypt | ||
| 789 | andl $4294967288, %ebp | ||
| 790 | movl 8(%esp), %eax | ||
| 791 | movl 12(%esp), %ebx | ||
| 792 | jz .L001encrypt_finish | ||
| 793 | .L002encrypt_loop: | ||
| 794 | movl (%esi), %ecx | ||
| 795 | movl 4(%esi), %edx | ||
| 796 | xorl %ecx, %eax | ||
| 797 | xorl %edx, %ebx | ||
| 798 | .byte 15 | ||
| 799 | .byte 200 /* bswapl %eax */ | ||
| 800 | .byte 15 | ||
| 801 | .byte 203 /* bswapl %ebx */ | ||
| 802 | movl %eax, 8(%esp) | ||
| 803 | movl %ebx, 12(%esp) | ||
| 804 | call BF_encrypt | ||
| 805 | movl 8(%esp), %eax | ||
| 806 | movl 12(%esp), %ebx | ||
| 807 | .byte 15 | ||
| 808 | .byte 200 /* bswapl %eax */ | ||
| 809 | .byte 15 | ||
| 810 | .byte 203 /* bswapl %ebx */ | ||
| 811 | movl %eax, (%edi) | ||
| 812 | movl %ebx, 4(%edi) | ||
| 813 | addl $8, %esi | ||
| 814 | addl $8, %edi | ||
| 815 | subl $8, %ebp | ||
| 816 | jnz .L002encrypt_loop | ||
| 817 | .L001encrypt_finish: | ||
| 818 | movl 52(%esp), %ebp | ||
| 819 | andl $7, %ebp | ||
| 820 | jz .L003finish | ||
| 821 | xorl %ecx, %ecx | ||
| 822 | xorl %edx, %edx | ||
| 823 | movl .L004cbc_enc_jmp_table(,%ebp,4),%ebp | ||
| 824 | jmp *%ebp | ||
| 825 | .L005ej7: | ||
| 826 | movb 6(%esi), %dh | ||
| 827 | sall $8, %edx | ||
| 828 | .L006ej6: | ||
| 829 | movb 5(%esi), %dh | ||
| 830 | .L007ej5: | ||
| 831 | movb 4(%esi), %dl | ||
| 832 | .L008ej4: | ||
| 833 | movl (%esi), %ecx | ||
| 834 | jmp .L009ejend | ||
| 835 | .L010ej3: | ||
| 836 | movb 2(%esi), %ch | ||
| 837 | sall $8, %ecx | ||
| 838 | .L011ej2: | ||
| 839 | movb 1(%esi), %ch | ||
| 840 | .L012ej1: | ||
| 841 | movb (%esi), %cl | ||
| 842 | .L009ejend: | ||
| 843 | xorl %ecx, %eax | ||
| 844 | xorl %edx, %ebx | ||
| 845 | .byte 15 | ||
| 846 | .byte 200 /* bswapl %eax */ | ||
| 847 | .byte 15 | ||
| 848 | .byte 203 /* bswapl %ebx */ | ||
| 849 | movl %eax, 8(%esp) | ||
| 850 | movl %ebx, 12(%esp) | ||
| 851 | call BF_encrypt | ||
| 852 | movl 8(%esp), %eax | ||
| 853 | movl 12(%esp), %ebx | ||
| 854 | .byte 15 | ||
| 855 | .byte 200 /* bswapl %eax */ | ||
| 856 | .byte 15 | ||
| 857 | .byte 203 /* bswapl %ebx */ | ||
| 858 | movl %eax, (%edi) | ||
| 859 | movl %ebx, 4(%edi) | ||
| 860 | jmp .L003finish | ||
| 861 | .align ALIGN | ||
| 862 | .L000decrypt: | ||
| 863 | andl $4294967288, %ebp | ||
| 864 | movl 16(%esp), %eax | ||
| 865 | movl 20(%esp), %ebx | ||
| 866 | jz .L013decrypt_finish | ||
| 867 | .L014decrypt_loop: | ||
| 868 | movl (%esi), %eax | ||
| 869 | movl 4(%esi), %ebx | ||
| 870 | .byte 15 | ||
| 871 | .byte 200 /* bswapl %eax */ | ||
| 872 | .byte 15 | ||
| 873 | .byte 203 /* bswapl %ebx */ | ||
| 874 | movl %eax, 8(%esp) | ||
| 875 | movl %ebx, 12(%esp) | ||
| 876 | call BF_decrypt | ||
| 877 | movl 8(%esp), %eax | ||
| 878 | movl 12(%esp), %ebx | ||
| 879 | .byte 15 | ||
| 880 | .byte 200 /* bswapl %eax */ | ||
| 881 | .byte 15 | ||
| 882 | .byte 203 /* bswapl %ebx */ | ||
| 883 | movl 16(%esp), %ecx | ||
| 884 | movl 20(%esp), %edx | ||
| 885 | xorl %eax, %ecx | ||
| 886 | xorl %ebx, %edx | ||
| 887 | movl (%esi), %eax | ||
| 888 | movl 4(%esi), %ebx | ||
| 889 | movl %ecx, (%edi) | ||
| 890 | movl %edx, 4(%edi) | ||
| 891 | movl %eax, 16(%esp) | ||
| 892 | movl %ebx, 20(%esp) | ||
| 893 | addl $8, %esi | ||
| 894 | addl $8, %edi | ||
| 895 | subl $8, %ebp | ||
| 896 | jnz .L014decrypt_loop | ||
| 897 | .L013decrypt_finish: | ||
| 898 | movl 52(%esp), %ebp | ||
| 899 | andl $7, %ebp | ||
| 900 | jz .L003finish | ||
| 901 | movl (%esi), %eax | ||
| 902 | movl 4(%esi), %ebx | ||
| 903 | .byte 15 | ||
| 904 | .byte 200 /* bswapl %eax */ | ||
| 905 | .byte 15 | ||
| 906 | .byte 203 /* bswapl %ebx */ | ||
| 907 | movl %eax, 8(%esp) | ||
| 908 | movl %ebx, 12(%esp) | ||
| 909 | call BF_decrypt | ||
| 910 | movl 8(%esp), %eax | ||
| 911 | movl 12(%esp), %ebx | ||
| 912 | .byte 15 | ||
| 913 | .byte 200 /* bswapl %eax */ | ||
| 914 | .byte 15 | ||
| 915 | .byte 203 /* bswapl %ebx */ | ||
| 916 | movl 16(%esp), %ecx | ||
| 917 | movl 20(%esp), %edx | ||
| 918 | xorl %eax, %ecx | ||
| 919 | xorl %ebx, %edx | ||
| 920 | movl (%esi), %eax | ||
| 921 | movl 4(%esi), %ebx | ||
| 922 | .L015dj7: | ||
| 923 | rorl $16, %edx | ||
| 924 | movb %dl, 6(%edi) | ||
| 925 | shrl $16, %edx | ||
| 926 | .L016dj6: | ||
| 927 | movb %dh, 5(%edi) | ||
| 928 | .L017dj5: | ||
| 929 | movb %dl, 4(%edi) | ||
| 930 | .L018dj4: | ||
| 931 | movl %ecx, (%edi) | ||
| 932 | jmp .L019djend | ||
| 933 | .L020dj3: | ||
| 934 | rorl $16, %ecx | ||
| 935 | movb %cl, 2(%edi) | ||
| 936 | sall $16, %ecx | ||
| 937 | .L021dj2: | ||
| 938 | movb %ch, 1(%esi) | ||
| 939 | .L022dj1: | ||
| 940 | movb %cl, (%esi) | ||
| 941 | .L019djend: | ||
| 942 | jmp .L003finish | ||
| 943 | .align ALIGN | ||
| 944 | .L003finish: | ||
| 945 | movl 60(%esp), %ecx | ||
| 946 | addl $24, %esp | ||
| 947 | movl %eax, (%ecx) | ||
| 948 | movl %ebx, 4(%ecx) | ||
| 949 | popl %edi | ||
| 950 | popl %esi | ||
| 951 | popl %ebx | ||
| 952 | popl %ebp | ||
| 953 | ret | ||
| 954 | .align ALIGN | ||
| 955 | .L004cbc_enc_jmp_table: | ||
| 956 | .long 0 | ||
| 957 | .long .L012ej1 | ||
| 958 | .long .L011ej2 | ||
| 959 | .long .L010ej3 | ||
| 960 | .long .L008ej4 | ||
| 961 | .long .L007ej5 | ||
| 962 | .long .L006ej6 | ||
| 963 | .long .L005ej7 | ||
| 964 | .align ALIGN | ||
| 965 | .L023cbc_dec_jmp_table: | ||
| 966 | .long 0 | ||
| 967 | .long .L022dj1 | ||
| 968 | .long .L021dj2 | ||
| 969 | .long .L020dj3 | ||
| 970 | .long .L018dj4 | ||
| 971 | .long .L017dj5 | ||
| 972 | .long .L016dj6 | ||
| 973 | .long .L015dj7 | ||
| 974 | .BF_cbc_encrypt_end: | ||
| 975 | SIZE(BF_cbc_encrypt,.BF_cbc_encrypt_end-BF_cbc_encrypt) | ||
| 976 | .ident "desasm.pl" | ||
diff --git a/src/lib/libssl/src/crypto/bf/bf_locl.org b/src/lib/libssl/src/crypto/bf/bf_locl.org new file mode 100644 index 0000000000..a5663de8ca --- /dev/null +++ b/src/lib/libssl/src/crypto/bf/bf_locl.org | |||
| @@ -0,0 +1,242 @@ | |||
| 1 | /* crypto/bf/bf_locl.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify bf_locl.org since bf_locl.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | /* Special defines which change the way the code is built depending on the | ||
| 68 | CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find | ||
| 69 | even newer MIPS CPU's, but at the moment one size fits all for | ||
| 70 | optimization options. Older Sparc's work better with only UNROLL, but | ||
| 71 | there's no way to tell at compile time what it is you're running on */ | ||
| 72 | |||
| 73 | #if defined( sun ) /* Newer Sparc's */ | ||
| 74 | # define BF_PTR | ||
| 75 | #elif defined( __ultrix ) /* Older MIPS */ | ||
| 76 | # define BF_PTR | ||
| 77 | #elif defined( __osf1__ ) /* Alpha */ | ||
| 78 | /* None */ | ||
| 79 | #elif defined ( _AIX ) /* RS6000 */ | ||
| 80 | /* Unknown */ | ||
| 81 | #elif defined( __hpux ) /* HP-PA */ | ||
| 82 | /* None */ | ||
| 83 | #elif defined( __aux ) /* 68K */ | ||
| 84 | /* Unknown */ | ||
| 85 | #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ | ||
| 86 | /* Unknown */ | ||
| 87 | #elif defined( __sgi ) /* Newer MIPS */ | ||
| 88 | # define BF_PTR | ||
| 89 | #elif defined( i386 ) /* x86 boxes, should be gcc */ | ||
| 90 | #elif defined( _MSC_VER ) /* x86 boxes, Visual C */ | ||
| 91 | #endif /* Systems-specific speed defines */ | ||
| 92 | |||
| 93 | #undef c2l | ||
| 94 | #define c2l(c,l) (l =((unsigned long)(*((c)++))) , \ | ||
| 95 | l|=((unsigned long)(*((c)++)))<< 8L, \ | ||
| 96 | l|=((unsigned long)(*((c)++)))<<16L, \ | ||
| 97 | l|=((unsigned long)(*((c)++)))<<24L) | ||
| 98 | |||
| 99 | /* NOTE - c is not incremented as per c2l */ | ||
| 100 | #undef c2ln | ||
| 101 | #define c2ln(c,l1,l2,n) { \ | ||
| 102 | c+=n; \ | ||
| 103 | l1=l2=0; \ | ||
| 104 | switch (n) { \ | ||
| 105 | case 8: l2 =((unsigned long)(*(--(c))))<<24L; \ | ||
| 106 | case 7: l2|=((unsigned long)(*(--(c))))<<16L; \ | ||
| 107 | case 6: l2|=((unsigned long)(*(--(c))))<< 8L; \ | ||
| 108 | case 5: l2|=((unsigned long)(*(--(c)))); \ | ||
| 109 | case 4: l1 =((unsigned long)(*(--(c))))<<24L; \ | ||
| 110 | case 3: l1|=((unsigned long)(*(--(c))))<<16L; \ | ||
| 111 | case 2: l1|=((unsigned long)(*(--(c))))<< 8L; \ | ||
| 112 | case 1: l1|=((unsigned long)(*(--(c)))); \ | ||
| 113 | } \ | ||
| 114 | } | ||
| 115 | |||
| 116 | #undef l2c | ||
| 117 | #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ | ||
| 118 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | ||
| 119 | *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ | ||
| 120 | *((c)++)=(unsigned char)(((l)>>24L)&0xff)) | ||
| 121 | |||
| 122 | /* NOTE - c is not incremented as per l2c */ | ||
| 123 | #undef l2cn | ||
| 124 | #define l2cn(l1,l2,c,n) { \ | ||
| 125 | c+=n; \ | ||
| 126 | switch (n) { \ | ||
| 127 | case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \ | ||
| 128 | case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \ | ||
| 129 | case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \ | ||
| 130 | case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ | ||
| 131 | case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \ | ||
| 132 | case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \ | ||
| 133 | case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \ | ||
| 134 | case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ | ||
| 135 | } \ | ||
| 136 | } | ||
| 137 | |||
| 138 | /* NOTE - c is not incremented as per n2l */ | ||
| 139 | #define n2ln(c,l1,l2,n) { \ | ||
| 140 | c+=n; \ | ||
| 141 | l1=l2=0; \ | ||
| 142 | switch (n) { \ | ||
| 143 | case 8: l2 =((unsigned long)(*(--(c)))) ; \ | ||
| 144 | case 7: l2|=((unsigned long)(*(--(c))))<< 8; \ | ||
| 145 | case 6: l2|=((unsigned long)(*(--(c))))<<16; \ | ||
| 146 | case 5: l2|=((unsigned long)(*(--(c))))<<24; \ | ||
| 147 | case 4: l1 =((unsigned long)(*(--(c)))) ; \ | ||
| 148 | case 3: l1|=((unsigned long)(*(--(c))))<< 8; \ | ||
| 149 | case 2: l1|=((unsigned long)(*(--(c))))<<16; \ | ||
| 150 | case 1: l1|=((unsigned long)(*(--(c))))<<24; \ | ||
| 151 | } \ | ||
| 152 | } | ||
| 153 | |||
| 154 | /* NOTE - c is not incremented as per l2n */ | ||
| 155 | #define l2nn(l1,l2,c,n) { \ | ||
| 156 | c+=n; \ | ||
| 157 | switch (n) { \ | ||
| 158 | case 8: *(--(c))=(unsigned char)(((l2) )&0xff); \ | ||
| 159 | case 7: *(--(c))=(unsigned char)(((l2)>> 8)&0xff); \ | ||
| 160 | case 6: *(--(c))=(unsigned char)(((l2)>>16)&0xff); \ | ||
| 161 | case 5: *(--(c))=(unsigned char)(((l2)>>24)&0xff); \ | ||
| 162 | case 4: *(--(c))=(unsigned char)(((l1) )&0xff); \ | ||
| 163 | case 3: *(--(c))=(unsigned char)(((l1)>> 8)&0xff); \ | ||
| 164 | case 2: *(--(c))=(unsigned char)(((l1)>>16)&0xff); \ | ||
| 165 | case 1: *(--(c))=(unsigned char)(((l1)>>24)&0xff); \ | ||
| 166 | } \ | ||
| 167 | } | ||
| 168 | |||
| 169 | #undef n2l | ||
| 170 | #define n2l(c,l) (l =((unsigned long)(*((c)++)))<<24L, \ | ||
| 171 | l|=((unsigned long)(*((c)++)))<<16L, \ | ||
| 172 | l|=((unsigned long)(*((c)++)))<< 8L, \ | ||
| 173 | l|=((unsigned long)(*((c)++)))) | ||
| 174 | |||
| 175 | #undef l2n | ||
| 176 | #define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \ | ||
| 177 | *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ | ||
| 178 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | ||
| 179 | *((c)++)=(unsigned char)(((l) )&0xff)) | ||
| 180 | |||
| 181 | /* This is actually a big endian algorithm, the most significate byte | ||
| 182 | * is used to lookup array 0 */ | ||
| 183 | |||
| 184 | /* use BF_PTR2 for intel boxes, | ||
| 185 | * BF_PTR for sparc and MIPS/SGI | ||
| 186 | * use nothing for Alpha and HP. | ||
| 187 | */ | ||
| 188 | #if !defined(BF_PTR) && !defined(BF_PTR2) | ||
| 189 | #undef BF_PTR | ||
| 190 | #endif | ||
| 191 | |||
| 192 | #define BF_M 0x3fc | ||
| 193 | #define BF_0 22L | ||
| 194 | #define BF_1 14L | ||
| 195 | #define BF_2 6L | ||
| 196 | #define BF_3 2L /* left shift */ | ||
| 197 | |||
| 198 | #if defined(BF_PTR2) | ||
| 199 | |||
| 200 | /* This is basically a special pentium verson */ | ||
| 201 | #define BF_ENC(LL,R,S,P) \ | ||
| 202 | { \ | ||
| 203 | BF_LONG t,u,v; \ | ||
| 204 | u=R>>BF_0; \ | ||
| 205 | v=R>>BF_1; \ | ||
| 206 | u&=BF_M; \ | ||
| 207 | v&=BF_M; \ | ||
| 208 | t= *(BF_LONG *)((unsigned char *)&(S[ 0])+u); \ | ||
| 209 | u=R>>BF_2; \ | ||
| 210 | t+= *(BF_LONG *)((unsigned char *)&(S[256])+v); \ | ||
| 211 | v=R<<BF_3; \ | ||
| 212 | u&=BF_M; \ | ||
| 213 | v&=BF_M; \ | ||
| 214 | t^= *(BF_LONG *)((unsigned char *)&(S[512])+u); \ | ||
| 215 | LL^=P; \ | ||
| 216 | t+= *(BF_LONG *)((unsigned char *)&(S[768])+v); \ | ||
| 217 | LL^=t; \ | ||
| 218 | } | ||
| 219 | |||
| 220 | #elif defined(BF_PTR) | ||
| 221 | |||
| 222 | /* This is normally very good */ | ||
| 223 | |||
| 224 | #define BF_ENC(LL,R,S,P) \ | ||
| 225 | LL^=P; \ | ||
| 226 | LL^= (((*(BF_LONG *)((unsigned char *)&(S[ 0])+((R>>BF_0)&BF_M))+ \ | ||
| 227 | *(BF_LONG *)((unsigned char *)&(S[256])+((R>>BF_1)&BF_M)))^ \ | ||
| 228 | *(BF_LONG *)((unsigned char *)&(S[512])+((R>>BF_2)&BF_M)))+ \ | ||
| 229 | *(BF_LONG *)((unsigned char *)&(S[768])+((R<<BF_3)&BF_M))); | ||
| 230 | #else | ||
| 231 | |||
| 232 | /* This will always work, even on 64 bit machines and strangly enough, | ||
| 233 | * on the Alpha it is faster than the pointer versions (both 32 and 64 | ||
| 234 | * versions of BF_LONG) */ | ||
| 235 | |||
| 236 | #define BF_ENC(LL,R,S,P) \ | ||
| 237 | LL^=P; \ | ||
| 238 | LL^=((( S[ (int)(R>>24L) ] + \ | ||
| 239 | S[0x0100+((int)(R>>16L)&0xff)])^ \ | ||
| 240 | S[0x0200+((int)(R>> 8L)&0xff)])+ \ | ||
| 241 | S[0x0300+((int)(R )&0xff)])&0xffffffffL; | ||
| 242 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/bio/Makefile.ssl b/src/lib/libssl/src/crypto/bio/Makefile.ssl new file mode 100644 index 0000000000..42e11e1c94 --- /dev/null +++ b/src/lib/libssl/src/crypto/bio/Makefile.ssl | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/bio/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= bio | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=bio | ||
| 19 | ERRC=bio_err | ||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= bio_lib.c bio_cb.c $(ERRC).c \ | ||
| 26 | bss_mem.c bss_null.c bss_fd.c \ | ||
| 27 | bss_file.c bss_sock.c bss_conn.c \ | ||
| 28 | bf_null.c bf_buff.c b_print.c b_dump.c \ | ||
| 29 | b_sock.c bss_acpt.c bf_nbio.c | ||
| 30 | LIBOBJ= bio_lib.o bio_cb.o $(ERRC).o \ | ||
| 31 | bss_mem.o bss_null.o bss_fd.o \ | ||
| 32 | bss_file.o bss_sock.o bss_conn.o \ | ||
| 33 | bf_null.o bf_buff.o b_print.o b_dump.o \ | ||
| 34 | b_sock.o bss_acpt.o bf_nbio.o | ||
| 35 | |||
| 36 | SRC= $(LIBSRC) | ||
| 37 | |||
| 38 | EXHEADER= bio.h bss_file.c | ||
| 39 | HEADER= $(EXHEADER) | ||
| 40 | |||
| 41 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 42 | |||
| 43 | top: | ||
| 44 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 45 | |||
| 46 | all: lib | ||
| 47 | |||
| 48 | lib: $(LIBOBJ) | ||
| 49 | $(AR) $(LIB) $(LIBOBJ) | ||
| 50 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 51 | @touch lib | ||
| 52 | |||
| 53 | files: | ||
| 54 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 55 | |||
| 56 | links: | ||
| 57 | /bin/rm -f Makefile | ||
| 58 | $(TOP)/util/point.sh Makefile.ssl Makefile; | ||
| 59 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 60 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 61 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 62 | |||
| 63 | install: | ||
| 64 | @for i in $(EXHEADER) bss_file.c ; \ | ||
| 65 | do \ | ||
| 66 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 67 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 68 | done; | ||
| 69 | |||
| 70 | tags: | ||
| 71 | ctags $(SRC) | ||
| 72 | |||
| 73 | tests: | ||
| 74 | |||
| 75 | lint: | ||
| 76 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 77 | |||
| 78 | depend: | ||
| 79 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 80 | |||
| 81 | dclean: | ||
| 82 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 83 | mv -f Makefile.new $(MAKEFILE) | ||
| 84 | |||
| 85 | clean: | ||
| 86 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 87 | |||
| 88 | errors: | ||
| 89 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 90 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 91 | |||
| 92 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/bio/bio.err b/src/lib/libssl/src/crypto/bio/bio.err new file mode 100644 index 0000000000..6e2f2b63ca --- /dev/null +++ b/src/lib/libssl/src/crypto/bio/bio.err | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* Error codes for the BIO functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define BIO_F_ACPT_STATE 100 | ||
| 5 | #define BIO_F_BIO_ACCEPT 101 | ||
| 6 | #define BIO_F_BIO_CTRL 102 | ||
| 7 | #define BIO_F_BIO_GETS 103 | ||
| 8 | #define BIO_F_BIO_GET_ACCEPT_SOCKET 104 | ||
| 9 | #define BIO_F_BIO_GET_HOST_IP 105 | ||
| 10 | #define BIO_F_BIO_GET_PORT 106 | ||
| 11 | #define BIO_F_BIO_NEW 107 | ||
| 12 | #define BIO_F_BIO_NEW_FILE 108 | ||
| 13 | #define BIO_F_BIO_PUTS 109 | ||
| 14 | #define BIO_F_BIO_READ 110 | ||
| 15 | #define BIO_F_BIO_SOCK_INIT 111 | ||
| 16 | #define BIO_F_BIO_WRITE 112 | ||
| 17 | #define BIO_F_BUFFER_CTRL 113 | ||
| 18 | #define BIO_F_CONN_STATE 114 | ||
| 19 | #define BIO_F_FILE_CTRL 115 | ||
| 20 | #define BIO_F_MEM_WRITE 116 | ||
| 21 | #define BIO_F_SSL_NEW 117 | ||
| 22 | #define BIO_F_WSASTARTUP 118 | ||
| 23 | |||
| 24 | /* Reason codes. */ | ||
| 25 | #define BIO_R_ACCEPT_ERROR 100 | ||
| 26 | #define BIO_R_BAD_FOPEN_MODE 101 | ||
| 27 | #define BIO_R_BAD_HOSTNAME_LOOKUP 102 | ||
| 28 | #define BIO_R_CONNECT_ERROR 103 | ||
| 29 | #define BIO_R_ERROR_SETTING_NBIO 104 | ||
| 30 | #define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPTED_SOCKET 105 | ||
| 31 | #define BIO_R_ERROR_SETTING_NBIO_ON_ACCEPT_SOCKET 106 | ||
| 32 | #define BIO_R_GETHOSTBYNAME_ADDR_IS_NOT_AF_INET 107 | ||
| 33 | #define BIO_R_INVALID_IP_ADDRESS 108 | ||
| 34 | #define BIO_R_KEEPALIVE 109 | ||
| 35 | #define BIO_R_NBIO_CONNECT_ERROR 110 | ||
| 36 | #define BIO_R_NO_ACCEPT_PORT_SPECIFIED 111 | ||
| 37 | #define BIO_R_NO_HOSTHNAME_SPECIFIED 112 | ||
| 38 | #define BIO_R_NO_PORT_DEFINED 113 | ||
| 39 | #define BIO_R_NO_PORT_SPECIFIED 114 | ||
| 40 | #define BIO_R_NULL_PARAMETER 115 | ||
| 41 | #define BIO_R_UNABLE_TO_BIND_SOCKET 116 | ||
| 42 | #define BIO_R_UNABLE_TO_CREATE_SOCKET 117 | ||
| 43 | #define BIO_R_UNABLE_TO_LISTEN_SOCKET 118 | ||
| 44 | #define BIO_R_UNINITALISED 119 | ||
| 45 | #define BIO_R_UNSUPPORTED_METHOD 120 | ||
| 46 | #define BIO_R_WSASTARTUP 121 | ||
diff --git a/src/lib/libssl/src/crypto/bn/Makefile.ssl b/src/lib/libssl/src/crypto/bn/Makefile.ssl new file mode 100644 index 0000000000..9809d26cbc --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/Makefile.ssl | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/bn/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= bn | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | BN_MULW= bn_mulw.o | ||
| 17 | # or use | ||
| 18 | #BN_MULW= bn86-elf.o | ||
| 19 | |||
| 20 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 21 | |||
| 22 | ERR=bn | ||
| 23 | ERRC=bn_err | ||
| 24 | GENERAL=Makefile | ||
| 25 | TEST=bntest.c exptest.c | ||
| 26 | APPS= | ||
| 27 | |||
| 28 | LIB=$(TOP)/libcrypto.a | ||
| 29 | LIBSRC= bn_add.c bn_div.c bn_exp.c bn_lib.c bn_mod.c bn_mul.c \ | ||
| 30 | bn_print.c bn_rand.c bn_shift.c bn_sub.c bn_word.c bn_blind.c \ | ||
| 31 | bn_gcd.c bn_prime.c $(ERRC).c bn_sqr.c bn_mulw.c bn_recp.c bn_mont.c \ | ||
| 32 | bn_mpi.c | ||
| 33 | |||
| 34 | LIBOBJ= bn_add.o bn_div.o bn_exp.o bn_lib.o bn_mod.o bn_mul.o \ | ||
| 35 | bn_print.o bn_rand.o bn_shift.o bn_sub.o bn_word.o bn_blind.o \ | ||
| 36 | bn_gcd.o bn_prime.o $(ERRC).o bn_sqr.o $(BN_MULW) bn_recp.o bn_mont.o \ | ||
| 37 | bn_mpi.o | ||
| 38 | |||
| 39 | |||
| 40 | SRC= $(LIBSRC) | ||
| 41 | |||
| 42 | EXHEADER= bn.h | ||
| 43 | HEADER= bn_lcl.h bn_prime.h $(EXHEADER) | ||
| 44 | |||
| 45 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 46 | |||
| 47 | top: | ||
| 48 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 49 | |||
| 50 | all: lib | ||
| 51 | |||
| 52 | knuth: bn_knuth.c | ||
| 53 | cc -pg -I.. -I../../include bn_knuth.c -o knuth $(LIB) #../../../libefence.a | ||
| 54 | |||
| 55 | knuth.fast: bn_knuth.c | ||
| 56 | cc -pg -fast -I.. -I../../include bn_knuth.c -o knuth $(LIB) #../../../libefence.a | ||
| 57 | |||
| 58 | |||
| 59 | lib: $(LIBOBJ) | ||
| 60 | $(AR) $(LIB) $(LIBOBJ) | ||
| 61 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 62 | @touch lib | ||
| 63 | |||
| 64 | # elf | ||
| 65 | asm/bn86-elf.o: asm/bn86unix.cpp | ||
| 66 | $(CPP) -DELF asm/bn86unix.cpp | as -o asm/bn86-elf.o | ||
| 67 | |||
| 68 | # solaris | ||
| 69 | asm/bn86-sol.o: asm/bn86unix.cpp | ||
| 70 | $(CC) -E -DSOL asm/bn86unix.cpp | sed 's/^#.*//' > asm/bn86-sol.s | ||
| 71 | as -o asm/bn86-sol.o asm/bn86-sol.s | ||
| 72 | rm -f asm/bn86-sol.s | ||
| 73 | |||
| 74 | # a.out | ||
| 75 | asm/bn86-out.o: asm/bn86unix.cpp | ||
| 76 | $(CPP) -DOUT asm/bn86unix.cpp | as -o asm/bn86-out.o | ||
| 77 | |||
| 78 | # bsdi | ||
| 79 | asm/bn86bsdi.o: asm/bn86unix.cpp | ||
| 80 | $(CPP) -DBSDI asm/bn86unix.cpp | as -o asm/bn86bsdi.o | ||
| 81 | |||
| 82 | asm/bn86unix.cpp: | ||
| 83 | (cd asm; perl bn-586.pl cpp >bn86unix.cpp ) | ||
| 84 | |||
| 85 | files: | ||
| 86 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 87 | |||
| 88 | links: | ||
| 89 | /bin/rm -f Makefile | ||
| 90 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 91 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 92 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 93 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 94 | |||
| 95 | install: | ||
| 96 | @for i in $(EXHEADER) ; \ | ||
| 97 | do \ | ||
| 98 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 99 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 100 | done; | ||
| 101 | |||
| 102 | exptest: | ||
| 103 | /bin/rm -f exptest | ||
| 104 | gcc -I../../include -g2 -ggdb -o exptest exptest.c ../../libcrypto.a | ||
| 105 | |||
| 106 | div: | ||
| 107 | /bin/rm -f a.out | ||
| 108 | gcc -I.. -g div.c ../../libcrypto.a | ||
| 109 | |||
| 110 | tags: | ||
| 111 | ctags $(SRC) | ||
| 112 | |||
| 113 | tests: | ||
| 114 | |||
| 115 | lint: | ||
| 116 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 117 | |||
| 118 | depend: | ||
| 119 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 120 | |||
| 121 | dclean: | ||
| 122 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 123 | mv -f Makefile.new $(MAKEFILE) | ||
| 124 | |||
| 125 | clean: | ||
| 126 | /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff bn_mulw.s | ||
| 127 | |||
| 128 | errors: | ||
| 129 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).org # special case .org | ||
| 130 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 131 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 132 | |||
| 133 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/bn/asm/bn-win32.asm b/src/lib/libssl/src/crypto/bn/asm/bn-win32.asm new file mode 100644 index 0000000000..017ea462b0 --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/asm/bn-win32.asm | |||
| @@ -0,0 +1,689 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by bn-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE bn-586.asm | ||
| 8 | .386 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _bn_mul_add_words | ||
| 12 | |||
| 13 | _bn_mul_add_words PROC NEAR | ||
| 14 | push ebp | ||
| 15 | push ebx | ||
| 16 | push esi | ||
| 17 | push edi | ||
| 18 | ; | ||
| 19 | xor esi, esi | ||
| 20 | mov edi, DWORD PTR 20[esp] | ||
| 21 | mov ecx, DWORD PTR 28[esp] | ||
| 22 | mov ebx, DWORD PTR 24[esp] | ||
| 23 | and ecx, 4294967288 | ||
| 24 | mov ebp, DWORD PTR 32[esp] | ||
| 25 | push ecx | ||
| 26 | jz $L000maw_finish | ||
| 27 | L001maw_loop: | ||
| 28 | mov DWORD PTR [esp],ecx | ||
| 29 | ; Round 0 | ||
| 30 | mov eax, DWORD PTR [ebx] | ||
| 31 | mul ebp | ||
| 32 | add eax, esi | ||
| 33 | mov esi, DWORD PTR [edi] | ||
| 34 | adc edx, 0 | ||
| 35 | add eax, esi | ||
| 36 | adc edx, 0 | ||
| 37 | mov DWORD PTR [edi],eax | ||
| 38 | mov esi, edx | ||
| 39 | ; Round 4 | ||
| 40 | mov eax, DWORD PTR 4[ebx] | ||
| 41 | mul ebp | ||
| 42 | add eax, esi | ||
| 43 | mov esi, DWORD PTR 4[edi] | ||
| 44 | adc edx, 0 | ||
| 45 | add eax, esi | ||
| 46 | adc edx, 0 | ||
| 47 | mov DWORD PTR 4[edi],eax | ||
| 48 | mov esi, edx | ||
| 49 | ; Round 8 | ||
| 50 | mov eax, DWORD PTR 8[ebx] | ||
| 51 | mul ebp | ||
| 52 | add eax, esi | ||
| 53 | mov esi, DWORD PTR 8[edi] | ||
| 54 | adc edx, 0 | ||
| 55 | add eax, esi | ||
| 56 | adc edx, 0 | ||
| 57 | mov DWORD PTR 8[edi],eax | ||
| 58 | mov esi, edx | ||
| 59 | ; Round 12 | ||
| 60 | mov eax, DWORD PTR 12[ebx] | ||
| 61 | mul ebp | ||
| 62 | add eax, esi | ||
| 63 | mov esi, DWORD PTR 12[edi] | ||
| 64 | adc edx, 0 | ||
| 65 | add eax, esi | ||
| 66 | adc edx, 0 | ||
| 67 | mov DWORD PTR 12[edi],eax | ||
| 68 | mov esi, edx | ||
| 69 | ; Round 16 | ||
| 70 | mov eax, DWORD PTR 16[ebx] | ||
| 71 | mul ebp | ||
| 72 | add eax, esi | ||
| 73 | mov esi, DWORD PTR 16[edi] | ||
| 74 | adc edx, 0 | ||
| 75 | add eax, esi | ||
| 76 | adc edx, 0 | ||
| 77 | mov DWORD PTR 16[edi],eax | ||
| 78 | mov esi, edx | ||
| 79 | ; Round 20 | ||
| 80 | mov eax, DWORD PTR 20[ebx] | ||
| 81 | mul ebp | ||
| 82 | add eax, esi | ||
| 83 | mov esi, DWORD PTR 20[edi] | ||
| 84 | adc edx, 0 | ||
| 85 | add eax, esi | ||
| 86 | adc edx, 0 | ||
| 87 | mov DWORD PTR 20[edi],eax | ||
| 88 | mov esi, edx | ||
| 89 | ; Round 24 | ||
| 90 | mov eax, DWORD PTR 24[ebx] | ||
| 91 | mul ebp | ||
| 92 | add eax, esi | ||
| 93 | mov esi, DWORD PTR 24[edi] | ||
| 94 | adc edx, 0 | ||
| 95 | add eax, esi | ||
| 96 | adc edx, 0 | ||
| 97 | mov DWORD PTR 24[edi],eax | ||
| 98 | mov esi, edx | ||
| 99 | ; Round 28 | ||
| 100 | mov eax, DWORD PTR 28[ebx] | ||
| 101 | mul ebp | ||
| 102 | add eax, esi | ||
| 103 | mov esi, DWORD PTR 28[edi] | ||
| 104 | adc edx, 0 | ||
| 105 | add eax, esi | ||
| 106 | adc edx, 0 | ||
| 107 | mov DWORD PTR 28[edi],eax | ||
| 108 | mov esi, edx | ||
| 109 | ; | ||
| 110 | mov ecx, DWORD PTR [esp] | ||
| 111 | add ebx, 32 | ||
| 112 | add edi, 32 | ||
| 113 | sub ecx, 8 | ||
| 114 | jnz L001maw_loop | ||
| 115 | $L000maw_finish: | ||
| 116 | mov ecx, DWORD PTR 32[esp] | ||
| 117 | and ecx, 7 | ||
| 118 | jnz $L002maw_finish2 | ||
| 119 | jmp $L003maw_end | ||
| 120 | $L002maw_finish2: | ||
| 121 | ; Tail Round 0 | ||
| 122 | mov eax, DWORD PTR [ebx] | ||
| 123 | mul ebp | ||
| 124 | add eax, esi | ||
| 125 | mov esi, DWORD PTR [edi] | ||
| 126 | adc edx, 0 | ||
| 127 | add eax, esi | ||
| 128 | adc edx, 0 | ||
| 129 | dec ecx | ||
| 130 | mov DWORD PTR [edi],eax | ||
| 131 | mov esi, edx | ||
| 132 | jz $L003maw_end | ||
| 133 | ; Tail Round 1 | ||
| 134 | mov eax, DWORD PTR 4[ebx] | ||
| 135 | mul ebp | ||
| 136 | add eax, esi | ||
| 137 | mov esi, DWORD PTR 4[edi] | ||
| 138 | adc edx, 0 | ||
| 139 | add eax, esi | ||
| 140 | adc edx, 0 | ||
| 141 | dec ecx | ||
| 142 | mov DWORD PTR 4[edi],eax | ||
| 143 | mov esi, edx | ||
| 144 | jz $L003maw_end | ||
| 145 | ; Tail Round 2 | ||
| 146 | mov eax, DWORD PTR 8[ebx] | ||
| 147 | mul ebp | ||
| 148 | add eax, esi | ||
| 149 | mov esi, DWORD PTR 8[edi] | ||
| 150 | adc edx, 0 | ||
| 151 | add eax, esi | ||
| 152 | adc edx, 0 | ||
| 153 | dec ecx | ||
| 154 | mov DWORD PTR 8[edi],eax | ||
| 155 | mov esi, edx | ||
| 156 | jz $L003maw_end | ||
| 157 | ; Tail Round 3 | ||
| 158 | mov eax, DWORD PTR 12[ebx] | ||
| 159 | mul ebp | ||
| 160 | add eax, esi | ||
| 161 | mov esi, DWORD PTR 12[edi] | ||
| 162 | adc edx, 0 | ||
| 163 | add eax, esi | ||
| 164 | adc edx, 0 | ||
| 165 | dec ecx | ||
| 166 | mov DWORD PTR 12[edi],eax | ||
| 167 | mov esi, edx | ||
| 168 | jz $L003maw_end | ||
| 169 | ; Tail Round 4 | ||
| 170 | mov eax, DWORD PTR 16[ebx] | ||
| 171 | mul ebp | ||
| 172 | add eax, esi | ||
| 173 | mov esi, DWORD PTR 16[edi] | ||
| 174 | adc edx, 0 | ||
| 175 | add eax, esi | ||
| 176 | adc edx, 0 | ||
| 177 | dec ecx | ||
| 178 | mov DWORD PTR 16[edi],eax | ||
| 179 | mov esi, edx | ||
| 180 | jz $L003maw_end | ||
| 181 | ; Tail Round 5 | ||
| 182 | mov eax, DWORD PTR 20[ebx] | ||
| 183 | mul ebp | ||
| 184 | add eax, esi | ||
| 185 | mov esi, DWORD PTR 20[edi] | ||
| 186 | adc edx, 0 | ||
| 187 | add eax, esi | ||
| 188 | adc edx, 0 | ||
| 189 | dec ecx | ||
| 190 | mov DWORD PTR 20[edi],eax | ||
| 191 | mov esi, edx | ||
| 192 | jz $L003maw_end | ||
| 193 | ; Tail Round 6 | ||
| 194 | mov eax, DWORD PTR 24[ebx] | ||
| 195 | mul ebp | ||
| 196 | add eax, esi | ||
| 197 | mov esi, DWORD PTR 24[edi] | ||
| 198 | adc edx, 0 | ||
| 199 | add eax, esi | ||
| 200 | adc edx, 0 | ||
| 201 | mov DWORD PTR 24[edi],eax | ||
| 202 | mov esi, edx | ||
| 203 | $L003maw_end: | ||
| 204 | mov eax, esi | ||
| 205 | pop ecx | ||
| 206 | pop edi | ||
| 207 | pop esi | ||
| 208 | pop ebx | ||
| 209 | pop ebp | ||
| 210 | ret | ||
| 211 | _bn_mul_add_words ENDP | ||
| 212 | _TEXT ENDS | ||
| 213 | _TEXT SEGMENT | ||
| 214 | PUBLIC _bn_mul_words | ||
| 215 | |||
| 216 | _bn_mul_words PROC NEAR | ||
| 217 | push ebp | ||
| 218 | push ebx | ||
| 219 | push esi | ||
| 220 | push edi | ||
| 221 | ; | ||
| 222 | xor esi, esi | ||
| 223 | mov edi, DWORD PTR 20[esp] | ||
| 224 | mov ebx, DWORD PTR 24[esp] | ||
| 225 | mov ebp, DWORD PTR 28[esp] | ||
| 226 | mov ecx, DWORD PTR 32[esp] | ||
| 227 | and ebp, 4294967288 | ||
| 228 | jz $L004mw_finish | ||
| 229 | L005mw_loop: | ||
| 230 | ; Round 0 | ||
| 231 | mov eax, DWORD PTR [ebx] | ||
| 232 | mul ecx | ||
| 233 | add eax, esi | ||
| 234 | adc edx, 0 | ||
| 235 | mov DWORD PTR [edi],eax | ||
| 236 | mov esi, edx | ||
| 237 | ; Round 4 | ||
| 238 | mov eax, DWORD PTR 4[ebx] | ||
| 239 | mul ecx | ||
| 240 | add eax, esi | ||
| 241 | adc edx, 0 | ||
| 242 | mov DWORD PTR 4[edi],eax | ||
| 243 | mov esi, edx | ||
| 244 | ; Round 8 | ||
| 245 | mov eax, DWORD PTR 8[ebx] | ||
| 246 | mul ecx | ||
| 247 | add eax, esi | ||
| 248 | adc edx, 0 | ||
| 249 | mov DWORD PTR 8[edi],eax | ||
| 250 | mov esi, edx | ||
| 251 | ; Round 12 | ||
| 252 | mov eax, DWORD PTR 12[ebx] | ||
| 253 | mul ecx | ||
| 254 | add eax, esi | ||
| 255 | adc edx, 0 | ||
| 256 | mov DWORD PTR 12[edi],eax | ||
| 257 | mov esi, edx | ||
| 258 | ; Round 16 | ||
| 259 | mov eax, DWORD PTR 16[ebx] | ||
| 260 | mul ecx | ||
| 261 | add eax, esi | ||
| 262 | adc edx, 0 | ||
| 263 | mov DWORD PTR 16[edi],eax | ||
| 264 | mov esi, edx | ||
| 265 | ; Round 20 | ||
| 266 | mov eax, DWORD PTR 20[ebx] | ||
| 267 | mul ecx | ||
| 268 | add eax, esi | ||
| 269 | adc edx, 0 | ||
| 270 | mov DWORD PTR 20[edi],eax | ||
| 271 | mov esi, edx | ||
| 272 | ; Round 24 | ||
| 273 | mov eax, DWORD PTR 24[ebx] | ||
| 274 | mul ecx | ||
| 275 | add eax, esi | ||
| 276 | adc edx, 0 | ||
| 277 | mov DWORD PTR 24[edi],eax | ||
| 278 | mov esi, edx | ||
| 279 | ; Round 28 | ||
| 280 | mov eax, DWORD PTR 28[ebx] | ||
| 281 | mul ecx | ||
| 282 | add eax, esi | ||
| 283 | adc edx, 0 | ||
| 284 | mov DWORD PTR 28[edi],eax | ||
| 285 | mov esi, edx | ||
| 286 | ; | ||
| 287 | add ebx, 32 | ||
| 288 | add edi, 32 | ||
| 289 | sub ebp, 8 | ||
| 290 | jz $L004mw_finish | ||
| 291 | jmp L005mw_loop | ||
| 292 | $L004mw_finish: | ||
| 293 | mov ebp, DWORD PTR 28[esp] | ||
| 294 | and ebp, 7 | ||
| 295 | jnz $L006mw_finish2 | ||
| 296 | jmp $L007mw_end | ||
| 297 | $L006mw_finish2: | ||
| 298 | ; Tail Round 0 | ||
| 299 | mov eax, DWORD PTR [ebx] | ||
| 300 | mul ecx | ||
| 301 | add eax, esi | ||
| 302 | adc edx, 0 | ||
| 303 | mov DWORD PTR [edi],eax | ||
| 304 | mov esi, edx | ||
| 305 | dec ebp | ||
| 306 | jz $L007mw_end | ||
| 307 | ; Tail Round 1 | ||
| 308 | mov eax, DWORD PTR 4[ebx] | ||
| 309 | mul ecx | ||
| 310 | add eax, esi | ||
| 311 | adc edx, 0 | ||
| 312 | mov DWORD PTR 4[edi],eax | ||
| 313 | mov esi, edx | ||
| 314 | dec ebp | ||
| 315 | jz $L007mw_end | ||
| 316 | ; Tail Round 2 | ||
| 317 | mov eax, DWORD PTR 8[ebx] | ||
| 318 | mul ecx | ||
| 319 | add eax, esi | ||
| 320 | adc edx, 0 | ||
| 321 | mov DWORD PTR 8[edi],eax | ||
| 322 | mov esi, edx | ||
| 323 | dec ebp | ||
| 324 | jz $L007mw_end | ||
| 325 | ; Tail Round 3 | ||
| 326 | mov eax, DWORD PTR 12[ebx] | ||
| 327 | mul ecx | ||
| 328 | add eax, esi | ||
| 329 | adc edx, 0 | ||
| 330 | mov DWORD PTR 12[edi],eax | ||
| 331 | mov esi, edx | ||
| 332 | dec ebp | ||
| 333 | jz $L007mw_end | ||
| 334 | ; Tail Round 4 | ||
| 335 | mov eax, DWORD PTR 16[ebx] | ||
| 336 | mul ecx | ||
| 337 | add eax, esi | ||
| 338 | adc edx, 0 | ||
| 339 | mov DWORD PTR 16[edi],eax | ||
| 340 | mov esi, edx | ||
| 341 | dec ebp | ||
| 342 | jz $L007mw_end | ||
| 343 | ; Tail Round 5 | ||
| 344 | mov eax, DWORD PTR 20[ebx] | ||
| 345 | mul ecx | ||
| 346 | add eax, esi | ||
| 347 | adc edx, 0 | ||
| 348 | mov DWORD PTR 20[edi],eax | ||
| 349 | mov esi, edx | ||
| 350 | dec ebp | ||
| 351 | jz $L007mw_end | ||
| 352 | ; Tail Round 6 | ||
| 353 | mov eax, DWORD PTR 24[ebx] | ||
| 354 | mul ecx | ||
| 355 | add eax, esi | ||
| 356 | adc edx, 0 | ||
| 357 | mov DWORD PTR 24[edi],eax | ||
| 358 | mov esi, edx | ||
| 359 | $L007mw_end: | ||
| 360 | mov eax, esi | ||
| 361 | pop edi | ||
| 362 | pop esi | ||
| 363 | pop ebx | ||
| 364 | pop ebp | ||
| 365 | ret | ||
| 366 | _bn_mul_words ENDP | ||
| 367 | _TEXT ENDS | ||
| 368 | _TEXT SEGMENT | ||
| 369 | PUBLIC _bn_sqr_words | ||
| 370 | |||
| 371 | _bn_sqr_words PROC NEAR | ||
| 372 | push ebp | ||
| 373 | push ebx | ||
| 374 | push esi | ||
| 375 | push edi | ||
| 376 | ; | ||
| 377 | mov esi, DWORD PTR 20[esp] | ||
| 378 | mov edi, DWORD PTR 24[esp] | ||
| 379 | mov ebx, DWORD PTR 28[esp] | ||
| 380 | and ebx, 4294967288 | ||
| 381 | jz $L008sw_finish | ||
| 382 | L009sw_loop: | ||
| 383 | ; Round 0 | ||
| 384 | mov eax, DWORD PTR [edi] | ||
| 385 | mul eax | ||
| 386 | mov DWORD PTR [esi],eax | ||
| 387 | mov DWORD PTR 4[esi],edx | ||
| 388 | ; Round 4 | ||
| 389 | mov eax, DWORD PTR 4[edi] | ||
| 390 | mul eax | ||
| 391 | mov DWORD PTR 8[esi],eax | ||
| 392 | mov DWORD PTR 12[esi],edx | ||
| 393 | ; Round 8 | ||
| 394 | mov eax, DWORD PTR 8[edi] | ||
| 395 | mul eax | ||
| 396 | mov DWORD PTR 16[esi],eax | ||
| 397 | mov DWORD PTR 20[esi],edx | ||
| 398 | ; Round 12 | ||
| 399 | mov eax, DWORD PTR 12[edi] | ||
| 400 | mul eax | ||
| 401 | mov DWORD PTR 24[esi],eax | ||
| 402 | mov DWORD PTR 28[esi],edx | ||
| 403 | ; Round 16 | ||
| 404 | mov eax, DWORD PTR 16[edi] | ||
| 405 | mul eax | ||
| 406 | mov DWORD PTR 32[esi],eax | ||
| 407 | mov DWORD PTR 36[esi],edx | ||
| 408 | ; Round 20 | ||
| 409 | mov eax, DWORD PTR 20[edi] | ||
| 410 | mul eax | ||
| 411 | mov DWORD PTR 40[esi],eax | ||
| 412 | mov DWORD PTR 44[esi],edx | ||
| 413 | ; Round 24 | ||
| 414 | mov eax, DWORD PTR 24[edi] | ||
| 415 | mul eax | ||
| 416 | mov DWORD PTR 48[esi],eax | ||
| 417 | mov DWORD PTR 52[esi],edx | ||
| 418 | ; Round 28 | ||
| 419 | mov eax, DWORD PTR 28[edi] | ||
| 420 | mul eax | ||
| 421 | mov DWORD PTR 56[esi],eax | ||
| 422 | mov DWORD PTR 60[esi],edx | ||
| 423 | ; | ||
| 424 | add edi, 32 | ||
| 425 | add esi, 64 | ||
| 426 | sub ebx, 8 | ||
| 427 | jnz L009sw_loop | ||
| 428 | $L008sw_finish: | ||
| 429 | mov ebx, DWORD PTR 28[esp] | ||
| 430 | and ebx, 7 | ||
| 431 | jz $L010sw_end | ||
| 432 | ; Tail Round 0 | ||
| 433 | mov eax, DWORD PTR [edi] | ||
| 434 | mul eax | ||
| 435 | mov DWORD PTR [esi],eax | ||
| 436 | dec ebx | ||
| 437 | mov DWORD PTR 4[esi],edx | ||
| 438 | jz $L010sw_end | ||
| 439 | ; Tail Round 1 | ||
| 440 | mov eax, DWORD PTR 4[edi] | ||
| 441 | mul eax | ||
| 442 | mov DWORD PTR 8[esi],eax | ||
| 443 | dec ebx | ||
| 444 | mov DWORD PTR 12[esi],edx | ||
| 445 | jz $L010sw_end | ||
| 446 | ; Tail Round 2 | ||
| 447 | mov eax, DWORD PTR 8[edi] | ||
| 448 | mul eax | ||
| 449 | mov DWORD PTR 16[esi],eax | ||
| 450 | dec ebx | ||
| 451 | mov DWORD PTR 20[esi],edx | ||
| 452 | jz $L010sw_end | ||
| 453 | ; Tail Round 3 | ||
| 454 | mov eax, DWORD PTR 12[edi] | ||
| 455 | mul eax | ||
| 456 | mov DWORD PTR 24[esi],eax | ||
| 457 | dec ebx | ||
| 458 | mov DWORD PTR 28[esi],edx | ||
| 459 | jz $L010sw_end | ||
| 460 | ; Tail Round 4 | ||
| 461 | mov eax, DWORD PTR 16[edi] | ||
| 462 | mul eax | ||
| 463 | mov DWORD PTR 32[esi],eax | ||
| 464 | dec ebx | ||
| 465 | mov DWORD PTR 36[esi],edx | ||
| 466 | jz $L010sw_end | ||
| 467 | ; Tail Round 5 | ||
| 468 | mov eax, DWORD PTR 20[edi] | ||
| 469 | mul eax | ||
| 470 | mov DWORD PTR 40[esi],eax | ||
| 471 | dec ebx | ||
| 472 | mov DWORD PTR 44[esi],edx | ||
| 473 | jz $L010sw_end | ||
| 474 | ; Tail Round 6 | ||
| 475 | mov eax, DWORD PTR 24[edi] | ||
| 476 | mul eax | ||
| 477 | mov DWORD PTR 48[esi],eax | ||
| 478 | mov DWORD PTR 52[esi],edx | ||
| 479 | $L010sw_end: | ||
| 480 | pop edi | ||
| 481 | pop esi | ||
| 482 | pop ebx | ||
| 483 | pop ebp | ||
| 484 | ret | ||
| 485 | _bn_sqr_words ENDP | ||
| 486 | _TEXT ENDS | ||
| 487 | _TEXT SEGMENT | ||
| 488 | PUBLIC _bn_div64 | ||
| 489 | |||
| 490 | _bn_div64 PROC NEAR | ||
| 491 | push ebp | ||
| 492 | push ebx | ||
| 493 | push esi | ||
| 494 | push edi | ||
| 495 | mov edx, DWORD PTR 20[esp] | ||
| 496 | mov eax, DWORD PTR 24[esp] | ||
| 497 | mov ebx, DWORD PTR 28[esp] | ||
| 498 | div ebx | ||
| 499 | pop edi | ||
| 500 | pop esi | ||
| 501 | pop ebx | ||
| 502 | pop ebp | ||
| 503 | ret | ||
| 504 | _bn_div64 ENDP | ||
| 505 | _TEXT ENDS | ||
| 506 | _TEXT SEGMENT | ||
| 507 | PUBLIC _bn_add_words | ||
| 508 | |||
| 509 | _bn_add_words PROC NEAR | ||
| 510 | push ebp | ||
| 511 | push ebx | ||
| 512 | push esi | ||
| 513 | push edi | ||
| 514 | ; | ||
| 515 | mov ebx, DWORD PTR 20[esp] | ||
| 516 | mov esi, DWORD PTR 24[esp] | ||
| 517 | mov edi, DWORD PTR 28[esp] | ||
| 518 | mov ebp, DWORD PTR 32[esp] | ||
| 519 | xor eax, eax | ||
| 520 | and ebp, 4294967288 | ||
| 521 | jz $L011aw_finish | ||
| 522 | L012aw_loop: | ||
| 523 | ; Round 0 | ||
| 524 | mov ecx, DWORD PTR [esi] | ||
| 525 | mov edx, DWORD PTR [edi] | ||
| 526 | add ecx, eax | ||
| 527 | mov eax, 0 | ||
| 528 | adc eax, eax | ||
| 529 | add ecx, edx | ||
| 530 | adc eax, 0 | ||
| 531 | mov DWORD PTR [ebx],ecx | ||
| 532 | ; Round 1 | ||
| 533 | mov ecx, DWORD PTR 4[esi] | ||
| 534 | mov edx, DWORD PTR 4[edi] | ||
| 535 | add ecx, eax | ||
| 536 | mov eax, 0 | ||
| 537 | adc eax, eax | ||
| 538 | add ecx, edx | ||
| 539 | adc eax, 0 | ||
| 540 | mov DWORD PTR 4[ebx],ecx | ||
| 541 | ; Round 2 | ||
| 542 | mov ecx, DWORD PTR 8[esi] | ||
| 543 | mov edx, DWORD PTR 8[edi] | ||
| 544 | add ecx, eax | ||
| 545 | mov eax, 0 | ||
| 546 | adc eax, eax | ||
| 547 | add ecx, edx | ||
| 548 | adc eax, 0 | ||
| 549 | mov DWORD PTR 8[ebx],ecx | ||
| 550 | ; Round 3 | ||
| 551 | mov ecx, DWORD PTR 12[esi] | ||
| 552 | mov edx, DWORD PTR 12[edi] | ||
| 553 | add ecx, eax | ||
| 554 | mov eax, 0 | ||
| 555 | adc eax, eax | ||
| 556 | add ecx, edx | ||
| 557 | adc eax, 0 | ||
| 558 | mov DWORD PTR 12[ebx],ecx | ||
| 559 | ; Round 4 | ||
| 560 | mov ecx, DWORD PTR 16[esi] | ||
| 561 | mov edx, DWORD PTR 16[edi] | ||
| 562 | add ecx, eax | ||
| 563 | mov eax, 0 | ||
| 564 | adc eax, eax | ||
| 565 | add ecx, edx | ||
| 566 | adc eax, 0 | ||
| 567 | mov DWORD PTR 16[ebx],ecx | ||
| 568 | ; Round 5 | ||
| 569 | mov ecx, DWORD PTR 20[esi] | ||
| 570 | mov edx, DWORD PTR 20[edi] | ||
| 571 | add ecx, eax | ||
| 572 | mov eax, 0 | ||
| 573 | adc eax, eax | ||
| 574 | add ecx, edx | ||
| 575 | adc eax, 0 | ||
| 576 | mov DWORD PTR 20[ebx],ecx | ||
| 577 | ; Round 6 | ||
| 578 | mov ecx, DWORD PTR 24[esi] | ||
| 579 | mov edx, DWORD PTR 24[edi] | ||
| 580 | add ecx, eax | ||
| 581 | mov eax, 0 | ||
| 582 | adc eax, eax | ||
| 583 | add ecx, edx | ||
| 584 | adc eax, 0 | ||
| 585 | mov DWORD PTR 24[ebx],ecx | ||
| 586 | ; Round 7 | ||
| 587 | mov ecx, DWORD PTR 28[esi] | ||
| 588 | mov edx, DWORD PTR 28[edi] | ||
| 589 | add ecx, eax | ||
| 590 | mov eax, 0 | ||
| 591 | adc eax, eax | ||
| 592 | add ecx, edx | ||
| 593 | adc eax, 0 | ||
| 594 | mov DWORD PTR 28[ebx],ecx | ||
| 595 | ; | ||
| 596 | add esi, 32 | ||
| 597 | add edi, 32 | ||
| 598 | add ebx, 32 | ||
| 599 | sub ebp, 8 | ||
| 600 | jnz L012aw_loop | ||
| 601 | $L011aw_finish: | ||
| 602 | mov ebp, DWORD PTR 32[esp] | ||
| 603 | and ebp, 7 | ||
| 604 | jz $L013aw_end | ||
| 605 | ; Tail Round 0 | ||
| 606 | mov ecx, DWORD PTR [esi] | ||
| 607 | mov edx, DWORD PTR [edi] | ||
| 608 | add ecx, eax | ||
| 609 | mov eax, 0 | ||
| 610 | adc eax, eax | ||
| 611 | add ecx, edx | ||
| 612 | adc eax, 0 | ||
| 613 | dec ebp | ||
| 614 | mov DWORD PTR [ebx],ecx | ||
| 615 | jz $L013aw_end | ||
| 616 | ; Tail Round 1 | ||
| 617 | mov ecx, DWORD PTR 4[esi] | ||
| 618 | mov edx, DWORD PTR 4[edi] | ||
| 619 | add ecx, eax | ||
| 620 | mov eax, 0 | ||
| 621 | adc eax, eax | ||
| 622 | add ecx, edx | ||
| 623 | adc eax, 0 | ||
| 624 | dec ebp | ||
| 625 | mov DWORD PTR 4[ebx],ecx | ||
| 626 | jz $L013aw_end | ||
| 627 | ; Tail Round 2 | ||
| 628 | mov ecx, DWORD PTR 8[esi] | ||
| 629 | mov edx, DWORD PTR 8[edi] | ||
| 630 | add ecx, eax | ||
| 631 | mov eax, 0 | ||
| 632 | adc eax, eax | ||
| 633 | add ecx, edx | ||
| 634 | adc eax, 0 | ||
| 635 | dec ebp | ||
| 636 | mov DWORD PTR 8[ebx],ecx | ||
| 637 | jz $L013aw_end | ||
| 638 | ; Tail Round 3 | ||
| 639 | mov ecx, DWORD PTR 12[esi] | ||
| 640 | mov edx, DWORD PTR 12[edi] | ||
| 641 | add ecx, eax | ||
| 642 | mov eax, 0 | ||
| 643 | adc eax, eax | ||
| 644 | add ecx, edx | ||
| 645 | adc eax, 0 | ||
| 646 | dec ebp | ||
| 647 | mov DWORD PTR 12[ebx],ecx | ||
| 648 | jz $L013aw_end | ||
| 649 | ; Tail Round 4 | ||
| 650 | mov ecx, DWORD PTR 16[esi] | ||
| 651 | mov edx, DWORD PTR 16[edi] | ||
| 652 | add ecx, eax | ||
| 653 | mov eax, 0 | ||
| 654 | adc eax, eax | ||
| 655 | add ecx, edx | ||
| 656 | adc eax, 0 | ||
| 657 | dec ebp | ||
| 658 | mov DWORD PTR 16[ebx],ecx | ||
| 659 | jz $L013aw_end | ||
| 660 | ; Tail Round 5 | ||
| 661 | mov ecx, DWORD PTR 20[esi] | ||
| 662 | mov edx, DWORD PTR 20[edi] | ||
| 663 | add ecx, eax | ||
| 664 | mov eax, 0 | ||
| 665 | adc eax, eax | ||
| 666 | add ecx, edx | ||
| 667 | adc eax, 0 | ||
| 668 | dec ebp | ||
| 669 | mov DWORD PTR 20[ebx],ecx | ||
| 670 | jz $L013aw_end | ||
| 671 | ; Tail Round 6 | ||
| 672 | mov ecx, DWORD PTR 24[esi] | ||
| 673 | mov edx, DWORD PTR 24[edi] | ||
| 674 | add ecx, eax | ||
| 675 | mov eax, 0 | ||
| 676 | adc eax, eax | ||
| 677 | add ecx, edx | ||
| 678 | adc eax, 0 | ||
| 679 | mov DWORD PTR 24[ebx],ecx | ||
| 680 | $L013aw_end: | ||
| 681 | mov eax, eax | ||
| 682 | pop edi | ||
| 683 | pop esi | ||
| 684 | pop ebx | ||
| 685 | pop ebp | ||
| 686 | ret | ||
| 687 | _bn_add_words ENDP | ||
| 688 | _TEXT ENDS | ||
| 689 | END | ||
diff --git a/src/lib/libssl/src/crypto/bn/asm/bn86unix.cpp b/src/lib/libssl/src/crypto/bn/asm/bn86unix.cpp new file mode 100644 index 0000000000..64702201ea --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/asm/bn86unix.cpp | |||
| @@ -0,0 +1,752 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define bn_mul_add_words _bn_mul_add_words | ||
| 13 | #define bn_mul_words _bn_mul_words | ||
| 14 | #define bn_sqr_words _bn_sqr_words | ||
| 15 | #define bn_div64 _bn_div64 | ||
| 16 | #define bn_add_words _bn_add_words | ||
| 17 | |||
| 18 | #endif | ||
| 19 | |||
| 20 | #ifdef OUT | ||
| 21 | #define OK 1 | ||
| 22 | #define ALIGN 4 | ||
| 23 | #endif | ||
| 24 | |||
| 25 | #ifdef BSDI | ||
| 26 | #define OK 1 | ||
| 27 | #define ALIGN 4 | ||
| 28 | #undef SIZE | ||
| 29 | #undef TYPE | ||
| 30 | #define SIZE(a,b) | ||
| 31 | #define TYPE(a,b) | ||
| 32 | #endif | ||
| 33 | |||
| 34 | #if defined(ELF) || defined(SOL) | ||
| 35 | #define OK 1 | ||
| 36 | #define ALIGN 16 | ||
| 37 | #endif | ||
| 38 | |||
| 39 | #ifndef OK | ||
| 40 | You need to define one of | ||
| 41 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 42 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 43 | SOL - solaris systems, which are elf with strange comment lines | ||
| 44 | BSDI - a.out with a very primative version of as. | ||
| 45 | #endif | ||
| 46 | |||
| 47 | /* Let the Assembler begin :-) */ | ||
| 48 | /* Don't even think of reading this code */ | ||
| 49 | /* It was automatically generated by bn-586.pl */ | ||
| 50 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 51 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 52 | /* eric <eay@cryptsoft.com> */ | ||
| 53 | |||
| 54 | .file "bn-586.s" | ||
| 55 | .version "01.01" | ||
| 56 | gcc2_compiled.: | ||
| 57 | .text | ||
| 58 | .align ALIGN | ||
| 59 | .globl bn_mul_add_words | ||
| 60 | TYPE(bn_mul_add_words,@function) | ||
| 61 | bn_mul_add_words: | ||
| 62 | pushl %ebp | ||
| 63 | pushl %ebx | ||
| 64 | pushl %esi | ||
| 65 | pushl %edi | ||
| 66 | |||
| 67 | |||
| 68 | xorl %esi, %esi | ||
| 69 | movl 20(%esp), %edi | ||
| 70 | movl 28(%esp), %ecx | ||
| 71 | movl 24(%esp), %ebx | ||
| 72 | andl $4294967288, %ecx | ||
| 73 | movl 32(%esp), %ebp | ||
| 74 | pushl %ecx | ||
| 75 | jz .L000maw_finish | ||
| 76 | .L001maw_loop: | ||
| 77 | movl %ecx, (%esp) | ||
| 78 | /* Round 0 */ | ||
| 79 | movl (%ebx), %eax | ||
| 80 | mull %ebp | ||
| 81 | addl %esi, %eax | ||
| 82 | movl (%edi), %esi | ||
| 83 | adcl $0, %edx | ||
| 84 | addl %esi, %eax | ||
| 85 | adcl $0, %edx | ||
| 86 | movl %eax, (%edi) | ||
| 87 | movl %edx, %esi | ||
| 88 | /* Round 4 */ | ||
| 89 | movl 4(%ebx), %eax | ||
| 90 | mull %ebp | ||
| 91 | addl %esi, %eax | ||
| 92 | movl 4(%edi), %esi | ||
| 93 | adcl $0, %edx | ||
| 94 | addl %esi, %eax | ||
| 95 | adcl $0, %edx | ||
| 96 | movl %eax, 4(%edi) | ||
| 97 | movl %edx, %esi | ||
| 98 | /* Round 8 */ | ||
| 99 | movl 8(%ebx), %eax | ||
| 100 | mull %ebp | ||
| 101 | addl %esi, %eax | ||
| 102 | movl 8(%edi), %esi | ||
| 103 | adcl $0, %edx | ||
| 104 | addl %esi, %eax | ||
| 105 | adcl $0, %edx | ||
| 106 | movl %eax, 8(%edi) | ||
| 107 | movl %edx, %esi | ||
| 108 | /* Round 12 */ | ||
| 109 | movl 12(%ebx), %eax | ||
| 110 | mull %ebp | ||
| 111 | addl %esi, %eax | ||
| 112 | movl 12(%edi), %esi | ||
| 113 | adcl $0, %edx | ||
| 114 | addl %esi, %eax | ||
| 115 | adcl $0, %edx | ||
| 116 | movl %eax, 12(%edi) | ||
| 117 | movl %edx, %esi | ||
| 118 | /* Round 16 */ | ||
| 119 | movl 16(%ebx), %eax | ||
| 120 | mull %ebp | ||
| 121 | addl %esi, %eax | ||
| 122 | movl 16(%edi), %esi | ||
| 123 | adcl $0, %edx | ||
| 124 | addl %esi, %eax | ||
| 125 | adcl $0, %edx | ||
| 126 | movl %eax, 16(%edi) | ||
| 127 | movl %edx, %esi | ||
| 128 | /* Round 20 */ | ||
| 129 | movl 20(%ebx), %eax | ||
| 130 | mull %ebp | ||
| 131 | addl %esi, %eax | ||
| 132 | movl 20(%edi), %esi | ||
| 133 | adcl $0, %edx | ||
| 134 | addl %esi, %eax | ||
| 135 | adcl $0, %edx | ||
| 136 | movl %eax, 20(%edi) | ||
| 137 | movl %edx, %esi | ||
| 138 | /* Round 24 */ | ||
| 139 | movl 24(%ebx), %eax | ||
| 140 | mull %ebp | ||
| 141 | addl %esi, %eax | ||
| 142 | movl 24(%edi), %esi | ||
| 143 | adcl $0, %edx | ||
| 144 | addl %esi, %eax | ||
| 145 | adcl $0, %edx | ||
| 146 | movl %eax, 24(%edi) | ||
| 147 | movl %edx, %esi | ||
| 148 | /* Round 28 */ | ||
| 149 | movl 28(%ebx), %eax | ||
| 150 | mull %ebp | ||
| 151 | addl %esi, %eax | ||
| 152 | movl 28(%edi), %esi | ||
| 153 | adcl $0, %edx | ||
| 154 | addl %esi, %eax | ||
| 155 | adcl $0, %edx | ||
| 156 | movl %eax, 28(%edi) | ||
| 157 | movl %edx, %esi | ||
| 158 | |||
| 159 | movl (%esp), %ecx | ||
| 160 | addl $32, %ebx | ||
| 161 | addl $32, %edi | ||
| 162 | subl $8, %ecx | ||
| 163 | jnz .L001maw_loop | ||
| 164 | .L000maw_finish: | ||
| 165 | movl 32(%esp), %ecx | ||
| 166 | andl $7, %ecx | ||
| 167 | jnz .L002maw_finish2 | ||
| 168 | jmp .L003maw_end | ||
| 169 | .align ALIGN | ||
| 170 | .L002maw_finish2: | ||
| 171 | /* Tail Round 0 */ | ||
| 172 | movl (%ebx), %eax | ||
| 173 | mull %ebp | ||
| 174 | addl %esi, %eax | ||
| 175 | movl (%edi), %esi | ||
| 176 | adcl $0, %edx | ||
| 177 | addl %esi, %eax | ||
| 178 | adcl $0, %edx | ||
| 179 | decl %ecx | ||
| 180 | movl %eax, (%edi) | ||
| 181 | movl %edx, %esi | ||
| 182 | jz .L003maw_end | ||
| 183 | /* Tail Round 1 */ | ||
| 184 | movl 4(%ebx), %eax | ||
| 185 | mull %ebp | ||
| 186 | addl %esi, %eax | ||
| 187 | movl 4(%edi), %esi | ||
| 188 | adcl $0, %edx | ||
| 189 | addl %esi, %eax | ||
| 190 | adcl $0, %edx | ||
| 191 | decl %ecx | ||
| 192 | movl %eax, 4(%edi) | ||
| 193 | movl %edx, %esi | ||
| 194 | jz .L003maw_end | ||
| 195 | /* Tail Round 2 */ | ||
| 196 | movl 8(%ebx), %eax | ||
| 197 | mull %ebp | ||
| 198 | addl %esi, %eax | ||
| 199 | movl 8(%edi), %esi | ||
| 200 | adcl $0, %edx | ||
| 201 | addl %esi, %eax | ||
| 202 | adcl $0, %edx | ||
| 203 | decl %ecx | ||
| 204 | movl %eax, 8(%edi) | ||
| 205 | movl %edx, %esi | ||
| 206 | jz .L003maw_end | ||
| 207 | /* Tail Round 3 */ | ||
| 208 | movl 12(%ebx), %eax | ||
| 209 | mull %ebp | ||
| 210 | addl %esi, %eax | ||
| 211 | movl 12(%edi), %esi | ||
| 212 | adcl $0, %edx | ||
| 213 | addl %esi, %eax | ||
| 214 | adcl $0, %edx | ||
| 215 | decl %ecx | ||
| 216 | movl %eax, 12(%edi) | ||
| 217 | movl %edx, %esi | ||
| 218 | jz .L003maw_end | ||
| 219 | /* Tail Round 4 */ | ||
| 220 | movl 16(%ebx), %eax | ||
| 221 | mull %ebp | ||
| 222 | addl %esi, %eax | ||
| 223 | movl 16(%edi), %esi | ||
| 224 | adcl $0, %edx | ||
| 225 | addl %esi, %eax | ||
| 226 | adcl $0, %edx | ||
| 227 | decl %ecx | ||
| 228 | movl %eax, 16(%edi) | ||
| 229 | movl %edx, %esi | ||
| 230 | jz .L003maw_end | ||
| 231 | /* Tail Round 5 */ | ||
| 232 | movl 20(%ebx), %eax | ||
| 233 | mull %ebp | ||
| 234 | addl %esi, %eax | ||
| 235 | movl 20(%edi), %esi | ||
| 236 | adcl $0, %edx | ||
| 237 | addl %esi, %eax | ||
| 238 | adcl $0, %edx | ||
| 239 | decl %ecx | ||
| 240 | movl %eax, 20(%edi) | ||
| 241 | movl %edx, %esi | ||
| 242 | jz .L003maw_end | ||
| 243 | /* Tail Round 6 */ | ||
| 244 | movl 24(%ebx), %eax | ||
| 245 | mull %ebp | ||
| 246 | addl %esi, %eax | ||
| 247 | movl 24(%edi), %esi | ||
| 248 | adcl $0, %edx | ||
| 249 | addl %esi, %eax | ||
| 250 | adcl $0, %edx | ||
| 251 | movl %eax, 24(%edi) | ||
| 252 | movl %edx, %esi | ||
| 253 | .L003maw_end: | ||
| 254 | movl %esi, %eax | ||
| 255 | popl %ecx | ||
| 256 | popl %edi | ||
| 257 | popl %esi | ||
| 258 | popl %ebx | ||
| 259 | popl %ebp | ||
| 260 | ret | ||
| 261 | .bn_mul_add_words_end: | ||
| 262 | SIZE(bn_mul_add_words,.bn_mul_add_words_end-bn_mul_add_words) | ||
| 263 | .ident "bn_mul_add_words" | ||
| 264 | .text | ||
| 265 | .align ALIGN | ||
| 266 | .globl bn_mul_words | ||
| 267 | TYPE(bn_mul_words,@function) | ||
| 268 | bn_mul_words: | ||
| 269 | pushl %ebp | ||
| 270 | pushl %ebx | ||
| 271 | pushl %esi | ||
| 272 | pushl %edi | ||
| 273 | |||
| 274 | |||
| 275 | xorl %esi, %esi | ||
| 276 | movl 20(%esp), %edi | ||
| 277 | movl 24(%esp), %ebx | ||
| 278 | movl 28(%esp), %ebp | ||
| 279 | movl 32(%esp), %ecx | ||
| 280 | andl $4294967288, %ebp | ||
| 281 | jz .L004mw_finish | ||
| 282 | .L005mw_loop: | ||
| 283 | /* Round 0 */ | ||
| 284 | movl (%ebx), %eax | ||
| 285 | mull %ecx | ||
| 286 | addl %esi, %eax | ||
| 287 | adcl $0, %edx | ||
| 288 | movl %eax, (%edi) | ||
| 289 | movl %edx, %esi | ||
| 290 | /* Round 4 */ | ||
| 291 | movl 4(%ebx), %eax | ||
| 292 | mull %ecx | ||
| 293 | addl %esi, %eax | ||
| 294 | adcl $0, %edx | ||
| 295 | movl %eax, 4(%edi) | ||
| 296 | movl %edx, %esi | ||
| 297 | /* Round 8 */ | ||
| 298 | movl 8(%ebx), %eax | ||
| 299 | mull %ecx | ||
| 300 | addl %esi, %eax | ||
| 301 | adcl $0, %edx | ||
| 302 | movl %eax, 8(%edi) | ||
| 303 | movl %edx, %esi | ||
| 304 | /* Round 12 */ | ||
| 305 | movl 12(%ebx), %eax | ||
| 306 | mull %ecx | ||
| 307 | addl %esi, %eax | ||
| 308 | adcl $0, %edx | ||
| 309 | movl %eax, 12(%edi) | ||
| 310 | movl %edx, %esi | ||
| 311 | /* Round 16 */ | ||
| 312 | movl 16(%ebx), %eax | ||
| 313 | mull %ecx | ||
| 314 | addl %esi, %eax | ||
| 315 | adcl $0, %edx | ||
| 316 | movl %eax, 16(%edi) | ||
| 317 | movl %edx, %esi | ||
| 318 | /* Round 20 */ | ||
| 319 | movl 20(%ebx), %eax | ||
| 320 | mull %ecx | ||
| 321 | addl %esi, %eax | ||
| 322 | adcl $0, %edx | ||
| 323 | movl %eax, 20(%edi) | ||
| 324 | movl %edx, %esi | ||
| 325 | /* Round 24 */ | ||
| 326 | movl 24(%ebx), %eax | ||
| 327 | mull %ecx | ||
| 328 | addl %esi, %eax | ||
| 329 | adcl $0, %edx | ||
| 330 | movl %eax, 24(%edi) | ||
| 331 | movl %edx, %esi | ||
| 332 | /* Round 28 */ | ||
| 333 | movl 28(%ebx), %eax | ||
| 334 | mull %ecx | ||
| 335 | addl %esi, %eax | ||
| 336 | adcl $0, %edx | ||
| 337 | movl %eax, 28(%edi) | ||
| 338 | movl %edx, %esi | ||
| 339 | |||
| 340 | addl $32, %ebx | ||
| 341 | addl $32, %edi | ||
| 342 | subl $8, %ebp | ||
| 343 | jz .L004mw_finish | ||
| 344 | jmp .L005mw_loop | ||
| 345 | .L004mw_finish: | ||
| 346 | movl 28(%esp), %ebp | ||
| 347 | andl $7, %ebp | ||
| 348 | jnz .L006mw_finish2 | ||
| 349 | jmp .L007mw_end | ||
| 350 | .align ALIGN | ||
| 351 | .L006mw_finish2: | ||
| 352 | /* Tail Round 0 */ | ||
| 353 | movl (%ebx), %eax | ||
| 354 | mull %ecx | ||
| 355 | addl %esi, %eax | ||
| 356 | adcl $0, %edx | ||
| 357 | movl %eax, (%edi) | ||
| 358 | movl %edx, %esi | ||
| 359 | decl %ebp | ||
| 360 | jz .L007mw_end | ||
| 361 | /* Tail Round 1 */ | ||
| 362 | movl 4(%ebx), %eax | ||
| 363 | mull %ecx | ||
| 364 | addl %esi, %eax | ||
| 365 | adcl $0, %edx | ||
| 366 | movl %eax, 4(%edi) | ||
| 367 | movl %edx, %esi | ||
| 368 | decl %ebp | ||
| 369 | jz .L007mw_end | ||
| 370 | /* Tail Round 2 */ | ||
| 371 | movl 8(%ebx), %eax | ||
| 372 | mull %ecx | ||
| 373 | addl %esi, %eax | ||
| 374 | adcl $0, %edx | ||
| 375 | movl %eax, 8(%edi) | ||
| 376 | movl %edx, %esi | ||
| 377 | decl %ebp | ||
| 378 | jz .L007mw_end | ||
| 379 | /* Tail Round 3 */ | ||
| 380 | movl 12(%ebx), %eax | ||
| 381 | mull %ecx | ||
| 382 | addl %esi, %eax | ||
| 383 | adcl $0, %edx | ||
| 384 | movl %eax, 12(%edi) | ||
| 385 | movl %edx, %esi | ||
| 386 | decl %ebp | ||
| 387 | jz .L007mw_end | ||
| 388 | /* Tail Round 4 */ | ||
| 389 | movl 16(%ebx), %eax | ||
| 390 | mull %ecx | ||
| 391 | addl %esi, %eax | ||
| 392 | adcl $0, %edx | ||
| 393 | movl %eax, 16(%edi) | ||
| 394 | movl %edx, %esi | ||
| 395 | decl %ebp | ||
| 396 | jz .L007mw_end | ||
| 397 | /* Tail Round 5 */ | ||
| 398 | movl 20(%ebx), %eax | ||
| 399 | mull %ecx | ||
| 400 | addl %esi, %eax | ||
| 401 | adcl $0, %edx | ||
| 402 | movl %eax, 20(%edi) | ||
| 403 | movl %edx, %esi | ||
| 404 | decl %ebp | ||
| 405 | jz .L007mw_end | ||
| 406 | /* Tail Round 6 */ | ||
| 407 | movl 24(%ebx), %eax | ||
| 408 | mull %ecx | ||
| 409 | addl %esi, %eax | ||
| 410 | adcl $0, %edx | ||
| 411 | movl %eax, 24(%edi) | ||
| 412 | movl %edx, %esi | ||
| 413 | .L007mw_end: | ||
| 414 | movl %esi, %eax | ||
| 415 | popl %edi | ||
| 416 | popl %esi | ||
| 417 | popl %ebx | ||
| 418 | popl %ebp | ||
| 419 | ret | ||
| 420 | .bn_mul_words_end: | ||
| 421 | SIZE(bn_mul_words,.bn_mul_words_end-bn_mul_words) | ||
| 422 | .ident "bn_mul_words" | ||
| 423 | .text | ||
| 424 | .align ALIGN | ||
| 425 | .globl bn_sqr_words | ||
| 426 | TYPE(bn_sqr_words,@function) | ||
| 427 | bn_sqr_words: | ||
| 428 | pushl %ebp | ||
| 429 | pushl %ebx | ||
| 430 | pushl %esi | ||
| 431 | pushl %edi | ||
| 432 | |||
| 433 | |||
| 434 | movl 20(%esp), %esi | ||
| 435 | movl 24(%esp), %edi | ||
| 436 | movl 28(%esp), %ebx | ||
| 437 | andl $4294967288, %ebx | ||
| 438 | jz .L008sw_finish | ||
| 439 | .L009sw_loop: | ||
| 440 | /* Round 0 */ | ||
| 441 | movl (%edi), %eax | ||
| 442 | mull %eax | ||
| 443 | movl %eax, (%esi) | ||
| 444 | movl %edx, 4(%esi) | ||
| 445 | /* Round 4 */ | ||
| 446 | movl 4(%edi), %eax | ||
| 447 | mull %eax | ||
| 448 | movl %eax, 8(%esi) | ||
| 449 | movl %edx, 12(%esi) | ||
| 450 | /* Round 8 */ | ||
| 451 | movl 8(%edi), %eax | ||
| 452 | mull %eax | ||
| 453 | movl %eax, 16(%esi) | ||
| 454 | movl %edx, 20(%esi) | ||
| 455 | /* Round 12 */ | ||
| 456 | movl 12(%edi), %eax | ||
| 457 | mull %eax | ||
| 458 | movl %eax, 24(%esi) | ||
| 459 | movl %edx, 28(%esi) | ||
| 460 | /* Round 16 */ | ||
| 461 | movl 16(%edi), %eax | ||
| 462 | mull %eax | ||
| 463 | movl %eax, 32(%esi) | ||
| 464 | movl %edx, 36(%esi) | ||
| 465 | /* Round 20 */ | ||
| 466 | movl 20(%edi), %eax | ||
| 467 | mull %eax | ||
| 468 | movl %eax, 40(%esi) | ||
| 469 | movl %edx, 44(%esi) | ||
| 470 | /* Round 24 */ | ||
| 471 | movl 24(%edi), %eax | ||
| 472 | mull %eax | ||
| 473 | movl %eax, 48(%esi) | ||
| 474 | movl %edx, 52(%esi) | ||
| 475 | /* Round 28 */ | ||
| 476 | movl 28(%edi), %eax | ||
| 477 | mull %eax | ||
| 478 | movl %eax, 56(%esi) | ||
| 479 | movl %edx, 60(%esi) | ||
| 480 | |||
| 481 | addl $32, %edi | ||
| 482 | addl $64, %esi | ||
| 483 | subl $8, %ebx | ||
| 484 | jnz .L009sw_loop | ||
| 485 | .L008sw_finish: | ||
| 486 | movl 28(%esp), %ebx | ||
| 487 | andl $7, %ebx | ||
| 488 | jz .L010sw_end | ||
| 489 | /* Tail Round 0 */ | ||
| 490 | movl (%edi), %eax | ||
| 491 | mull %eax | ||
| 492 | movl %eax, (%esi) | ||
| 493 | decl %ebx | ||
| 494 | movl %edx, 4(%esi) | ||
| 495 | jz .L010sw_end | ||
| 496 | /* Tail Round 1 */ | ||
| 497 | movl 4(%edi), %eax | ||
| 498 | mull %eax | ||
| 499 | movl %eax, 8(%esi) | ||
| 500 | decl %ebx | ||
| 501 | movl %edx, 12(%esi) | ||
| 502 | jz .L010sw_end | ||
| 503 | /* Tail Round 2 */ | ||
| 504 | movl 8(%edi), %eax | ||
| 505 | mull %eax | ||
| 506 | movl %eax, 16(%esi) | ||
| 507 | decl %ebx | ||
| 508 | movl %edx, 20(%esi) | ||
| 509 | jz .L010sw_end | ||
| 510 | /* Tail Round 3 */ | ||
| 511 | movl 12(%edi), %eax | ||
| 512 | mull %eax | ||
| 513 | movl %eax, 24(%esi) | ||
| 514 | decl %ebx | ||
| 515 | movl %edx, 28(%esi) | ||
| 516 | jz .L010sw_end | ||
| 517 | /* Tail Round 4 */ | ||
| 518 | movl 16(%edi), %eax | ||
| 519 | mull %eax | ||
| 520 | movl %eax, 32(%esi) | ||
| 521 | decl %ebx | ||
| 522 | movl %edx, 36(%esi) | ||
| 523 | jz .L010sw_end | ||
| 524 | /* Tail Round 5 */ | ||
| 525 | movl 20(%edi), %eax | ||
| 526 | mull %eax | ||
| 527 | movl %eax, 40(%esi) | ||
| 528 | decl %ebx | ||
| 529 | movl %edx, 44(%esi) | ||
| 530 | jz .L010sw_end | ||
| 531 | /* Tail Round 6 */ | ||
| 532 | movl 24(%edi), %eax | ||
| 533 | mull %eax | ||
| 534 | movl %eax, 48(%esi) | ||
| 535 | movl %edx, 52(%esi) | ||
| 536 | .L010sw_end: | ||
| 537 | popl %edi | ||
| 538 | popl %esi | ||
| 539 | popl %ebx | ||
| 540 | popl %ebp | ||
| 541 | ret | ||
| 542 | .bn_sqr_words_end: | ||
| 543 | SIZE(bn_sqr_words,.bn_sqr_words_end-bn_sqr_words) | ||
| 544 | .ident "bn_sqr_words" | ||
| 545 | .text | ||
| 546 | .align ALIGN | ||
| 547 | .globl bn_div64 | ||
| 548 | TYPE(bn_div64,@function) | ||
| 549 | bn_div64: | ||
| 550 | pushl %ebp | ||
| 551 | pushl %ebx | ||
| 552 | pushl %esi | ||
| 553 | pushl %edi | ||
| 554 | |||
| 555 | movl 20(%esp), %edx | ||
| 556 | movl 24(%esp), %eax | ||
| 557 | movl 28(%esp), %ebx | ||
| 558 | divl %ebx | ||
| 559 | popl %edi | ||
| 560 | popl %esi | ||
| 561 | popl %ebx | ||
| 562 | popl %ebp | ||
| 563 | ret | ||
| 564 | .bn_div64_end: | ||
| 565 | SIZE(bn_div64,.bn_div64_end-bn_div64) | ||
| 566 | .ident "bn_div64" | ||
| 567 | .text | ||
| 568 | .align ALIGN | ||
| 569 | .globl bn_add_words | ||
| 570 | TYPE(bn_add_words,@function) | ||
| 571 | bn_add_words: | ||
| 572 | pushl %ebp | ||
| 573 | pushl %ebx | ||
| 574 | pushl %esi | ||
| 575 | pushl %edi | ||
| 576 | |||
| 577 | |||
| 578 | movl 20(%esp), %ebx | ||
| 579 | movl 24(%esp), %esi | ||
| 580 | movl 28(%esp), %edi | ||
| 581 | movl 32(%esp), %ebp | ||
| 582 | xorl %eax, %eax | ||
| 583 | andl $4294967288, %ebp | ||
| 584 | jz .L011aw_finish | ||
| 585 | .L012aw_loop: | ||
| 586 | /* Round 0 */ | ||
| 587 | movl (%esi), %ecx | ||
| 588 | movl (%edi), %edx | ||
| 589 | addl %eax, %ecx | ||
| 590 | movl $0, %eax | ||
| 591 | adcl %eax, %eax | ||
| 592 | addl %edx, %ecx | ||
| 593 | adcl $0, %eax | ||
| 594 | movl %ecx, (%ebx) | ||
| 595 | /* Round 1 */ | ||
| 596 | movl 4(%esi), %ecx | ||
| 597 | movl 4(%edi), %edx | ||
| 598 | addl %eax, %ecx | ||
| 599 | movl $0, %eax | ||
| 600 | adcl %eax, %eax | ||
| 601 | addl %edx, %ecx | ||
| 602 | adcl $0, %eax | ||
| 603 | movl %ecx, 4(%ebx) | ||
| 604 | /* Round 2 */ | ||
| 605 | movl 8(%esi), %ecx | ||
| 606 | movl 8(%edi), %edx | ||
| 607 | addl %eax, %ecx | ||
| 608 | movl $0, %eax | ||
| 609 | adcl %eax, %eax | ||
| 610 | addl %edx, %ecx | ||
| 611 | adcl $0, %eax | ||
| 612 | movl %ecx, 8(%ebx) | ||
| 613 | /* Round 3 */ | ||
| 614 | movl 12(%esi), %ecx | ||
| 615 | movl 12(%edi), %edx | ||
| 616 | addl %eax, %ecx | ||
| 617 | movl $0, %eax | ||
| 618 | adcl %eax, %eax | ||
| 619 | addl %edx, %ecx | ||
| 620 | adcl $0, %eax | ||
| 621 | movl %ecx, 12(%ebx) | ||
| 622 | /* Round 4 */ | ||
| 623 | movl 16(%esi), %ecx | ||
| 624 | movl 16(%edi), %edx | ||
| 625 | addl %eax, %ecx | ||
| 626 | movl $0, %eax | ||
| 627 | adcl %eax, %eax | ||
| 628 | addl %edx, %ecx | ||
| 629 | adcl $0, %eax | ||
| 630 | movl %ecx, 16(%ebx) | ||
| 631 | /* Round 5 */ | ||
| 632 | movl 20(%esi), %ecx | ||
| 633 | movl 20(%edi), %edx | ||
| 634 | addl %eax, %ecx | ||
| 635 | movl $0, %eax | ||
| 636 | adcl %eax, %eax | ||
| 637 | addl %edx, %ecx | ||
| 638 | adcl $0, %eax | ||
| 639 | movl %ecx, 20(%ebx) | ||
| 640 | /* Round 6 */ | ||
| 641 | movl 24(%esi), %ecx | ||
| 642 | movl 24(%edi), %edx | ||
| 643 | addl %eax, %ecx | ||
| 644 | movl $0, %eax | ||
| 645 | adcl %eax, %eax | ||
| 646 | addl %edx, %ecx | ||
| 647 | adcl $0, %eax | ||
| 648 | movl %ecx, 24(%ebx) | ||
| 649 | /* Round 7 */ | ||
| 650 | movl 28(%esi), %ecx | ||
| 651 | movl 28(%edi), %edx | ||
| 652 | addl %eax, %ecx | ||
| 653 | movl $0, %eax | ||
| 654 | adcl %eax, %eax | ||
| 655 | addl %edx, %ecx | ||
| 656 | adcl $0, %eax | ||
| 657 | movl %ecx, 28(%ebx) | ||
| 658 | |||
| 659 | addl $32, %esi | ||
| 660 | addl $32, %edi | ||
| 661 | addl $32, %ebx | ||
| 662 | subl $8, %ebp | ||
| 663 | jnz .L012aw_loop | ||
| 664 | .L011aw_finish: | ||
| 665 | movl 32(%esp), %ebp | ||
| 666 | andl $7, %ebp | ||
| 667 | jz .L013aw_end | ||
| 668 | /* Tail Round 0 */ | ||
| 669 | movl (%esi), %ecx | ||
| 670 | movl (%edi), %edx | ||
| 671 | addl %eax, %ecx | ||
| 672 | movl $0, %eax | ||
| 673 | adcl %eax, %eax | ||
| 674 | addl %edx, %ecx | ||
| 675 | adcl $0, %eax | ||
| 676 | decl %ebp | ||
| 677 | movl %ecx, (%ebx) | ||
| 678 | jz .L013aw_end | ||
| 679 | /* Tail Round 1 */ | ||
| 680 | movl 4(%esi), %ecx | ||
| 681 | movl 4(%edi), %edx | ||
| 682 | addl %eax, %ecx | ||
| 683 | movl $0, %eax | ||
| 684 | adcl %eax, %eax | ||
| 685 | addl %edx, %ecx | ||
| 686 | adcl $0, %eax | ||
| 687 | decl %ebp | ||
| 688 | movl %ecx, 4(%ebx) | ||
| 689 | jz .L013aw_end | ||
| 690 | /* Tail Round 2 */ | ||
| 691 | movl 8(%esi), %ecx | ||
| 692 | movl 8(%edi), %edx | ||
| 693 | addl %eax, %ecx | ||
| 694 | movl $0, %eax | ||
| 695 | adcl %eax, %eax | ||
| 696 | addl %edx, %ecx | ||
| 697 | adcl $0, %eax | ||
| 698 | decl %ebp | ||
| 699 | movl %ecx, 8(%ebx) | ||
| 700 | jz .L013aw_end | ||
| 701 | /* Tail Round 3 */ | ||
| 702 | movl 12(%esi), %ecx | ||
| 703 | movl 12(%edi), %edx | ||
| 704 | addl %eax, %ecx | ||
| 705 | movl $0, %eax | ||
| 706 | adcl %eax, %eax | ||
| 707 | addl %edx, %ecx | ||
| 708 | adcl $0, %eax | ||
| 709 | decl %ebp | ||
| 710 | movl %ecx, 12(%ebx) | ||
| 711 | jz .L013aw_end | ||
| 712 | /* Tail Round 4 */ | ||
| 713 | movl 16(%esi), %ecx | ||
| 714 | movl 16(%edi), %edx | ||
| 715 | addl %eax, %ecx | ||
| 716 | movl $0, %eax | ||
| 717 | adcl %eax, %eax | ||
| 718 | addl %edx, %ecx | ||
| 719 | adcl $0, %eax | ||
| 720 | decl %ebp | ||
| 721 | movl %ecx, 16(%ebx) | ||
| 722 | jz .L013aw_end | ||
| 723 | /* Tail Round 5 */ | ||
| 724 | movl 20(%esi), %ecx | ||
| 725 | movl 20(%edi), %edx | ||
| 726 | addl %eax, %ecx | ||
| 727 | movl $0, %eax | ||
| 728 | adcl %eax, %eax | ||
| 729 | addl %edx, %ecx | ||
| 730 | adcl $0, %eax | ||
| 731 | decl %ebp | ||
| 732 | movl %ecx, 20(%ebx) | ||
| 733 | jz .L013aw_end | ||
| 734 | /* Tail Round 6 */ | ||
| 735 | movl 24(%esi), %ecx | ||
| 736 | movl 24(%edi), %edx | ||
| 737 | addl %eax, %ecx | ||
| 738 | movl $0, %eax | ||
| 739 | adcl %eax, %eax | ||
| 740 | addl %edx, %ecx | ||
| 741 | adcl $0, %eax | ||
| 742 | movl %ecx, 24(%ebx) | ||
| 743 | .L013aw_end: | ||
| 744 | movl %eax, %eax | ||
| 745 | popl %edi | ||
| 746 | popl %esi | ||
| 747 | popl %ebx | ||
| 748 | popl %ebp | ||
| 749 | ret | ||
| 750 | .bn_add_words_end: | ||
| 751 | SIZE(bn_add_words,.bn_add_words_end-bn_add_words) | ||
| 752 | .ident "bn_add_words" | ||
diff --git a/src/lib/libssl/src/crypto/bn/asm/sparc.s b/src/lib/libssl/src/crypto/bn/asm/sparc.s new file mode 100644 index 0000000000..f9e533caa8 --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/asm/sparc.s | |||
| @@ -0,0 +1,462 @@ | |||
| 1 | .file "bn_mulw.c" | ||
| 2 | gcc2_compiled.: | ||
| 3 | .section ".text" | ||
| 4 | .align 4 | ||
| 5 | .global bn_mul_add_words | ||
| 6 | .type bn_mul_add_words,#function | ||
| 7 | .proc 016 | ||
| 8 | bn_mul_add_words: | ||
| 9 | !#PROLOGUE# 0 | ||
| 10 | save %sp,-112,%sp | ||
| 11 | !#PROLOGUE# 1 | ||
| 12 | mov %i0,%o0 | ||
| 13 | mov %i1,%o2 | ||
| 14 | mov %i2,%g1 | ||
| 15 | mov %i3,%o1 | ||
| 16 | mov 0,%i4 | ||
| 17 | add %o0,12,%g4 | ||
| 18 | add %o2,12,%o7 | ||
| 19 | .LL2: | ||
| 20 | mov %i4,%i3 | ||
| 21 | mov 0,%i2 | ||
| 22 | ld [%o0],%g2 | ||
| 23 | mov %g2,%i1 | ||
| 24 | ld [%o2],%g2 | ||
| 25 | mov 0,%i0 | ||
| 26 | umul %o1,%g2,%g3 | ||
| 27 | rd %y,%g2 | ||
| 28 | addcc %g3,%i1,%g3 | ||
| 29 | addx %g2,%i0,%g2 | ||
| 30 | addcc %g3,%i3,%g3 | ||
| 31 | addx %g2,%i2,%g2 | ||
| 32 | st %g3,[%o0] | ||
| 33 | mov %g2,%i5 | ||
| 34 | mov 0,%i4 | ||
| 35 | addcc %g1,-1,%g1 | ||
| 36 | be .LL3 | ||
| 37 | mov %i5,%i4 | ||
| 38 | mov %i4,%i3 | ||
| 39 | mov 0,%i2 | ||
| 40 | ld [%g4-8],%g2 | ||
| 41 | mov %g2,%i1 | ||
| 42 | ld [%o7-8],%g2 | ||
| 43 | mov 0,%i0 | ||
| 44 | umul %o1,%g2,%g3 | ||
| 45 | rd %y,%g2 | ||
| 46 | addcc %g3,%i1,%g3 | ||
| 47 | addx %g2,%i0,%g2 | ||
| 48 | addcc %g3,%i3,%g3 | ||
| 49 | addx %g2,%i2,%g2 | ||
| 50 | st %g3,[%g4-8] | ||
| 51 | mov %g2,%i5 | ||
| 52 | mov 0,%i4 | ||
| 53 | addcc %g1,-1,%g1 | ||
| 54 | be .LL3 | ||
| 55 | mov %i5,%i4 | ||
| 56 | mov %i4,%i3 | ||
| 57 | mov 0,%i2 | ||
| 58 | ld [%g4-4],%g2 | ||
| 59 | mov %g2,%i1 | ||
| 60 | ld [%o7-4],%g2 | ||
| 61 | mov 0,%i0 | ||
| 62 | umul %o1,%g2,%g3 | ||
| 63 | rd %y,%g2 | ||
| 64 | addcc %g3,%i1,%g3 | ||
| 65 | addx %g2,%i0,%g2 | ||
| 66 | addcc %g3,%i3,%g3 | ||
| 67 | addx %g2,%i2,%g2 | ||
| 68 | st %g3,[%g4-4] | ||
| 69 | mov %g2,%i5 | ||
| 70 | mov 0,%i4 | ||
| 71 | addcc %g1,-1,%g1 | ||
| 72 | be .LL3 | ||
| 73 | mov %i5,%i4 | ||
| 74 | mov %i4,%i3 | ||
| 75 | mov 0,%i2 | ||
| 76 | ld [%g4],%g2 | ||
| 77 | mov %g2,%i1 | ||
| 78 | ld [%o7],%g2 | ||
| 79 | mov 0,%i0 | ||
| 80 | umul %o1,%g2,%g3 | ||
| 81 | rd %y,%g2 | ||
| 82 | addcc %g3,%i1,%g3 | ||
| 83 | addx %g2,%i0,%g2 | ||
| 84 | addcc %g3,%i3,%g3 | ||
| 85 | addx %g2,%i2,%g2 | ||
| 86 | st %g3,[%g4] | ||
| 87 | mov %g2,%i5 | ||
| 88 | mov 0,%i4 | ||
| 89 | addcc %g1,-1,%g1 | ||
| 90 | be .LL3 | ||
| 91 | mov %i5,%i4 | ||
| 92 | add %o7,16,%o7 | ||
| 93 | add %o2,16,%o2 | ||
| 94 | add %g4,16,%g4 | ||
| 95 | b .LL2 | ||
| 96 | add %o0,16,%o0 | ||
| 97 | .LL3: | ||
| 98 | ret | ||
| 99 | restore %g0,%i4,%o0 | ||
| 100 | .LLfe1: | ||
| 101 | .size bn_mul_add_words,.LLfe1-bn_mul_add_words | ||
| 102 | .align 4 | ||
| 103 | .global bn_mul_words | ||
| 104 | .type bn_mul_words,#function | ||
| 105 | .proc 016 | ||
| 106 | bn_mul_words: | ||
| 107 | !#PROLOGUE# 0 | ||
| 108 | save %sp,-112,%sp | ||
| 109 | !#PROLOGUE# 1 | ||
| 110 | mov %i0,%o7 | ||
| 111 | mov %i1,%o0 | ||
| 112 | mov %i2,%i4 | ||
| 113 | mov %i3,%g4 | ||
| 114 | mov 0,%i0 | ||
| 115 | add %o7,12,%g1 | ||
| 116 | add %o0,12,%i5 | ||
| 117 | .LL18: | ||
| 118 | mov %i0,%g3 | ||
| 119 | mov 0,%g2 | ||
| 120 | ld [%o0],%i2 | ||
| 121 | umul %g4,%i2,%i3 | ||
| 122 | rd %y,%i2 | ||
| 123 | addcc %i3,%g3,%i3 | ||
| 124 | addx %i2,%g2,%i2 | ||
| 125 | st %i3,[%o7] | ||
| 126 | mov %i2,%i1 | ||
| 127 | mov 0,%i0 | ||
| 128 | addcc %i4,-1,%i4 | ||
| 129 | be .LL19 | ||
| 130 | mov %i1,%i0 | ||
| 131 | mov %i0,%g3 | ||
| 132 | mov 0,%g2 | ||
| 133 | ld [%i5-8],%i2 | ||
| 134 | umul %g4,%i2,%i3 | ||
| 135 | rd %y,%i2 | ||
| 136 | addcc %i3,%g3,%i3 | ||
| 137 | addx %i2,%g2,%i2 | ||
| 138 | st %i3,[%g1-8] | ||
| 139 | mov %i2,%i1 | ||
| 140 | mov 0,%i0 | ||
| 141 | addcc %i4,-1,%i4 | ||
| 142 | be .LL19 | ||
| 143 | mov %i1,%i0 | ||
| 144 | mov %i0,%g3 | ||
| 145 | mov 0,%g2 | ||
| 146 | ld [%i5-4],%i2 | ||
| 147 | umul %g4,%i2,%i3 | ||
| 148 | rd %y,%i2 | ||
| 149 | addcc %i3,%g3,%i3 | ||
| 150 | addx %i2,%g2,%i2 | ||
| 151 | st %i3,[%g1-4] | ||
| 152 | mov %i2,%i1 | ||
| 153 | mov 0,%i0 | ||
| 154 | addcc %i4,-1,%i4 | ||
| 155 | be .LL19 | ||
| 156 | mov %i1,%i0 | ||
| 157 | mov %i0,%g3 | ||
| 158 | mov 0,%g2 | ||
| 159 | ld [%i5],%i2 | ||
| 160 | umul %g4,%i2,%i3 | ||
| 161 | rd %y,%i2 | ||
| 162 | addcc %i3,%g3,%i3 | ||
| 163 | addx %i2,%g2,%i2 | ||
| 164 | st %i3,[%g1] | ||
| 165 | mov %i2,%i1 | ||
| 166 | mov 0,%i0 | ||
| 167 | addcc %i4,-1,%i4 | ||
| 168 | be .LL19 | ||
| 169 | mov %i1,%i0 | ||
| 170 | add %i5,16,%i5 | ||
| 171 | add %o0,16,%o0 | ||
| 172 | add %g1,16,%g1 | ||
| 173 | b .LL18 | ||
| 174 | add %o7,16,%o7 | ||
| 175 | .LL19: | ||
| 176 | ret | ||
| 177 | restore | ||
| 178 | .LLfe2: | ||
| 179 | .size bn_mul_words,.LLfe2-bn_mul_words | ||
| 180 | .align 4 | ||
| 181 | .global bn_sqr_words | ||
| 182 | .type bn_sqr_words,#function | ||
| 183 | .proc 020 | ||
| 184 | bn_sqr_words: | ||
| 185 | !#PROLOGUE# 0 | ||
| 186 | !#PROLOGUE# 1 | ||
| 187 | mov %o0,%g4 | ||
| 188 | add %g4,28,%o3 | ||
| 189 | add %o1,12,%g1 | ||
| 190 | .LL34: | ||
| 191 | ld [%o1],%o0 | ||
| 192 | addcc %o2,-1,%o2 | ||
| 193 | umul %o0,%o0,%o5 | ||
| 194 | rd %y,%o4 | ||
| 195 | st %o5,[%g4] | ||
| 196 | mov %o4,%g3 | ||
| 197 | mov 0,%g2 | ||
| 198 | be .LL35 | ||
| 199 | st %g3,[%o3-24] | ||
| 200 | ld [%g1-8],%o0 | ||
| 201 | addcc %o2,-1,%o2 | ||
| 202 | umul %o0,%o0,%o5 | ||
| 203 | rd %y,%o4 | ||
| 204 | st %o5,[%o3-20] | ||
| 205 | mov %o4,%g3 | ||
| 206 | mov 0,%g2 | ||
| 207 | be .LL35 | ||
| 208 | st %g3,[%o3-16] | ||
| 209 | ld [%g1-4],%o0 | ||
| 210 | addcc %o2,-1,%o2 | ||
| 211 | umul %o0,%o0,%o5 | ||
| 212 | rd %y,%o4 | ||
| 213 | st %o5,[%o3-12] | ||
| 214 | mov %o4,%g3 | ||
| 215 | mov 0,%g2 | ||
| 216 | be .LL35 | ||
| 217 | st %g3,[%o3-8] | ||
| 218 | ld [%g1],%o0 | ||
| 219 | addcc %o2,-1,%o2 | ||
| 220 | umul %o0,%o0,%o5 | ||
| 221 | rd %y,%o4 | ||
| 222 | st %o5,[%o3-4] | ||
| 223 | mov %o4,%g3 | ||
| 224 | mov 0,%g2 | ||
| 225 | be .LL35 | ||
| 226 | st %g3,[%o3] | ||
| 227 | add %g1,16,%g1 | ||
| 228 | add %o1,16,%o1 | ||
| 229 | add %o3,32,%o3 | ||
| 230 | b .LL34 | ||
| 231 | add %g4,32,%g4 | ||
| 232 | .LL35: | ||
| 233 | retl | ||
| 234 | nop | ||
| 235 | .LLfe3: | ||
| 236 | .size bn_sqr_words,.LLfe3-bn_sqr_words | ||
| 237 | .align 4 | ||
| 238 | .global bn_add_words | ||
| 239 | .type bn_add_words,#function | ||
| 240 | .proc 016 | ||
| 241 | bn_add_words: | ||
| 242 | !#PROLOGUE# 0 | ||
| 243 | save %sp,-112,%sp | ||
| 244 | !#PROLOGUE# 1 | ||
| 245 | mov %i0,%o2 | ||
| 246 | mov %i1,%o3 | ||
| 247 | mov %i2,%o4 | ||
| 248 | mov %i3,%i5 | ||
| 249 | mov 0,%o0 | ||
| 250 | mov 0,%o1 | ||
| 251 | add %o2,12,%o7 | ||
| 252 | add %o4,12,%g4 | ||
| 253 | b .LL42 | ||
| 254 | add %o3,12,%g1 | ||
| 255 | .LL45: | ||
| 256 | add %i5,-1,%i5 | ||
| 257 | mov %i4,%g3 | ||
| 258 | ld [%g4-8],%i4 | ||
| 259 | mov 0,%g2 | ||
| 260 | mov %i4,%i1 | ||
| 261 | mov 0,%i0 | ||
| 262 | addcc %g3,%i1,%g3 | ||
| 263 | addx %g2,%i0,%g2 | ||
| 264 | addcc %o1,%g3,%o1 | ||
| 265 | addx %o0,%g2,%o0 | ||
| 266 | st %o1,[%o7-8] | ||
| 267 | mov %o0,%i3 | ||
| 268 | mov 0,%i2 | ||
| 269 | mov %i2,%o0 | ||
| 270 | mov %i3,%o1 | ||
| 271 | cmp %i5,0 | ||
| 272 | ble .LL43 | ||
| 273 | add %i5,-1,%i5 | ||
| 274 | ld [%g1-4],%i4 | ||
| 275 | mov %i4,%g3 | ||
| 276 | ld [%g4-4],%i4 | ||
| 277 | mov 0,%g2 | ||
| 278 | mov %i4,%i1 | ||
| 279 | mov 0,%i0 | ||
| 280 | addcc %g3,%i1,%g3 | ||
| 281 | addx %g2,%i0,%g2 | ||
| 282 | addcc %o1,%g3,%o1 | ||
| 283 | addx %o0,%g2,%o0 | ||
| 284 | st %o1,[%o7-4] | ||
| 285 | mov %o0,%i3 | ||
| 286 | mov 0,%i2 | ||
| 287 | mov %i2,%o0 | ||
| 288 | mov %i3,%o1 | ||
| 289 | cmp %i5,0 | ||
| 290 | ble .LL43 | ||
| 291 | add %i5,-1,%i5 | ||
| 292 | ld [%g1],%i4 | ||
| 293 | mov %i4,%g3 | ||
| 294 | ld [%g4],%i4 | ||
| 295 | mov 0,%g2 | ||
| 296 | mov %i4,%i1 | ||
| 297 | mov 0,%i0 | ||
| 298 | addcc %g3,%i1,%g3 | ||
| 299 | addx %g2,%i0,%g2 | ||
| 300 | addcc %o1,%g3,%o1 | ||
| 301 | addx %o0,%g2,%o0 | ||
| 302 | st %o1,[%o7] | ||
| 303 | mov %o0,%i3 | ||
| 304 | mov 0,%i2 | ||
| 305 | mov %i2,%o0 | ||
| 306 | mov %i3,%o1 | ||
| 307 | cmp %i5,0 | ||
| 308 | ble .LL43 | ||
| 309 | add %g1,16,%g1 | ||
| 310 | add %o3,16,%o3 | ||
| 311 | add %g4,16,%g4 | ||
| 312 | add %o4,16,%o4 | ||
| 313 | add %o7,16,%o7 | ||
| 314 | add %o2,16,%o2 | ||
| 315 | .LL42: | ||
| 316 | ld [%o3],%i4 | ||
| 317 | add %i5,-1,%i5 | ||
| 318 | mov %i4,%g3 | ||
| 319 | ld [%o4],%i4 | ||
| 320 | mov 0,%g2 | ||
| 321 | mov %i4,%i1 | ||
| 322 | mov 0,%i0 | ||
| 323 | addcc %g3,%i1,%g3 | ||
| 324 | addx %g2,%i0,%g2 | ||
| 325 | addcc %o1,%g3,%o1 | ||
| 326 | addx %o0,%g2,%o0 | ||
| 327 | st %o1,[%o2] | ||
| 328 | mov %o0,%i3 | ||
| 329 | mov 0,%i2 | ||
| 330 | mov %i2,%o0 | ||
| 331 | mov %i3,%o1 | ||
| 332 | cmp %i5,0 | ||
| 333 | bg,a .LL45 | ||
| 334 | ld [%g1-8],%i4 | ||
| 335 | .LL43: | ||
| 336 | ret | ||
| 337 | restore %g0,%o1,%o0 | ||
| 338 | .LLfe4: | ||
| 339 | .size bn_add_words,.LLfe4-bn_add_words | ||
| 340 | .section ".rodata" | ||
| 341 | .align 8 | ||
| 342 | .LLC0: | ||
| 343 | .asciz "Division would overflow (%d)\n" | ||
| 344 | .section ".text" | ||
| 345 | .align 4 | ||
| 346 | .global bn_div64 | ||
| 347 | .type bn_div64,#function | ||
| 348 | .proc 016 | ||
| 349 | bn_div64: | ||
| 350 | !#PROLOGUE# 0 | ||
| 351 | save %sp,-112,%sp | ||
| 352 | !#PROLOGUE# 1 | ||
| 353 | mov 0,%l1 | ||
| 354 | cmp %i2,0 | ||
| 355 | bne .LL51 | ||
| 356 | mov 2,%l0 | ||
| 357 | b .LL68 | ||
| 358 | mov -1,%i0 | ||
| 359 | .LL51: | ||
| 360 | call BN_num_bits_word,0 | ||
| 361 | mov %i2,%o0 | ||
| 362 | mov %o0,%o2 | ||
| 363 | cmp %o2,32 | ||
| 364 | be .LL52 | ||
| 365 | mov 1,%o0 | ||
| 366 | sll %o0,%o2,%o0 | ||
| 367 | cmp %i0,%o0 | ||
| 368 | bleu .LL69 | ||
| 369 | mov 32,%o0 | ||
| 370 | sethi %hi(__iob+32),%o0 | ||
| 371 | or %o0,%lo(__iob+32),%o0 | ||
| 372 | sethi %hi(.LLC0),%o1 | ||
| 373 | call fprintf,0 | ||
| 374 | or %o1,%lo(.LLC0),%o1 | ||
| 375 | call abort,0 | ||
| 376 | nop | ||
| 377 | .LL52: | ||
| 378 | mov 32,%o0 | ||
| 379 | .LL69: | ||
| 380 | cmp %i0,%i2 | ||
| 381 | blu .LL53 | ||
| 382 | sub %o0,%o2,%o2 | ||
| 383 | sub %i0,%i2,%i0 | ||
| 384 | .LL53: | ||
| 385 | cmp %o2,0 | ||
| 386 | be .LL54 | ||
| 387 | sll %i0,%o2,%o1 | ||
| 388 | sll %i2,%o2,%i2 | ||
| 389 | sub %o0,%o2,%o0 | ||
| 390 | srl %i1,%o0,%o0 | ||
| 391 | or %o1,%o0,%i0 | ||
| 392 | sll %i1,%o2,%i1 | ||
| 393 | .LL54: | ||
| 394 | srl %i2,16,%g2 | ||
| 395 | sethi %hi(65535),%o0 | ||
| 396 | or %o0,%lo(65535),%o1 | ||
| 397 | and %i2,%o1,%g3 | ||
| 398 | mov %o0,%g4 | ||
| 399 | sethi %hi(-65536),%o7 | ||
| 400 | mov %o1,%g1 | ||
| 401 | .LL55: | ||
| 402 | srl %i0,16,%o0 | ||
| 403 | cmp %o0,%g2 | ||
| 404 | be .LL59 | ||
| 405 | or %g4,%lo(65535),%o3 | ||
| 406 | wr %g0,%g0,%y | ||
| 407 | nop | ||
| 408 | nop | ||
| 409 | nop | ||
| 410 | udiv %i0,%g2,%o3 | ||
| 411 | .LL59: | ||
| 412 | and %i1,%o7,%o0 | ||
| 413 | srl %o0,16,%o5 | ||
| 414 | smul %o3,%g3,%o4 | ||
| 415 | smul %o3,%g2,%o2 | ||
| 416 | .LL60: | ||
| 417 | sub %i0,%o2,%o1 | ||
| 418 | andcc %o1,%o7,%g0 | ||
| 419 | bne .LL61 | ||
| 420 | sll %o1,16,%o0 | ||
| 421 | add %o0,%o5,%o0 | ||
| 422 | cmp %o4,%o0 | ||
| 423 | bleu .LL61 | ||
| 424 | sub %o4,%g3,%o4 | ||
| 425 | sub %o2,%g2,%o2 | ||
| 426 | b .LL60 | ||
| 427 | add %o3,-1,%o3 | ||
| 428 | .LL61: | ||
| 429 | smul %o3,%g2,%o2 | ||
| 430 | smul %o3,%g3,%o0 | ||
| 431 | srl %o0,16,%o1 | ||
| 432 | sll %o0,16,%o0 | ||
| 433 | and %o0,%o7,%o0 | ||
| 434 | cmp %i1,%o0 | ||
| 435 | bgeu .LL65 | ||
| 436 | add %o2,%o1,%o2 | ||
| 437 | add %o2,1,%o2 | ||
| 438 | .LL65: | ||
| 439 | cmp %i0,%o2 | ||
| 440 | bgeu .LL66 | ||
| 441 | sub %i1,%o0,%i1 | ||
| 442 | add %i0,%i2,%i0 | ||
| 443 | add %o3,-1,%o3 | ||
| 444 | .LL66: | ||
| 445 | addcc %l0,-1,%l0 | ||
| 446 | be .LL56 | ||
| 447 | sub %i0,%o2,%i0 | ||
| 448 | sll %o3,16,%l1 | ||
| 449 | sll %i0,16,%o0 | ||
| 450 | srl %i1,16,%o1 | ||
| 451 | or %o0,%o1,%i0 | ||
| 452 | and %i1,%g1,%o0 | ||
| 453 | b .LL55 | ||
| 454 | sll %o0,16,%i1 | ||
| 455 | .LL56: | ||
| 456 | or %l1,%o3,%i0 | ||
| 457 | .LL68: | ||
| 458 | ret | ||
| 459 | restore | ||
| 460 | .LLfe5: | ||
| 461 | .size bn_div64,.LLfe5-bn_div64 | ||
| 462 | .ident "GCC: (GNU) 2.7.2.3" | ||
diff --git a/src/lib/libssl/src/crypto/bn/asm/x86w16.asm b/src/lib/libssl/src/crypto/bn/asm/x86w16.asm new file mode 100644 index 0000000000..74a933a8cd --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/asm/x86w16.asm | |||
| @@ -0,0 +1,297 @@ | |||
| 1 | ; Static Name Aliases | ||
| 2 | ; | ||
| 3 | TITLE bn_mulw.c | ||
| 4 | .8087 | ||
| 5 | F_TEXT SEGMENT WORD PUBLIC 'CODE' | ||
| 6 | F_TEXT ENDS | ||
| 7 | _DATA SEGMENT WORD PUBLIC 'DATA' | ||
| 8 | _DATA ENDS | ||
| 9 | CONST SEGMENT WORD PUBLIC 'CONST' | ||
| 10 | CONST ENDS | ||
| 11 | _BSS SEGMENT WORD PUBLIC 'BSS' | ||
| 12 | _BSS ENDS | ||
| 13 | DGROUP GROUP CONST, _BSS, _DATA | ||
| 14 | ASSUME DS: DGROUP, SS: DGROUP | ||
| 15 | F_TEXT SEGMENT | ||
| 16 | ASSUME CS: F_TEXT | ||
| 17 | PUBLIC _bn_mul_add_words | ||
| 18 | _bn_mul_add_words PROC FAR | ||
| 19 | ; Line 58 | ||
| 20 | push bp | ||
| 21 | push bx | ||
| 22 | push si | ||
| 23 | push di | ||
| 24 | push ds | ||
| 25 | push es | ||
| 26 | mov bp,sp | ||
| 27 | ; w = 26 | ||
| 28 | ; num = 24 | ||
| 29 | ; ap = 20 | ||
| 30 | ; rp = 16 | ||
| 31 | xor si,si ;c=0; | ||
| 32 | mov di,WORD PTR [bp+16] ; load r | ||
| 33 | mov ds,WORD PTR [bp+18] ; load r | ||
| 34 | mov bx,WORD PTR [bp+20] ; load a | ||
| 35 | mov es,WORD PTR [bp+22] ; load a | ||
| 36 | mov cx,WORD PTR [bp+26] ; load w | ||
| 37 | mov bp,WORD PTR [bp+24] ; load num | ||
| 38 | |||
| 39 | shr bp,1 ; div count by 4 and do groups of 4 | ||
| 40 | shr bp,1 | ||
| 41 | je $L555 | ||
| 42 | |||
| 43 | $L546: | ||
| 44 | mov ax,cx | ||
| 45 | mul WORD PTR es:[bx] ; w* *a | ||
| 46 | add ax,WORD PTR ds:[di] ; + *r | ||
| 47 | adc dx,0 | ||
| 48 | adc ax,si | ||
| 49 | adc dx,0 | ||
| 50 | mov WORD PTR ds:[di],ax | ||
| 51 | mov si,dx | ||
| 52 | ; | ||
| 53 | mov ax,cx | ||
| 54 | mul WORD PTR es:[bx+2] ; w* *a | ||
| 55 | add ax,WORD PTR ds:[di+2] ; + *r | ||
| 56 | adc dx,0 | ||
| 57 | adc ax,si | ||
| 58 | adc dx,0 | ||
| 59 | mov WORD PTR ds:[di+2],ax | ||
| 60 | mov si,dx | ||
| 61 | ; | ||
| 62 | mov ax,cx | ||
| 63 | mul WORD PTR es:[bx+4] ; w* *a | ||
| 64 | add ax,WORD PTR ds:[di+4] ; + *r | ||
| 65 | adc dx,0 | ||
| 66 | adc ax,si | ||
| 67 | adc dx,0 | ||
| 68 | mov WORD PTR ds:[di+4],ax | ||
| 69 | mov si,dx | ||
| 70 | ; | ||
| 71 | mov ax,cx | ||
| 72 | mul WORD PTR es:[bx+6] ; w* *a | ||
| 73 | add ax,WORD PTR ds:[di+6] ; + *r | ||
| 74 | adc dx,0 | ||
| 75 | adc ax,si | ||
| 76 | adc dx,0 | ||
| 77 | mov WORD PTR ds:[di+6],ax | ||
| 78 | mov si,dx | ||
| 79 | ; | ||
| 80 | add bx,8 | ||
| 81 | add di,8 | ||
| 82 | ; | ||
| 83 | dec bp | ||
| 84 | je $L555 | ||
| 85 | jmp $L546 | ||
| 86 | ; | ||
| 87 | ; | ||
| 88 | $L555: | ||
| 89 | mov bp,sp | ||
| 90 | mov bp,WORD PTR [bp+24] ; load num | ||
| 91 | and bp,3 | ||
| 92 | dec bp | ||
| 93 | js $L547 | ||
| 94 | |||
| 95 | mov ax,cx | ||
| 96 | mul WORD PTR es:[bx] ; w* *a | ||
| 97 | add ax,WORD PTR ds:[di] ; + *r | ||
| 98 | adc dx,0 | ||
| 99 | adc ax,si | ||
| 100 | adc dx,0 | ||
| 101 | mov WORD PTR ds:[di],ax | ||
| 102 | mov si,dx | ||
| 103 | dec bp | ||
| 104 | js $L547 ; Note that we are now testing for -1 | ||
| 105 | ; | ||
| 106 | mov ax,cx | ||
| 107 | mul WORD PTR es:[bx+2] ; w* *a | ||
| 108 | add ax,WORD PTR ds:[di+2] ; + *r | ||
| 109 | adc dx,0 | ||
| 110 | adc ax,si | ||
| 111 | adc dx,0 | ||
| 112 | mov WORD PTR ds:[di+2],ax | ||
| 113 | mov si,dx | ||
| 114 | dec bp | ||
| 115 | js $L547 | ||
| 116 | ; | ||
| 117 | mov ax,cx | ||
| 118 | mul WORD PTR es:[bx+4] ; w* *a | ||
| 119 | add ax,WORD PTR ds:[di+4] ; + *r | ||
| 120 | adc dx,0 | ||
| 121 | adc ax,si | ||
| 122 | adc dx,0 | ||
| 123 | mov WORD PTR ds:[di+4],ax | ||
| 124 | mov si,dx | ||
| 125 | $L547: | ||
| 126 | mov ax,si | ||
| 127 | pop es | ||
| 128 | pop ds | ||
| 129 | pop di | ||
| 130 | pop si | ||
| 131 | pop bx | ||
| 132 | pop bp | ||
| 133 | ret | ||
| 134 | nop | ||
| 135 | |||
| 136 | _bn_mul_add_words ENDP | ||
| 137 | PUBLIC _bn_mul_words | ||
| 138 | _bn_mul_words PROC FAR | ||
| 139 | ; Line 76 | ||
| 140 | push bp | ||
| 141 | push bx | ||
| 142 | push si | ||
| 143 | push di | ||
| 144 | push ds | ||
| 145 | push es | ||
| 146 | xor si,si | ||
| 147 | mov bp,sp | ||
| 148 | mov di,WORD PTR [bp+16] ; r | ||
| 149 | mov ds,WORD PTR [bp+18] | ||
| 150 | mov bx,WORD PTR [bp+20] ; a | ||
| 151 | mov es,WORD PTR [bp+22] | ||
| 152 | mov cx,WORD PTR [bp+26] ; w | ||
| 153 | mov bp,WORD PTR [bp+24] ; num | ||
| 154 | $FC743: | ||
| 155 | mov ax,cx | ||
| 156 | mul WORD PTR es:[bx] | ||
| 157 | add ax,si | ||
| 158 | adc dx,0 | ||
| 159 | mov WORD PTR ds:[di],ax | ||
| 160 | mov si,dx | ||
| 161 | dec bp | ||
| 162 | je $L764 | ||
| 163 | ; | ||
| 164 | mov ax,cx | ||
| 165 | mul WORD PTR es:[bx+2] | ||
| 166 | add ax,si | ||
| 167 | adc dx,0 | ||
| 168 | mov WORD PTR ds:[di+2],ax | ||
| 169 | mov si,dx | ||
| 170 | dec bp | ||
| 171 | je $L764 | ||
| 172 | ; | ||
| 173 | mov ax,cx | ||
| 174 | mul WORD PTR es:[bx+4] | ||
| 175 | add ax,si | ||
| 176 | adc dx,0 | ||
| 177 | mov WORD PTR ds:[di+4],ax | ||
| 178 | mov si,dx | ||
| 179 | dec bp | ||
| 180 | je $L764 | ||
| 181 | ; | ||
| 182 | mov ax,cx | ||
| 183 | mul WORD PTR es:[bx+6] | ||
| 184 | add ax,si | ||
| 185 | adc dx,0 | ||
| 186 | mov WORD PTR ds:[di+6],ax | ||
| 187 | mov si,dx | ||
| 188 | dec bp | ||
| 189 | je $L764 | ||
| 190 | ; | ||
| 191 | add bx,8 | ||
| 192 | add di,8 | ||
| 193 | jmp $FC743 | ||
| 194 | nop | ||
| 195 | $L764: | ||
| 196 | mov ax,si | ||
| 197 | pop es | ||
| 198 | pop ds | ||
| 199 | pop di | ||
| 200 | pop si | ||
| 201 | pop bx | ||
| 202 | pop bp | ||
| 203 | ret | ||
| 204 | nop | ||
| 205 | _bn_mul_words ENDP | ||
| 206 | PUBLIC _bn_sqr_words | ||
| 207 | _bn_sqr_words PROC FAR | ||
| 208 | ; Line 92 | ||
| 209 | push bp | ||
| 210 | push bx | ||
| 211 | push si | ||
| 212 | push di | ||
| 213 | push ds | ||
| 214 | push es | ||
| 215 | mov bp,sp | ||
| 216 | mov si,WORD PTR [bp+16] | ||
| 217 | mov ds,WORD PTR [bp+18] | ||
| 218 | mov di,WORD PTR [bp+20] | ||
| 219 | mov es,WORD PTR [bp+22] | ||
| 220 | mov bx,WORD PTR [bp+24] | ||
| 221 | |||
| 222 | mov bp,bx ; save a memory lookup later | ||
| 223 | shr bx,1 ; div count by 4 and do groups of 4 | ||
| 224 | shr bx,1 | ||
| 225 | je $L666 | ||
| 226 | |||
| 227 | $L765: | ||
| 228 | mov ax,WORD PTR es:[di] | ||
| 229 | mul ax | ||
| 230 | mov WORD PTR ds:[si],ax | ||
| 231 | mov WORD PTR ds:[si+2],dx | ||
| 232 | ; | ||
| 233 | mov ax,WORD PTR es:[di+2] | ||
| 234 | mul ax | ||
| 235 | mov WORD PTR ds:[si+4],ax | ||
| 236 | mov WORD PTR ds:[si+6],dx | ||
| 237 | ; | ||
| 238 | mov ax,WORD PTR es:[di+4] | ||
| 239 | mul ax | ||
| 240 | mov WORD PTR ds:[si+8],ax | ||
| 241 | mov WORD PTR ds:[si+10],dx | ||
| 242 | ; | ||
| 243 | mov ax,WORD PTR es:[di+6] | ||
| 244 | mul ax | ||
| 245 | mov WORD PTR ds:[si+12],ax | ||
| 246 | mov WORD PTR ds:[si+14],dx | ||
| 247 | ; | ||
| 248 | add di,8 | ||
| 249 | add si,16 | ||
| 250 | dec bx | ||
| 251 | je $L666 | ||
| 252 | jmp $L765 | ||
| 253 | $L666: | ||
| 254 | and bp,3 | ||
| 255 | dec bp ; The copied value of bx (num) | ||
| 256 | js $L645 | ||
| 257 | ; | ||
| 258 | mov ax,WORD PTR es:[di] | ||
| 259 | mul ax | ||
| 260 | mov WORD PTR ds:[si],ax | ||
| 261 | mov WORD PTR ds:[si+2],dx | ||
| 262 | dec bp | ||
| 263 | js $L645 | ||
| 264 | ; | ||
| 265 | mov ax,WORD PTR es:[di+2] | ||
| 266 | mul ax | ||
| 267 | mov WORD PTR ds:[si+4],ax | ||
| 268 | mov WORD PTR ds:[si+6],dx | ||
| 269 | dec bp | ||
| 270 | js $L645 | ||
| 271 | ; | ||
| 272 | mov ax,WORD PTR es:[di+4] | ||
| 273 | mul ax | ||
| 274 | mov WORD PTR ds:[si+8],ax | ||
| 275 | mov WORD PTR ds:[si+10],dx | ||
| 276 | $L645: | ||
| 277 | pop es | ||
| 278 | pop ds | ||
| 279 | pop di | ||
| 280 | pop si | ||
| 281 | pop bx | ||
| 282 | pop bp | ||
| 283 | ret | ||
| 284 | |||
| 285 | _bn_sqr_words ENDP | ||
| 286 | PUBLIC _bn_div64 | ||
| 287 | _bn_div64 PROC FAR | ||
| 288 | push bp | ||
| 289 | mov bp,sp | ||
| 290 | mov dx, WORD PTR [bp+6] | ||
| 291 | mov ax, WORD PTR [bp+8] | ||
| 292 | div WORD PTR [bp+10] | ||
| 293 | pop bp | ||
| 294 | ret | ||
| 295 | _bn_div64 ENDP | ||
| 296 | F_TEXT ENDS | ||
| 297 | END | ||
diff --git a/src/lib/libssl/src/crypto/bn/asm/x86w32.asm b/src/lib/libssl/src/crypto/bn/asm/x86w32.asm new file mode 100644 index 0000000000..fc6f917714 --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/asm/x86w32.asm | |||
| @@ -0,0 +1,362 @@ | |||
| 1 | ; Static Name Aliases | ||
| 2 | ; | ||
| 3 | TITLE bn_mulw.c | ||
| 4 | .386 | ||
| 5 | F_TEXT SEGMENT WORD USE16 PUBLIC 'CODE' | ||
| 6 | F_TEXT ENDS | ||
| 7 | _DATA SEGMENT WORD USE16 PUBLIC 'DATA' | ||
| 8 | _DATA ENDS | ||
| 9 | CONST SEGMENT WORD USE16 PUBLIC 'CONST' | ||
| 10 | CONST ENDS | ||
| 11 | _BSS SEGMENT WORD USE16 PUBLIC 'BSS' | ||
| 12 | _BSS ENDS | ||
| 13 | DGROUP GROUP CONST, _BSS, _DATA | ||
| 14 | ASSUME DS: DGROUP, SS: DGROUP | ||
| 15 | F_TEXT SEGMENT | ||
| 16 | ASSUME CS: F_TEXT | ||
| 17 | PUBLIC _bn_mul_add_words | ||
| 18 | _bn_mul_add_words PROC FAR | ||
| 19 | ; Line 58 | ||
| 20 | push bp | ||
| 21 | push bx | ||
| 22 | push esi | ||
| 23 | push di | ||
| 24 | push ds | ||
| 25 | push es | ||
| 26 | mov bp,sp | ||
| 27 | ; w = 28 | ||
| 28 | ; num = 26 | ||
| 29 | ; ap = 22 | ||
| 30 | ; rp = 18 | ||
| 31 | xor esi,esi ;c=0; | ||
| 32 | mov di,WORD PTR [bp+18] ; load r | ||
| 33 | mov ds,WORD PTR [bp+20] ; load r | ||
| 34 | mov bx,WORD PTR [bp+22] ; load a | ||
| 35 | mov es,WORD PTR [bp+24] ; load a | ||
| 36 | mov ecx,DWORD PTR [bp+28] ; load w | ||
| 37 | mov bp,WORD PTR [bp+26] ; load num | ||
| 38 | shr bp,1 ; div count by 4 and do groups of 4 | ||
| 39 | shr bp,1 | ||
| 40 | je $L555 | ||
| 41 | |||
| 42 | $L546: | ||
| 43 | mov eax,ecx | ||
| 44 | mul DWORD PTR es:[bx] ; w* *a | ||
| 45 | add eax,DWORD PTR ds:[di] ; + *r | ||
| 46 | adc edx,0 | ||
| 47 | adc eax,esi | ||
| 48 | adc edx,0 | ||
| 49 | mov DWORD PTR ds:[di],eax | ||
| 50 | mov esi,edx | ||
| 51 | ; | ||
| 52 | mov eax,ecx | ||
| 53 | mul DWORD PTR es:[bx+4] ; w* *a | ||
| 54 | add eax,DWORD PTR ds:[di+4] ; + *r | ||
| 55 | adc edx,0 | ||
| 56 | adc eax,esi | ||
| 57 | adc edx,0 | ||
| 58 | mov DWORD PTR ds:[di+4],eax | ||
| 59 | mov esi,edx | ||
| 60 | ; | ||
| 61 | mov eax,ecx | ||
| 62 | mul DWORD PTR es:[bx+8] ; w* *a | ||
| 63 | add eax,DWORD PTR ds:[di+8] ; + *r | ||
| 64 | adc edx,0 | ||
| 65 | adc eax,esi | ||
| 66 | adc edx,0 | ||
| 67 | mov DWORD PTR ds:[di+8],eax | ||
| 68 | mov esi,edx | ||
| 69 | ; | ||
| 70 | mov eax,ecx | ||
| 71 | mul DWORD PTR es:[bx+12] ; w* *a | ||
| 72 | add eax,DWORD PTR ds:[di+12] ; + *r | ||
| 73 | adc edx,0 | ||
| 74 | adc eax,esi | ||
| 75 | adc edx,0 | ||
| 76 | mov DWORD PTR ds:[di+12],eax | ||
| 77 | mov esi,edx | ||
| 78 | ; | ||
| 79 | add bx,16 | ||
| 80 | add di,16 | ||
| 81 | ; | ||
| 82 | dec bp | ||
| 83 | je $L555 | ||
| 84 | jmp $L546 | ||
| 85 | ; | ||
| 86 | ; | ||
| 87 | $L555: | ||
| 88 | mov bp,sp | ||
| 89 | mov bp,WORD PTR [bp+26] ; load num | ||
| 90 | and bp,3 | ||
| 91 | dec bp | ||
| 92 | js $L547 | ||
| 93 | |||
| 94 | mov eax,ecx | ||
| 95 | mul DWORD PTR es:[bx] ; w* *a | ||
| 96 | add eax,DWORD PTR ds:[di] ; + *r | ||
| 97 | adc edx,0 | ||
| 98 | adc eax,esi | ||
| 99 | adc edx,0 | ||
| 100 | mov DWORD PTR ds:[di],eax | ||
| 101 | mov esi,edx | ||
| 102 | dec bp | ||
| 103 | js $L547 ; Note that we are now testing for -1 | ||
| 104 | ; | ||
| 105 | mov eax,ecx | ||
| 106 | mul DWORD PTR es:[bx+4] ; w* *a | ||
| 107 | add eax,DWORD PTR ds:[di+4] ; + *r | ||
| 108 | adc edx,0 | ||
| 109 | adc eax,esi | ||
| 110 | adc edx,0 | ||
| 111 | mov DWORD PTR ds:[di+4],eax | ||
| 112 | mov esi,edx | ||
| 113 | dec bp | ||
| 114 | js $L547 | ||
| 115 | ; | ||
| 116 | mov eax,ecx | ||
| 117 | mul DWORD PTR es:[bx+8] ; w* *a | ||
| 118 | add eax,DWORD PTR ds:[di+8] ; + *r | ||
| 119 | adc edx,0 | ||
| 120 | adc eax,esi | ||
| 121 | adc edx,0 | ||
| 122 | mov DWORD PTR ds:[di+8],eax | ||
| 123 | mov esi,edx | ||
| 124 | $L547: | ||
| 125 | mov eax,esi | ||
| 126 | mov edx,esi | ||
| 127 | shr edx,16 | ||
| 128 | pop es | ||
| 129 | pop ds | ||
| 130 | pop di | ||
| 131 | pop esi | ||
| 132 | pop bx | ||
| 133 | pop bp | ||
| 134 | ret | ||
| 135 | nop | ||
| 136 | _bn_mul_add_words ENDP | ||
| 137 | |||
| 138 | PUBLIC _bn_mul_words | ||
| 139 | _bn_mul_words PROC FAR | ||
| 140 | ; Line 76 | ||
| 141 | push bp | ||
| 142 | push bx | ||
| 143 | push esi | ||
| 144 | push di | ||
| 145 | push ds | ||
| 146 | push es | ||
| 147 | xor esi,esi | ||
| 148 | mov bp,sp | ||
| 149 | mov di,WORD PTR [bp+18] ; r | ||
| 150 | mov ds,WORD PTR [bp+20] | ||
| 151 | mov bx,WORD PTR [bp+22] ; a | ||
| 152 | mov es,WORD PTR [bp+24] | ||
| 153 | mov ecx,DWORD PTR [bp+28] ; w | ||
| 154 | mov bp,WORD PTR [bp+26] ; num | ||
| 155 | |||
| 156 | $FC743: | ||
| 157 | mov eax,ecx | ||
| 158 | mul DWORD PTR es:[bx] | ||
| 159 | add eax,esi | ||
| 160 | adc edx,0 | ||
| 161 | mov DWORD PTR ds:[di],eax | ||
| 162 | mov esi,edx | ||
| 163 | dec bp | ||
| 164 | je $L764 | ||
| 165 | ; | ||
| 166 | mov eax,ecx | ||
| 167 | mul DWORD PTR es:[bx+4] | ||
| 168 | add eax,esi | ||
| 169 | adc edx,0 | ||
| 170 | mov DWORD PTR ds:[di+4],eax | ||
| 171 | mov esi,edx | ||
| 172 | dec bp | ||
| 173 | je $L764 | ||
| 174 | ; | ||
| 175 | mov eax,ecx | ||
| 176 | mul DWORD PTR es:[bx+8] | ||
| 177 | add eax,esi | ||
| 178 | adc edx,0 | ||
| 179 | mov DWORD PTR ds:[di+8],eax | ||
| 180 | mov esi,edx | ||
| 181 | dec bp | ||
| 182 | je $L764 | ||
| 183 | ; | ||
| 184 | mov eax,ecx | ||
| 185 | mul DWORD PTR es:[bx+12] | ||
| 186 | add eax,esi | ||
| 187 | adc edx,0 | ||
| 188 | mov DWORD PTR ds:[di+12],eax | ||
| 189 | mov esi,edx | ||
| 190 | dec bp | ||
| 191 | je $L764 | ||
| 192 | ; | ||
| 193 | add bx,16 | ||
| 194 | add di,16 | ||
| 195 | jmp $FC743 | ||
| 196 | nop | ||
| 197 | $L764: | ||
| 198 | mov eax,esi | ||
| 199 | mov edx,esi | ||
| 200 | shr edx,16 | ||
| 201 | pop es | ||
| 202 | pop ds | ||
| 203 | pop di | ||
| 204 | pop esi | ||
| 205 | pop bx | ||
| 206 | pop bp | ||
| 207 | ret | ||
| 208 | nop | ||
| 209 | _bn_mul_words ENDP | ||
| 210 | PUBLIC _bn_sqr_words | ||
| 211 | _bn_sqr_words PROC FAR | ||
| 212 | ; Line 92 | ||
| 213 | push bp | ||
| 214 | push bx | ||
| 215 | push si | ||
| 216 | push di | ||
| 217 | push ds | ||
| 218 | push es | ||
| 219 | mov bp,sp | ||
| 220 | mov si,WORD PTR [bp+16] | ||
| 221 | mov ds,WORD PTR [bp+18] | ||
| 222 | mov di,WORD PTR [bp+20] | ||
| 223 | mov es,WORD PTR [bp+22] | ||
| 224 | mov bx,WORD PTR [bp+24] | ||
| 225 | |||
| 226 | mov bp,bx ; save a memory lookup later | ||
| 227 | shr bx,1 ; div count by 4 and do groups of 4 | ||
| 228 | shr bx,1 | ||
| 229 | je $L666 | ||
| 230 | |||
| 231 | $L765: | ||
| 232 | mov eax,DWORD PTR es:[di] | ||
| 233 | mul eax | ||
| 234 | mov DWORD PTR ds:[si],eax | ||
| 235 | mov DWORD PTR ds:[si+4],edx | ||
| 236 | ; | ||
| 237 | mov eax,DWORD PTR es:[di+4] | ||
| 238 | mul eax | ||
| 239 | mov DWORD PTR ds:[si+8],eax | ||
| 240 | mov DWORD PTR ds:[si+12],edx | ||
| 241 | ; | ||
| 242 | mov eax,DWORD PTR es:[di+8] | ||
| 243 | mul eax | ||
| 244 | mov DWORD PTR ds:[si+16],eax | ||
| 245 | mov DWORD PTR ds:[si+20],edx | ||
| 246 | ; | ||
| 247 | mov eax,DWORD PTR es:[di+12] | ||
| 248 | mul eax | ||
| 249 | mov DWORD PTR ds:[si+24],eax | ||
| 250 | mov DWORD PTR ds:[si+28],edx | ||
| 251 | ; | ||
| 252 | add di,16 | ||
| 253 | add si,32 | ||
| 254 | dec bx | ||
| 255 | je $L666 | ||
| 256 | jmp $L765 | ||
| 257 | $L666: | ||
| 258 | and bp,3 | ||
| 259 | dec bp ; The copied value of bx (num) | ||
| 260 | js $L645 | ||
| 261 | ; | ||
| 262 | mov eax,DWORD PTR es:[di] | ||
| 263 | mul eax | ||
| 264 | mov DWORD PTR ds:[si],eax | ||
| 265 | mov DWORD PTR ds:[si+4],edx | ||
| 266 | dec bp | ||
| 267 | js $L645 | ||
| 268 | ; | ||
| 269 | mov eax,DWORD PTR es:[di+4] | ||
| 270 | mul eax | ||
| 271 | mov DWORD PTR ds:[si+8],eax | ||
| 272 | mov DWORD PTR ds:[si+12],edx | ||
| 273 | dec bp | ||
| 274 | js $L645 | ||
| 275 | ; | ||
| 276 | mov eax,DWORD PTR es:[di+8] | ||
| 277 | mul eax | ||
| 278 | mov DWORD PTR ds:[si+16],eax | ||
| 279 | mov DWORD PTR ds:[si+20],edx | ||
| 280 | $L645: | ||
| 281 | pop es | ||
| 282 | pop ds | ||
| 283 | pop di | ||
| 284 | pop si | ||
| 285 | pop bx | ||
| 286 | pop bp | ||
| 287 | ret | ||
| 288 | _bn_sqr_words ENDP | ||
| 289 | |||
| 290 | PUBLIC _bn_div64 | ||
| 291 | _bn_div64 PROC FAR | ||
| 292 | push bp | ||
| 293 | mov bp,sp | ||
| 294 | mov edx, DWORD PTR [bp+6] | ||
| 295 | mov eax, DWORD PTR [bp+10] | ||
| 296 | div DWORD PTR [bp+14] | ||
| 297 | mov edx,eax | ||
| 298 | shr edx,16 | ||
| 299 | pop bp | ||
| 300 | ret | ||
| 301 | _bn_div64 ENDP | ||
| 302 | |||
| 303 | PUBLIC _bn_add_words | ||
| 304 | _bn_add_words PROC FAR | ||
| 305 | ; Line 58 | ||
| 306 | push bp | ||
| 307 | push bx | ||
| 308 | push esi | ||
| 309 | push di | ||
| 310 | push ds | ||
| 311 | push es | ||
| 312 | mov bp,sp | ||
| 313 | ; w = 28 | ||
| 314 | ; num = 26 | ||
| 315 | ; ap = 22 | ||
| 316 | ; rp = 18 | ||
| 317 | xor esi,esi ;c=0; | ||
| 318 | mov si,WORD PTR [bp+22] ; load a | ||
| 319 | mov es,WORD PTR [bp+24] ; load a | ||
| 320 | mov di,WORD PTR [bp+26] ; load b | ||
| 321 | mov ds,WORD PTR [bp+28] ; load b | ||
| 322 | |||
| 323 | mov dx,WORD PTR [bp+30] ; load num | ||
| 324 | dec dx | ||
| 325 | js $L547 | ||
| 326 | xor ecx,ecx | ||
| 327 | |||
| 328 | $L5477: | ||
| 329 | xor ebx,ebx | ||
| 330 | mov eax,DWORD PTR es:[si] ; *a | ||
| 331 | add eax,ecx | ||
| 332 | adc ebx,0 | ||
| 333 | add si,4 ; a++ | ||
| 334 | add eax,DWORD PTR ds:[di] ; + *b | ||
| 335 | mov ecx,ebx | ||
| 336 | adc ecx,0 | ||
| 337 | add di,4 | ||
| 338 | mov bx,WORD PTR [bp+18] | ||
| 339 | mov ds,WORD PTR [bp+20] | ||
| 340 | mov DWORD PTR ds:[bx],eax | ||
| 341 | add bx,4 | ||
| 342 | mov ds,WORD PTR [bp+28] | ||
| 343 | mov WORD PTR [bp+18],bx | ||
| 344 | dec dx | ||
| 345 | js $L547 ; Note that we are now testing for -1 | ||
| 346 | jmp $L5477 | ||
| 347 | ; | ||
| 348 | $L547: | ||
| 349 | mov eax,ecx | ||
| 350 | mov edx,ecx | ||
| 351 | shr edx,16 | ||
| 352 | pop es | ||
| 353 | pop ds | ||
| 354 | pop di | ||
| 355 | pop esi | ||
| 356 | pop bx | ||
| 357 | pop bp | ||
| 358 | ret | ||
| 359 | nop | ||
| 360 | _bn_add_words ENDP | ||
| 361 | F_TEXT ENDS | ||
| 362 | END | ||
diff --git a/src/lib/libssl/src/crypto/bn/bn.err b/src/lib/libssl/src/crypto/bn/bn.err new file mode 100644 index 0000000000..7ccc247c41 --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/bn.err | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | /* Error codes for the BN functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define BN_F_BN_BLINDING_CONVERT 100 | ||
| 5 | #define BN_F_BN_BLINDING_INVERT 101 | ||
| 6 | #define BN_F_BN_BLINDING_NEW 102 | ||
| 7 | #define BN_F_BN_BLINDING_UPDATE 103 | ||
| 8 | #define BN_F_BN_BN2DEC 104 | ||
| 9 | #define BN_F_BN_BN2HEX 105 | ||
| 10 | #define BN_F_BN_CTX_NEW 106 | ||
| 11 | #define BN_F_BN_DIV 107 | ||
| 12 | #define BN_F_BN_EXPAND2 108 | ||
| 13 | #define BN_F_BN_MOD_EXP_MONT 109 | ||
| 14 | #define BN_F_BN_MOD_INVERSE 110 | ||
| 15 | #define BN_F_BN_MOD_MUL_RECIPROCAL 111 | ||
| 16 | #define BN_F_BN_MPI2BN 112 | ||
| 17 | #define BN_F_BN_NEW 113 | ||
| 18 | #define BN_F_BN_RAND 114 | ||
| 19 | |||
| 20 | /* Reason codes. */ | ||
| 21 | #define BN_R_BAD_RECIPROCAL 100 | ||
| 22 | #define BN_R_CALLED_WITH_EVEN_MODULUS 101 | ||
| 23 | #define BN_R_DIV_BY_ZERO 102 | ||
| 24 | #define BN_R_ENCODING_ERROR 103 | ||
| 25 | #define BN_R_INVALID_LENGTH 104 | ||
| 26 | #define BN_R_NOT_INITALISED 105 | ||
| 27 | #define BN_R_NO_INVERSE 106 | ||
diff --git a/src/lib/libssl/src/crypto/bn/bn.org b/src/lib/libssl/src/crypto/bn/bn.org new file mode 100644 index 0000000000..66dde285d6 --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/bn.org | |||
| @@ -0,0 +1,502 @@ | |||
| 1 | /* crypto/bn/bn.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify bn.org since bn.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef HEADER_BN_H | ||
| 68 | #define HEADER_BN_H | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | extern "C" { | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #undef BN_LLONG | ||
| 75 | |||
| 76 | #ifdef WIN32 | ||
| 77 | #define BN_LLONG /* This comment stops Configure mutilating things */ | ||
| 78 | #endif | ||
| 79 | |||
| 80 | #define RECP_MUL_MOD | ||
| 81 | #define MONT_MUL_MOD | ||
| 82 | |||
| 83 | /* This next option uses the C libraries (2 word)/(1 word) function. | ||
| 84 | * If it is not defined, I use my C version (which is slower). | ||
| 85 | * The reason for this flag is that when the particular C compiler | ||
| 86 | * library routine is used, and the library is linked with a different | ||
| 87 | * compiler, the library is missing. This mostly happens when the | ||
| 88 | * library is built with gcc and then linked using nornal cc. This would | ||
| 89 | * be a common occurance because gcc normally produces code that is | ||
| 90 | * 2 times faster than system compilers for the big number stuff. | ||
| 91 | * For machines with only one compiler (or shared libraries), this should | ||
| 92 | * be on. Again this in only really a problem on machines | ||
| 93 | * using "long long's", are 32bit, and are not using my assember code. */ | ||
| 94 | #if defined(MSDOS) || defined(WINDOWS) || defined(linux) | ||
| 95 | #define BN_DIV2W | ||
| 96 | #endif | ||
| 97 | |||
| 98 | /* Only one for the following should be defined */ | ||
| 99 | /* The prime number generation stuff may not work when | ||
| 100 | * EIGHT_BIT but I don't care since I've only used this mode | ||
| 101 | * for debuging the bignum libraries */ | ||
| 102 | #undef SIXTY_FOUR_BIT_LONG | ||
| 103 | #undef SIXTY_FOUR_BIT | ||
| 104 | #define THIRTY_TWO_BIT | ||
| 105 | #undef SIXTEEN_BIT | ||
| 106 | #undef EIGHT_BIT | ||
| 107 | |||
| 108 | /* assuming long is 64bit - this is the DEC Alpha | ||
| 109 | * unsigned long long is only 64 bits :-(, don't define | ||
| 110 | * BN_LLONG for the DEC Alpha */ | ||
| 111 | #ifdef SIXTY_FOUR_BIT_LONG | ||
| 112 | #define BN_ULLONG unsigned long long | ||
| 113 | #define BN_ULONG unsigned long | ||
| 114 | #define BN_LONG long | ||
| 115 | #define BN_BITS 128 | ||
| 116 | #define BN_BYTES 8 | ||
| 117 | #define BN_BITS2 64 | ||
| 118 | #define BN_BITS4 32 | ||
| 119 | #define BN_MASK2 (0xffffffffffffffffL) | ||
| 120 | #define BN_MASK2l (0xffffffffL) | ||
| 121 | #define BN_MASK2h (0xffffffff00000000L) | ||
| 122 | #define BN_MASK2h1 (0xffffffff80000000L) | ||
| 123 | #define BN_TBIT (0x8000000000000000L) | ||
| 124 | #define BN_DEC_CONV (10000000000000000000L) | ||
| 125 | #define BN_DEC_FMT1 "%lu" | ||
| 126 | #define BN_DEC_FMT2 "%019lu" | ||
| 127 | #define BN_DEC_NUM 19 | ||
| 128 | #endif | ||
| 129 | |||
| 130 | #ifdef SIXTY_FOUR_BIT | ||
| 131 | #undef BN_LLONG | ||
| 132 | /* #define BN_ULLONG unsigned long long */ | ||
| 133 | #define BN_ULONG unsigned long long | ||
| 134 | #define BN_LONG long long | ||
| 135 | #define BN_BITS 128 | ||
| 136 | #define BN_BYTES 8 | ||
| 137 | #define BN_BITS2 64 | ||
| 138 | #define BN_BITS4 32 | ||
| 139 | #define BN_MASK2 (0xffffffffffffffffLL) | ||
| 140 | #define BN_MASK2l (0xffffffffL) | ||
| 141 | #define BN_MASK2h (0xffffffff00000000LL) | ||
| 142 | #define BN_MASK2h1 (0xffffffff80000000LL) | ||
| 143 | #define BN_TBIT (0x8000000000000000LL) | ||
| 144 | #define BN_DEC_CONV (10000000000000000000L) | ||
| 145 | #define BN_DEC_FMT1 "%lu" | ||
| 146 | #define BN_DEC_FMT2 "%019lu" | ||
| 147 | #define BN_DEC_NUM 19 | ||
| 148 | #endif | ||
| 149 | |||
| 150 | #ifdef THIRTY_TWO_BIT | ||
| 151 | #ifdef WIN32 | ||
| 152 | #define BN_ULLONG unsigned _int64 | ||
| 153 | #else | ||
| 154 | #define BN_ULLONG unsigned long long | ||
| 155 | #endif | ||
| 156 | #define BN_ULONG unsigned long | ||
| 157 | #define BN_LONG long | ||
| 158 | #define BN_BITS 64 | ||
| 159 | #define BN_BYTES 4 | ||
| 160 | #define BN_BITS2 32 | ||
| 161 | #define BN_BITS4 16 | ||
| 162 | #define BN_MASK2 (0xffffffffL) | ||
| 163 | #define BN_MASK2l (0xffff) | ||
| 164 | #define BN_MASK2h1 (0xffff8000L) | ||
| 165 | #define BN_MASK2h (0xffff0000L) | ||
| 166 | #define BN_TBIT (0x80000000L) | ||
| 167 | #define BN_DEC_CONV (1000000000L) | ||
| 168 | #define BN_DEC_FMT1 "%lu" | ||
| 169 | #define BN_DEC_FMT2 "%09lu" | ||
| 170 | #define BN_DEC_NUM 9 | ||
| 171 | #endif | ||
| 172 | |||
| 173 | #ifdef SIXTEEN_BIT | ||
| 174 | #ifndef BN_DIV2W | ||
| 175 | #define BN_DIV2W | ||
| 176 | #endif | ||
| 177 | #define BN_ULLONG unsigned long | ||
| 178 | #define BN_ULONG unsigned short | ||
| 179 | #define BN_LONG short | ||
| 180 | #define BN_BITS 32 | ||
| 181 | #define BN_BYTES 2 | ||
| 182 | #define BN_BITS2 16 | ||
| 183 | #define BN_BITS4 8 | ||
| 184 | #define BN_MASK2 (0xffff) | ||
| 185 | #define BN_MASK2l (0xff) | ||
| 186 | #define BN_MASK2h1 (0xff80) | ||
| 187 | #define BN_MASK2h (0xff00) | ||
| 188 | #define BN_TBIT (0x8000) | ||
| 189 | #define BN_DEC_CONV (100000) | ||
| 190 | #define BN_DEC_FMT1 "%u" | ||
| 191 | #define BN_DEC_FMT2 "%05u" | ||
| 192 | #define BN_DEC_NUM 5 | ||
| 193 | #endif | ||
| 194 | |||
| 195 | #ifdef EIGHT_BIT | ||
| 196 | #ifndef BN_DIV2W | ||
| 197 | #define BN_DIV2W | ||
| 198 | #endif | ||
| 199 | #define BN_ULLONG unsigned short | ||
| 200 | #define BN_ULONG unsigned char | ||
| 201 | #define BN_LONG char | ||
| 202 | #define BN_BITS 16 | ||
| 203 | #define BN_BYTES 1 | ||
| 204 | #define BN_BITS2 8 | ||
| 205 | #define BN_BITS4 4 | ||
| 206 | #define BN_MASK2 (0xff) | ||
| 207 | #define BN_MASK2l (0xf) | ||
| 208 | #define BN_MASK2h1 (0xf8) | ||
| 209 | #define BN_MASK2h (0xf0) | ||
| 210 | #define BN_TBIT (0x80) | ||
| 211 | #define BN_DEC_CONV (100) | ||
| 212 | #define BN_DEC_FMT1 "%u" | ||
| 213 | #define BN_DEC_FMT2 "%02u" | ||
| 214 | #define BN_DEC_NUM 2 | ||
| 215 | #endif | ||
| 216 | |||
| 217 | #define BN_DEFAULT_BITS 1280 | ||
| 218 | |||
| 219 | #ifdef BIGNUM | ||
| 220 | #undef BIGNUM | ||
| 221 | #endif | ||
| 222 | |||
| 223 | typedef struct bignum_st | ||
| 224 | { | ||
| 225 | BN_ULONG *d; /* Pointer to an array of 'BN_BITS2' bit chunks. */ | ||
| 226 | int top; /* Index of last used d +1. */ | ||
| 227 | /* The next are internal book keeping for bn_expand. */ | ||
| 228 | int max; /* Size of the d array. */ | ||
| 229 | int neg; /* one if the number is negative */ | ||
| 230 | } BIGNUM; | ||
| 231 | |||
| 232 | /* Used for temp variables */ | ||
| 233 | #define BN_CTX_NUM 12 | ||
| 234 | typedef struct bignum_ctx | ||
| 235 | { | ||
| 236 | int tos; | ||
| 237 | BIGNUM *bn[BN_CTX_NUM+1]; | ||
| 238 | } BN_CTX; | ||
| 239 | |||
| 240 | typedef struct bn_blinding_st | ||
| 241 | { | ||
| 242 | int init; | ||
| 243 | BIGNUM *A; | ||
| 244 | BIGNUM *Ai; | ||
| 245 | BIGNUM *mod; /* just a reference */ | ||
| 246 | } BN_BLINDING; | ||
| 247 | |||
| 248 | /* Used for montgomery multiplication */ | ||
| 249 | typedef struct bn_mont_ctx_st | ||
| 250 | { | ||
| 251 | int ri; /* number of bits in R */ | ||
| 252 | BIGNUM *RR; /* used to convert to montgomery form */ | ||
| 253 | BIGNUM *N; /* The modulus */ | ||
| 254 | BIGNUM *Ni; /* The inverse of N */ | ||
| 255 | BN_ULONG n0; /* word form of inverse, normally only one of | ||
| 256 | * Ni or n0 is defined */ | ||
| 257 | } BN_MONT_CTX; | ||
| 258 | |||
| 259 | #define BN_to_montgomery(r,a,mont,ctx) BN_mod_mul_montgomery(\ | ||
| 260 | r,a,(mont)->RR,(mont),ctx) | ||
| 261 | |||
| 262 | #define BN_prime_checks (5) | ||
| 263 | |||
| 264 | #define BN_num_bytes(a) ((BN_num_bits(a)+7)/8) | ||
| 265 | #define BN_is_word(a,w) (((a)->top == 1) && ((a)->d[0] == (BN_ULONG)(w))) | ||
| 266 | #define BN_is_zero(a) (((a)->top <= 1) && ((a)->d[0] == (BN_ULONG)0)) | ||
| 267 | #define BN_is_one(a) (BN_is_word((a),1)) | ||
| 268 | #define BN_is_odd(a) ((a)->d[0] & 1) | ||
| 269 | #define BN_one(a) (BN_set_word((a),1)) | ||
| 270 | #define BN_zero(a) (BN_set_word((a),0)) | ||
| 271 | |||
| 272 | #define BN_ascii2bn(a) BN_hex2bn(a) | ||
| 273 | #define BN_bn2ascii(a) BN_bn2hex(a) | ||
| 274 | |||
| 275 | #define bn_fix_top(a) \ | ||
| 276 | { \ | ||
| 277 | BN_ULONG *fix_top_l; \ | ||
| 278 | for (fix_top_l= &((a)->d[(a)->top-1]); (a)->top > 0; (a)->top--) \ | ||
| 279 | if (*(fix_top_l--)) break; \ | ||
| 280 | } | ||
| 281 | |||
| 282 | #define bn_expand(n,b) ((((b)/BN_BITS2) <= (n)->max)?\ | ||
| 283 | (n):bn_expand2((n),(b)/BN_BITS2)) | ||
| 284 | #define bn_wexpand(n,b) (((b) <= (n)->max)?(n):bn_expand2((n),(b))) | ||
| 285 | |||
| 286 | |||
| 287 | #ifndef NOPROTO | ||
| 288 | BIGNUM *BN_value_one(void); | ||
| 289 | char * BN_options(void); | ||
| 290 | BN_CTX *BN_CTX_new(void); | ||
| 291 | void BN_CTX_free(BN_CTX *c); | ||
| 292 | int BN_rand(BIGNUM *rnd, int bits, int top,int bottom); | ||
| 293 | int BN_num_bits(BIGNUM *a); | ||
| 294 | int BN_num_bits_word(BN_ULONG); | ||
| 295 | BIGNUM *BN_new(void); | ||
| 296 | void BN_clear_free(BIGNUM *a); | ||
| 297 | BIGNUM *BN_copy(BIGNUM *a, BIGNUM *b); | ||
| 298 | BIGNUM *BN_bin2bn(unsigned char *s,int len,BIGNUM *ret); | ||
| 299 | int BN_bn2bin(BIGNUM *a, unsigned char *to); | ||
| 300 | BIGNUM *BN_mpi2bn(unsigned char *s,int len,BIGNUM *ret); | ||
| 301 | int BN_bn2mpi(BIGNUM *a, unsigned char *to); | ||
| 302 | int BN_sub(BIGNUM *r, BIGNUM *a, BIGNUM *b); | ||
| 303 | void bn_qsub(BIGNUM *r, BIGNUM *a, BIGNUM *b); | ||
| 304 | void bn_qadd(BIGNUM *r, BIGNUM *a, BIGNUM *b); | ||
| 305 | int BN_add(BIGNUM *r, BIGNUM *a, BIGNUM *b); | ||
| 306 | int BN_mod(BIGNUM *rem, BIGNUM *m, BIGNUM *d, BN_CTX *ctx); | ||
| 307 | int BN_div(BIGNUM *dv, BIGNUM *rem, BIGNUM *m, BIGNUM *d, BN_CTX *ctx); | ||
| 308 | int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b); | ||
| 309 | int BN_sqr(BIGNUM *r, BIGNUM *a,BN_CTX *ctx); | ||
| 310 | BN_ULONG BN_mod_word(BIGNUM *a, unsigned long w); | ||
| 311 | BN_ULONG BN_div_word(BIGNUM *a, unsigned long w); | ||
| 312 | int BN_mul_word(BIGNUM *a, unsigned long w); | ||
| 313 | int BN_add_word(BIGNUM *a, unsigned long w); | ||
| 314 | int BN_sub_word(BIGNUM *a, unsigned long w); | ||
| 315 | int BN_set_word(BIGNUM *a, unsigned long w); | ||
| 316 | unsigned long BN_get_word(BIGNUM *a); | ||
| 317 | int BN_cmp(BIGNUM *a, BIGNUM *b); | ||
| 318 | void BN_free(BIGNUM *a); | ||
| 319 | int BN_is_bit_set(BIGNUM *a, int n); | ||
| 320 | int BN_lshift(BIGNUM *r, BIGNUM *a, int n); | ||
| 321 | int BN_lshift1(BIGNUM *r, BIGNUM *a); | ||
| 322 | int BN_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p,BN_CTX *ctx); | ||
| 323 | int BN_mod_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m,BN_CTX *ctx); | ||
| 324 | int BN_mod_exp_mont(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m,BN_CTX *ctx, | ||
| 325 | BN_MONT_CTX *m_ctx); | ||
| 326 | int BN_mod_exp_recp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m,BN_CTX *ctx); | ||
| 327 | int BN_mod_exp_simple(BIGNUM *r, BIGNUM *a, BIGNUM *p, | ||
| 328 | BIGNUM *m,BN_CTX *ctx); | ||
| 329 | int BN_mask_bits(BIGNUM *a,int n); | ||
| 330 | int BN_mod_mul_reciprocal(BIGNUM *r, BIGNUM *x, BIGNUM *y, BIGNUM *m, | ||
| 331 | BIGNUM *i, int nb, BN_CTX *ctx); | ||
| 332 | int BN_mod_mul(BIGNUM *ret, BIGNUM *a, BIGNUM *b, BIGNUM *m, | ||
| 333 | BN_CTX *ctx); | ||
| 334 | #ifndef WIN16 | ||
| 335 | int BN_print_fp(FILE *fp, BIGNUM *a); | ||
| 336 | #endif | ||
| 337 | #ifdef HEADER_BIO_H | ||
| 338 | int BN_print(BIO *fp, BIGNUM *a); | ||
| 339 | #else | ||
| 340 | int BN_print(char *fp, BIGNUM *a); | ||
| 341 | #endif | ||
| 342 | int BN_reciprocal(BIGNUM *r, BIGNUM *m, BN_CTX *ctx); | ||
| 343 | int BN_rshift(BIGNUM *r, BIGNUM *a, int n); | ||
| 344 | int BN_rshift1(BIGNUM *r, BIGNUM *a); | ||
| 345 | void BN_clear(BIGNUM *a); | ||
| 346 | BIGNUM *bn_expand2(BIGNUM *b, int bits); | ||
| 347 | BIGNUM *BN_dup(BIGNUM *a); | ||
| 348 | int BN_ucmp(BIGNUM *a, BIGNUM *b); | ||
| 349 | int BN_set_bit(BIGNUM *a, int n); | ||
| 350 | int BN_clear_bit(BIGNUM *a, int n); | ||
| 351 | char * BN_bn2hex(BIGNUM *a); | ||
| 352 | char * BN_bn2dec(BIGNUM *a); | ||
| 353 | int BN_hex2bn(BIGNUM **a,char *str); | ||
| 354 | int BN_dec2bn(BIGNUM **a,char *str); | ||
| 355 | int BN_gcd(BIGNUM *r,BIGNUM *in_a,BIGNUM *in_b,BN_CTX *ctx); | ||
| 356 | BIGNUM *BN_mod_inverse(BIGNUM *a, BIGNUM *n,BN_CTX *ctx); | ||
| 357 | BIGNUM *BN_generate_prime(int bits,int strong,BIGNUM *add, | ||
| 358 | BIGNUM *rem,void (*callback)(int,int,char *),char *cb_arg); | ||
| 359 | int BN_is_prime(BIGNUM *p,int nchecks,void (*callback)(int,int,char *), | ||
| 360 | BN_CTX *ctx,char *cb_arg); | ||
| 361 | void ERR_load_BN_strings(void ); | ||
| 362 | |||
| 363 | BN_ULONG bn_mul_add_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w); | ||
| 364 | BN_ULONG bn_mul_words(BN_ULONG *rp, BN_ULONG *ap, int num, BN_ULONG w); | ||
| 365 | void bn_sqr_words(BN_ULONG *rp, BN_ULONG *ap, int num); | ||
| 366 | BN_ULONG bn_div64(BN_ULONG h, BN_ULONG l, BN_ULONG d); | ||
| 367 | BN_ULONG bn_add_words(BN_ULONG *rp, BN_ULONG *ap, BN_ULONG *bp,int num); | ||
| 368 | |||
| 369 | BN_MONT_CTX *BN_MONT_CTX_new(void ); | ||
| 370 | int BN_mod_mul_montgomery(BIGNUM *r,BIGNUM *a,BIGNUM *b,BN_MONT_CTX *mont, | ||
| 371 | BN_CTX *ctx); | ||
| 372 | int BN_from_montgomery(BIGNUM *r,BIGNUM *a,BN_MONT_CTX *mont,BN_CTX *ctx); | ||
| 373 | void BN_MONT_CTX_free(BN_MONT_CTX *mont); | ||
| 374 | int BN_MONT_CTX_set(BN_MONT_CTX *mont,BIGNUM *modulus,BN_CTX *ctx); | ||
| 375 | |||
| 376 | BN_BLINDING *BN_BLINDING_new(BIGNUM *A,BIGNUM *Ai,BIGNUM *mod); | ||
| 377 | void BN_BLINDING_free(BN_BLINDING *b); | ||
| 378 | int BN_BLINDING_update(BN_BLINDING *b,BN_CTX *ctx); | ||
| 379 | int BN_BLINDING_convert(BIGNUM *n, BN_BLINDING *r, BN_CTX *ctx); | ||
| 380 | int BN_BLINDING_invert(BIGNUM *n, BN_BLINDING *b, BN_CTX *ctx); | ||
| 381 | |||
| 382 | #else | ||
| 383 | |||
| 384 | BIGNUM *BN_value_one(); | ||
| 385 | char * BN_options(); | ||
| 386 | BN_CTX *BN_CTX_new(); | ||
| 387 | void BN_CTX_free(); | ||
| 388 | int BN_rand(); | ||
| 389 | int BN_num_bits(); | ||
| 390 | int BN_num_bits_word(); | ||
| 391 | BIGNUM *BN_new(); | ||
| 392 | void BN_clear_free(); | ||
| 393 | BIGNUM *BN_copy(); | ||
| 394 | BIGNUM *BN_bin2bn(); | ||
| 395 | int BN_bn2bin(); | ||
| 396 | BIGNUM *BN_mpi2bn(); | ||
| 397 | int BN_bn2mpi(); | ||
| 398 | int BN_sub(); | ||
| 399 | void bn_qsub(); | ||
| 400 | void bn_qadd(); | ||
| 401 | int BN_add(); | ||
| 402 | int BN_mod(); | ||
| 403 | int BN_div(); | ||
| 404 | int BN_mul(); | ||
| 405 | int BN_sqr(); | ||
| 406 | BN_ULONG BN_mod_word(); | ||
| 407 | BN_ULONG BN_div_word(); | ||
| 408 | int BN_add_word(); | ||
| 409 | int BN_sub_word(); | ||
| 410 | int BN_mul_word(); | ||
| 411 | int BN_set_word(); | ||
| 412 | unsigned long BN_get_word(); | ||
| 413 | int BN_cmp(); | ||
| 414 | void BN_free(); | ||
| 415 | int BN_is_bit_set(); | ||
| 416 | int BN_lshift(); | ||
| 417 | int BN_lshift1(); | ||
| 418 | int BN_exp(); | ||
| 419 | int BN_mod_exp(); | ||
| 420 | int BN_mod_exp_mont(); | ||
| 421 | int BN_mod_exp_recp(); | ||
| 422 | int BN_mod_exp_simple(); | ||
| 423 | int BN_mask_bits(); | ||
| 424 | int BN_mod_mul_reciprocal(); | ||
| 425 | int BN_mod_mul(); | ||
| 426 | #ifndef WIN16 | ||
| 427 | int BN_print_fp(); | ||
| 428 | #endif | ||
| 429 | int BN_print(); | ||
| 430 | int BN_reciprocal(); | ||
| 431 | int BN_rshift(); | ||
| 432 | int BN_rshift1(); | ||
| 433 | void BN_clear(); | ||
| 434 | BIGNUM *bn_expand2(); | ||
| 435 | BIGNUM *BN_dup(); | ||
| 436 | int BN_ucmp(); | ||
| 437 | int BN_set_bit(); | ||
| 438 | int BN_clear_bit(); | ||
| 439 | char * BN_bn2hex(); | ||
| 440 | char * BN_bn2dec(); | ||
| 441 | int BN_hex2bn(); | ||
| 442 | int BN_dec2bn(); | ||
| 443 | int BN_gcd(); | ||
| 444 | BIGNUM *BN_mod_inverse(); | ||
| 445 | BIGNUM *BN_generate_prime(); | ||
| 446 | int BN_is_prime(); | ||
| 447 | void ERR_load_BN_strings(); | ||
| 448 | |||
| 449 | BN_ULONG bn_mul_add_words(); | ||
| 450 | BN_ULONG bn_mul_words(); | ||
| 451 | void bn_sqr_words(); | ||
| 452 | BN_ULONG bn_div64(); | ||
| 453 | BN_ULONG bn_add_words(); | ||
| 454 | |||
| 455 | int BN_mod_mul_montgomery(); | ||
| 456 | int BN_from_montgomery(); | ||
| 457 | BN_MONT_CTX *BN_MONT_CTX_new(); | ||
| 458 | void BN_MONT_CTX_free(); | ||
| 459 | int BN_MONT_CTX_set(); | ||
| 460 | |||
| 461 | BN_BLINDING *BN_BLINDING_new(); | ||
| 462 | void BN_BLINDING_free(); | ||
| 463 | int BN_BLINDING_update(); | ||
| 464 | int BN_BLINDING_convert(); | ||
| 465 | int BN_BLINDING_invert(); | ||
| 466 | |||
| 467 | #endif | ||
| 468 | |||
| 469 | /* BEGIN ERROR CODES */ | ||
| 470 | /* Error codes for the BN functions. */ | ||
| 471 | |||
| 472 | /* Function codes. */ | ||
| 473 | #define BN_F_BN_BLINDING_CONVERT 100 | ||
| 474 | #define BN_F_BN_BLINDING_INVERT 101 | ||
| 475 | #define BN_F_BN_BLINDING_NEW 102 | ||
| 476 | #define BN_F_BN_BLINDING_UPDATE 103 | ||
| 477 | #define BN_F_BN_BN2DEC 104 | ||
| 478 | #define BN_F_BN_BN2HEX 105 | ||
| 479 | #define BN_F_BN_CTX_NEW 106 | ||
| 480 | #define BN_F_BN_DIV 107 | ||
| 481 | #define BN_F_BN_EXPAND2 108 | ||
| 482 | #define BN_F_BN_MOD_EXP_MONT 109 | ||
| 483 | #define BN_F_BN_MOD_INVERSE 110 | ||
| 484 | #define BN_F_BN_MOD_MUL_RECIPROCAL 111 | ||
| 485 | #define BN_F_BN_MPI2BN 112 | ||
| 486 | #define BN_F_BN_NEW 113 | ||
| 487 | #define BN_F_BN_RAND 114 | ||
| 488 | |||
| 489 | /* Reason codes. */ | ||
| 490 | #define BN_R_BAD_RECIPROCAL 100 | ||
| 491 | #define BN_R_CALLED_WITH_EVEN_MODULUS 101 | ||
| 492 | #define BN_R_DIV_BY_ZERO 102 | ||
| 493 | #define BN_R_ENCODING_ERROR 103 | ||
| 494 | #define BN_R_INVALID_LENGTH 104 | ||
| 495 | #define BN_R_NOT_INITALISED 105 | ||
| 496 | #define BN_R_NO_INVERSE 106 | ||
| 497 | |||
| 498 | #ifdef __cplusplus | ||
| 499 | } | ||
| 500 | #endif | ||
| 501 | #endif | ||
| 502 | |||
diff --git a/src/lib/libssl/src/crypto/bn/bn_m.c b/src/lib/libssl/src/crypto/bn/bn_m.c new file mode 100644 index 0000000000..5166daaeec --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/bn_m.c | |||
| @@ -0,0 +1,169 @@ | |||
| 1 | /* crypto/bn/bn_m.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 "bn_lcl.h" | ||
| 62 | #include "stack.h" | ||
| 63 | |||
| 64 | int limit=16; | ||
| 65 | |||
| 66 | typedef struct bn_pool_st | ||
| 67 | { | ||
| 68 | int used; | ||
| 69 | int tos; | ||
| 70 | STACK *sk; | ||
| 71 | } BN_POOL; | ||
| 72 | |||
| 73 | BIGNUM *BN_POOL_push(bp) | ||
| 74 | BN_POOL *bp; | ||
| 75 | { | ||
| 76 | BIGNUM *ret; | ||
| 77 | |||
| 78 | if (bp->used >= bp->tos) | ||
| 79 | { | ||
| 80 | ret=BN_new(); | ||
| 81 | sk_push(bp->sk,(char *)ret); | ||
| 82 | bp->tos++; | ||
| 83 | bp->used++; | ||
| 84 | } | ||
| 85 | else | ||
| 86 | { | ||
| 87 | ret=(BIGNUM *)sk_value(bp->sk,bp->used); | ||
| 88 | bp->used++; | ||
| 89 | } | ||
| 90 | return(ret); | ||
| 91 | } | ||
| 92 | |||
| 93 | void BN_POOL_pop(bp,num) | ||
| 94 | BN_POOL *bp; | ||
| 95 | int num; | ||
| 96 | { | ||
| 97 | bp->used-=num; | ||
| 98 | } | ||
| 99 | |||
| 100 | int BN_m(r,a,b) | ||
| 101 | BIGNUM *r,*a,*b; | ||
| 102 | { | ||
| 103 | static BN_POOL bp; | ||
| 104 | static init=1; | ||
| 105 | |||
| 106 | if (init) | ||
| 107 | { | ||
| 108 | bp.used=0; | ||
| 109 | bp.tos=0; | ||
| 110 | bp.sk=sk_new_null(); | ||
| 111 | init=0; | ||
| 112 | } | ||
| 113 | return(BN_mm(r,a,b,&bp)); | ||
| 114 | } | ||
| 115 | |||
| 116 | /* r must be different to a and b */ | ||
| 117 | int BN_mm(m, A, B, bp) | ||
| 118 | BIGNUM *m,*A,*B; | ||
| 119 | BN_POOL *bp; | ||
| 120 | { | ||
| 121 | int i,num; | ||
| 122 | int an,bn; | ||
| 123 | BIGNUM *a,*b,*c,*d,*ac,*bd; | ||
| 124 | |||
| 125 | an=A->top; | ||
| 126 | bn=B->top; | ||
| 127 | if ((an <= limit) || (bn <= limit)) | ||
| 128 | { | ||
| 129 | return(BN_mul(m,A,B)); | ||
| 130 | } | ||
| 131 | |||
| 132 | a=BN_POOL_push(bp); | ||
| 133 | b=BN_POOL_push(bp); | ||
| 134 | c=BN_POOL_push(bp); | ||
| 135 | d=BN_POOL_push(bp); | ||
| 136 | ac=BN_POOL_push(bp); | ||
| 137 | bd=BN_POOL_push(bp); | ||
| 138 | |||
| 139 | num=(an <= bn)?an:bn; | ||
| 140 | num=1<<(BN_num_bits_word(num-1)-1); | ||
| 141 | |||
| 142 | /* Are going to now chop things into 'num' word chunks. */ | ||
| 143 | num*=BN_BITS2; | ||
| 144 | |||
| 145 | BN_copy(a,A); | ||
| 146 | BN_mask_bits(a,num); | ||
| 147 | BN_rshift(b,A,num); | ||
| 148 | |||
| 149 | BN_copy(c,B); | ||
| 150 | BN_mask_bits(c,num); | ||
| 151 | BN_rshift(d,B,num); | ||
| 152 | |||
| 153 | BN_sub(ac ,b,a); | ||
| 154 | BN_sub(bd,c,d); | ||
| 155 | BN_mm(m,ac,bd,bp); | ||
| 156 | BN_mm(ac,a,c,bp); | ||
| 157 | BN_mm(bd,b,d,bp); | ||
| 158 | |||
| 159 | BN_add(m,m,ac); | ||
| 160 | BN_add(m,m,bd); | ||
| 161 | BN_lshift(m,m,num); | ||
| 162 | BN_lshift(bd,bd,num*2); | ||
| 163 | |||
| 164 | BN_add(m,m,ac); | ||
| 165 | BN_add(m,m,bd); | ||
| 166 | BN_POOL_pop(bp,6); | ||
| 167 | return(1); | ||
| 168 | } | ||
| 169 | |||
diff --git a/src/lib/libssl/src/crypto/bn/bn_mulw.c b/src/lib/libssl/src/crypto/bn/bn_mulw.c new file mode 100644 index 0000000000..abfc7e4d6c --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/bn_mulw.c | |||
| @@ -0,0 +1,366 @@ | |||
| 1 | /* crypto/bn/bn_mulw.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 "bn_lcl.h" | ||
| 62 | |||
| 63 | #ifdef BN_LLONG | ||
| 64 | |||
| 65 | BN_ULONG bn_mul_add_words(rp,ap,num,w) | ||
| 66 | BN_ULONG *rp,*ap; | ||
| 67 | int num; | ||
| 68 | BN_ULONG w; | ||
| 69 | { | ||
| 70 | BN_ULONG c1=0; | ||
| 71 | |||
| 72 | for (;;) | ||
| 73 | { | ||
| 74 | mul_add(rp[0],ap[0],w,c1); | ||
| 75 | if (--num == 0) break; | ||
| 76 | mul_add(rp[1],ap[1],w,c1); | ||
| 77 | if (--num == 0) break; | ||
| 78 | mul_add(rp[2],ap[2],w,c1); | ||
| 79 | if (--num == 0) break; | ||
| 80 | mul_add(rp[3],ap[3],w,c1); | ||
| 81 | if (--num == 0) break; | ||
| 82 | ap+=4; | ||
| 83 | rp+=4; | ||
| 84 | } | ||
| 85 | |||
| 86 | return(c1); | ||
| 87 | } | ||
| 88 | |||
| 89 | BN_ULONG bn_mul_words(rp,ap,num,w) | ||
| 90 | BN_ULONG *rp,*ap; | ||
| 91 | int num; | ||
| 92 | BN_ULONG w; | ||
| 93 | { | ||
| 94 | BN_ULONG c1=0; | ||
| 95 | |||
| 96 | for (;;) | ||
| 97 | { | ||
| 98 | mul(rp[0],ap[0],w,c1); | ||
| 99 | if (--num == 0) break; | ||
| 100 | mul(rp[1],ap[1],w,c1); | ||
| 101 | if (--num == 0) break; | ||
| 102 | mul(rp[2],ap[2],w,c1); | ||
| 103 | if (--num == 0) break; | ||
| 104 | mul(rp[3],ap[3],w,c1); | ||
| 105 | if (--num == 0) break; | ||
| 106 | ap+=4; | ||
| 107 | rp+=4; | ||
| 108 | } | ||
| 109 | return(c1); | ||
| 110 | } | ||
| 111 | |||
| 112 | void bn_sqr_words(r,a,n) | ||
| 113 | BN_ULONG *r,*a; | ||
| 114 | int n; | ||
| 115 | { | ||
| 116 | for (;;) | ||
| 117 | { | ||
| 118 | BN_ULLONG t; | ||
| 119 | |||
| 120 | t=(BN_ULLONG)(a[0])*(a[0]); | ||
| 121 | r[0]=Lw(t); r[1]=Hw(t); | ||
| 122 | if (--n == 0) break; | ||
| 123 | |||
| 124 | t=(BN_ULLONG)(a[1])*(a[1]); | ||
| 125 | r[2]=Lw(t); r[3]=Hw(t); | ||
| 126 | if (--n == 0) break; | ||
| 127 | |||
| 128 | t=(BN_ULLONG)(a[2])*(a[2]); | ||
| 129 | r[4]=Lw(t); r[5]=Hw(t); | ||
| 130 | if (--n == 0) break; | ||
| 131 | |||
| 132 | t=(BN_ULLONG)(a[3])*(a[3]); | ||
| 133 | r[6]=Lw(t); r[7]=Hw(t); | ||
| 134 | if (--n == 0) break; | ||
| 135 | |||
| 136 | a+=4; | ||
| 137 | r+=8; | ||
| 138 | } | ||
| 139 | } | ||
| 140 | |||
| 141 | BN_ULONG bn_add_words(r,a,b,n) | ||
| 142 | BN_ULONG *r,*a,*b; | ||
| 143 | int n; | ||
| 144 | { | ||
| 145 | BN_ULLONG ll; | ||
| 146 | |||
| 147 | ll=0; | ||
| 148 | for (;;) | ||
| 149 | { | ||
| 150 | ll+= (BN_ULLONG)a[0]+b[0]; | ||
| 151 | r[0]=(BN_ULONG)ll&BN_MASK2; | ||
| 152 | ll>>=BN_BITS2; | ||
| 153 | if (--n <= 0) break; | ||
| 154 | |||
| 155 | ll+= (BN_ULLONG)a[1]+b[1]; | ||
| 156 | r[1]=(BN_ULONG)ll&BN_MASK2; | ||
| 157 | ll>>=BN_BITS2; | ||
| 158 | if (--n <= 0) break; | ||
| 159 | |||
| 160 | ll+= (BN_ULLONG)a[2]+b[2]; | ||
| 161 | r[2]=(BN_ULONG)ll&BN_MASK2; | ||
| 162 | ll>>=BN_BITS2; | ||
| 163 | if (--n <= 0) break; | ||
| 164 | |||
| 165 | ll+= (BN_ULLONG)a[3]+b[3]; | ||
| 166 | r[3]=(BN_ULONG)ll&BN_MASK2; | ||
| 167 | ll>>=BN_BITS2; | ||
| 168 | if (--n <= 0) break; | ||
| 169 | |||
| 170 | a+=4; | ||
| 171 | b+=4; | ||
| 172 | r+=4; | ||
| 173 | } | ||
| 174 | return(ll&BN_MASK2); | ||
| 175 | } | ||
| 176 | |||
| 177 | #else | ||
| 178 | |||
| 179 | BN_ULONG bn_mul_add_words(rp,ap,num,w) | ||
| 180 | BN_ULONG *rp,*ap; | ||
| 181 | int num; | ||
| 182 | BN_ULONG w; | ||
| 183 | { | ||
| 184 | BN_ULONG c=0; | ||
| 185 | BN_ULONG bl,bh; | ||
| 186 | |||
| 187 | bl=LBITS(w); | ||
| 188 | bh=HBITS(w); | ||
| 189 | |||
| 190 | for (;;) | ||
| 191 | { | ||
| 192 | mul_add(rp[0],ap[0],bl,bh,c); | ||
| 193 | if (--num == 0) break; | ||
| 194 | mul_add(rp[1],ap[1],bl,bh,c); | ||
| 195 | if (--num == 0) break; | ||
| 196 | mul_add(rp[2],ap[2],bl,bh,c); | ||
| 197 | if (--num == 0) break; | ||
| 198 | mul_add(rp[3],ap[3],bl,bh,c); | ||
| 199 | if (--num == 0) break; | ||
| 200 | ap+=4; | ||
| 201 | rp+=4; | ||
| 202 | } | ||
| 203 | return(c); | ||
| 204 | } | ||
| 205 | |||
| 206 | BN_ULONG bn_mul_words(rp,ap,num,w) | ||
| 207 | BN_ULONG *rp,*ap; | ||
| 208 | int num; | ||
| 209 | BN_ULONG w; | ||
| 210 | { | ||
| 211 | BN_ULONG carry=0; | ||
| 212 | BN_ULONG bl,bh; | ||
| 213 | |||
| 214 | bl=LBITS(w); | ||
| 215 | bh=HBITS(w); | ||
| 216 | |||
| 217 | for (;;) | ||
| 218 | { | ||
| 219 | mul(rp[0],ap[0],bl,bh,carry); | ||
| 220 | if (--num == 0) break; | ||
| 221 | mul(rp[1],ap[1],bl,bh,carry); | ||
| 222 | if (--num == 0) break; | ||
| 223 | mul(rp[2],ap[2],bl,bh,carry); | ||
| 224 | if (--num == 0) break; | ||
| 225 | mul(rp[3],ap[3],bl,bh,carry); | ||
| 226 | if (--num == 0) break; | ||
| 227 | ap+=4; | ||
| 228 | rp+=4; | ||
| 229 | } | ||
| 230 | return(carry); | ||
| 231 | } | ||
| 232 | |||
| 233 | void bn_sqr_words(r,a,n) | ||
| 234 | BN_ULONG *r,*a; | ||
| 235 | int n; | ||
| 236 | { | ||
| 237 | for (;;) | ||
| 238 | { | ||
| 239 | sqr64(r[0],r[1],a[0]); | ||
| 240 | if (--n == 0) break; | ||
| 241 | |||
| 242 | sqr64(r[2],r[3],a[1]); | ||
| 243 | if (--n == 0) break; | ||
| 244 | |||
| 245 | sqr64(r[4],r[5],a[2]); | ||
| 246 | if (--n == 0) break; | ||
| 247 | |||
| 248 | sqr64(r[6],r[7],a[3]); | ||
| 249 | if (--n == 0) break; | ||
| 250 | |||
| 251 | a+=4; | ||
| 252 | r+=8; | ||
| 253 | } | ||
| 254 | } | ||
| 255 | |||
| 256 | BN_ULONG bn_add_words(r,a,b,n) | ||
| 257 | BN_ULONG *r,*a,*b; | ||
| 258 | int n; | ||
| 259 | { | ||
| 260 | BN_ULONG t1,t2; | ||
| 261 | int carry,i; | ||
| 262 | |||
| 263 | carry=0; | ||
| 264 | for (i=0; i<n; i++) | ||
| 265 | { | ||
| 266 | t1= *(a++); | ||
| 267 | t2= *(b++); | ||
| 268 | if (carry) | ||
| 269 | { | ||
| 270 | carry=(t2 >= ((~t1)&BN_MASK2)); | ||
| 271 | t2=(t1+t2+1)&BN_MASK2; | ||
| 272 | } | ||
| 273 | else | ||
| 274 | { | ||
| 275 | t2=(t1+t2)&BN_MASK2; | ||
| 276 | carry=(t2<t1); | ||
| 277 | } | ||
| 278 | *(r++)=t2; | ||
| 279 | } | ||
| 280 | return(carry); | ||
| 281 | } | ||
| 282 | |||
| 283 | #endif | ||
| 284 | |||
| 285 | #if defined(BN_LLONG) && defined(BN_DIV2W) | ||
| 286 | |||
| 287 | BN_ULONG bn_div64(h,l,d) | ||
| 288 | BN_ULONG h,l,d; | ||
| 289 | { | ||
| 290 | return((BN_ULONG)(((((BN_ULLONG)h)<<BN_BITS2)|l)/(BN_ULLONG)d)); | ||
| 291 | } | ||
| 292 | |||
| 293 | #else | ||
| 294 | |||
| 295 | /* Divide h-l by d and return the result. */ | ||
| 296 | /* I need to test this some more :-( */ | ||
| 297 | BN_ULONG bn_div64(h,l,d) | ||
| 298 | BN_ULONG h,l,d; | ||
| 299 | { | ||
| 300 | BN_ULONG dh,dl,q,ret=0,th,tl,t; | ||
| 301 | int i,count=2; | ||
| 302 | |||
| 303 | if (d == 0) return(BN_MASK2); | ||
| 304 | |||
| 305 | i=BN_num_bits_word(d); | ||
| 306 | if ((i != BN_BITS2) && (h > (BN_ULONG)1<<i)) | ||
| 307 | { | ||
| 308 | #if !defined(NO_STDIO) && !defined(WIN16) | ||
| 309 | fprintf(stderr,"Division would overflow (%d)\n",i); | ||
| 310 | #endif | ||
| 311 | abort(); | ||
| 312 | } | ||
| 313 | i=BN_BITS2-i; | ||
| 314 | if (h >= d) h-=d; | ||
| 315 | |||
| 316 | if (i) | ||
| 317 | { | ||
| 318 | d<<=i; | ||
| 319 | h=(h<<i)|(l>>(BN_BITS2-i)); | ||
| 320 | l<<=i; | ||
| 321 | } | ||
| 322 | dh=(d&BN_MASK2h)>>BN_BITS4; | ||
| 323 | dl=(d&BN_MASK2l); | ||
| 324 | for (;;) | ||
| 325 | { | ||
| 326 | if ((h>>BN_BITS4) == dh) | ||
| 327 | q=BN_MASK2l; | ||
| 328 | else | ||
| 329 | q=h/dh; | ||
| 330 | |||
| 331 | for (;;) | ||
| 332 | { | ||
| 333 | t=(h-q*dh); | ||
| 334 | if ((t&BN_MASK2h) || | ||
| 335 | ((dl*q) <= ( | ||
| 336 | (t<<BN_BITS4)+ | ||
| 337 | ((l&BN_MASK2h)>>BN_BITS4)))) | ||
| 338 | break; | ||
| 339 | q--; | ||
| 340 | } | ||
| 341 | th=q*dh; | ||
| 342 | tl=q*dl; | ||
| 343 | t=(tl>>BN_BITS4); | ||
| 344 | tl=(tl<<BN_BITS4)&BN_MASK2h; | ||
| 345 | th+=t; | ||
| 346 | |||
| 347 | if (l < tl) th++; | ||
| 348 | l-=tl; | ||
| 349 | if (h < th) | ||
| 350 | { | ||
| 351 | h+=d; | ||
| 352 | q--; | ||
| 353 | } | ||
| 354 | h-=th; | ||
| 355 | |||
| 356 | if (--count == 0) break; | ||
| 357 | |||
| 358 | ret=q<<BN_BITS4; | ||
| 359 | h=((h<<BN_BITS4)|(l>>BN_BITS4))&BN_MASK2; | ||
| 360 | l=(l&BN_MASK2l)<<BN_BITS4; | ||
| 361 | } | ||
| 362 | ret|=q; | ||
| 363 | return(ret); | ||
| 364 | } | ||
| 365 | #endif | ||
| 366 | |||
diff --git a/src/lib/libssl/src/crypto/bn/bn_sub.c b/src/lib/libssl/src/crypto/bn/bn_sub.c new file mode 100644 index 0000000000..bba80f8afb --- /dev/null +++ b/src/lib/libssl/src/crypto/bn/bn_sub.c | |||
| @@ -0,0 +1,180 @@ | |||
| 1 | /* crypto/bn/bn_sub.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 "bn_lcl.h" | ||
| 62 | |||
| 63 | /* unsigned subtraction of b from a, a must be larger than b. */ | ||
| 64 | void bn_qsub(r, a, b) | ||
| 65 | BIGNUM *r; | ||
| 66 | BIGNUM *a; | ||
| 67 | BIGNUM *b; | ||
| 68 | { | ||
| 69 | int max,min; | ||
| 70 | register BN_ULONG t1,t2,*ap,*bp,*rp; | ||
| 71 | int i,carry; | ||
| 72 | #if defined(IRIX_CC_BUG) && !defined(LINT) | ||
| 73 | int dummy; | ||
| 74 | #endif | ||
| 75 | |||
| 76 | max=a->top; | ||
| 77 | min=b->top; | ||
| 78 | ap=a->d; | ||
| 79 | bp=b->d; | ||
| 80 | rp=r->d; | ||
| 81 | |||
| 82 | carry=0; | ||
| 83 | for (i=0; i<min; i++) | ||
| 84 | { | ||
| 85 | t1= *(ap++); | ||
| 86 | t2= *(bp++); | ||
| 87 | if (carry) | ||
| 88 | { | ||
| 89 | carry=(t1 <= t2); | ||
| 90 | t1=(t1-t2-1)&BN_MASK2; | ||
| 91 | } | ||
| 92 | else | ||
| 93 | { | ||
| 94 | carry=(t1 < t2); | ||
| 95 | t1=(t1-t2)&BN_MASK2; | ||
| 96 | } | ||
| 97 | #if defined(IRIX_CC_BUG) && !defined(LINT) | ||
| 98 | dummy=t1; | ||
| 99 | #endif | ||
| 100 | *(rp++)=t1&BN_MASK2; | ||
| 101 | } | ||
| 102 | if (carry) /* subtracted */ | ||
| 103 | { | ||
| 104 | while (i < max) | ||
| 105 | { | ||
| 106 | i++; | ||
| 107 | t1= *(ap++); | ||
| 108 | t2=(t1-1)&BN_MASK2; | ||
| 109 | *(rp++)=t2; | ||
| 110 | if (t1 > t2) break; | ||
| 111 | } | ||
| 112 | } | ||
| 113 | #if 0 | ||
| 114 | memcpy(rp,ap,sizeof(*rp)*(max-i)); | ||
| 115 | #else | ||
| 116 | for (; i<max; i++) | ||
| 117 | *(rp++)= *(ap++); | ||
| 118 | #endif | ||
| 119 | |||
| 120 | r->top=max; | ||
| 121 | bn_fix_top(r); | ||
| 122 | } | ||
| 123 | |||
| 124 | int BN_sub(r, a, b) | ||
| 125 | BIGNUM *r; | ||
| 126 | BIGNUM *a; | ||
| 127 | BIGNUM *b; | ||
| 128 | { | ||
| 129 | int max,i; | ||
| 130 | int add=0,neg=0; | ||
| 131 | BIGNUM *tmp; | ||
| 132 | |||
| 133 | /* a - b a-b | ||
| 134 | * a - -b a+b | ||
| 135 | * -a - b -(a+b) | ||
| 136 | * -a - -b b-a | ||
| 137 | */ | ||
| 138 | if (a->neg) | ||
| 139 | { | ||
| 140 | if (b->neg) | ||
| 141 | { tmp=a; a=b; b=tmp; } | ||
| 142 | else | ||
| 143 | { add=1; neg=1; } | ||
| 144 | } | ||
| 145 | else | ||
| 146 | { | ||
| 147 | if (b->neg) { add=1; neg=0; } | ||
| 148 | } | ||
| 149 | |||
| 150 | if (add) | ||
| 151 | { | ||
| 152 | /* As a fast max size, do a a->top | b->top */ | ||
| 153 | i=(a->top | b->top)+1; | ||
| 154 | if (bn_wexpand(r,i) == NULL) | ||
| 155 | return(0); | ||
| 156 | if (i) | ||
| 157 | bn_qadd(r,a,b); | ||
| 158 | else | ||
| 159 | bn_qadd(r,b,a); | ||
| 160 | r->neg=neg; | ||
| 161 | return(1); | ||
| 162 | } | ||
| 163 | |||
| 164 | /* We are actually doing a - b :-) */ | ||
| 165 | |||
| 166 | max=(a->top > b->top)?a->top:b->top; | ||
| 167 | if (bn_wexpand(r,max) == NULL) return(0); | ||
| 168 | if (BN_ucmp(a,b) < 0) | ||
| 169 | { | ||
| 170 | bn_qsub(r,b,a); | ||
| 171 | r->neg=1; | ||
| 172 | } | ||
| 173 | else | ||
| 174 | { | ||
| 175 | bn_qsub(r,a,b); | ||
| 176 | r->neg=0; | ||
| 177 | } | ||
| 178 | return(1); | ||
| 179 | } | ||
| 180 | |||
diff --git a/src/lib/libssl/src/crypto/buffer/Makefile.ssl b/src/lib/libssl/src/crypto/buffer/Makefile.ssl new file mode 100644 index 0000000000..a5f150e523 --- /dev/null +++ b/src/lib/libssl/src/crypto/buffer/Makefile.ssl | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/buffer/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= buffer | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=buffer | ||
| 19 | ERRC=buf_err | ||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= buffer.c $(ERRC).c | ||
| 26 | LIBOBJ= buffer.o $(ERRC).o | ||
| 27 | |||
| 28 | SRC= $(LIBSRC) | ||
| 29 | |||
| 30 | EXHEADER= buffer.h | ||
| 31 | HEADER= $(EXHEADER) | ||
| 32 | |||
| 33 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 34 | |||
| 35 | top: | ||
| 36 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 37 | |||
| 38 | all: lib | ||
| 39 | |||
| 40 | lib: $(LIBOBJ) | ||
| 41 | $(AR) $(LIB) $(LIBOBJ) | ||
| 42 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 43 | @touch lib | ||
| 44 | |||
| 45 | files: | ||
| 46 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 47 | |||
| 48 | links: | ||
| 49 | /bin/rm -f Makefile | ||
| 50 | $(TOP)/util/point.sh Makefile.ssl Makefile; | ||
| 51 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 52 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 53 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 54 | |||
| 55 | install: | ||
| 56 | @for i in $(EXHEADER) ; \ | ||
| 57 | do \ | ||
| 58 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 59 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 60 | done; | ||
| 61 | |||
| 62 | tags: | ||
| 63 | ctags $(SRC) | ||
| 64 | |||
| 65 | tests: | ||
| 66 | |||
| 67 | lint: | ||
| 68 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 69 | |||
| 70 | depend: | ||
| 71 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 72 | |||
| 73 | dclean: | ||
| 74 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 75 | mv -f Makefile.new $(MAKEFILE) | ||
| 76 | |||
| 77 | clean: | ||
| 78 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 79 | |||
| 80 | errors: | ||
| 81 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 82 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 83 | |||
| 84 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/buffer/buffer.err b/src/lib/libssl/src/crypto/buffer/buffer.err new file mode 100644 index 0000000000..62b775e637 --- /dev/null +++ b/src/lib/libssl/src/crypto/buffer/buffer.err | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | /* Error codes for the BUF functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define BUF_F_BUF_MEM_GROW 100 | ||
| 5 | #define BUF_F_BUF_MEM_NEW 101 | ||
| 6 | #define BUF_F_BUF_STRDUP 102 | ||
| 7 | #define BUF_F_PXYCLNT_READ 103 | ||
| 8 | |||
| 9 | /* Reason codes. */ | ||
diff --git a/src/lib/libssl/src/crypto/cast/Makefile.ssl b/src/lib/libssl/src/crypto/cast/Makefile.ssl new file mode 100644 index 0000000000..0143827ae5 --- /dev/null +++ b/src/lib/libssl/src/crypto/cast/Makefile.ssl | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/cast/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= cast | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | CPP= $(CC) -E | ||
| 9 | INCLUDES= | ||
| 10 | CFLAG=-g | ||
| 11 | INSTALLTOP=/usr/local/ssl | ||
| 12 | MAKE= make -f Makefile.ssl | ||
| 13 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 14 | MAKEFILE= Makefile.ssl | ||
| 15 | AR= ar r | ||
| 16 | |||
| 17 | CAST_ENC=c_enc.o | ||
| 18 | # or use | ||
| 19 | #CAST_ENC=asm/cx86-elf.o | ||
| 20 | #CAST_ENC=asm/cx86-out.o | ||
| 21 | #CAST_ENC=asm/cx86-sol.o | ||
| 22 | #CAST_ENC=asm/cx86bdsi.o | ||
| 23 | |||
| 24 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 25 | |||
| 26 | GENERAL=Makefile | ||
| 27 | TEST=casttest.c | ||
| 28 | APPS= | ||
| 29 | |||
| 30 | LIB=$(TOP)/libcrypto.a | ||
| 31 | LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c | ||
| 32 | LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o | ||
| 33 | |||
| 34 | SRC= $(LIBSRC) | ||
| 35 | |||
| 36 | EXHEADER= cast.h | ||
| 37 | HEADER= cast_s.h cast_lcl.h $(EXHEADER) | ||
| 38 | |||
| 39 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 40 | |||
| 41 | top: | ||
| 42 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 43 | |||
| 44 | all: lib | ||
| 45 | |||
| 46 | lib: $(LIBOBJ) | ||
| 47 | $(AR) $(LIB) $(LIBOBJ) | ||
| 48 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 49 | @touch lib | ||
| 50 | |||
| 51 | # elf | ||
| 52 | asm/cx86-elf.o: asm/cx86unix.cpp | ||
| 53 | $(CPP) -DELF asm/cx86unix.cpp | as -o asm/cx86-elf.o | ||
| 54 | |||
| 55 | # solaris | ||
| 56 | asm/cx86-sol.o: asm/cx86unix.cpp | ||
| 57 | $(CC) -E -DSOL asm/cx86unix.cpp | sed 's/^#.*//' > asm/cx86-sol.s | ||
| 58 | as -o asm/cx86-sol.o asm/cx86-sol.s | ||
| 59 | rm -f asm/cx86-sol.s | ||
| 60 | |||
| 61 | # a.out | ||
| 62 | asm/cx86-out.o: asm/cx86unix.cpp | ||
| 63 | $(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o | ||
| 64 | |||
| 65 | # bsdi | ||
| 66 | asm/cx86bsdi.o: asm/cx86unix.cpp | ||
| 67 | $(CPP) -DBSDI asm/cx86unix.cpp | as -o asm/cx86bsdi.o | ||
| 68 | |||
| 69 | asm/cx86unix.cpp: | ||
| 70 | (cd asm; perl cast-586.pl cpp >cx86unix.cpp) | ||
| 71 | |||
| 72 | files: | ||
| 73 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 74 | |||
| 75 | links: | ||
| 76 | /bin/rm -f Makefile | ||
| 77 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 78 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 79 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 80 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 81 | |||
| 82 | install: | ||
| 83 | @for i in $(EXHEADER) ; \ | ||
| 84 | do \ | ||
| 85 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 86 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 87 | done; | ||
| 88 | |||
| 89 | tags: | ||
| 90 | ctags $(SRC) | ||
| 91 | |||
| 92 | tests: | ||
| 93 | |||
| 94 | lint: | ||
| 95 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 96 | |||
| 97 | depend: | ||
| 98 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 99 | |||
| 100 | dclean: | ||
| 101 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 102 | mv -f Makefile.new $(MAKEFILE) | ||
| 103 | |||
| 104 | clean: | ||
| 105 | /bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 106 | |||
| 107 | errors: | ||
| 108 | |||
| 109 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/cast/Makefile.uni b/src/lib/libssl/src/crypto/cast/Makefile.uni new file mode 100644 index 0000000000..780073e75b --- /dev/null +++ b/src/lib/libssl/src/crypto/cast/Makefile.uni | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | # Targets | ||
| 2 | # make - twidle the options yourself :-) | ||
| 3 | # make cc - standard cc options | ||
| 4 | # make gcc - standard gcc options | ||
| 5 | # make x86-elf - linux-elf etc | ||
| 6 | # make x86-out - linux-a.out, FreeBSD etc | ||
| 7 | # make x86-solaris | ||
| 8 | # make x86-bdsi | ||
| 9 | |||
| 10 | # There are 3 possible performance options, experiment :-) | ||
| 11 | #OPTS= -DBF_PTR | ||
| 12 | #OPTS= -DBF_PTR2 | ||
| 13 | OPTS= | ||
| 14 | |||
| 15 | DIR= cast | ||
| 16 | TOP= . | ||
| 17 | CC= gcc | ||
| 18 | CFLAG= -O3 -fomit-frame-pointer | ||
| 19 | |||
| 20 | CPP= $(CC) -E | ||
| 21 | INCLUDES= | ||
| 22 | INSTALLTOP=/usr/local/lib | ||
| 23 | MAKE= make | ||
| 24 | MAKEDEPEND= makedepend | ||
| 25 | MAKEFILE= Makefile.uni | ||
| 26 | AR= ar r | ||
| 27 | |||
| 28 | CAST_ENC=c_enc.o | ||
| 29 | # or use | ||
| 30 | #CAST_ENC=asm/cx86-elf.o | ||
| 31 | #CAST_ENC=asm/cx86-out.o | ||
| 32 | #CAST_ENC=asm/cx86-sol.o | ||
| 33 | #CAST_ENC=asm/cx86bdsi.o | ||
| 34 | |||
| 35 | CFLAGS= $(OPTS) $(INCLUDES) $(CFLAG) -DFULL_TEST | ||
| 36 | |||
| 37 | GENERAL=Makefile | ||
| 38 | TEST=casttest | ||
| 39 | APP1=cast_spd | ||
| 40 | APP2=castopts | ||
| 41 | APPS=$(APP1) $(APP2) | ||
| 42 | |||
| 43 | LIB=libcast.a | ||
| 44 | LIBSRC=c_skey.c c_ecb.c c_enc.c c_cfb64.c c_ofb64.c | ||
| 45 | LIBOBJ=c_skey.o c_ecb.o $(CAST_ENC) c_cfb64.o c_ofb64.o | ||
| 46 | |||
| 47 | SRC= $(LIBSRC) | ||
| 48 | |||
| 49 | EXHEADER= cast.h | ||
| 50 | HEADER= cast_lcl.h $(EXHEADER) | ||
| 51 | |||
| 52 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 53 | |||
| 54 | all: $(LIB) $(TEST) $(APPS) | ||
| 55 | |||
| 56 | $(LIB): $(LIBOBJ) | ||
| 57 | $(AR) $(LIB) $(LIBOBJ) | ||
| 58 | sh $(TOP)/ranlib.sh $(LIB) | ||
| 59 | # elf | ||
| 60 | asm/cx86-elf.o: asm/cx86unix.cpp | ||
| 61 | $(CPP) -DELF asm/cx86unix.cpp | as -o asm/cx86-elf.o | ||
| 62 | |||
| 63 | # solaris | ||
| 64 | asm/cx86-sol.o: asm/cx86unix.cpp | ||
| 65 | $(CC) -E -DSOL asm/cx86unix.cpp | sed 's/^#.*//' > asm/cx86-sol.s | ||
| 66 | as -o asm/cx86-sol.o asm/cx86-sol.s | ||
| 67 | rm -f asm/cx86-sol.s | ||
| 68 | |||
| 69 | # a.out | ||
| 70 | asm/cx86-out.o: asm/cx86unix.cpp | ||
| 71 | $(CPP) -DOUT asm/cx86unix.cpp | as -o asm/cx86-out.o | ||
| 72 | |||
| 73 | # bsdi | ||
| 74 | asm/cx86bsdi.o: asm/cx86unix.cpp | ||
| 75 | $(CPP) -DBSDI asm/cx86unix.cpp | as -o asm/cx86bsdi.o | ||
| 76 | |||
| 77 | asm/cx86unix.cpp: | ||
| 78 | (cd asm; perl cast-586.pl cpp >cx86unix.cpp) | ||
| 79 | |||
| 80 | test: $(TEST) | ||
| 81 | ./$(TEST) | ||
| 82 | |||
| 83 | $(TEST): $(TEST).c $(LIB) | ||
| 84 | $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB) | ||
| 85 | |||
| 86 | $(APP1): $(APP1).c $(LIB) | ||
| 87 | $(CC) -o $(APP1) $(CFLAGS) $(APP1).c $(LIB) | ||
| 88 | |||
| 89 | $(APP2): $(APP2).c $(LIB) | ||
| 90 | $(CC) -o $(APP2) $(CFLAGS) $(APP2).c $(LIB) | ||
| 91 | |||
| 92 | lint: | ||
| 93 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 94 | |||
| 95 | depend: | ||
| 96 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 97 | |||
| 98 | dclean: | ||
| 99 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 100 | mv -f Makefile.new $(MAKEFILE) | ||
| 101 | |||
| 102 | clean: | ||
| 103 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 104 | |||
| 105 | cc: | ||
| 106 | $(MAKE) CC="cc" CFLAG="-O" all | ||
| 107 | |||
| 108 | gcc: | ||
| 109 | $(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
| 110 | |||
| 111 | x86-elf: | ||
| 112 | $(MAKE) CAST_ENC="asm/cx86-elf.o" CFLAG="-DELF $(CFLAGS)" all | ||
| 113 | |||
| 114 | x86-out: | ||
| 115 | $(MAKE) CAST_ENC="asm/cx86-out.o" CFLAG="-DOUT $(CFLAGS)" all | ||
| 116 | |||
| 117 | x86-solaris: | ||
| 118 | $(MAKE) CAST_ENC="asm/cx86-sol.o" CFLAG="-DSOL $(CFLAGS)" all | ||
| 119 | |||
| 120 | x86-bdsi: | ||
| 121 | $(MAKE) CAST_ENC="asm/cx86-bdsi.o" CFLAG="-DBDSI $(CFLAGS)" all | ||
| 122 | |||
| 123 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/cast/asm/c-win32.asm b/src/lib/libssl/src/crypto/cast/asm/c-win32.asm new file mode 100644 index 0000000000..a1d8a2671a --- /dev/null +++ b/src/lib/libssl/src/crypto/cast/asm/c-win32.asm | |||
| @@ -0,0 +1,940 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by cast-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE cast-586.asm | ||
| 8 | .486 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _CAST_encrypt | ||
| 12 | EXTERN _CAST_S_table0:DWORD | ||
| 13 | EXTERN _CAST_S_table1:DWORD | ||
| 14 | EXTERN _CAST_S_table2:DWORD | ||
| 15 | EXTERN _CAST_S_table3:DWORD | ||
| 16 | |||
| 17 | _CAST_encrypt PROC NEAR | ||
| 18 | ; | ||
| 19 | push ebp | ||
| 20 | push ebx | ||
| 21 | mov ebx, DWORD PTR 12[esp] | ||
| 22 | mov ebp, DWORD PTR 16[esp] | ||
| 23 | push esi | ||
| 24 | push edi | ||
| 25 | ; Load the 2 words | ||
| 26 | mov edi, DWORD PTR [ebx] | ||
| 27 | mov esi, DWORD PTR 4[ebx] | ||
| 28 | xor eax, eax | ||
| 29 | ; round 0 | ||
| 30 | mov edx, DWORD PTR [ebp] | ||
| 31 | mov ecx, DWORD PTR 4[ebp] | ||
| 32 | add edx, esi | ||
| 33 | rol edx, cl | ||
| 34 | mov ebx, edx | ||
| 35 | xor ecx, ecx | ||
| 36 | mov cl, dh | ||
| 37 | and ebx, 255 | ||
| 38 | shr edx, 16 | ||
| 39 | xor eax, eax | ||
| 40 | mov al, dh | ||
| 41 | and edx, 255 | ||
| 42 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 43 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 44 | xor ecx, ebx | ||
| 45 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 46 | sub ecx, ebx | ||
| 47 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 48 | add ecx, ebx | ||
| 49 | xor edi, ecx | ||
| 50 | ; round 1 | ||
| 51 | mov edx, DWORD PTR 8[ebp] | ||
| 52 | mov ecx, DWORD PTR 12[ebp] | ||
| 53 | xor edx, edi | ||
| 54 | rol edx, cl | ||
| 55 | mov ebx, edx | ||
| 56 | xor ecx, ecx | ||
| 57 | mov cl, dh | ||
| 58 | and ebx, 255 | ||
| 59 | shr edx, 16 | ||
| 60 | xor eax, eax | ||
| 61 | mov al, dh | ||
| 62 | and edx, 255 | ||
| 63 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 64 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 65 | sub ecx, ebx | ||
| 66 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 67 | add ecx, ebx | ||
| 68 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 69 | xor ecx, ebx | ||
| 70 | xor esi, ecx | ||
| 71 | ; round 2 | ||
| 72 | mov edx, DWORD PTR 16[ebp] | ||
| 73 | mov ecx, DWORD PTR 20[ebp] | ||
| 74 | sub edx, esi | ||
| 75 | rol edx, cl | ||
| 76 | mov ebx, edx | ||
| 77 | xor ecx, ecx | ||
| 78 | mov cl, dh | ||
| 79 | and ebx, 255 | ||
| 80 | shr edx, 16 | ||
| 81 | xor eax, eax | ||
| 82 | mov al, dh | ||
| 83 | and edx, 255 | ||
| 84 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 85 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 86 | add ecx, ebx | ||
| 87 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 88 | xor ecx, ebx | ||
| 89 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 90 | sub ecx, ebx | ||
| 91 | xor edi, ecx | ||
| 92 | ; round 3 | ||
| 93 | mov edx, DWORD PTR 24[ebp] | ||
| 94 | mov ecx, DWORD PTR 28[ebp] | ||
| 95 | add edx, edi | ||
| 96 | rol edx, cl | ||
| 97 | mov ebx, edx | ||
| 98 | xor ecx, ecx | ||
| 99 | mov cl, dh | ||
| 100 | and ebx, 255 | ||
| 101 | shr edx, 16 | ||
| 102 | xor eax, eax | ||
| 103 | mov al, dh | ||
| 104 | and edx, 255 | ||
| 105 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 106 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 107 | xor ecx, ebx | ||
| 108 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 109 | sub ecx, ebx | ||
| 110 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 111 | add ecx, ebx | ||
| 112 | xor esi, ecx | ||
| 113 | ; round 4 | ||
| 114 | mov edx, DWORD PTR 32[ebp] | ||
| 115 | mov ecx, DWORD PTR 36[ebp] | ||
| 116 | xor edx, esi | ||
| 117 | rol edx, cl | ||
| 118 | mov ebx, edx | ||
| 119 | xor ecx, ecx | ||
| 120 | mov cl, dh | ||
| 121 | and ebx, 255 | ||
| 122 | shr edx, 16 | ||
| 123 | xor eax, eax | ||
| 124 | mov al, dh | ||
| 125 | and edx, 255 | ||
| 126 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 127 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 128 | sub ecx, ebx | ||
| 129 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 130 | add ecx, ebx | ||
| 131 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 132 | xor ecx, ebx | ||
| 133 | xor edi, ecx | ||
| 134 | ; round 5 | ||
| 135 | mov edx, DWORD PTR 40[ebp] | ||
| 136 | mov ecx, DWORD PTR 44[ebp] | ||
| 137 | sub edx, edi | ||
| 138 | rol edx, cl | ||
| 139 | mov ebx, edx | ||
| 140 | xor ecx, ecx | ||
| 141 | mov cl, dh | ||
| 142 | and ebx, 255 | ||
| 143 | shr edx, 16 | ||
| 144 | xor eax, eax | ||
| 145 | mov al, dh | ||
| 146 | and edx, 255 | ||
| 147 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 148 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 149 | add ecx, ebx | ||
| 150 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 151 | xor ecx, ebx | ||
| 152 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 153 | sub ecx, ebx | ||
| 154 | xor esi, ecx | ||
| 155 | ; round 6 | ||
| 156 | mov edx, DWORD PTR 48[ebp] | ||
| 157 | mov ecx, DWORD PTR 52[ebp] | ||
| 158 | add edx, esi | ||
| 159 | rol edx, cl | ||
| 160 | mov ebx, edx | ||
| 161 | xor ecx, ecx | ||
| 162 | mov cl, dh | ||
| 163 | and ebx, 255 | ||
| 164 | shr edx, 16 | ||
| 165 | xor eax, eax | ||
| 166 | mov al, dh | ||
| 167 | and edx, 255 | ||
| 168 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 169 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 170 | xor ecx, ebx | ||
| 171 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 172 | sub ecx, ebx | ||
| 173 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 174 | add ecx, ebx | ||
| 175 | xor edi, ecx | ||
| 176 | ; round 7 | ||
| 177 | mov edx, DWORD PTR 56[ebp] | ||
| 178 | mov ecx, DWORD PTR 60[ebp] | ||
| 179 | xor edx, edi | ||
| 180 | rol edx, cl | ||
| 181 | mov ebx, edx | ||
| 182 | xor ecx, ecx | ||
| 183 | mov cl, dh | ||
| 184 | and ebx, 255 | ||
| 185 | shr edx, 16 | ||
| 186 | xor eax, eax | ||
| 187 | mov al, dh | ||
| 188 | and edx, 255 | ||
| 189 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 190 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 191 | sub ecx, ebx | ||
| 192 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 193 | add ecx, ebx | ||
| 194 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 195 | xor ecx, ebx | ||
| 196 | xor esi, ecx | ||
| 197 | ; round 8 | ||
| 198 | mov edx, DWORD PTR 64[ebp] | ||
| 199 | mov ecx, DWORD PTR 68[ebp] | ||
| 200 | sub edx, esi | ||
| 201 | rol edx, cl | ||
| 202 | mov ebx, edx | ||
| 203 | xor ecx, ecx | ||
| 204 | mov cl, dh | ||
| 205 | and ebx, 255 | ||
| 206 | shr edx, 16 | ||
| 207 | xor eax, eax | ||
| 208 | mov al, dh | ||
| 209 | and edx, 255 | ||
| 210 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 211 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 212 | add ecx, ebx | ||
| 213 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 214 | xor ecx, ebx | ||
| 215 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 216 | sub ecx, ebx | ||
| 217 | xor edi, ecx | ||
| 218 | ; round 9 | ||
| 219 | mov edx, DWORD PTR 72[ebp] | ||
| 220 | mov ecx, DWORD PTR 76[ebp] | ||
| 221 | add edx, edi | ||
| 222 | rol edx, cl | ||
| 223 | mov ebx, edx | ||
| 224 | xor ecx, ecx | ||
| 225 | mov cl, dh | ||
| 226 | and ebx, 255 | ||
| 227 | shr edx, 16 | ||
| 228 | xor eax, eax | ||
| 229 | mov al, dh | ||
| 230 | and edx, 255 | ||
| 231 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 232 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 233 | xor ecx, ebx | ||
| 234 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 235 | sub ecx, ebx | ||
| 236 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 237 | add ecx, ebx | ||
| 238 | xor esi, ecx | ||
| 239 | ; round 10 | ||
| 240 | mov edx, DWORD PTR 80[ebp] | ||
| 241 | mov ecx, DWORD PTR 84[ebp] | ||
| 242 | xor edx, esi | ||
| 243 | rol edx, cl | ||
| 244 | mov ebx, edx | ||
| 245 | xor ecx, ecx | ||
| 246 | mov cl, dh | ||
| 247 | and ebx, 255 | ||
| 248 | shr edx, 16 | ||
| 249 | xor eax, eax | ||
| 250 | mov al, dh | ||
| 251 | and edx, 255 | ||
| 252 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 253 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 254 | sub ecx, ebx | ||
| 255 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 256 | add ecx, ebx | ||
| 257 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 258 | xor ecx, ebx | ||
| 259 | xor edi, ecx | ||
| 260 | ; round 11 | ||
| 261 | mov edx, DWORD PTR 88[ebp] | ||
| 262 | mov ecx, DWORD PTR 92[ebp] | ||
| 263 | sub edx, edi | ||
| 264 | rol edx, cl | ||
| 265 | mov ebx, edx | ||
| 266 | xor ecx, ecx | ||
| 267 | mov cl, dh | ||
| 268 | and ebx, 255 | ||
| 269 | shr edx, 16 | ||
| 270 | xor eax, eax | ||
| 271 | mov al, dh | ||
| 272 | and edx, 255 | ||
| 273 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 274 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 275 | add ecx, ebx | ||
| 276 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 277 | xor ecx, ebx | ||
| 278 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 279 | sub ecx, ebx | ||
| 280 | xor esi, ecx | ||
| 281 | ; round 12 | ||
| 282 | mov edx, DWORD PTR 96[ebp] | ||
| 283 | mov ecx, DWORD PTR 100[ebp] | ||
| 284 | add edx, esi | ||
| 285 | rol edx, cl | ||
| 286 | mov ebx, edx | ||
| 287 | xor ecx, ecx | ||
| 288 | mov cl, dh | ||
| 289 | and ebx, 255 | ||
| 290 | shr edx, 16 | ||
| 291 | xor eax, eax | ||
| 292 | mov al, dh | ||
| 293 | and edx, 255 | ||
| 294 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 295 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 296 | xor ecx, ebx | ||
| 297 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 298 | sub ecx, ebx | ||
| 299 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 300 | add ecx, ebx | ||
| 301 | xor edi, ecx | ||
| 302 | ; round 13 | ||
| 303 | mov edx, DWORD PTR 104[ebp] | ||
| 304 | mov ecx, DWORD PTR 108[ebp] | ||
| 305 | xor edx, edi | ||
| 306 | rol edx, cl | ||
| 307 | mov ebx, edx | ||
| 308 | xor ecx, ecx | ||
| 309 | mov cl, dh | ||
| 310 | and ebx, 255 | ||
| 311 | shr edx, 16 | ||
| 312 | xor eax, eax | ||
| 313 | mov al, dh | ||
| 314 | and edx, 255 | ||
| 315 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 316 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 317 | sub ecx, ebx | ||
| 318 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 319 | add ecx, ebx | ||
| 320 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 321 | xor ecx, ebx | ||
| 322 | xor esi, ecx | ||
| 323 | ; round 14 | ||
| 324 | mov edx, DWORD PTR 112[ebp] | ||
| 325 | mov ecx, DWORD PTR 116[ebp] | ||
| 326 | sub edx, esi | ||
| 327 | rol edx, cl | ||
| 328 | mov ebx, edx | ||
| 329 | xor ecx, ecx | ||
| 330 | mov cl, dh | ||
| 331 | and ebx, 255 | ||
| 332 | shr edx, 16 | ||
| 333 | xor eax, eax | ||
| 334 | mov al, dh | ||
| 335 | and edx, 255 | ||
| 336 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 337 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 338 | add ecx, ebx | ||
| 339 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 340 | xor ecx, ebx | ||
| 341 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 342 | sub ecx, ebx | ||
| 343 | xor edi, ecx | ||
| 344 | ; round 15 | ||
| 345 | mov edx, DWORD PTR 120[ebp] | ||
| 346 | mov ecx, DWORD PTR 124[ebp] | ||
| 347 | add edx, edi | ||
| 348 | rol edx, cl | ||
| 349 | mov ebx, edx | ||
| 350 | xor ecx, ecx | ||
| 351 | mov cl, dh | ||
| 352 | and ebx, 255 | ||
| 353 | shr edx, 16 | ||
| 354 | xor eax, eax | ||
| 355 | mov al, dh | ||
| 356 | and edx, 255 | ||
| 357 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 358 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 359 | xor ecx, ebx | ||
| 360 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 361 | sub ecx, ebx | ||
| 362 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 363 | add ecx, ebx | ||
| 364 | mov eax, DWORD PTR 20[esp] | ||
| 365 | xor esi, ecx | ||
| 366 | nop | ||
| 367 | mov DWORD PTR 4[eax],edi | ||
| 368 | mov DWORD PTR [eax],esi | ||
| 369 | pop edi | ||
| 370 | pop esi | ||
| 371 | pop ebx | ||
| 372 | pop ebp | ||
| 373 | ret | ||
| 374 | _CAST_encrypt ENDP | ||
| 375 | _TEXT ENDS | ||
| 376 | _TEXT SEGMENT | ||
| 377 | PUBLIC _CAST_decrypt | ||
| 378 | EXTERN _CAST_S_table0:DWORD | ||
| 379 | EXTERN _CAST_S_table1:DWORD | ||
| 380 | EXTERN _CAST_S_table2:DWORD | ||
| 381 | EXTERN _CAST_S_table3:DWORD | ||
| 382 | |||
| 383 | _CAST_decrypt PROC NEAR | ||
| 384 | ; | ||
| 385 | push ebp | ||
| 386 | push ebx | ||
| 387 | mov ebx, DWORD PTR 12[esp] | ||
| 388 | mov ebp, DWORD PTR 16[esp] | ||
| 389 | push esi | ||
| 390 | push edi | ||
| 391 | ; Load the 2 words | ||
| 392 | mov edi, DWORD PTR [ebx] | ||
| 393 | mov esi, DWORD PTR 4[ebx] | ||
| 394 | xor eax, eax | ||
| 395 | ; round 15 | ||
| 396 | mov edx, DWORD PTR 120[ebp] | ||
| 397 | mov ecx, DWORD PTR 124[ebp] | ||
| 398 | add edx, esi | ||
| 399 | rol edx, cl | ||
| 400 | mov ebx, edx | ||
| 401 | xor ecx, ecx | ||
| 402 | mov cl, dh | ||
| 403 | and ebx, 255 | ||
| 404 | shr edx, 16 | ||
| 405 | xor eax, eax | ||
| 406 | mov al, dh | ||
| 407 | and edx, 255 | ||
| 408 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 409 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 410 | xor ecx, ebx | ||
| 411 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 412 | sub ecx, ebx | ||
| 413 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 414 | add ecx, ebx | ||
| 415 | xor edi, ecx | ||
| 416 | ; round 14 | ||
| 417 | mov edx, DWORD PTR 112[ebp] | ||
| 418 | mov ecx, DWORD PTR 116[ebp] | ||
| 419 | sub edx, edi | ||
| 420 | rol edx, cl | ||
| 421 | mov ebx, edx | ||
| 422 | xor ecx, ecx | ||
| 423 | mov cl, dh | ||
| 424 | and ebx, 255 | ||
| 425 | shr edx, 16 | ||
| 426 | xor eax, eax | ||
| 427 | mov al, dh | ||
| 428 | and edx, 255 | ||
| 429 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 430 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 431 | add ecx, ebx | ||
| 432 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 433 | xor ecx, ebx | ||
| 434 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 435 | sub ecx, ebx | ||
| 436 | xor esi, ecx | ||
| 437 | ; round 13 | ||
| 438 | mov edx, DWORD PTR 104[ebp] | ||
| 439 | mov ecx, DWORD PTR 108[ebp] | ||
| 440 | xor edx, esi | ||
| 441 | rol edx, cl | ||
| 442 | mov ebx, edx | ||
| 443 | xor ecx, ecx | ||
| 444 | mov cl, dh | ||
| 445 | and ebx, 255 | ||
| 446 | shr edx, 16 | ||
| 447 | xor eax, eax | ||
| 448 | mov al, dh | ||
| 449 | and edx, 255 | ||
| 450 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 451 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 452 | sub ecx, ebx | ||
| 453 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 454 | add ecx, ebx | ||
| 455 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 456 | xor ecx, ebx | ||
| 457 | xor edi, ecx | ||
| 458 | ; round 12 | ||
| 459 | mov edx, DWORD PTR 96[ebp] | ||
| 460 | mov ecx, DWORD PTR 100[ebp] | ||
| 461 | add edx, edi | ||
| 462 | rol edx, cl | ||
| 463 | mov ebx, edx | ||
| 464 | xor ecx, ecx | ||
| 465 | mov cl, dh | ||
| 466 | and ebx, 255 | ||
| 467 | shr edx, 16 | ||
| 468 | xor eax, eax | ||
| 469 | mov al, dh | ||
| 470 | and edx, 255 | ||
| 471 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 472 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 473 | xor ecx, ebx | ||
| 474 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 475 | sub ecx, ebx | ||
| 476 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 477 | add ecx, ebx | ||
| 478 | xor esi, ecx | ||
| 479 | ; round 11 | ||
| 480 | mov edx, DWORD PTR 88[ebp] | ||
| 481 | mov ecx, DWORD PTR 92[ebp] | ||
| 482 | sub edx, esi | ||
| 483 | rol edx, cl | ||
| 484 | mov ebx, edx | ||
| 485 | xor ecx, ecx | ||
| 486 | mov cl, dh | ||
| 487 | and ebx, 255 | ||
| 488 | shr edx, 16 | ||
| 489 | xor eax, eax | ||
| 490 | mov al, dh | ||
| 491 | and edx, 255 | ||
| 492 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 493 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 494 | add ecx, ebx | ||
| 495 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 496 | xor ecx, ebx | ||
| 497 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 498 | sub ecx, ebx | ||
| 499 | xor edi, ecx | ||
| 500 | ; round 10 | ||
| 501 | mov edx, DWORD PTR 80[ebp] | ||
| 502 | mov ecx, DWORD PTR 84[ebp] | ||
| 503 | xor edx, edi | ||
| 504 | rol edx, cl | ||
| 505 | mov ebx, edx | ||
| 506 | xor ecx, ecx | ||
| 507 | mov cl, dh | ||
| 508 | and ebx, 255 | ||
| 509 | shr edx, 16 | ||
| 510 | xor eax, eax | ||
| 511 | mov al, dh | ||
| 512 | and edx, 255 | ||
| 513 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 514 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 515 | sub ecx, ebx | ||
| 516 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 517 | add ecx, ebx | ||
| 518 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 519 | xor ecx, ebx | ||
| 520 | xor esi, ecx | ||
| 521 | ; round 9 | ||
| 522 | mov edx, DWORD PTR 72[ebp] | ||
| 523 | mov ecx, DWORD PTR 76[ebp] | ||
| 524 | add edx, esi | ||
| 525 | rol edx, cl | ||
| 526 | mov ebx, edx | ||
| 527 | xor ecx, ecx | ||
| 528 | mov cl, dh | ||
| 529 | and ebx, 255 | ||
| 530 | shr edx, 16 | ||
| 531 | xor eax, eax | ||
| 532 | mov al, dh | ||
| 533 | and edx, 255 | ||
| 534 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 535 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 536 | xor ecx, ebx | ||
| 537 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 538 | sub ecx, ebx | ||
| 539 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 540 | add ecx, ebx | ||
| 541 | xor edi, ecx | ||
| 542 | ; round 8 | ||
| 543 | mov edx, DWORD PTR 64[ebp] | ||
| 544 | mov ecx, DWORD PTR 68[ebp] | ||
| 545 | sub edx, edi | ||
| 546 | rol edx, cl | ||
| 547 | mov ebx, edx | ||
| 548 | xor ecx, ecx | ||
| 549 | mov cl, dh | ||
| 550 | and ebx, 255 | ||
| 551 | shr edx, 16 | ||
| 552 | xor eax, eax | ||
| 553 | mov al, dh | ||
| 554 | and edx, 255 | ||
| 555 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 556 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 557 | add ecx, ebx | ||
| 558 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 559 | xor ecx, ebx | ||
| 560 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 561 | sub ecx, ebx | ||
| 562 | xor esi, ecx | ||
| 563 | ; round 7 | ||
| 564 | mov edx, DWORD PTR 56[ebp] | ||
| 565 | mov ecx, DWORD PTR 60[ebp] | ||
| 566 | xor edx, esi | ||
| 567 | rol edx, cl | ||
| 568 | mov ebx, edx | ||
| 569 | xor ecx, ecx | ||
| 570 | mov cl, dh | ||
| 571 | and ebx, 255 | ||
| 572 | shr edx, 16 | ||
| 573 | xor eax, eax | ||
| 574 | mov al, dh | ||
| 575 | and edx, 255 | ||
| 576 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 577 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 578 | sub ecx, ebx | ||
| 579 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 580 | add ecx, ebx | ||
| 581 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 582 | xor ecx, ebx | ||
| 583 | xor edi, ecx | ||
| 584 | ; round 6 | ||
| 585 | mov edx, DWORD PTR 48[ebp] | ||
| 586 | mov ecx, DWORD PTR 52[ebp] | ||
| 587 | add edx, edi | ||
| 588 | rol edx, cl | ||
| 589 | mov ebx, edx | ||
| 590 | xor ecx, ecx | ||
| 591 | mov cl, dh | ||
| 592 | and ebx, 255 | ||
| 593 | shr edx, 16 | ||
| 594 | xor eax, eax | ||
| 595 | mov al, dh | ||
| 596 | and edx, 255 | ||
| 597 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 598 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 599 | xor ecx, ebx | ||
| 600 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 601 | sub ecx, ebx | ||
| 602 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 603 | add ecx, ebx | ||
| 604 | xor esi, ecx | ||
| 605 | ; round 5 | ||
| 606 | mov edx, DWORD PTR 40[ebp] | ||
| 607 | mov ecx, DWORD PTR 44[ebp] | ||
| 608 | sub edx, esi | ||
| 609 | rol edx, cl | ||
| 610 | mov ebx, edx | ||
| 611 | xor ecx, ecx | ||
| 612 | mov cl, dh | ||
| 613 | and ebx, 255 | ||
| 614 | shr edx, 16 | ||
| 615 | xor eax, eax | ||
| 616 | mov al, dh | ||
| 617 | and edx, 255 | ||
| 618 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 619 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 620 | add ecx, ebx | ||
| 621 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 622 | xor ecx, ebx | ||
| 623 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 624 | sub ecx, ebx | ||
| 625 | xor edi, ecx | ||
| 626 | ; round 4 | ||
| 627 | mov edx, DWORD PTR 32[ebp] | ||
| 628 | mov ecx, DWORD PTR 36[ebp] | ||
| 629 | xor edx, edi | ||
| 630 | rol edx, cl | ||
| 631 | mov ebx, edx | ||
| 632 | xor ecx, ecx | ||
| 633 | mov cl, dh | ||
| 634 | and ebx, 255 | ||
| 635 | shr edx, 16 | ||
| 636 | xor eax, eax | ||
| 637 | mov al, dh | ||
| 638 | and edx, 255 | ||
| 639 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 640 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 641 | sub ecx, ebx | ||
| 642 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 643 | add ecx, ebx | ||
| 644 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 645 | xor ecx, ebx | ||
| 646 | xor esi, ecx | ||
| 647 | ; round 3 | ||
| 648 | mov edx, DWORD PTR 24[ebp] | ||
| 649 | mov ecx, DWORD PTR 28[ebp] | ||
| 650 | add edx, esi | ||
| 651 | rol edx, cl | ||
| 652 | mov ebx, edx | ||
| 653 | xor ecx, ecx | ||
| 654 | mov cl, dh | ||
| 655 | and ebx, 255 | ||
| 656 | shr edx, 16 | ||
| 657 | xor eax, eax | ||
| 658 | mov al, dh | ||
| 659 | and edx, 255 | ||
| 660 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 661 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 662 | xor ecx, ebx | ||
| 663 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 664 | sub ecx, ebx | ||
| 665 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 666 | add ecx, ebx | ||
| 667 | xor edi, ecx | ||
| 668 | ; round 2 | ||
| 669 | mov edx, DWORD PTR 16[ebp] | ||
| 670 | mov ecx, DWORD PTR 20[ebp] | ||
| 671 | sub edx, edi | ||
| 672 | rol edx, cl | ||
| 673 | mov ebx, edx | ||
| 674 | xor ecx, ecx | ||
| 675 | mov cl, dh | ||
| 676 | and ebx, 255 | ||
| 677 | shr edx, 16 | ||
| 678 | xor eax, eax | ||
| 679 | mov al, dh | ||
| 680 | and edx, 255 | ||
| 681 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 682 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 683 | add ecx, ebx | ||
| 684 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 685 | xor ecx, ebx | ||
| 686 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 687 | sub ecx, ebx | ||
| 688 | xor esi, ecx | ||
| 689 | ; round 1 | ||
| 690 | mov edx, DWORD PTR 8[ebp] | ||
| 691 | mov ecx, DWORD PTR 12[ebp] | ||
| 692 | xor edx, esi | ||
| 693 | rol edx, cl | ||
| 694 | mov ebx, edx | ||
| 695 | xor ecx, ecx | ||
| 696 | mov cl, dh | ||
| 697 | and ebx, 255 | ||
| 698 | shr edx, 16 | ||
| 699 | xor eax, eax | ||
| 700 | mov al, dh | ||
| 701 | and edx, 255 | ||
| 702 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 703 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 704 | sub ecx, ebx | ||
| 705 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 706 | add ecx, ebx | ||
| 707 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 708 | xor ecx, ebx | ||
| 709 | xor edi, ecx | ||
| 710 | ; round 0 | ||
| 711 | mov edx, DWORD PTR [ebp] | ||
| 712 | mov ecx, DWORD PTR 4[ebp] | ||
| 713 | add edx, edi | ||
| 714 | rol edx, cl | ||
| 715 | mov ebx, edx | ||
| 716 | xor ecx, ecx | ||
| 717 | mov cl, dh | ||
| 718 | and ebx, 255 | ||
| 719 | shr edx, 16 | ||
| 720 | xor eax, eax | ||
| 721 | mov al, dh | ||
| 722 | and edx, 255 | ||
| 723 | mov ecx, DWORD PTR _CAST_S_table0[ecx*4] | ||
| 724 | mov ebx, DWORD PTR _CAST_S_table1[ebx*4] | ||
| 725 | xor ecx, ebx | ||
| 726 | mov ebx, DWORD PTR _CAST_S_table2[eax*4] | ||
| 727 | sub ecx, ebx | ||
| 728 | mov ebx, DWORD PTR _CAST_S_table3[edx*4] | ||
| 729 | add ecx, ebx | ||
| 730 | mov eax, DWORD PTR 20[esp] | ||
| 731 | xor esi, ecx | ||
| 732 | nop | ||
| 733 | mov DWORD PTR 4[eax],edi | ||
| 734 | mov DWORD PTR [eax],esi | ||
| 735 | pop edi | ||
| 736 | pop esi | ||
| 737 | pop ebx | ||
| 738 | pop ebp | ||
| 739 | ret | ||
| 740 | _CAST_decrypt ENDP | ||
| 741 | _TEXT ENDS | ||
| 742 | _TEXT SEGMENT | ||
| 743 | PUBLIC _CAST_cbc_encrypt | ||
| 744 | |||
| 745 | _CAST_cbc_encrypt PROC NEAR | ||
| 746 | ; | ||
| 747 | push ebp | ||
| 748 | push ebx | ||
| 749 | push esi | ||
| 750 | push edi | ||
| 751 | mov ebp, DWORD PTR 28[esp] | ||
| 752 | ; getting iv ptr from parameter 4 | ||
| 753 | mov ebx, DWORD PTR 36[esp] | ||
| 754 | mov esi, DWORD PTR [ebx] | ||
| 755 | mov edi, DWORD PTR 4[ebx] | ||
| 756 | push edi | ||
| 757 | push esi | ||
| 758 | push edi | ||
| 759 | push esi | ||
| 760 | mov ebx, esp | ||
| 761 | mov esi, DWORD PTR 36[esp] | ||
| 762 | mov edi, DWORD PTR 40[esp] | ||
| 763 | ; getting encrypt flag from parameter 5 | ||
| 764 | mov ecx, DWORD PTR 56[esp] | ||
| 765 | ; get and push parameter 3 | ||
| 766 | mov eax, DWORD PTR 48[esp] | ||
| 767 | push eax | ||
| 768 | push ebx | ||
| 769 | cmp ecx, 0 | ||
| 770 | jz $L000decrypt | ||
| 771 | and ebp, 4294967288 | ||
| 772 | mov eax, DWORD PTR 8[esp] | ||
| 773 | mov ebx, DWORD PTR 12[esp] | ||
| 774 | jz $L001encrypt_finish | ||
| 775 | L002encrypt_loop: | ||
| 776 | mov ecx, DWORD PTR [esi] | ||
| 777 | mov edx, DWORD PTR 4[esi] | ||
| 778 | xor eax, ecx | ||
| 779 | xor ebx, edx | ||
| 780 | bswap eax | ||
| 781 | bswap ebx | ||
| 782 | mov DWORD PTR 8[esp],eax | ||
| 783 | mov DWORD PTR 12[esp],ebx | ||
| 784 | call _CAST_encrypt | ||
| 785 | mov eax, DWORD PTR 8[esp] | ||
| 786 | mov ebx, DWORD PTR 12[esp] | ||
| 787 | bswap eax | ||
| 788 | bswap ebx | ||
| 789 | mov DWORD PTR [edi],eax | ||
| 790 | mov DWORD PTR 4[edi],ebx | ||
| 791 | add esi, 8 | ||
| 792 | add edi, 8 | ||
| 793 | sub ebp, 8 | ||
| 794 | jnz L002encrypt_loop | ||
| 795 | $L001encrypt_finish: | ||
| 796 | mov ebp, DWORD PTR 52[esp] | ||
| 797 | and ebp, 7 | ||
| 798 | jz $L003finish | ||
| 799 | xor ecx, ecx | ||
| 800 | xor edx, edx | ||
| 801 | mov ebp, DWORD PTR $L004cbc_enc_jmp_table[ebp*4] | ||
| 802 | jmp ebp | ||
| 803 | L005ej7: | ||
| 804 | xor edx, edx | ||
| 805 | mov dh, BYTE PTR 6[esi] | ||
| 806 | shl edx, 8 | ||
| 807 | L006ej6: | ||
| 808 | mov dh, BYTE PTR 5[esi] | ||
| 809 | L007ej5: | ||
| 810 | mov dl, BYTE PTR 4[esi] | ||
| 811 | L008ej4: | ||
| 812 | mov ecx, DWORD PTR [esi] | ||
| 813 | jmp $L009ejend | ||
| 814 | L010ej3: | ||
| 815 | mov ch, BYTE PTR 2[esi] | ||
| 816 | xor ecx, ecx | ||
| 817 | shl ecx, 8 | ||
| 818 | L011ej2: | ||
| 819 | mov ch, BYTE PTR 1[esi] | ||
| 820 | L012ej1: | ||
| 821 | mov cl, BYTE PTR [esi] | ||
| 822 | $L009ejend: | ||
| 823 | xor eax, ecx | ||
| 824 | xor ebx, edx | ||
| 825 | bswap eax | ||
| 826 | bswap ebx | ||
| 827 | mov DWORD PTR 8[esp],eax | ||
| 828 | mov DWORD PTR 12[esp],ebx | ||
| 829 | call _CAST_encrypt | ||
| 830 | mov eax, DWORD PTR 8[esp] | ||
| 831 | mov ebx, DWORD PTR 12[esp] | ||
| 832 | bswap eax | ||
| 833 | bswap ebx | ||
| 834 | mov DWORD PTR [edi],eax | ||
| 835 | mov DWORD PTR 4[edi],ebx | ||
| 836 | jmp $L003finish | ||
| 837 | $L000decrypt: | ||
| 838 | and ebp, 4294967288 | ||
| 839 | mov eax, DWORD PTR 16[esp] | ||
| 840 | mov ebx, DWORD PTR 20[esp] | ||
| 841 | jz $L013decrypt_finish | ||
| 842 | L014decrypt_loop: | ||
| 843 | mov eax, DWORD PTR [esi] | ||
| 844 | mov ebx, DWORD PTR 4[esi] | ||
| 845 | bswap eax | ||
| 846 | bswap ebx | ||
| 847 | mov DWORD PTR 8[esp],eax | ||
| 848 | mov DWORD PTR 12[esp],ebx | ||
| 849 | call _CAST_decrypt | ||
| 850 | mov eax, DWORD PTR 8[esp] | ||
| 851 | mov ebx, DWORD PTR 12[esp] | ||
| 852 | bswap eax | ||
| 853 | bswap ebx | ||
| 854 | mov ecx, DWORD PTR 16[esp] | ||
| 855 | mov edx, DWORD PTR 20[esp] | ||
| 856 | xor ecx, eax | ||
| 857 | xor edx, ebx | ||
| 858 | mov eax, DWORD PTR [esi] | ||
| 859 | mov ebx, DWORD PTR 4[esi] | ||
| 860 | mov DWORD PTR [edi],ecx | ||
| 861 | mov DWORD PTR 4[edi],edx | ||
| 862 | mov DWORD PTR 16[esp],eax | ||
| 863 | mov DWORD PTR 20[esp],ebx | ||
| 864 | add esi, 8 | ||
| 865 | add edi, 8 | ||
| 866 | sub ebp, 8 | ||
| 867 | jnz L014decrypt_loop | ||
| 868 | $L013decrypt_finish: | ||
| 869 | mov ebp, DWORD PTR 52[esp] | ||
| 870 | and ebp, 7 | ||
| 871 | jz $L003finish | ||
| 872 | mov eax, DWORD PTR [esi] | ||
| 873 | mov ebx, DWORD PTR 4[esi] | ||
| 874 | bswap eax | ||
| 875 | bswap ebx | ||
| 876 | mov DWORD PTR 8[esp],eax | ||
| 877 | mov DWORD PTR 12[esp],ebx | ||
| 878 | call _CAST_decrypt | ||
| 879 | mov eax, DWORD PTR 8[esp] | ||
| 880 | mov ebx, DWORD PTR 12[esp] | ||
| 881 | bswap eax | ||
| 882 | bswap ebx | ||
| 883 | mov ecx, DWORD PTR 16[esp] | ||
| 884 | mov edx, DWORD PTR 20[esp] | ||
| 885 | xor ecx, eax | ||
| 886 | xor edx, ebx | ||
| 887 | mov eax, DWORD PTR [esi] | ||
| 888 | mov ebx, DWORD PTR 4[esi] | ||
| 889 | L015dj7: | ||
| 890 | ror edx, 16 | ||
| 891 | mov BYTE PTR 6[edi],dl | ||
| 892 | shr edx, 16 | ||
| 893 | L016dj6: | ||
| 894 | mov BYTE PTR 5[edi],dh | ||
| 895 | L017dj5: | ||
| 896 | mov BYTE PTR 4[edi],dl | ||
| 897 | L018dj4: | ||
| 898 | mov DWORD PTR [edi],ecx | ||
| 899 | jmp $L019djend | ||
| 900 | L020dj3: | ||
| 901 | ror ecx, 16 | ||
| 902 | mov BYTE PTR 2[edi],cl | ||
| 903 | shl ecx, 16 | ||
| 904 | L021dj2: | ||
| 905 | mov BYTE PTR 1[esi],ch | ||
| 906 | L022dj1: | ||
| 907 | mov BYTE PTR [esi], cl | ||
| 908 | $L019djend: | ||
| 909 | jmp $L003finish | ||
| 910 | $L003finish: | ||
| 911 | mov ecx, DWORD PTR 60[esp] | ||
| 912 | add esp, 24 | ||
| 913 | mov DWORD PTR [ecx],eax | ||
| 914 | mov DWORD PTR 4[ecx],ebx | ||
| 915 | pop edi | ||
| 916 | pop esi | ||
| 917 | pop ebx | ||
| 918 | pop ebp | ||
| 919 | ret | ||
| 920 | $L004cbc_enc_jmp_table: | ||
| 921 | DD 0 | ||
| 922 | DD L012ej1 | ||
| 923 | DD L011ej2 | ||
| 924 | DD L010ej3 | ||
| 925 | DD L008ej4 | ||
| 926 | DD L007ej5 | ||
| 927 | DD L006ej6 | ||
| 928 | DD L005ej7 | ||
| 929 | L023cbc_dec_jmp_table: | ||
| 930 | DD 0 | ||
| 931 | DD L022dj1 | ||
| 932 | DD L021dj2 | ||
| 933 | DD L020dj3 | ||
| 934 | DD L018dj4 | ||
| 935 | DD L017dj5 | ||
| 936 | DD L016dj6 | ||
| 937 | DD L015dj7 | ||
| 938 | _CAST_cbc_encrypt ENDP | ||
| 939 | _TEXT ENDS | ||
| 940 | END | ||
diff --git a/src/lib/libssl/src/crypto/cast/asm/cx86unix.cpp b/src/lib/libssl/src/crypto/cast/asm/cx86unix.cpp new file mode 100644 index 0000000000..035692a5af --- /dev/null +++ b/src/lib/libssl/src/crypto/cast/asm/cx86unix.cpp | |||
| @@ -0,0 +1,1010 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define CAST_S_table0 _CAST_S_table0 | ||
| 13 | #define CAST_S_table1 _CAST_S_table1 | ||
| 14 | #define CAST_S_table2 _CAST_S_table2 | ||
| 15 | #define CAST_S_table3 _CAST_S_table3 | ||
| 16 | #define CAST_encrypt _CAST_encrypt | ||
| 17 | #define CAST_S_table0 _CAST_S_table0 | ||
| 18 | #define CAST_S_table1 _CAST_S_table1 | ||
| 19 | #define CAST_S_table2 _CAST_S_table2 | ||
| 20 | #define CAST_S_table3 _CAST_S_table3 | ||
| 21 | #define CAST_decrypt _CAST_decrypt | ||
| 22 | #define CAST_cbc_encrypt _CAST_cbc_encrypt | ||
| 23 | |||
| 24 | #endif | ||
| 25 | |||
| 26 | #ifdef OUT | ||
| 27 | #define OK 1 | ||
| 28 | #define ALIGN 4 | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #ifdef BSDI | ||
| 32 | #define OK 1 | ||
| 33 | #define ALIGN 4 | ||
| 34 | #undef SIZE | ||
| 35 | #undef TYPE | ||
| 36 | #define SIZE(a,b) | ||
| 37 | #define TYPE(a,b) | ||
| 38 | #endif | ||
| 39 | |||
| 40 | #if defined(ELF) || defined(SOL) | ||
| 41 | #define OK 1 | ||
| 42 | #define ALIGN 16 | ||
| 43 | #endif | ||
| 44 | |||
| 45 | #ifndef OK | ||
| 46 | You need to define one of | ||
| 47 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 48 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 49 | SOL - solaris systems, which are elf with strange comment lines | ||
| 50 | BSDI - a.out with a very primative version of as. | ||
| 51 | #endif | ||
| 52 | |||
| 53 | /* Let the Assembler begin :-) */ | ||
| 54 | /* Don't even think of reading this code */ | ||
| 55 | /* It was automatically generated by cast-586.pl */ | ||
| 56 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 57 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 58 | /* eric <eay@cryptsoft.com> */ | ||
| 59 | |||
| 60 | .file "cast-586.s" | ||
| 61 | .version "01.01" | ||
| 62 | gcc2_compiled.: | ||
| 63 | .text | ||
| 64 | .align ALIGN | ||
| 65 | .globl CAST_encrypt | ||
| 66 | TYPE(CAST_encrypt,@function) | ||
| 67 | CAST_encrypt: | ||
| 68 | |||
| 69 | pushl %ebp | ||
| 70 | pushl %ebx | ||
| 71 | movl 12(%esp), %ebx | ||
| 72 | movl 16(%esp), %ebp | ||
| 73 | pushl %esi | ||
| 74 | pushl %edi | ||
| 75 | /* Load the 2 words */ | ||
| 76 | movl (%ebx), %edi | ||
| 77 | movl 4(%ebx), %esi | ||
| 78 | xorl %eax, %eax | ||
| 79 | /* round 0 */ | ||
| 80 | movl (%ebp), %edx | ||
| 81 | movl 4(%ebp), %ecx | ||
| 82 | addl %esi, %edx | ||
| 83 | roll %cl, %edx | ||
| 84 | movl %edx, %ebx | ||
| 85 | xorl %ecx, %ecx | ||
| 86 | movb %dh, %cl | ||
| 87 | andl $255, %ebx | ||
| 88 | shrl $16, %edx | ||
| 89 | xorl %eax, %eax | ||
| 90 | movb %dh, %al | ||
| 91 | andl $255, %edx | ||
| 92 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 93 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 94 | xorl %ebx, %ecx | ||
| 95 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 96 | subl %ebx, %ecx | ||
| 97 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 98 | addl %ebx, %ecx | ||
| 99 | xorl %ecx, %edi | ||
| 100 | /* round 1 */ | ||
| 101 | movl 8(%ebp), %edx | ||
| 102 | movl 12(%ebp), %ecx | ||
| 103 | xorl %edi, %edx | ||
| 104 | roll %cl, %edx | ||
| 105 | movl %edx, %ebx | ||
| 106 | xorl %ecx, %ecx | ||
| 107 | movb %dh, %cl | ||
| 108 | andl $255, %ebx | ||
| 109 | shrl $16, %edx | ||
| 110 | xorl %eax, %eax | ||
| 111 | movb %dh, %al | ||
| 112 | andl $255, %edx | ||
| 113 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 114 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 115 | subl %ebx, %ecx | ||
| 116 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 117 | addl %ebx, %ecx | ||
| 118 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 119 | xorl %ebx, %ecx | ||
| 120 | xorl %ecx, %esi | ||
| 121 | /* round 2 */ | ||
| 122 | movl 16(%ebp), %edx | ||
| 123 | movl 20(%ebp), %ecx | ||
| 124 | subl %esi, %edx | ||
| 125 | roll %cl, %edx | ||
| 126 | movl %edx, %ebx | ||
| 127 | xorl %ecx, %ecx | ||
| 128 | movb %dh, %cl | ||
| 129 | andl $255, %ebx | ||
| 130 | shrl $16, %edx | ||
| 131 | xorl %eax, %eax | ||
| 132 | movb %dh, %al | ||
| 133 | andl $255, %edx | ||
| 134 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 135 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 136 | addl %ebx, %ecx | ||
| 137 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 138 | xorl %ebx, %ecx | ||
| 139 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 140 | subl %ebx, %ecx | ||
| 141 | xorl %ecx, %edi | ||
| 142 | /* round 3 */ | ||
| 143 | movl 24(%ebp), %edx | ||
| 144 | movl 28(%ebp), %ecx | ||
| 145 | addl %edi, %edx | ||
| 146 | roll %cl, %edx | ||
| 147 | movl %edx, %ebx | ||
| 148 | xorl %ecx, %ecx | ||
| 149 | movb %dh, %cl | ||
| 150 | andl $255, %ebx | ||
| 151 | shrl $16, %edx | ||
| 152 | xorl %eax, %eax | ||
| 153 | movb %dh, %al | ||
| 154 | andl $255, %edx | ||
| 155 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 156 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 157 | xorl %ebx, %ecx | ||
| 158 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 159 | subl %ebx, %ecx | ||
| 160 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 161 | addl %ebx, %ecx | ||
| 162 | xorl %ecx, %esi | ||
| 163 | /* round 4 */ | ||
| 164 | movl 32(%ebp), %edx | ||
| 165 | movl 36(%ebp), %ecx | ||
| 166 | xorl %esi, %edx | ||
| 167 | roll %cl, %edx | ||
| 168 | movl %edx, %ebx | ||
| 169 | xorl %ecx, %ecx | ||
| 170 | movb %dh, %cl | ||
| 171 | andl $255, %ebx | ||
| 172 | shrl $16, %edx | ||
| 173 | xorl %eax, %eax | ||
| 174 | movb %dh, %al | ||
| 175 | andl $255, %edx | ||
| 176 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 177 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 178 | subl %ebx, %ecx | ||
| 179 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 180 | addl %ebx, %ecx | ||
| 181 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 182 | xorl %ebx, %ecx | ||
| 183 | xorl %ecx, %edi | ||
| 184 | /* round 5 */ | ||
| 185 | movl 40(%ebp), %edx | ||
| 186 | movl 44(%ebp), %ecx | ||
| 187 | subl %edi, %edx | ||
| 188 | roll %cl, %edx | ||
| 189 | movl %edx, %ebx | ||
| 190 | xorl %ecx, %ecx | ||
| 191 | movb %dh, %cl | ||
| 192 | andl $255, %ebx | ||
| 193 | shrl $16, %edx | ||
| 194 | xorl %eax, %eax | ||
| 195 | movb %dh, %al | ||
| 196 | andl $255, %edx | ||
| 197 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 198 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 199 | addl %ebx, %ecx | ||
| 200 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 201 | xorl %ebx, %ecx | ||
| 202 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 203 | subl %ebx, %ecx | ||
| 204 | xorl %ecx, %esi | ||
| 205 | /* round 6 */ | ||
| 206 | movl 48(%ebp), %edx | ||
| 207 | movl 52(%ebp), %ecx | ||
| 208 | addl %esi, %edx | ||
| 209 | roll %cl, %edx | ||
| 210 | movl %edx, %ebx | ||
| 211 | xorl %ecx, %ecx | ||
| 212 | movb %dh, %cl | ||
| 213 | andl $255, %ebx | ||
| 214 | shrl $16, %edx | ||
| 215 | xorl %eax, %eax | ||
| 216 | movb %dh, %al | ||
| 217 | andl $255, %edx | ||
| 218 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 219 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 220 | xorl %ebx, %ecx | ||
| 221 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 222 | subl %ebx, %ecx | ||
| 223 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 224 | addl %ebx, %ecx | ||
| 225 | xorl %ecx, %edi | ||
| 226 | /* round 7 */ | ||
| 227 | movl 56(%ebp), %edx | ||
| 228 | movl 60(%ebp), %ecx | ||
| 229 | xorl %edi, %edx | ||
| 230 | roll %cl, %edx | ||
| 231 | movl %edx, %ebx | ||
| 232 | xorl %ecx, %ecx | ||
| 233 | movb %dh, %cl | ||
| 234 | andl $255, %ebx | ||
| 235 | shrl $16, %edx | ||
| 236 | xorl %eax, %eax | ||
| 237 | movb %dh, %al | ||
| 238 | andl $255, %edx | ||
| 239 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 240 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 241 | subl %ebx, %ecx | ||
| 242 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 243 | addl %ebx, %ecx | ||
| 244 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 245 | xorl %ebx, %ecx | ||
| 246 | xorl %ecx, %esi | ||
| 247 | /* round 8 */ | ||
| 248 | movl 64(%ebp), %edx | ||
| 249 | movl 68(%ebp), %ecx | ||
| 250 | subl %esi, %edx | ||
| 251 | roll %cl, %edx | ||
| 252 | movl %edx, %ebx | ||
| 253 | xorl %ecx, %ecx | ||
| 254 | movb %dh, %cl | ||
| 255 | andl $255, %ebx | ||
| 256 | shrl $16, %edx | ||
| 257 | xorl %eax, %eax | ||
| 258 | movb %dh, %al | ||
| 259 | andl $255, %edx | ||
| 260 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 261 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 262 | addl %ebx, %ecx | ||
| 263 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 264 | xorl %ebx, %ecx | ||
| 265 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 266 | subl %ebx, %ecx | ||
| 267 | xorl %ecx, %edi | ||
| 268 | /* round 9 */ | ||
| 269 | movl 72(%ebp), %edx | ||
| 270 | movl 76(%ebp), %ecx | ||
| 271 | addl %edi, %edx | ||
| 272 | roll %cl, %edx | ||
| 273 | movl %edx, %ebx | ||
| 274 | xorl %ecx, %ecx | ||
| 275 | movb %dh, %cl | ||
| 276 | andl $255, %ebx | ||
| 277 | shrl $16, %edx | ||
| 278 | xorl %eax, %eax | ||
| 279 | movb %dh, %al | ||
| 280 | andl $255, %edx | ||
| 281 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 282 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 283 | xorl %ebx, %ecx | ||
| 284 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 285 | subl %ebx, %ecx | ||
| 286 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 287 | addl %ebx, %ecx | ||
| 288 | xorl %ecx, %esi | ||
| 289 | /* round 10 */ | ||
| 290 | movl 80(%ebp), %edx | ||
| 291 | movl 84(%ebp), %ecx | ||
| 292 | xorl %esi, %edx | ||
| 293 | roll %cl, %edx | ||
| 294 | movl %edx, %ebx | ||
| 295 | xorl %ecx, %ecx | ||
| 296 | movb %dh, %cl | ||
| 297 | andl $255, %ebx | ||
| 298 | shrl $16, %edx | ||
| 299 | xorl %eax, %eax | ||
| 300 | movb %dh, %al | ||
| 301 | andl $255, %edx | ||
| 302 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 303 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 304 | subl %ebx, %ecx | ||
| 305 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 306 | addl %ebx, %ecx | ||
| 307 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 308 | xorl %ebx, %ecx | ||
| 309 | xorl %ecx, %edi | ||
| 310 | /* round 11 */ | ||
| 311 | movl 88(%ebp), %edx | ||
| 312 | movl 92(%ebp), %ecx | ||
| 313 | subl %edi, %edx | ||
| 314 | roll %cl, %edx | ||
| 315 | movl %edx, %ebx | ||
| 316 | xorl %ecx, %ecx | ||
| 317 | movb %dh, %cl | ||
| 318 | andl $255, %ebx | ||
| 319 | shrl $16, %edx | ||
| 320 | xorl %eax, %eax | ||
| 321 | movb %dh, %al | ||
| 322 | andl $255, %edx | ||
| 323 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 324 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 325 | addl %ebx, %ecx | ||
| 326 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 327 | xorl %ebx, %ecx | ||
| 328 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 329 | subl %ebx, %ecx | ||
| 330 | xorl %ecx, %esi | ||
| 331 | /* round 12 */ | ||
| 332 | movl 96(%ebp), %edx | ||
| 333 | movl 100(%ebp), %ecx | ||
| 334 | addl %esi, %edx | ||
| 335 | roll %cl, %edx | ||
| 336 | movl %edx, %ebx | ||
| 337 | xorl %ecx, %ecx | ||
| 338 | movb %dh, %cl | ||
| 339 | andl $255, %ebx | ||
| 340 | shrl $16, %edx | ||
| 341 | xorl %eax, %eax | ||
| 342 | movb %dh, %al | ||
| 343 | andl $255, %edx | ||
| 344 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 345 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 346 | xorl %ebx, %ecx | ||
| 347 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 348 | subl %ebx, %ecx | ||
| 349 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 350 | addl %ebx, %ecx | ||
| 351 | xorl %ecx, %edi | ||
| 352 | /* round 13 */ | ||
| 353 | movl 104(%ebp), %edx | ||
| 354 | movl 108(%ebp), %ecx | ||
| 355 | xorl %edi, %edx | ||
| 356 | roll %cl, %edx | ||
| 357 | movl %edx, %ebx | ||
| 358 | xorl %ecx, %ecx | ||
| 359 | movb %dh, %cl | ||
| 360 | andl $255, %ebx | ||
| 361 | shrl $16, %edx | ||
| 362 | xorl %eax, %eax | ||
| 363 | movb %dh, %al | ||
| 364 | andl $255, %edx | ||
| 365 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 366 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 367 | subl %ebx, %ecx | ||
| 368 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 369 | addl %ebx, %ecx | ||
| 370 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 371 | xorl %ebx, %ecx | ||
| 372 | xorl %ecx, %esi | ||
| 373 | /* round 14 */ | ||
| 374 | movl 112(%ebp), %edx | ||
| 375 | movl 116(%ebp), %ecx | ||
| 376 | subl %esi, %edx | ||
| 377 | roll %cl, %edx | ||
| 378 | movl %edx, %ebx | ||
| 379 | xorl %ecx, %ecx | ||
| 380 | movb %dh, %cl | ||
| 381 | andl $255, %ebx | ||
| 382 | shrl $16, %edx | ||
| 383 | xorl %eax, %eax | ||
| 384 | movb %dh, %al | ||
| 385 | andl $255, %edx | ||
| 386 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 387 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 388 | addl %ebx, %ecx | ||
| 389 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 390 | xorl %ebx, %ecx | ||
| 391 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 392 | subl %ebx, %ecx | ||
| 393 | xorl %ecx, %edi | ||
| 394 | /* round 15 */ | ||
| 395 | movl 120(%ebp), %edx | ||
| 396 | movl 124(%ebp), %ecx | ||
| 397 | addl %edi, %edx | ||
| 398 | roll %cl, %edx | ||
| 399 | movl %edx, %ebx | ||
| 400 | xorl %ecx, %ecx | ||
| 401 | movb %dh, %cl | ||
| 402 | andl $255, %ebx | ||
| 403 | shrl $16, %edx | ||
| 404 | xorl %eax, %eax | ||
| 405 | movb %dh, %al | ||
| 406 | andl $255, %edx | ||
| 407 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 408 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 409 | xorl %ebx, %ecx | ||
| 410 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 411 | subl %ebx, %ecx | ||
| 412 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 413 | addl %ebx, %ecx | ||
| 414 | movl 20(%esp), %eax | ||
| 415 | xorl %ecx, %esi | ||
| 416 | nop | ||
| 417 | movl %edi, 4(%eax) | ||
| 418 | movl %esi, (%eax) | ||
| 419 | popl %edi | ||
| 420 | popl %esi | ||
| 421 | popl %ebx | ||
| 422 | popl %ebp | ||
| 423 | ret | ||
| 424 | .CAST_encrypt_end: | ||
| 425 | SIZE(CAST_encrypt,.CAST_encrypt_end-CAST_encrypt) | ||
| 426 | .ident "CAST_encrypt" | ||
| 427 | .text | ||
| 428 | .align ALIGN | ||
| 429 | .globl CAST_decrypt | ||
| 430 | TYPE(CAST_decrypt,@function) | ||
| 431 | CAST_decrypt: | ||
| 432 | |||
| 433 | pushl %ebp | ||
| 434 | pushl %ebx | ||
| 435 | movl 12(%esp), %ebx | ||
| 436 | movl 16(%esp), %ebp | ||
| 437 | pushl %esi | ||
| 438 | pushl %edi | ||
| 439 | /* Load the 2 words */ | ||
| 440 | movl (%ebx), %edi | ||
| 441 | movl 4(%ebx), %esi | ||
| 442 | xorl %eax, %eax | ||
| 443 | /* round 15 */ | ||
| 444 | movl 120(%ebp), %edx | ||
| 445 | movl 124(%ebp), %ecx | ||
| 446 | addl %esi, %edx | ||
| 447 | roll %cl, %edx | ||
| 448 | movl %edx, %ebx | ||
| 449 | xorl %ecx, %ecx | ||
| 450 | movb %dh, %cl | ||
| 451 | andl $255, %ebx | ||
| 452 | shrl $16, %edx | ||
| 453 | xorl %eax, %eax | ||
| 454 | movb %dh, %al | ||
| 455 | andl $255, %edx | ||
| 456 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 457 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 458 | xorl %ebx, %ecx | ||
| 459 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 460 | subl %ebx, %ecx | ||
| 461 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 462 | addl %ebx, %ecx | ||
| 463 | xorl %ecx, %edi | ||
| 464 | /* round 14 */ | ||
| 465 | movl 112(%ebp), %edx | ||
| 466 | movl 116(%ebp), %ecx | ||
| 467 | subl %edi, %edx | ||
| 468 | roll %cl, %edx | ||
| 469 | movl %edx, %ebx | ||
| 470 | xorl %ecx, %ecx | ||
| 471 | movb %dh, %cl | ||
| 472 | andl $255, %ebx | ||
| 473 | shrl $16, %edx | ||
| 474 | xorl %eax, %eax | ||
| 475 | movb %dh, %al | ||
| 476 | andl $255, %edx | ||
| 477 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 478 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 479 | addl %ebx, %ecx | ||
| 480 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 481 | xorl %ebx, %ecx | ||
| 482 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 483 | subl %ebx, %ecx | ||
| 484 | xorl %ecx, %esi | ||
| 485 | /* round 13 */ | ||
| 486 | movl 104(%ebp), %edx | ||
| 487 | movl 108(%ebp), %ecx | ||
| 488 | xorl %esi, %edx | ||
| 489 | roll %cl, %edx | ||
| 490 | movl %edx, %ebx | ||
| 491 | xorl %ecx, %ecx | ||
| 492 | movb %dh, %cl | ||
| 493 | andl $255, %ebx | ||
| 494 | shrl $16, %edx | ||
| 495 | xorl %eax, %eax | ||
| 496 | movb %dh, %al | ||
| 497 | andl $255, %edx | ||
| 498 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 499 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 500 | subl %ebx, %ecx | ||
| 501 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 502 | addl %ebx, %ecx | ||
| 503 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 504 | xorl %ebx, %ecx | ||
| 505 | xorl %ecx, %edi | ||
| 506 | /* round 12 */ | ||
| 507 | movl 96(%ebp), %edx | ||
| 508 | movl 100(%ebp), %ecx | ||
| 509 | addl %edi, %edx | ||
| 510 | roll %cl, %edx | ||
| 511 | movl %edx, %ebx | ||
| 512 | xorl %ecx, %ecx | ||
| 513 | movb %dh, %cl | ||
| 514 | andl $255, %ebx | ||
| 515 | shrl $16, %edx | ||
| 516 | xorl %eax, %eax | ||
| 517 | movb %dh, %al | ||
| 518 | andl $255, %edx | ||
| 519 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 520 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 521 | xorl %ebx, %ecx | ||
| 522 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 523 | subl %ebx, %ecx | ||
| 524 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 525 | addl %ebx, %ecx | ||
| 526 | xorl %ecx, %esi | ||
| 527 | /* round 11 */ | ||
| 528 | movl 88(%ebp), %edx | ||
| 529 | movl 92(%ebp), %ecx | ||
| 530 | subl %esi, %edx | ||
| 531 | roll %cl, %edx | ||
| 532 | movl %edx, %ebx | ||
| 533 | xorl %ecx, %ecx | ||
| 534 | movb %dh, %cl | ||
| 535 | andl $255, %ebx | ||
| 536 | shrl $16, %edx | ||
| 537 | xorl %eax, %eax | ||
| 538 | movb %dh, %al | ||
| 539 | andl $255, %edx | ||
| 540 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 541 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 542 | addl %ebx, %ecx | ||
| 543 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 544 | xorl %ebx, %ecx | ||
| 545 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 546 | subl %ebx, %ecx | ||
| 547 | xorl %ecx, %edi | ||
| 548 | /* round 10 */ | ||
| 549 | movl 80(%ebp), %edx | ||
| 550 | movl 84(%ebp), %ecx | ||
| 551 | xorl %edi, %edx | ||
| 552 | roll %cl, %edx | ||
| 553 | movl %edx, %ebx | ||
| 554 | xorl %ecx, %ecx | ||
| 555 | movb %dh, %cl | ||
| 556 | andl $255, %ebx | ||
| 557 | shrl $16, %edx | ||
| 558 | xorl %eax, %eax | ||
| 559 | movb %dh, %al | ||
| 560 | andl $255, %edx | ||
| 561 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 562 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 563 | subl %ebx, %ecx | ||
| 564 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 565 | addl %ebx, %ecx | ||
| 566 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 567 | xorl %ebx, %ecx | ||
| 568 | xorl %ecx, %esi | ||
| 569 | /* round 9 */ | ||
| 570 | movl 72(%ebp), %edx | ||
| 571 | movl 76(%ebp), %ecx | ||
| 572 | addl %esi, %edx | ||
| 573 | roll %cl, %edx | ||
| 574 | movl %edx, %ebx | ||
| 575 | xorl %ecx, %ecx | ||
| 576 | movb %dh, %cl | ||
| 577 | andl $255, %ebx | ||
| 578 | shrl $16, %edx | ||
| 579 | xorl %eax, %eax | ||
| 580 | movb %dh, %al | ||
| 581 | andl $255, %edx | ||
| 582 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 583 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 584 | xorl %ebx, %ecx | ||
| 585 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 586 | subl %ebx, %ecx | ||
| 587 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 588 | addl %ebx, %ecx | ||
| 589 | xorl %ecx, %edi | ||
| 590 | /* round 8 */ | ||
| 591 | movl 64(%ebp), %edx | ||
| 592 | movl 68(%ebp), %ecx | ||
| 593 | subl %edi, %edx | ||
| 594 | roll %cl, %edx | ||
| 595 | movl %edx, %ebx | ||
| 596 | xorl %ecx, %ecx | ||
| 597 | movb %dh, %cl | ||
| 598 | andl $255, %ebx | ||
| 599 | shrl $16, %edx | ||
| 600 | xorl %eax, %eax | ||
| 601 | movb %dh, %al | ||
| 602 | andl $255, %edx | ||
| 603 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 604 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 605 | addl %ebx, %ecx | ||
| 606 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 607 | xorl %ebx, %ecx | ||
| 608 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 609 | subl %ebx, %ecx | ||
| 610 | xorl %ecx, %esi | ||
| 611 | /* round 7 */ | ||
| 612 | movl 56(%ebp), %edx | ||
| 613 | movl 60(%ebp), %ecx | ||
| 614 | xorl %esi, %edx | ||
| 615 | roll %cl, %edx | ||
| 616 | movl %edx, %ebx | ||
| 617 | xorl %ecx, %ecx | ||
| 618 | movb %dh, %cl | ||
| 619 | andl $255, %ebx | ||
| 620 | shrl $16, %edx | ||
| 621 | xorl %eax, %eax | ||
| 622 | movb %dh, %al | ||
| 623 | andl $255, %edx | ||
| 624 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 625 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 626 | subl %ebx, %ecx | ||
| 627 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 628 | addl %ebx, %ecx | ||
| 629 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 630 | xorl %ebx, %ecx | ||
| 631 | xorl %ecx, %edi | ||
| 632 | /* round 6 */ | ||
| 633 | movl 48(%ebp), %edx | ||
| 634 | movl 52(%ebp), %ecx | ||
| 635 | addl %edi, %edx | ||
| 636 | roll %cl, %edx | ||
| 637 | movl %edx, %ebx | ||
| 638 | xorl %ecx, %ecx | ||
| 639 | movb %dh, %cl | ||
| 640 | andl $255, %ebx | ||
| 641 | shrl $16, %edx | ||
| 642 | xorl %eax, %eax | ||
| 643 | movb %dh, %al | ||
| 644 | andl $255, %edx | ||
| 645 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 646 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 647 | xorl %ebx, %ecx | ||
| 648 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 649 | subl %ebx, %ecx | ||
| 650 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 651 | addl %ebx, %ecx | ||
| 652 | xorl %ecx, %esi | ||
| 653 | /* round 5 */ | ||
| 654 | movl 40(%ebp), %edx | ||
| 655 | movl 44(%ebp), %ecx | ||
| 656 | subl %esi, %edx | ||
| 657 | roll %cl, %edx | ||
| 658 | movl %edx, %ebx | ||
| 659 | xorl %ecx, %ecx | ||
| 660 | movb %dh, %cl | ||
| 661 | andl $255, %ebx | ||
| 662 | shrl $16, %edx | ||
| 663 | xorl %eax, %eax | ||
| 664 | movb %dh, %al | ||
| 665 | andl $255, %edx | ||
| 666 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 667 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 668 | addl %ebx, %ecx | ||
| 669 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 670 | xorl %ebx, %ecx | ||
| 671 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 672 | subl %ebx, %ecx | ||
| 673 | xorl %ecx, %edi | ||
| 674 | /* round 4 */ | ||
| 675 | movl 32(%ebp), %edx | ||
| 676 | movl 36(%ebp), %ecx | ||
| 677 | xorl %edi, %edx | ||
| 678 | roll %cl, %edx | ||
| 679 | movl %edx, %ebx | ||
| 680 | xorl %ecx, %ecx | ||
| 681 | movb %dh, %cl | ||
| 682 | andl $255, %ebx | ||
| 683 | shrl $16, %edx | ||
| 684 | xorl %eax, %eax | ||
| 685 | movb %dh, %al | ||
| 686 | andl $255, %edx | ||
| 687 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 688 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 689 | subl %ebx, %ecx | ||
| 690 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 691 | addl %ebx, %ecx | ||
| 692 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 693 | xorl %ebx, %ecx | ||
| 694 | xorl %ecx, %esi | ||
| 695 | /* round 3 */ | ||
| 696 | movl 24(%ebp), %edx | ||
| 697 | movl 28(%ebp), %ecx | ||
| 698 | addl %esi, %edx | ||
| 699 | roll %cl, %edx | ||
| 700 | movl %edx, %ebx | ||
| 701 | xorl %ecx, %ecx | ||
| 702 | movb %dh, %cl | ||
| 703 | andl $255, %ebx | ||
| 704 | shrl $16, %edx | ||
| 705 | xorl %eax, %eax | ||
| 706 | movb %dh, %al | ||
| 707 | andl $255, %edx | ||
| 708 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 709 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 710 | xorl %ebx, %ecx | ||
| 711 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 712 | subl %ebx, %ecx | ||
| 713 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 714 | addl %ebx, %ecx | ||
| 715 | xorl %ecx, %edi | ||
| 716 | /* round 2 */ | ||
| 717 | movl 16(%ebp), %edx | ||
| 718 | movl 20(%ebp), %ecx | ||
| 719 | subl %edi, %edx | ||
| 720 | roll %cl, %edx | ||
| 721 | movl %edx, %ebx | ||
| 722 | xorl %ecx, %ecx | ||
| 723 | movb %dh, %cl | ||
| 724 | andl $255, %ebx | ||
| 725 | shrl $16, %edx | ||
| 726 | xorl %eax, %eax | ||
| 727 | movb %dh, %al | ||
| 728 | andl $255, %edx | ||
| 729 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 730 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 731 | addl %ebx, %ecx | ||
| 732 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 733 | xorl %ebx, %ecx | ||
| 734 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 735 | subl %ebx, %ecx | ||
| 736 | xorl %ecx, %esi | ||
| 737 | /* round 1 */ | ||
| 738 | movl 8(%ebp), %edx | ||
| 739 | movl 12(%ebp), %ecx | ||
| 740 | xorl %esi, %edx | ||
| 741 | roll %cl, %edx | ||
| 742 | movl %edx, %ebx | ||
| 743 | xorl %ecx, %ecx | ||
| 744 | movb %dh, %cl | ||
| 745 | andl $255, %ebx | ||
| 746 | shrl $16, %edx | ||
| 747 | xorl %eax, %eax | ||
| 748 | movb %dh, %al | ||
| 749 | andl $255, %edx | ||
| 750 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 751 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 752 | subl %ebx, %ecx | ||
| 753 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 754 | addl %ebx, %ecx | ||
| 755 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 756 | xorl %ebx, %ecx | ||
| 757 | xorl %ecx, %edi | ||
| 758 | /* round 0 */ | ||
| 759 | movl (%ebp), %edx | ||
| 760 | movl 4(%ebp), %ecx | ||
| 761 | addl %edi, %edx | ||
| 762 | roll %cl, %edx | ||
| 763 | movl %edx, %ebx | ||
| 764 | xorl %ecx, %ecx | ||
| 765 | movb %dh, %cl | ||
| 766 | andl $255, %ebx | ||
| 767 | shrl $16, %edx | ||
| 768 | xorl %eax, %eax | ||
| 769 | movb %dh, %al | ||
| 770 | andl $255, %edx | ||
| 771 | movl CAST_S_table0(,%ecx,4),%ecx | ||
| 772 | movl CAST_S_table1(,%ebx,4),%ebx | ||
| 773 | xorl %ebx, %ecx | ||
| 774 | movl CAST_S_table2(,%eax,4),%ebx | ||
| 775 | subl %ebx, %ecx | ||
| 776 | movl CAST_S_table3(,%edx,4),%ebx | ||
| 777 | addl %ebx, %ecx | ||
| 778 | movl 20(%esp), %eax | ||
| 779 | xorl %ecx, %esi | ||
| 780 | nop | ||
| 781 | movl %edi, 4(%eax) | ||
| 782 | movl %esi, (%eax) | ||
| 783 | popl %edi | ||
| 784 | popl %esi | ||
| 785 | popl %ebx | ||
| 786 | popl %ebp | ||
| 787 | ret | ||
| 788 | .CAST_decrypt_end: | ||
| 789 | SIZE(CAST_decrypt,.CAST_decrypt_end-CAST_decrypt) | ||
| 790 | .ident "CAST_decrypt" | ||
| 791 | .text | ||
| 792 | .align ALIGN | ||
| 793 | .globl CAST_cbc_encrypt | ||
| 794 | TYPE(CAST_cbc_encrypt,@function) | ||
| 795 | CAST_cbc_encrypt: | ||
| 796 | |||
| 797 | pushl %ebp | ||
| 798 | pushl %ebx | ||
| 799 | pushl %esi | ||
| 800 | pushl %edi | ||
| 801 | movl 28(%esp), %ebp | ||
| 802 | /* getting iv ptr from parameter 4 */ | ||
| 803 | movl 36(%esp), %ebx | ||
| 804 | movl (%ebx), %esi | ||
| 805 | movl 4(%ebx), %edi | ||
| 806 | pushl %edi | ||
| 807 | pushl %esi | ||
| 808 | pushl %edi | ||
| 809 | pushl %esi | ||
| 810 | movl %esp, %ebx | ||
| 811 | movl 36(%esp), %esi | ||
| 812 | movl 40(%esp), %edi | ||
| 813 | /* getting encrypt flag from parameter 5 */ | ||
| 814 | movl 56(%esp), %ecx | ||
| 815 | /* get and push parameter 3 */ | ||
| 816 | movl 48(%esp), %eax | ||
| 817 | pushl %eax | ||
| 818 | pushl %ebx | ||
| 819 | cmpl $0, %ecx | ||
| 820 | jz .L000decrypt | ||
| 821 | andl $4294967288, %ebp | ||
| 822 | movl 8(%esp), %eax | ||
| 823 | movl 12(%esp), %ebx | ||
| 824 | jz .L001encrypt_finish | ||
| 825 | .L002encrypt_loop: | ||
| 826 | movl (%esi), %ecx | ||
| 827 | movl 4(%esi), %edx | ||
| 828 | xorl %ecx, %eax | ||
| 829 | xorl %edx, %ebx | ||
| 830 | .byte 15 | ||
| 831 | .byte 200 /* bswapl %eax */ | ||
| 832 | .byte 15 | ||
| 833 | .byte 203 /* bswapl %ebx */ | ||
| 834 | movl %eax, 8(%esp) | ||
| 835 | movl %ebx, 12(%esp) | ||
| 836 | call CAST_encrypt | ||
| 837 | movl 8(%esp), %eax | ||
| 838 | movl 12(%esp), %ebx | ||
| 839 | .byte 15 | ||
| 840 | .byte 200 /* bswapl %eax */ | ||
| 841 | .byte 15 | ||
| 842 | .byte 203 /* bswapl %ebx */ | ||
| 843 | movl %eax, (%edi) | ||
| 844 | movl %ebx, 4(%edi) | ||
| 845 | addl $8, %esi | ||
| 846 | addl $8, %edi | ||
| 847 | subl $8, %ebp | ||
| 848 | jnz .L002encrypt_loop | ||
| 849 | .L001encrypt_finish: | ||
| 850 | movl 52(%esp), %ebp | ||
| 851 | andl $7, %ebp | ||
| 852 | jz .L003finish | ||
| 853 | xorl %ecx, %ecx | ||
| 854 | xorl %edx, %edx | ||
| 855 | movl .L004cbc_enc_jmp_table(,%ebp,4),%ebp | ||
| 856 | jmp *%ebp | ||
| 857 | .L005ej7: | ||
| 858 | xorl %edx, %edx | ||
| 859 | movb 6(%esi), %dh | ||
| 860 | sall $8, %edx | ||
| 861 | .L006ej6: | ||
| 862 | movb 5(%esi), %dh | ||
| 863 | .L007ej5: | ||
| 864 | movb 4(%esi), %dl | ||
| 865 | .L008ej4: | ||
| 866 | movl (%esi), %ecx | ||
| 867 | jmp .L009ejend | ||
| 868 | .L010ej3: | ||
| 869 | movb 2(%esi), %ch | ||
| 870 | xorl %ecx, %ecx | ||
| 871 | sall $8, %ecx | ||
| 872 | .L011ej2: | ||
| 873 | movb 1(%esi), %ch | ||
| 874 | .L012ej1: | ||
| 875 | movb (%esi), %cl | ||
| 876 | .L009ejend: | ||
| 877 | xorl %ecx, %eax | ||
| 878 | xorl %edx, %ebx | ||
| 879 | .byte 15 | ||
| 880 | .byte 200 /* bswapl %eax */ | ||
| 881 | .byte 15 | ||
| 882 | .byte 203 /* bswapl %ebx */ | ||
| 883 | movl %eax, 8(%esp) | ||
| 884 | movl %ebx, 12(%esp) | ||
| 885 | call CAST_encrypt | ||
| 886 | movl 8(%esp), %eax | ||
| 887 | movl 12(%esp), %ebx | ||
| 888 | .byte 15 | ||
| 889 | .byte 200 /* bswapl %eax */ | ||
| 890 | .byte 15 | ||
| 891 | .byte 203 /* bswapl %ebx */ | ||
| 892 | movl %eax, (%edi) | ||
| 893 | movl %ebx, 4(%edi) | ||
| 894 | jmp .L003finish | ||
| 895 | .align ALIGN | ||
| 896 | .L000decrypt: | ||
| 897 | andl $4294967288, %ebp | ||
| 898 | movl 16(%esp), %eax | ||
| 899 | movl 20(%esp), %ebx | ||
| 900 | jz .L013decrypt_finish | ||
| 901 | .L014decrypt_loop: | ||
| 902 | movl (%esi), %eax | ||
| 903 | movl 4(%esi), %ebx | ||
| 904 | .byte 15 | ||
| 905 | .byte 200 /* bswapl %eax */ | ||
| 906 | .byte 15 | ||
| 907 | .byte 203 /* bswapl %ebx */ | ||
| 908 | movl %eax, 8(%esp) | ||
| 909 | movl %ebx, 12(%esp) | ||
| 910 | call CAST_decrypt | ||
| 911 | movl 8(%esp), %eax | ||
| 912 | movl 12(%esp), %ebx | ||
| 913 | .byte 15 | ||
| 914 | .byte 200 /* bswapl %eax */ | ||
| 915 | .byte 15 | ||
| 916 | .byte 203 /* bswapl %ebx */ | ||
| 917 | movl 16(%esp), %ecx | ||
| 918 | movl 20(%esp), %edx | ||
| 919 | xorl %eax, %ecx | ||
| 920 | xorl %ebx, %edx | ||
| 921 | movl (%esi), %eax | ||
| 922 | movl 4(%esi), %ebx | ||
| 923 | movl %ecx, (%edi) | ||
| 924 | movl %edx, 4(%edi) | ||
| 925 | movl %eax, 16(%esp) | ||
| 926 | movl %ebx, 20(%esp) | ||
| 927 | addl $8, %esi | ||
| 928 | addl $8, %edi | ||
| 929 | subl $8, %ebp | ||
| 930 | jnz .L014decrypt_loop | ||
| 931 | .L013decrypt_finish: | ||
| 932 | movl 52(%esp), %ebp | ||
| 933 | andl $7, %ebp | ||
| 934 | jz .L003finish | ||
| 935 | movl (%esi), %eax | ||
| 936 | movl 4(%esi), %ebx | ||
| 937 | .byte 15 | ||
| 938 | .byte 200 /* bswapl %eax */ | ||
| 939 | .byte 15 | ||
| 940 | .byte 203 /* bswapl %ebx */ | ||
| 941 | movl %eax, 8(%esp) | ||
| 942 | movl %ebx, 12(%esp) | ||
| 943 | call CAST_decrypt | ||
| 944 | movl 8(%esp), %eax | ||
| 945 | movl 12(%esp), %ebx | ||
| 946 | .byte 15 | ||
| 947 | .byte 200 /* bswapl %eax */ | ||
| 948 | .byte 15 | ||
| 949 | .byte 203 /* bswapl %ebx */ | ||
| 950 | movl 16(%esp), %ecx | ||
| 951 | movl 20(%esp), %edx | ||
| 952 | xorl %eax, %ecx | ||
| 953 | xorl %ebx, %edx | ||
| 954 | movl (%esi), %eax | ||
| 955 | movl 4(%esi), %ebx | ||
| 956 | .L015dj7: | ||
| 957 | rorl $16, %edx | ||
| 958 | movb %dl, 6(%edi) | ||
| 959 | shrl $16, %edx | ||
| 960 | .L016dj6: | ||
| 961 | movb %dh, 5(%edi) | ||
| 962 | .L017dj5: | ||
| 963 | movb %dl, 4(%edi) | ||
| 964 | .L018dj4: | ||
| 965 | movl %ecx, (%edi) | ||
| 966 | jmp .L019djend | ||
| 967 | .L020dj3: | ||
| 968 | rorl $16, %ecx | ||
| 969 | movb %cl, 2(%edi) | ||
| 970 | sall $16, %ecx | ||
| 971 | .L021dj2: | ||
| 972 | movb %ch, 1(%esi) | ||
| 973 | .L022dj1: | ||
| 974 | movb %cl, (%esi) | ||
| 975 | .L019djend: | ||
| 976 | jmp .L003finish | ||
| 977 | .align ALIGN | ||
| 978 | .L003finish: | ||
| 979 | movl 60(%esp), %ecx | ||
| 980 | addl $24, %esp | ||
| 981 | movl %eax, (%ecx) | ||
| 982 | movl %ebx, 4(%ecx) | ||
| 983 | popl %edi | ||
| 984 | popl %esi | ||
| 985 | popl %ebx | ||
| 986 | popl %ebp | ||
| 987 | ret | ||
| 988 | .align ALIGN | ||
| 989 | .L004cbc_enc_jmp_table: | ||
| 990 | .long 0 | ||
| 991 | .long .L012ej1 | ||
| 992 | .long .L011ej2 | ||
| 993 | .long .L010ej3 | ||
| 994 | .long .L008ej4 | ||
| 995 | .long .L007ej5 | ||
| 996 | .long .L006ej6 | ||
| 997 | .long .L005ej7 | ||
| 998 | .align ALIGN | ||
| 999 | .L023cbc_dec_jmp_table: | ||
| 1000 | .long 0 | ||
| 1001 | .long .L022dj1 | ||
| 1002 | .long .L021dj2 | ||
| 1003 | .long .L020dj3 | ||
| 1004 | .long .L018dj4 | ||
| 1005 | .long .L017dj5 | ||
| 1006 | .long .L016dj6 | ||
| 1007 | .long .L015dj7 | ||
| 1008 | .CAST_cbc_encrypt_end: | ||
| 1009 | SIZE(CAST_cbc_encrypt,.CAST_cbc_encrypt_end-CAST_cbc_encrypt) | ||
| 1010 | .ident "desasm.pl" | ||
diff --git a/src/lib/libssl/src/crypto/conf/Makefile.ssl b/src/lib/libssl/src/crypto/conf/Makefile.ssl new file mode 100644 index 0000000000..00e917aa44 --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/Makefile.ssl | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/conf/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= conf | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=conf | ||
| 19 | ERRC=conf_err | ||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= conf.c $(ERRC).c | ||
| 26 | |||
| 27 | LIBOBJ= conf.o $(ERRC).o | ||
| 28 | |||
| 29 | SRC= $(LIBSRC) | ||
| 30 | |||
| 31 | EXHEADER= conf.h | ||
| 32 | HEADER= conf_lcl.h $(EXHEADER) | ||
| 33 | |||
| 34 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 35 | |||
| 36 | top: | ||
| 37 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 38 | |||
| 39 | all: lib | ||
| 40 | |||
| 41 | lib: $(LIBOBJ) | ||
| 42 | $(AR) $(LIB) $(LIBOBJ) | ||
| 43 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 44 | @touch lib | ||
| 45 | |||
| 46 | files: | ||
| 47 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 48 | |||
| 49 | links: | ||
| 50 | /bin/rm -f Makefile | ||
| 51 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 52 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 53 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 54 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 55 | |||
| 56 | install: | ||
| 57 | @for i in $(EXHEADER) ; \ | ||
| 58 | do \ | ||
| 59 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 60 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 61 | done; | ||
| 62 | |||
| 63 | tags: | ||
| 64 | ctags $(SRC) | ||
| 65 | |||
| 66 | tests: | ||
| 67 | |||
| 68 | lint: | ||
| 69 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 70 | |||
| 71 | depend: | ||
| 72 | $(MAKEDEPEND) $(INCLUDES) $(LIBSRC) | ||
| 73 | |||
| 74 | dclean: | ||
| 75 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 76 | mv -f Makefile.new $(MAKEFILE) | ||
| 77 | |||
| 78 | clean: | ||
| 79 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 80 | |||
| 81 | errors: | ||
| 82 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 83 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 84 | |||
| 85 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf.c b/src/lib/libssl/src/crypto/conf/conf.c new file mode 100644 index 0000000000..9e84300c5e --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/conf.c | |||
| @@ -0,0 +1,727 @@ | |||
| 1 | /* crypto/conf/conf.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 <errno.h> | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include "stack.h" | ||
| 63 | #include "lhash.h" | ||
| 64 | #include "conf.h" | ||
| 65 | #include "buffer.h" | ||
| 66 | #include "err.h" | ||
| 67 | |||
| 68 | #include "conf_lcl.h" | ||
| 69 | |||
| 70 | #ifndef NOPROTO | ||
| 71 | static void value_free_hash(CONF_VALUE *a, LHASH *conf); | ||
| 72 | static void value_free_stack(CONF_VALUE *a,LHASH *conf); | ||
| 73 | static unsigned long hash(CONF_VALUE *v); | ||
| 74 | static int cmp(CONF_VALUE *a,CONF_VALUE *b); | ||
| 75 | static char *eat_ws(char *p); | ||
| 76 | static char *eat_alpha_numeric(char *p); | ||
| 77 | static void clear_comments(char *p); | ||
| 78 | static int str_copy(LHASH *conf,char *section,char **to, char *from); | ||
| 79 | static char *scan_quote(char *p); | ||
| 80 | static CONF_VALUE *new_section(LHASH *conf,char *section); | ||
| 81 | static CONF_VALUE *get_section(LHASH *conf,char *section); | ||
| 82 | #else | ||
| 83 | static void value_free_hash(); | ||
| 84 | static void value_free_stack(); | ||
| 85 | static unsigned long hash(); | ||
| 86 | static int cmp(); | ||
| 87 | static char *eat_ws(); | ||
| 88 | static char *eat_alpha_numeric(); | ||
| 89 | static void clear_comments(); | ||
| 90 | static int str_copy(); | ||
| 91 | static char *scan_quote(); | ||
| 92 | static CONF_VALUE *new_section(); | ||
| 93 | static CONF_VALUE *get_section(); | ||
| 94 | #endif | ||
| 95 | |||
| 96 | #define scan_esc(p) ((*(++p) == '\0')?(p):(++p)) | ||
| 97 | |||
| 98 | char *CONF_version="CONF part of SSLeay 0.9.0b 29-Jun-1998"; | ||
| 99 | |||
| 100 | LHASH *CONF_load(h,file,line) | ||
| 101 | LHASH *h; | ||
| 102 | char *file; | ||
| 103 | long *line; | ||
| 104 | { | ||
| 105 | LHASH *ret=NULL; | ||
| 106 | FILE *in=NULL; | ||
| 107 | #define BUFSIZE 512 | ||
| 108 | int bufnum=0,i,ii; | ||
| 109 | BUF_MEM *buff=NULL; | ||
| 110 | char *s,*p,*end; | ||
| 111 | int again,n,eline=0; | ||
| 112 | CONF_VALUE *v=NULL,*vv,*tv; | ||
| 113 | CONF_VALUE *sv=NULL; | ||
| 114 | char *section=NULL,*buf; | ||
| 115 | STACK *section_sk=NULL,*ts; | ||
| 116 | char *start,*psection,*pname; | ||
| 117 | |||
| 118 | if ((buff=BUF_MEM_new()) == NULL) | ||
| 119 | { | ||
| 120 | CONFerr(CONF_F_CONF_LOAD,ERR_R_BUF_LIB); | ||
| 121 | goto err; | ||
| 122 | } | ||
| 123 | |||
| 124 | in=fopen(file,"rb"); | ||
| 125 | if (in == NULL) | ||
| 126 | { | ||
| 127 | SYSerr(SYS_F_FOPEN,get_last_sys_error()); | ||
| 128 | ERR_set_error_data(BUF_strdup(file), | ||
| 129 | ERR_TXT_MALLOCED|ERR_TXT_STRING); | ||
| 130 | CONFerr(CONF_F_CONF_LOAD,ERR_R_SYS_LIB); | ||
| 131 | goto err; | ||
| 132 | } | ||
| 133 | |||
| 134 | section=(char *)Malloc(10); | ||
| 135 | if (section == NULL) | ||
| 136 | { | ||
| 137 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | ||
| 138 | goto err; | ||
| 139 | } | ||
| 140 | strcpy(section,"default"); | ||
| 141 | |||
| 142 | if (h == NULL) | ||
| 143 | { | ||
| 144 | if ((ret=lh_new(hash,cmp)) == NULL) | ||
| 145 | { | ||
| 146 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | ||
| 147 | goto err; | ||
| 148 | } | ||
| 149 | } | ||
| 150 | else | ||
| 151 | ret=h; | ||
| 152 | |||
| 153 | sv=new_section(ret,section); | ||
| 154 | if (sv == NULL) | ||
| 155 | { | ||
| 156 | CONFerr(CONF_F_CONF_LOAD,CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 157 | goto err; | ||
| 158 | } | ||
| 159 | section_sk=(STACK *)sv->value; | ||
| 160 | |||
| 161 | bufnum=0; | ||
| 162 | for (;;) | ||
| 163 | { | ||
| 164 | again=0; | ||
| 165 | if (!BUF_MEM_grow(buff,bufnum+BUFSIZE)) | ||
| 166 | { | ||
| 167 | CONFerr(CONF_F_CONF_LOAD,ERR_R_BUF_LIB); | ||
| 168 | goto err; | ||
| 169 | } | ||
| 170 | p= &(buff->data[bufnum]); | ||
| 171 | *p='\0'; | ||
| 172 | fgets(p,BUFSIZE-1,in); | ||
| 173 | p[BUFSIZE-1]='\0'; | ||
| 174 | ii=i=strlen(p); | ||
| 175 | if (i == 0) break; | ||
| 176 | while (i > 0) | ||
| 177 | { | ||
| 178 | if ((p[i-1] != '\r') && (p[i-1] != '\n')) | ||
| 179 | break; | ||
| 180 | else | ||
| 181 | i--; | ||
| 182 | } | ||
| 183 | /* we removed some trailing stuff so there is a new | ||
| 184 | * line on the end. */ | ||
| 185 | if (i == ii) | ||
| 186 | again=1; /* long line */ | ||
| 187 | else | ||
| 188 | { | ||
| 189 | p[i]='\0'; | ||
| 190 | eline++; /* another input line */ | ||
| 191 | } | ||
| 192 | |||
| 193 | /* we now have a line with trailing \r\n removed */ | ||
| 194 | |||
| 195 | /* i is the number of bytes */ | ||
| 196 | bufnum+=i; | ||
| 197 | |||
| 198 | v=NULL; | ||
| 199 | /* check for line continuation */ | ||
| 200 | if (bufnum >= 1) | ||
| 201 | { | ||
| 202 | /* If we have bytes and the last char '\\' and | ||
| 203 | * second last char is not '\\' */ | ||
| 204 | p= &(buff->data[bufnum-1]); | ||
| 205 | if ( IS_ESC(p[0]) && | ||
| 206 | ((bufnum <= 1) || !IS_ESC(p[-1]))) | ||
| 207 | { | ||
| 208 | bufnum--; | ||
| 209 | again=1; | ||
| 210 | } | ||
| 211 | } | ||
| 212 | if (again) continue; | ||
| 213 | bufnum=0; | ||
| 214 | buf=buff->data; | ||
| 215 | |||
| 216 | clear_comments(buf); | ||
| 217 | n=strlen(buf); | ||
| 218 | s=eat_ws(buf); | ||
| 219 | if (IS_EOF(*s)) continue; /* blank line */ | ||
| 220 | if (*s == '[') | ||
| 221 | { | ||
| 222 | s++; | ||
| 223 | start=eat_ws(s); | ||
| 224 | end=eat_alpha_numeric(start); | ||
| 225 | p=eat_ws(end); | ||
| 226 | if (*p != ']') | ||
| 227 | { | ||
| 228 | CONFerr(CONF_F_CONF_LOAD,CONF_R_MISSING_CLOSE_SQUARE_BRACKET); | ||
| 229 | goto err; | ||
| 230 | } | ||
| 231 | *end='\0'; | ||
| 232 | if (!str_copy(ret,NULL,§ion,start)) goto err; | ||
| 233 | if ((sv=get_section(ret,section)) == NULL) | ||
| 234 | sv=new_section(ret,section); | ||
| 235 | if (sv == NULL) | ||
| 236 | { | ||
| 237 | CONFerr(CONF_F_CONF_LOAD,CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 238 | goto err; | ||
| 239 | } | ||
| 240 | section_sk=(STACK *)sv->value; | ||
| 241 | continue; | ||
| 242 | } | ||
| 243 | else | ||
| 244 | { | ||
| 245 | pname=s; | ||
| 246 | psection=NULL; | ||
| 247 | end=eat_alpha_numeric(s); | ||
| 248 | if ((end[0] == ':') && (end[1] == ':')) | ||
| 249 | { | ||
| 250 | *end='\0'; | ||
| 251 | end+=2; | ||
| 252 | psection=pname; | ||
| 253 | pname=end; | ||
| 254 | end=eat_alpha_numeric(end); | ||
| 255 | } | ||
| 256 | p=eat_ws(end); | ||
| 257 | if (*p != '=') | ||
| 258 | { | ||
| 259 | CONFerr(CONF_F_CONF_LOAD,CONF_R_MISSING_EQUAL_SIGN); | ||
| 260 | goto err; | ||
| 261 | } | ||
| 262 | *end='\0'; | ||
| 263 | p++; | ||
| 264 | start=eat_ws(p); | ||
| 265 | while (!IS_EOF(*p)) | ||
| 266 | p++; | ||
| 267 | p--; | ||
| 268 | while ((p != start) && (IS_WS(*p))) | ||
| 269 | p--; | ||
| 270 | p++; | ||
| 271 | *p='\0'; | ||
| 272 | |||
| 273 | if ((v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE))) == NULL) | ||
| 274 | { | ||
| 275 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | ||
| 276 | goto err; | ||
| 277 | } | ||
| 278 | if (psection == NULL) psection=section; | ||
| 279 | v->name=(char *)Malloc(strlen(pname)+1); | ||
| 280 | v->value=NULL; | ||
| 281 | if (v->name == NULL) | ||
| 282 | { | ||
| 283 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | ||
| 284 | goto err; | ||
| 285 | } | ||
| 286 | strcpy(v->name,pname); | ||
| 287 | if (!str_copy(ret,psection,&(v->value),start)) goto err; | ||
| 288 | |||
| 289 | if (strcmp(psection,section) != 0) | ||
| 290 | { | ||
| 291 | if ((tv=get_section(ret,psection)) | ||
| 292 | == NULL) | ||
| 293 | tv=new_section(ret,psection); | ||
| 294 | if (tv == NULL) | ||
| 295 | { | ||
| 296 | CONFerr(CONF_F_CONF_LOAD,CONF_R_UNABLE_TO_CREATE_NEW_SECTION); | ||
| 297 | goto err; | ||
| 298 | } | ||
| 299 | ts=(STACK *)tv->value; | ||
| 300 | } | ||
| 301 | else | ||
| 302 | { | ||
| 303 | tv=sv; | ||
| 304 | ts=section_sk; | ||
| 305 | } | ||
| 306 | v->section=tv->section; | ||
| 307 | if (!sk_push(ts,(char *)v)) | ||
| 308 | { | ||
| 309 | CONFerr(CONF_F_CONF_LOAD,ERR_R_MALLOC_FAILURE); | ||
| 310 | goto err; | ||
| 311 | } | ||
| 312 | vv=(CONF_VALUE *)lh_insert(ret,(char *)v); | ||
| 313 | if (vv != NULL) | ||
| 314 | { | ||
| 315 | sk_delete_ptr(ts,(char *)vv); | ||
| 316 | Free(vv->name); | ||
| 317 | Free(vv->value); | ||
| 318 | Free(vv); | ||
| 319 | } | ||
| 320 | v=NULL; | ||
| 321 | } | ||
| 322 | } | ||
| 323 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 324 | if (section != NULL) Free(section); | ||
| 325 | if (in != NULL) fclose(in); | ||
| 326 | return(ret); | ||
| 327 | err: | ||
| 328 | if (buff != NULL) BUF_MEM_free(buff); | ||
| 329 | if (section != NULL) Free(section); | ||
| 330 | if (line != NULL) *line=eline; | ||
| 331 | if (in != NULL) fclose(in); | ||
| 332 | if ((h != ret) && (ret != NULL)) CONF_free(ret); | ||
| 333 | if (v != NULL) | ||
| 334 | { | ||
| 335 | if (v->name != NULL) Free(v->name); | ||
| 336 | if (v->value != NULL) Free(v->value); | ||
| 337 | if (v != NULL) Free(v); | ||
| 338 | } | ||
| 339 | return(NULL); | ||
| 340 | } | ||
| 341 | |||
| 342 | char *CONF_get_string(conf,section,name) | ||
| 343 | LHASH *conf; | ||
| 344 | char *section; | ||
| 345 | char *name; | ||
| 346 | { | ||
| 347 | CONF_VALUE *v,vv; | ||
| 348 | char *p; | ||
| 349 | |||
| 350 | if (name == NULL) return(NULL); | ||
| 351 | if (conf != NULL) | ||
| 352 | { | ||
| 353 | if (section != NULL) | ||
| 354 | { | ||
| 355 | vv.name=name; | ||
| 356 | vv.section=section; | ||
| 357 | v=(CONF_VALUE *)lh_retrieve(conf,(char *)&vv); | ||
| 358 | if (v != NULL) return(v->value); | ||
| 359 | if (strcmp(section,"ENV") == 0) | ||
| 360 | { | ||
| 361 | p=Getenv(name); | ||
| 362 | if (p != NULL) return(p); | ||
| 363 | } | ||
| 364 | } | ||
| 365 | vv.section="default"; | ||
| 366 | vv.name=name; | ||
| 367 | v=(CONF_VALUE *)lh_retrieve(conf,(char *)&vv); | ||
| 368 | if (v != NULL) | ||
| 369 | return(v->value); | ||
| 370 | else | ||
| 371 | return(NULL); | ||
| 372 | } | ||
| 373 | else | ||
| 374 | return(Getenv(name)); | ||
| 375 | } | ||
| 376 | |||
| 377 | static CONF_VALUE *get_section(conf,section) | ||
| 378 | LHASH *conf; | ||
| 379 | char *section; | ||
| 380 | { | ||
| 381 | CONF_VALUE *v,vv; | ||
| 382 | |||
| 383 | if ((conf == NULL) || (section == NULL)) return(NULL); | ||
| 384 | vv.name=NULL; | ||
| 385 | vv.section=section; | ||
| 386 | v=(CONF_VALUE *)lh_retrieve(conf,(char *)&vv); | ||
| 387 | return(v); | ||
| 388 | } | ||
| 389 | |||
| 390 | STACK *CONF_get_section(conf,section) | ||
| 391 | LHASH *conf; | ||
| 392 | char *section; | ||
| 393 | { | ||
| 394 | CONF_VALUE *v; | ||
| 395 | |||
| 396 | v=get_section(conf,section); | ||
| 397 | if (v != NULL) | ||
| 398 | return((STACK *)v->value); | ||
| 399 | else | ||
| 400 | return(NULL); | ||
| 401 | } | ||
| 402 | |||
| 403 | long CONF_get_number(conf,section,name) | ||
| 404 | LHASH *conf; | ||
| 405 | char *section; | ||
| 406 | char *name; | ||
| 407 | { | ||
| 408 | char *str; | ||
| 409 | long ret=0; | ||
| 410 | |||
| 411 | str=CONF_get_string(conf,section,name); | ||
| 412 | if (str == NULL) return(0); | ||
| 413 | for (;;) | ||
| 414 | { | ||
| 415 | if (IS_NUMER(*str)) | ||
| 416 | ret=ret*10+(*str -'0'); | ||
| 417 | else | ||
| 418 | return(ret); | ||
| 419 | str++; | ||
| 420 | } | ||
| 421 | } | ||
| 422 | |||
| 423 | void CONF_free(conf) | ||
| 424 | LHASH *conf; | ||
| 425 | { | ||
| 426 | if (conf == NULL) return; | ||
| 427 | |||
| 428 | conf->down_load=0; /* evil thing to make sure the 'Free()' | ||
| 429 | * works as expected */ | ||
| 430 | lh_doall_arg(conf,(void (*)())value_free_hash,(char *)conf); | ||
| 431 | |||
| 432 | /* We now have only 'section' entries in the hash table. | ||
| 433 | * Due to problems with */ | ||
| 434 | |||
| 435 | lh_doall_arg(conf,(void (*)())value_free_stack,(char *)conf); | ||
| 436 | lh_free(conf); | ||
| 437 | } | ||
| 438 | |||
| 439 | static void value_free_hash(a,conf) | ||
| 440 | CONF_VALUE *a; | ||
| 441 | LHASH *conf; | ||
| 442 | { | ||
| 443 | if (a->name != NULL) | ||
| 444 | { | ||
| 445 | a=(CONF_VALUE *)lh_delete(conf,(char *)a); | ||
| 446 | } | ||
| 447 | } | ||
| 448 | |||
| 449 | static void value_free_stack(a,conf) | ||
| 450 | CONF_VALUE *a; | ||
| 451 | LHASH *conf; | ||
| 452 | { | ||
| 453 | CONF_VALUE *vv; | ||
| 454 | STACK *sk; | ||
| 455 | int i; | ||
| 456 | |||
| 457 | if (a->name != NULL) return; | ||
| 458 | |||
| 459 | sk=(STACK *)a->value; | ||
| 460 | for (i=sk_num(sk)-1; i>=0; i--) | ||
| 461 | { | ||
| 462 | vv=(CONF_VALUE *)sk_value(sk,i); | ||
| 463 | Free(vv->value); | ||
| 464 | Free(vv->name); | ||
| 465 | Free(vv); | ||
| 466 | } | ||
| 467 | if (sk != NULL) sk_free(sk); | ||
| 468 | Free(a->section); | ||
| 469 | Free(a); | ||
| 470 | } | ||
| 471 | |||
| 472 | static void clear_comments(p) | ||
| 473 | char *p; | ||
| 474 | { | ||
| 475 | char *to; | ||
| 476 | |||
| 477 | to=p; | ||
| 478 | for (;;) | ||
| 479 | { | ||
| 480 | if (IS_COMMENT(*p)) | ||
| 481 | { | ||
| 482 | *p='\0'; | ||
| 483 | return; | ||
| 484 | } | ||
| 485 | if (IS_QUOTE(*p)) | ||
| 486 | { | ||
| 487 | p=scan_quote(p); | ||
| 488 | continue; | ||
| 489 | } | ||
| 490 | if (IS_ESC(*p)) | ||
| 491 | { | ||
| 492 | p=scan_esc(p); | ||
| 493 | continue; | ||
| 494 | } | ||
| 495 | if (IS_EOF(*p)) | ||
| 496 | return; | ||
| 497 | else | ||
| 498 | p++; | ||
| 499 | } | ||
| 500 | } | ||
| 501 | |||
| 502 | static int str_copy(conf,section,pto,from) | ||
| 503 | LHASH *conf; | ||
| 504 | char *section; | ||
| 505 | char **pto,*from; | ||
| 506 | { | ||
| 507 | int q,r,rr=0,to=0,len=0; | ||
| 508 | char *s,*e,*rp,*p,*rrp,*np,*cp,v; | ||
| 509 | BUF_MEM *buf; | ||
| 510 | |||
| 511 | if ((buf=BUF_MEM_new()) == NULL) return(0); | ||
| 512 | |||
| 513 | len=strlen(from)+1; | ||
| 514 | if (!BUF_MEM_grow(buf,len)) goto err; | ||
| 515 | |||
| 516 | for (;;) | ||
| 517 | { | ||
| 518 | if (IS_QUOTE(*from)) | ||
| 519 | { | ||
| 520 | q= *from; | ||
| 521 | from++; | ||
| 522 | while ((*from != '\0') && (*from != q)) | ||
| 523 | { | ||
| 524 | if (*from == '\\') | ||
| 525 | { | ||
| 526 | from++; | ||
| 527 | if (*from == '\0') break; | ||
| 528 | } | ||
| 529 | buf->data[to++]= *(from++); | ||
| 530 | } | ||
| 531 | } | ||
| 532 | else if (*from == '\\') | ||
| 533 | { | ||
| 534 | from++; | ||
| 535 | v= *(from++); | ||
| 536 | if (v == '\0') break; | ||
| 537 | else if (v == 'r') v='\r'; | ||
| 538 | else if (v == 'n') v='\n'; | ||
| 539 | else if (v == 'b') v='\b'; | ||
| 540 | else if (v == 't') v='\t'; | ||
| 541 | buf->data[to++]= v; | ||
| 542 | } | ||
| 543 | else if (*from == '\0') | ||
| 544 | break; | ||
| 545 | else if (*from == '$') | ||
| 546 | { | ||
| 547 | /* try to expand it */ | ||
| 548 | rrp=NULL; | ||
| 549 | s= &(from[1]); | ||
| 550 | if (*s == '{') | ||
| 551 | q='}'; | ||
| 552 | else if (*s == '(') | ||
| 553 | q=')'; | ||
| 554 | else q=0; | ||
| 555 | |||
| 556 | if (q) s++; | ||
| 557 | cp=section; | ||
| 558 | e=np=s; | ||
| 559 | while (IS_ALPHA_NUMERIC(*e)) | ||
| 560 | e++; | ||
| 561 | if ((e[0] == ':') && (e[1] == ':')) | ||
| 562 | { | ||
| 563 | cp=np; | ||
| 564 | rrp=e; | ||
| 565 | rr= *e; | ||
| 566 | *rrp='\0'; | ||
| 567 | e+=2; | ||
| 568 | np=e; | ||
| 569 | while (IS_ALPHA_NUMERIC(*e)) | ||
| 570 | e++; | ||
| 571 | } | ||
| 572 | r= *e; | ||
| 573 | *e='\0'; | ||
| 574 | rp=e; | ||
| 575 | if (q) | ||
| 576 | { | ||
| 577 | if (r != q) | ||
| 578 | { | ||
| 579 | CONFerr(CONF_F_STR_COPY,CONF_R_NO_CLOSE_BRACE); | ||
| 580 | goto err; | ||
| 581 | } | ||
| 582 | e++; | ||
| 583 | } | ||
| 584 | /* So at this point we have | ||
| 585 | * ns which is the start of the name string which is | ||
| 586 | * '\0' terminated. | ||
| 587 | * cs which is the start of the section string which is | ||
| 588 | * '\0' terminated. | ||
| 589 | * e is the 'next point after'. | ||
| 590 | * r and s are the chars replaced by the '\0' | ||
| 591 | * rp and sp is where 'r' and 's' came from. | ||
| 592 | */ | ||
| 593 | p=CONF_get_string(conf,cp,np); | ||
| 594 | if (rrp != NULL) *rrp=rr; | ||
| 595 | *rp=r; | ||
| 596 | if (p == NULL) | ||
| 597 | { | ||
| 598 | CONFerr(CONF_F_STR_COPY,CONF_R_VARIABLE_HAS_NO_VALUE); | ||
| 599 | goto err; | ||
| 600 | } | ||
| 601 | BUF_MEM_grow(buf,(strlen(p)+len-(e-from))); | ||
| 602 | while (*p) | ||
| 603 | buf->data[to++]= *(p++); | ||
| 604 | from=e; | ||
| 605 | } | ||
| 606 | else | ||
| 607 | buf->data[to++]= *(from++); | ||
| 608 | } | ||
| 609 | buf->data[to]='\0'; | ||
| 610 | if (*pto != NULL) Free(*pto); | ||
| 611 | *pto=buf->data; | ||
| 612 | Free(buf); | ||
| 613 | return(1); | ||
| 614 | err: | ||
| 615 | if (buf != NULL) BUF_MEM_free(buf); | ||
| 616 | return(0); | ||
| 617 | } | ||
| 618 | |||
| 619 | static char *eat_ws(p) | ||
| 620 | char *p; | ||
| 621 | { | ||
| 622 | while (IS_WS(*p) && (!IS_EOF(*p))) | ||
| 623 | p++; | ||
| 624 | return(p); | ||
| 625 | } | ||
| 626 | |||
| 627 | static char *eat_alpha_numeric(p) | ||
| 628 | char *p; | ||
| 629 | { | ||
| 630 | for (;;) | ||
| 631 | { | ||
| 632 | if (IS_ESC(*p)) | ||
| 633 | { | ||
| 634 | p=scan_esc(p); | ||
| 635 | continue; | ||
| 636 | } | ||
| 637 | if (!IS_ALPHA_NUMERIC_PUNCT(*p)) | ||
| 638 | return(p); | ||
| 639 | p++; | ||
| 640 | } | ||
| 641 | } | ||
| 642 | |||
| 643 | static unsigned long hash(v) | ||
| 644 | CONF_VALUE *v; | ||
| 645 | { | ||
| 646 | return((lh_strhash(v->section)<<2)^lh_strhash(v->name)); | ||
| 647 | } | ||
| 648 | |||
| 649 | static int cmp(a,b) | ||
| 650 | CONF_VALUE *a,*b; | ||
| 651 | { | ||
| 652 | int i; | ||
| 653 | |||
| 654 | if (a->section != b->section) | ||
| 655 | { | ||
| 656 | i=strcmp(a->section,b->section); | ||
| 657 | if (i) return(i); | ||
| 658 | } | ||
| 659 | |||
| 660 | if ((a->name != NULL) && (b->name != NULL)) | ||
| 661 | { | ||
| 662 | i=strcmp(a->name,b->name); | ||
| 663 | return(i); | ||
| 664 | } | ||
| 665 | else if (a->name == b->name) | ||
| 666 | return(0); | ||
| 667 | else | ||
| 668 | return((a->name == NULL)?-1:1); | ||
| 669 | } | ||
| 670 | |||
| 671 | static char *scan_quote(p) | ||
| 672 | char *p; | ||
| 673 | { | ||
| 674 | int q= *p; | ||
| 675 | |||
| 676 | p++; | ||
| 677 | while (!(IS_EOF(*p)) && (*p != q)) | ||
| 678 | { | ||
| 679 | if (IS_ESC(*p)) | ||
| 680 | { | ||
| 681 | p++; | ||
| 682 | if (IS_EOF(*p)) return(p); | ||
| 683 | } | ||
| 684 | p++; | ||
| 685 | } | ||
| 686 | if (*p == q) p++; | ||
| 687 | return(p); | ||
| 688 | } | ||
| 689 | |||
| 690 | static CONF_VALUE *new_section(conf,section) | ||
| 691 | LHASH *conf; | ||
| 692 | char *section; | ||
| 693 | { | ||
| 694 | STACK *sk=NULL; | ||
| 695 | int ok=0,i; | ||
| 696 | CONF_VALUE *v=NULL,*vv; | ||
| 697 | |||
| 698 | if ((sk=sk_new_null()) == NULL) | ||
| 699 | goto err; | ||
| 700 | if ((v=(CONF_VALUE *)Malloc(sizeof(CONF_VALUE))) == NULL) | ||
| 701 | goto err; | ||
| 702 | i=strlen(section)+1; | ||
| 703 | if ((v->section=(char *)Malloc(i)) == NULL) | ||
| 704 | goto err; | ||
| 705 | |||
| 706 | memcpy(v->section,section,i); | ||
| 707 | v->name=NULL; | ||
| 708 | v->value=(char *)sk; | ||
| 709 | |||
| 710 | vv=(CONF_VALUE *)lh_insert(conf,(char *)v); | ||
| 711 | if (vv != NULL) | ||
| 712 | { | ||
| 713 | #if !defined(NO_STDIO) && !defined(WIN16) | ||
| 714 | fprintf(stderr,"internal fault\n"); | ||
| 715 | #endif | ||
| 716 | abort(); | ||
| 717 | } | ||
| 718 | ok=1; | ||
| 719 | err: | ||
| 720 | if (!ok) | ||
| 721 | { | ||
| 722 | if (sk != NULL) sk_free(sk); | ||
| 723 | if (v != NULL) Free(v); | ||
| 724 | v=NULL; | ||
| 725 | } | ||
| 726 | return(v); | ||
| 727 | } | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf.err b/src/lib/libssl/src/crypto/conf/conf.err new file mode 100644 index 0000000000..933d3d692a --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/conf.err | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | /* Error codes for the CONF functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define CONF_F_CONF_LOAD 100 | ||
| 5 | #define CONF_F_STR_COPY 101 | ||
| 6 | |||
| 7 | /* Reason codes. */ | ||
| 8 | #define CONF_R_MISSING_CLOSE_SQUARE_BRACKET 100 | ||
| 9 | #define CONF_R_MISSING_EQUAL_SIGN 101 | ||
| 10 | #define CONF_R_NO_CLOSE_BRACE 102 | ||
| 11 | #define CONF_R_UNABLE_TO_CREATE_NEW_SECTION 103 | ||
| 12 | #define CONF_R_VARIABLE_HAS_NO_VALUE 104 | ||
diff --git a/src/lib/libssl/src/crypto/conf/conf_lcl.h b/src/lib/libssl/src/crypto/conf/conf_lcl.h new file mode 100644 index 0000000000..4e5644ed79 --- /dev/null +++ b/src/lib/libssl/src/crypto/conf/conf_lcl.h | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | /* crypto/conf/conf_lcl.h */ | ||
| 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 | #define CONF_NUMBER 1 | ||
| 60 | #define CONF_UPPER 2 | ||
| 61 | #define CONF_LOWER 4 | ||
| 62 | #define CONF_UNDER 256 | ||
| 63 | #define CONF_PUNCTUATION 512 | ||
| 64 | #define CONF_WS 16 | ||
| 65 | #define CONF_ESC 32 | ||
| 66 | #define CONF_QUOTE 64 | ||
| 67 | #define CONF_COMMENT 128 | ||
| 68 | #define CONF_EOF 8 | ||
| 69 | #define CONF_ALPHA (CONF_UPPER|CONF_LOWER) | ||
| 70 | #define CONF_ALPHA_NUMERIC (CONF_ALPHA|CONF_NUMBER|CONF_UNDER) | ||
| 71 | #define CONF_ALPHA_NUMERIC_PUNCT (CONF_ALPHA|CONF_NUMBER|CONF_UNDER| \ | ||
| 72 | CONF_PUNCTUATION) | ||
| 73 | |||
| 74 | #define IS_COMMENT(a) (CONF_COMMENT&(CONF_type[(a)&0x7f])) | ||
| 75 | #define IS_EOF(a) ((a) == '\0') | ||
| 76 | #define IS_ESC(a) ((a) == '\\') | ||
| 77 | #define IS_NUMER(a) (CONF_type[(a)&0x7f]&CONF_NUMBER) | ||
| 78 | #define IS_WS(a) (CONF_type[(a)&0x7f]&CONF_WS) | ||
| 79 | #define IS_ALPHA_NUMERIC(a) (CONF_type[(a)&0x7f]&CONF_ALPHA_NUMERIC) | ||
| 80 | #define IS_ALPHA_NUMERIC_PUNCT(a) \ | ||
| 81 | (CONF_type[(a)&0x7f]&CONF_ALPHA_NUMERIC_PUNCT) | ||
| 82 | #define IS_QUOTE(a) (CONF_type[(a)&0x7f]&CONF_QUOTE) | ||
| 83 | |||
| 84 | static unsigned short CONF_type[128]={ | ||
| 85 | 0x008,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 86 | 0x000,0x010,0x010,0x000,0x000,0x010,0x000,0x000, | ||
| 87 | 0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 88 | 0x000,0x000,0x000,0x000,0x000,0x000,0x000,0x000, | ||
| 89 | 0x010,0x200,0x040,0x080,0x000,0x200,0x200,0x040, | ||
| 90 | 0x000,0x000,0x200,0x200,0x200,0x200,0x200,0x200, | ||
| 91 | 0x001,0x001,0x001,0x001,0x001,0x001,0x001,0x001, | ||
| 92 | 0x001,0x001,0x000,0x200,0x000,0x000,0x000,0x200, | ||
| 93 | 0x200,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 94 | 0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 95 | 0x002,0x002,0x002,0x002,0x002,0x002,0x002,0x002, | ||
| 96 | 0x002,0x002,0x002,0x000,0x020,0x000,0x200,0x100, | ||
| 97 | 0x040,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 98 | 0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 99 | 0x004,0x004,0x004,0x004,0x004,0x004,0x004,0x004, | ||
| 100 | 0x004,0x004,0x004,0x000,0x200,0x000,0x200,0x000, | ||
| 101 | }; | ||
| 102 | |||
diff --git a/src/lib/libssl/src/crypto/cryptall.h b/src/lib/libssl/src/crypto/cryptall.h new file mode 100644 index 0000000000..65a46452a8 --- /dev/null +++ b/src/lib/libssl/src/crypto/cryptall.h | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | /* crypto/cryptall.h */ | ||
| 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 HEADER_CRYPTOALL_H | ||
| 60 | #define HEADER_CRYPTOALL_H | ||
| 61 | |||
| 62 | #include "buffer.h" | ||
| 63 | #include "stack.h" | ||
| 64 | #include "lhash.h" | ||
| 65 | |||
| 66 | #include "err.h" | ||
| 67 | |||
| 68 | #ifdef NO_MD2 | ||
| 69 | #include <md2.h> | ||
| 70 | #else | ||
| 71 | #include "md2.h" | ||
| 72 | #endif | ||
| 73 | #ifdef NO_MD5 | ||
| 74 | #include <md5.h> | ||
| 75 | #else | ||
| 76 | #include "md5.h" | ||
| 77 | #endif | ||
| 78 | #include "sha.h" | ||
| 79 | |||
| 80 | #ifdef NO_DES | ||
| 81 | #include <des.h> | ||
| 82 | #else | ||
| 83 | #include "des.h" | ||
| 84 | #endif | ||
| 85 | #include "rc2.h" | ||
| 86 | #include "rc4.h" | ||
| 87 | #include "idea.h" | ||
| 88 | |||
| 89 | #include "bn.h" | ||
| 90 | #include "dh.h" | ||
| 91 | #include "rsa.h" | ||
| 92 | #include "dsa.h" | ||
| 93 | |||
| 94 | #include "rand.h" | ||
| 95 | #include "conf.h" | ||
| 96 | #include "txt_db.h" | ||
| 97 | |||
| 98 | #include "err.h" | ||
| 99 | #include "evp.h" | ||
| 100 | |||
| 101 | #include "meth.h" | ||
| 102 | #include "x509.h" | ||
| 103 | #include "pkcs7.h" | ||
| 104 | #include "pem.h" | ||
| 105 | #include "asn1.h" | ||
| 106 | #include "objects.h" | ||
| 107 | |||
| 108 | #include "crypto.h" | ||
| 109 | |||
| 110 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/crypto.c b/src/lib/libssl/src/crypto/crypto.c new file mode 100644 index 0000000000..366e25c939 --- /dev/null +++ b/src/lib/libssl/src/crypto/crypto.c | |||
| @@ -0,0 +1,575 @@ | |||
| 1 | /* crypto/crypto.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 you are happy to use the assmbler version of bn/bn_mulw.c, define | ||
| 60 | * BN_ASM */ | ||
| 61 | #ifndef BN_ASM | ||
| 62 | #undef BN_ASM | ||
| 63 | #define X86_ASM | ||
| 64 | #endif | ||
| 65 | |||
| 66 | #ifndef DES_ASM | ||
| 67 | #undef DES_ASM | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #ifndef BF_ASM | ||
| 71 | #undef BF_ASM | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /* The following defines are only to break the compiles into chunks. | ||
| 75 | * If you wish to not compile some sections, use the 'NO_XXX' macros | ||
| 76 | */ | ||
| 77 | #ifndef CRYPTO_SUBSET | ||
| 78 | /* Define all subset symbols. */ | ||
| 79 | #define CRYPTO_LIB_SUBSET | ||
| 80 | #define CRYPTO_ASN1_SUBSET | ||
| 81 | #define CRYPTO_BN_SUBSET | ||
| 82 | #define CRYPTO_BUFFER_SUBSET | ||
| 83 | #define CRYPTO_BIO_SUBSET | ||
| 84 | #define CRYPTO_CONF_SUBSET | ||
| 85 | #define CRYPTO_DES_SUBSET | ||
| 86 | #define CRYPTO_DH_SUBSET | ||
| 87 | #define CRYPTO_DSA_SUBSET | ||
| 88 | #define CRYPTO_ERROR_SUBSET | ||
| 89 | #define CRYPTO_EVP_SUBSET | ||
| 90 | #define CRYPTO_IDEA_SUBSET | ||
| 91 | #define CRYPTO_LHASH_SUBSET | ||
| 92 | #define CRYPTO_MD_SUBSET | ||
| 93 | #define CRYPTO_MDC2_SUBSET | ||
| 94 | #define CRYPTO_METH_SUBSET | ||
| 95 | #define CRYPTO_OBJECTS_SUBSET | ||
| 96 | #define CRYPTO_PEM_SUBSET | ||
| 97 | #define CRYPTO_RAND_SUBSET | ||
| 98 | #define CRYPTO_RC_SUBSET | ||
| 99 | #define CRYPTO_BLOWFISH_SUBSET | ||
| 100 | #define CRYPTO_CAST_SUBSET | ||
| 101 | #define CRYPTO_RSA_SUBSET | ||
| 102 | #define CRYPTO_SHA_SUBSET | ||
| 103 | #define CRYPTO_HMAC_SUBSET | ||
| 104 | #define CRYPTO_SHA1_SUBSET | ||
| 105 | #define CRYPTO_STACK_SUBSET | ||
| 106 | #define CRYPTO_TXT_DB_SUBSET | ||
| 107 | #define CRYPTO_X509_SUBSET | ||
| 108 | #define CRYPTO_PKCS7_SUBSET | ||
| 109 | #endif | ||
| 110 | |||
| 111 | #include <stdio.h> | ||
| 112 | #include <stdlib.h> | ||
| 113 | #include <string.h> | ||
| 114 | |||
| 115 | #define USE_SOCKETS | ||
| 116 | #include "../e_os.h" | ||
| 117 | |||
| 118 | #include "buffer.h" | ||
| 119 | #include "bio.h" | ||
| 120 | #include "stack.h" | ||
| 121 | #include "lhash.h" | ||
| 122 | |||
| 123 | #include "err.h" | ||
| 124 | |||
| 125 | #include "bn.h" | ||
| 126 | #include "evp.h" | ||
| 127 | |||
| 128 | #include "rand.h" | ||
| 129 | #include "conf.h" | ||
| 130 | #include "txt_db.h" | ||
| 131 | |||
| 132 | #include "x509.h" | ||
| 133 | #include "pkcs7.h" | ||
| 134 | #include "pem.h" | ||
| 135 | #include "asn1.h" | ||
| 136 | #include "objects.h" | ||
| 137 | |||
| 138 | #ifdef CRYPTO_LIB_SUBSET | ||
| 139 | #include "cryptlib.c" | ||
| 140 | #include "mem.c" | ||
| 141 | #include "cversion.c" | ||
| 142 | #endif | ||
| 143 | |||
| 144 | #ifdef CRYPTO_ASN1_SUBSET | ||
| 145 | #include "asn1/a_meth.c" | ||
| 146 | #include "asn1/a_bitstr.c" | ||
| 147 | #include "asn1/a_d2i_fp.c" | ||
| 148 | #include "asn1/a_dup.c" | ||
| 149 | #include "asn1/a_hdr.c" | ||
| 150 | #include "asn1/a_i2d_fp.c" | ||
| 151 | #include "asn1/a_int.c" | ||
| 152 | #include "asn1/a_bool.c" | ||
| 153 | #include "asn1/a_bytes.c" | ||
| 154 | #include "asn1/a_object.c" | ||
| 155 | #include "asn1/a_octet.c" | ||
| 156 | #include "asn1/a_print.c" | ||
| 157 | #include "asn1/a_set.c" | ||
| 158 | #include "asn1/a_sign.c" | ||
| 159 | #include "asn1/a_type.c" | ||
| 160 | #include "asn1/a_utctm.c" | ||
| 161 | #include "asn1/a_verify.c" | ||
| 162 | #include "asn1/a_digest.c" | ||
| 163 | #include "asn1/asn1_err.c" | ||
| 164 | #include "asn1/asn1_lib.c" | ||
| 165 | #include "asn1/asn1_par.c" | ||
| 166 | #ifndef NO_DH | ||
| 167 | #include "asn1/d2i_dhp.c" | ||
| 168 | #include "asn1/i2d_dhp.c" | ||
| 169 | #endif | ||
| 170 | #ifndef NO_DSA | ||
| 171 | #include "asn1/d2i_dsap.c" | ||
| 172 | #include "asn1/i2d_dsap.c" | ||
| 173 | #include "asn1/d2i_s_pr.c" | ||
| 174 | #include "asn1/i2d_s_pr.c" | ||
| 175 | #include "asn1/d2i_s_pu.c" | ||
| 176 | #include "asn1/i2d_s_pu.c" | ||
| 177 | #endif | ||
| 178 | #ifndef NO_RSA | ||
| 179 | #include "asn1/d2i_r_pr.c" | ||
| 180 | #include "asn1/i2d_r_pr.c" | ||
| 181 | #include "asn1/d2i_r_pu.c" | ||
| 182 | #include "asn1/i2d_r_pu.c" | ||
| 183 | #include "asn1/n_pkey.c" | ||
| 184 | #endif | ||
| 185 | #include "asn1/d2i_pr.c" | ||
| 186 | #include "asn1/d2i_pu.c" | ||
| 187 | #include "asn1/i2d_pr.c" | ||
| 188 | #include "asn1/i2d_pu.c" | ||
| 189 | #include "asn1/f_int.c" | ||
| 190 | #include "asn1/f_string.c" | ||
| 191 | #include "asn1/p7_dgst.c" | ||
| 192 | #include "asn1/p7_enc.c" | ||
| 193 | #include "asn1/p7_enc_c.c" | ||
| 194 | #include "asn1/p7_evp.c" | ||
| 195 | #include "asn1/p7_i_s.c" | ||
| 196 | #include "asn1/p7_lib.c" | ||
| 197 | #include "asn1/p7_recip.c" | ||
| 198 | #include "asn1/p7_s_e.c" | ||
| 199 | #include "asn1/p7_signd.c" | ||
| 200 | #include "asn1/p7_signi.c" | ||
| 201 | #include "asn1/t_pkey.c" | ||
| 202 | #include "asn1/t_req.c" | ||
| 203 | #include "asn1/t_x509.c" | ||
| 204 | #include "asn1/x_algor.c" | ||
| 205 | #include "asn1/x_attrib.c" | ||
| 206 | #include "asn1/x_exten.c" | ||
| 207 | #include "asn1/x_cinf.c" | ||
| 208 | #include "asn1/x_crl.c" | ||
| 209 | #include "asn1/x_info.c" | ||
| 210 | #include "asn1/x_name.c" | ||
| 211 | #include "asn1/x_pkey.c" | ||
| 212 | #include "asn1/x_pubkey.c" | ||
| 213 | #include "asn1/x_req.c" | ||
| 214 | #include "asn1/x_sig.c" | ||
| 215 | #include "asn1/x_spki.c" | ||
| 216 | #include "asn1/x_val.c" | ||
| 217 | #include "asn1/x_x509.c" | ||
| 218 | #endif | ||
| 219 | |||
| 220 | #ifdef CRYPTO_BN_SUBSET | ||
| 221 | #include "bn/bn_add.c" | ||
| 222 | #include "bn/bn_div.c" | ||
| 223 | #include "bn/bn_exp.c" | ||
| 224 | #include "bn/bn_mont.c" | ||
| 225 | #include "bn/bn_recp.c" | ||
| 226 | #include "bn/bn_gcd.c" | ||
| 227 | #include "bn/bn_lib.c" | ||
| 228 | #include "bn/bn_mod.c" | ||
| 229 | #include "bn/bn_mul.c" | ||
| 230 | #ifndef BN_ASM | ||
| 231 | #include "bn/bn_mulw.c" | ||
| 232 | #endif | ||
| 233 | #include "bn/bn_prime.c" | ||
| 234 | #include "bn/bn_rand.c" | ||
| 235 | #include "bn/bn_shift.c" | ||
| 236 | #include "bn/bn_sqr.c" | ||
| 237 | #include "bn/bn_sub.c" | ||
| 238 | #include "bn/bn_word.c" | ||
| 239 | #include "bn/bn_print.c" | ||
| 240 | #include "bn/bn_err.c" | ||
| 241 | #include "bn/bn_blind.c" | ||
| 242 | #endif | ||
| 243 | |||
| 244 | #ifdef CRYPTO_BIO_SUBSET | ||
| 245 | #include "bio/bf_buff.c" | ||
| 246 | #include "bio/bf_null.c" | ||
| 247 | #include "bio/bf_nbio.c" | ||
| 248 | #include "bio/bio_cb.c" | ||
| 249 | #include "bio/bio_lib.c" | ||
| 250 | #include "bio/bss_fd.c" | ||
| 251 | #include "bio/bss_file.c" | ||
| 252 | #include "bio/bss_mem.c" | ||
| 253 | #include "bio/bss_null.c" | ||
| 254 | #ifdef VMS | ||
| 255 | #include "bio/bss_rtcp.c" | ||
| 256 | #endif | ||
| 257 | #include "bio/bss_sock.c" | ||
| 258 | #include "bio/bss_conn.c" | ||
| 259 | #include "bio/bss_acpt.c" | ||
| 260 | #include "bio/b_sock.c" | ||
| 261 | #include "bio/b_print.c" | ||
| 262 | #include "bio/b_dump.c" | ||
| 263 | #include "bio/bio_err.c" | ||
| 264 | #endif | ||
| 265 | |||
| 266 | #ifdef CRYPTO_BUFFER_SUBSET | ||
| 267 | #include "buffer/buf_err.c" | ||
| 268 | #include "buffer/buffer.c" | ||
| 269 | #endif | ||
| 270 | |||
| 271 | #ifdef CRYPTO_CONF_SUBSET | ||
| 272 | #include "conf/conf.c" | ||
| 273 | #include "conf/conf_err.c" | ||
| 274 | #endif | ||
| 275 | |||
| 276 | #ifdef CRYPTO_DES_SUBSET | ||
| 277 | #include "des/read_pwd.c" | ||
| 278 | #ifndef NO_DES | ||
| 279 | #ifndef DES_ASM | ||
| 280 | #include "des/fcrypt_b.c" | ||
| 281 | #include "des/des_enc.c" | ||
| 282 | #endif | ||
| 283 | #include "des/cbc_cksm.c" | ||
| 284 | #include "des/xcbc_enc.c" | ||
| 285 | #include "des/cbc_enc.c" | ||
| 286 | #include "des/cfb64ede.c" | ||
| 287 | #include "des/cfb64enc.c" | ||
| 288 | #include "des/cfb_enc.c" | ||
| 289 | #include "des/ecb3_enc.c" | ||
| 290 | #include "des/ecb_enc.c" | ||
| 291 | #include "des/enc_read.c" | ||
| 292 | #include "des/enc_writ.c" | ||
| 293 | #include "des/fcrypt.c" | ||
| 294 | #include "des/ofb64ede.c" | ||
| 295 | #include "des/ofb64enc.c" | ||
| 296 | #include "des/ofb_enc.c" | ||
| 297 | #include "des/pcbc_enc.c" | ||
| 298 | #include "des/qud_cksm.c" | ||
| 299 | #include "des/rand_key.c" | ||
| 300 | #include "des/read2pwd.c" | ||
| 301 | #include "des/rpc_enc.c" | ||
| 302 | #include "des/set_key.c" | ||
| 303 | #include "des/str2key.c" | ||
| 304 | #include "des/supp.c" | ||
| 305 | #endif | ||
| 306 | #endif | ||
| 307 | |||
| 308 | #ifdef CRYPTO_DH_SUBSET | ||
| 309 | #ifndef NO_DH | ||
| 310 | #include "dh/dh_check.c" | ||
| 311 | #include "dh/dh_err.c" | ||
| 312 | #include "dh/dh_gen.c" | ||
| 313 | #include "dh/dh_key.c" | ||
| 314 | #include "dh/dh_lib.c" | ||
| 315 | #endif | ||
| 316 | #endif | ||
| 317 | |||
| 318 | #ifdef CRYPTO_DSA_SUBSET | ||
| 319 | #ifndef NO_DSA | ||
| 320 | #include "dsa/dsa_gen.c" | ||
| 321 | #include "dsa/dsa_key.c" | ||
| 322 | #include "dsa/dsa_lib.c" | ||
| 323 | #include "dsa/dsa_sign.c" | ||
| 324 | #include "dsa/dsa_vrf.c" | ||
| 325 | #include "dsa/dsa_err.c" | ||
| 326 | #endif | ||
| 327 | #endif | ||
| 328 | |||
| 329 | #ifdef CRYPTO_ERROR_SUBSET | ||
| 330 | #include "err/err.c" | ||
| 331 | #include "err/err_all.c" | ||
| 332 | #include "err/err_prn.c" | ||
| 333 | #endif | ||
| 334 | |||
| 335 | #ifdef CRYPTO_EVP_SUBSET | ||
| 336 | #include "evp/bio_md.c" | ||
| 337 | #include "evp/bio_b64.c" | ||
| 338 | #include "evp/bio_enc.c" | ||
| 339 | #include "evp/c_all.c" | ||
| 340 | #include "evp/digest.c" | ||
| 341 | #ifndef NO_DES | ||
| 342 | #include "evp/e_cbc_3d.c" | ||
| 343 | #include "evp/e_cfb_3d.c" | ||
| 344 | #include "evp/e_ecb_3d.c" | ||
| 345 | #include "evp/e_ofb_3d.c" | ||
| 346 | #include "evp/e_cbc_d.c" | ||
| 347 | #include "evp/e_cfb_d.c" | ||
| 348 | #include "evp/e_xcbc_d.c" | ||
| 349 | #include "evp/e_ecb_d.c" | ||
| 350 | #include "evp/e_ofb_d.c" | ||
| 351 | #endif | ||
| 352 | #ifndef NO_IDEA | ||
| 353 | #include "evp/e_cbc_i.c" | ||
| 354 | #include "evp/e_cfb_i.c" | ||
| 355 | #include "evp/e_ecb_i.c" | ||
| 356 | #include "evp/e_ofb_i.c" | ||
| 357 | #endif | ||
| 358 | #ifndef NO_RC2 | ||
| 359 | #include "evp/e_cbc_r2.c" | ||
| 360 | #include "evp/e_cfb_r2.c" | ||
| 361 | #include "evp/e_ecb_r2.c" | ||
| 362 | #include "evp/e_ofb_r2.c" | ||
| 363 | #endif | ||
| 364 | #ifndef NO_BLOWFISH | ||
| 365 | #include "evp/e_cbc_bf.c" | ||
| 366 | #include "evp/e_cfb_bf.c" | ||
| 367 | #include "evp/e_ecb_bf.c" | ||
| 368 | #include "evp/e_ofb_bf.c" | ||
| 369 | #endif | ||
| 370 | #ifndef NO_CAST | ||
| 371 | #include "evp/e_cbc_c.c" | ||
| 372 | #include "evp/e_cfb_c.c" | ||
| 373 | #include "evp/e_ecb_c.c" | ||
| 374 | #include "evp/e_ofb_c.c" | ||
| 375 | #endif | ||
| 376 | #ifndef NO_RC4 | ||
| 377 | #include "evp/e_rc4.c" | ||
| 378 | #endif | ||
| 379 | #include "rc5/rc5_enc.c" | ||
| 380 | #include "rc5/rc5cfb64.c" | ||
| 381 | #include "rc5/rc5_ecb.c" | ||
| 382 | #include "rc5/rc5_skey.c" | ||
| 383 | #include "rc5/rc5ofb64.c" | ||
| 384 | #include "ripemd/rmd160.c" | ||
| 385 | #include "ripemd/rmd_dgst.c" | ||
| 386 | #include "ripemd/rmd_one.c" | ||
| 387 | #include "evp/evp_lib.c" | ||
| 388 | |||
| 389 | #include "evp/names.c" | ||
| 390 | #include "evp/e_null.c" | ||
| 391 | #include "evp/encode.c" | ||
| 392 | #include "evp/evp_enc.c" | ||
| 393 | #include "evp/evp_err.c" | ||
| 394 | #include "evp/evp_key.c" | ||
| 395 | #include "evp/m_null.c" | ||
| 396 | #include "evp/p_lib.c" | ||
| 397 | #ifndef NO_RSA | ||
| 398 | #include "evp/p_open.c" | ||
| 399 | #include "evp/p_seal.c" | ||
| 400 | #endif | ||
| 401 | #include "evp/p_sign.c" | ||
| 402 | #include "evp/p_verify.c" | ||
| 403 | #endif | ||
| 404 | |||
| 405 | #ifdef CRYPTO_IDEA_SUBSET | ||
| 406 | #ifndef NO_IDEA | ||
| 407 | #include "idea/i_cbc.c" | ||
| 408 | #include "idea/i_cfb64.c" | ||
| 409 | #include "idea/i_ecb.c" | ||
| 410 | #include "idea/i_ofb64.c" | ||
| 411 | #include "idea/i_skey.c" | ||
| 412 | #endif | ||
| 413 | #endif | ||
| 414 | |||
| 415 | #ifdef CRYPTO_BLOWFISH_SUBSET | ||
| 416 | #ifndef NO_BLOWFISH | ||
| 417 | #include "bf/bf_cfb64.c" | ||
| 418 | #include "bf/bf_ecb.c" | ||
| 419 | #ifndef BF_ASM | ||
| 420 | #include "bf/bf_enc.c" | ||
| 421 | #endif | ||
| 422 | #include "bf/bf_ofb64.c" | ||
| 423 | #include "bf/bf_skey.c" | ||
| 424 | #endif | ||
| 425 | #endif | ||
| 426 | |||
| 427 | #ifdef CRYPTO_CAST_SUBSET | ||
| 428 | #ifndef NO_CAST | ||
| 429 | #include "cast/c_cfb64.c" | ||
| 430 | #include "cast/c_ecb.c" | ||
| 431 | #ifndef CAST_ASM | ||
| 432 | #include "cast/c_enc.c" | ||
| 433 | #endif | ||
| 434 | #include "cast/c_ofb64.c" | ||
| 435 | #include "cast/c_skey.c" | ||
| 436 | #endif | ||
| 437 | #endif | ||
| 438 | |||
| 439 | #ifdef CRYPTO_LHASH_SUBSET | ||
| 440 | #include "lhash/lh_stats.c" | ||
| 441 | #include "lhash/lhash.c" | ||
| 442 | #endif | ||
| 443 | |||
| 444 | #ifdef CRYPTO_MD_SUBSET | ||
| 445 | #ifndef NO_MD2 | ||
| 446 | #include "md2/md2_dgst.c" | ||
| 447 | #include "md2/md2_one.c" | ||
| 448 | #include "evp/m_md2.c" | ||
| 449 | #endif | ||
| 450 | #ifndef NO_MD5 | ||
| 451 | #include "md5/md5_dgst.c" | ||
| 452 | #include "md5/md5_one.c" | ||
| 453 | #include "evp/m_md5.c" | ||
| 454 | #endif | ||
| 455 | #endif | ||
| 456 | |||
| 457 | #ifdef CRYPTO_MDC2_SUBSET | ||
| 458 | #ifndef NO_MDC2 | ||
| 459 | #include "mdc2/mdc2dgst.c" | ||
| 460 | #include "mdc2/mdc2_one.c" | ||
| 461 | #include "evp/m_mdc2.c" | ||
| 462 | #endif | ||
| 463 | #endif | ||
| 464 | |||
| 465 | #ifdef CRYPTO_OBJECTS_SUBSET | ||
| 466 | #include "objects/obj_dat.c" | ||
| 467 | #include "objects/obj_err.c" | ||
| 468 | #include "objects/obj_lib.c" | ||
| 469 | #endif | ||
| 470 | |||
| 471 | #ifdef CRYPTO_PEM_SUBSET | ||
| 472 | #include "pem/pem_err.c" | ||
| 473 | #include "pem/pem_info.c" | ||
| 474 | #include "pem/pem_lib.c" | ||
| 475 | #include "pem/pem_all.c" | ||
| 476 | #ifndef NO_RSA | ||
| 477 | #include "pem/pem_seal.c" | ||
| 478 | #include "pem/pem_sign.c" | ||
| 479 | #endif | ||
| 480 | #endif | ||
| 481 | |||
| 482 | #ifdef CRYPTO_RAND_SUBSET | ||
| 483 | #include "rand/md_rand.c" | ||
| 484 | #include "rand/randfile.c" | ||
| 485 | #endif | ||
| 486 | |||
| 487 | #ifdef CRYPTO_RC_SUBSET | ||
| 488 | #ifndef NO_RC2 | ||
| 489 | #include "rc2/rc2_cbc.c" | ||
| 490 | #include "rc2/rc2_ecb.c" | ||
| 491 | #include "rc2/rc2_skey.c" | ||
| 492 | #include "rc2/rc2cfb64.c" | ||
| 493 | #include "rc2/rc2ofb64.c" | ||
| 494 | #endif | ||
| 495 | #ifndef NO_RC4 | ||
| 496 | #include "rc4/rc4_skey.c" | ||
| 497 | #ifndef RC4_ASM | ||
| 498 | #include "rc4/rc4_enc.c" | ||
| 499 | #endif | ||
| 500 | #endif | ||
| 501 | #endif | ||
| 502 | |||
| 503 | #ifdef CRYPTO_HMAC_SUBSET | ||
| 504 | #include "hmac/hmac.c" | ||
| 505 | #endif | ||
| 506 | |||
| 507 | #ifdef CRYPTO_RSA_SUBSET | ||
| 508 | #ifndef NO_RSA | ||
| 509 | #include "rsa/rsa_eay.c" | ||
| 510 | #include "rsa/rsa_err.c" | ||
| 511 | #include "rsa/rsa_gen.c" | ||
| 512 | #include "rsa/rsa_lib.c" | ||
| 513 | #include "rsa/rsa_sign.c" | ||
| 514 | #include "rsa/rsa_saos.c" | ||
| 515 | #endif | ||
| 516 | #endif | ||
| 517 | |||
| 518 | #ifdef CRYPTO_SHA1_SUBSET | ||
| 519 | #ifndef NO_SHA1 | ||
| 520 | #include "sha/sha1_one.c" | ||
| 521 | #include "sha/sha1dgst.c" | ||
| 522 | #include "evp/m_dss1.c" | ||
| 523 | #include "evp/m_sha1.c" | ||
| 524 | #endif | ||
| 525 | #endif | ||
| 526 | |||
| 527 | #ifdef CRYPTO_SHA_SUBSET | ||
| 528 | #ifndef NO_SHA | ||
| 529 | #include "evp/m_dss.c" | ||
| 530 | #include "sha/sha_dgst.c" | ||
| 531 | #include "sha/sha_one.c" | ||
| 532 | #include "evp/m_sha.c" | ||
| 533 | #endif | ||
| 534 | #endif | ||
| 535 | |||
| 536 | #ifdef CRYPTO_STACK_SUBSET | ||
| 537 | #include "stack/stack.c" | ||
| 538 | #endif | ||
| 539 | |||
| 540 | #ifdef CRYPTO_TXT_DB_SUBSET | ||
| 541 | #include "txt_db/txt_db.c" | ||
| 542 | #endif | ||
| 543 | |||
| 544 | #ifdef CRYPTO_X509_SUBSET | ||
| 545 | #include "x509/x509_cmp.c" | ||
| 546 | #include "x509/x509_d2.c" | ||
| 547 | #include "x509/x509_def.c" | ||
| 548 | #include "x509/x509_err.c" | ||
| 549 | #include "x509/x509_ext.c" | ||
| 550 | #include "x509/x509_lu.c" | ||
| 551 | #include "x509/x509_obj.c" | ||
| 552 | #include "x509/x509_r2x.c" | ||
| 553 | #include "x509/x509_req.c" | ||
| 554 | #include "x509/x509_set.c" | ||
| 555 | #include "x509/x509_v3.c" | ||
| 556 | #include "x509/x509_vfy.c" | ||
| 557 | #include "x509/x509name.c" | ||
| 558 | #include "x509/x509pack.c" | ||
| 559 | #include "x509/x509rset.c" | ||
| 560 | #include "x509/x509type.c" | ||
| 561 | #include "x509/x_all.c" | ||
| 562 | #include "x509/x509_txt.c" | ||
| 563 | #include "x509/by_dir.c" | ||
| 564 | #include "x509/by_file.c" | ||
| 565 | #include "x509/v3_net.c" | ||
| 566 | #include "x509/v3_x509.c" | ||
| 567 | #endif | ||
| 568 | |||
| 569 | |||
| 570 | #ifdef CRYPTO_PKCS7_SUBSET /* I have an explicit removal of 7 lines */ | ||
| 571 | #include "pkcs7/pk7_lib.c" | ||
| 572 | #include "pkcs7/pkcs7err.c" | ||
| 573 | #include "pkcs7/pk7_doit.c" | ||
| 574 | #endif /* CRYPTO_PKCS7_SUBSET */ | ||
| 575 | |||
diff --git a/src/lib/libssl/src/crypto/crypto.err b/src/lib/libssl/src/crypto/crypto.err new file mode 100644 index 0000000000..4ea3385e73 --- /dev/null +++ b/src/lib/libssl/src/crypto/crypto.err | |||
| @@ -0,0 +1,8 @@ | |||
| 1 | /* Error codes for the CRYPTO functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define CRYPTO_F_CRYPTO_GET_EX_NEW_INDEX 100 | ||
| 5 | #define CRYPTO_F_CRYPTO_GET_NEW_LOCKID 101 | ||
| 6 | #define CRYPTO_F_CRYPTO_SET_EX_DATA 102 | ||
| 7 | |||
| 8 | /* Reason codes. */ | ||
diff --git a/src/lib/libssl/src/crypto/date.h b/src/lib/libssl/src/crypto/date.h new file mode 100644 index 0000000000..dbb71bd1b7 --- /dev/null +++ b/src/lib/libssl/src/crypto/date.h | |||
| @@ -0,0 +1 @@ | |||
| #define DATE "Sun Jul 12 21:04:32 MDT 1998" | |||
diff --git a/src/lib/libssl/src/crypto/des/DES.pod b/src/lib/libssl/src/crypto/des/DES.pod new file mode 100644 index 0000000000..8a739e7ca0 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/DES.pod | |||
| @@ -0,0 +1,16 @@ | |||
| 1 | crypt <= crypt(buf,salt) | ||
| 2 | key <= set_odd_parity(key) | ||
| 3 | int <= is_weak_key(key) | ||
| 4 | keysched<= set_key(key) | ||
| 5 | key <= ecb_encrypt(string8,ks,enc) | ||
| 6 | key <= ecb3_encrypt(input,ks1,ks2,enc) | ||
| 7 | string <= cbc_encrypt(input,ks,ivec,enc) => ivec | ||
| 8 | string <= cbc3_encrypt(input,ks1,ks2,ivec1,ivec2,enc) => ivec1&ivec2 | ||
| 9 | ck1,ck2 <= cbc_cksum(input,ks,ivec) => ivec | ||
| 10 | string <= pcbc_encrypt(input,ks,ivec,enc) => ivec | ||
| 11 | string <= ofb_encrypt(input,numbits,ks,ivec) => ivec | ||
| 12 | string <= cfb_encrypt(input,numbits,ks,ivec,enc) => ivec | ||
| 13 | key <= random_key() | ||
| 14 | key <= string_to_key(string) | ||
| 15 | key1,key2<= string_to_2keys(string) | ||
| 16 | |||
diff --git a/src/lib/libssl/src/crypto/des/FILES b/src/lib/libssl/src/crypto/des/FILES new file mode 100644 index 0000000000..4c7ea2de7a --- /dev/null +++ b/src/lib/libssl/src/crypto/des/FILES | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | /* General stuff */ | ||
| 2 | COPYRIGHT - Copyright info. | ||
| 3 | MODES.DES - A description of the features of the different modes of DES. | ||
| 4 | FILES - This file. | ||
| 5 | INSTALL - How to make things compile. | ||
| 6 | Imakefile - For use with kerberos. | ||
| 7 | README - What this package is. | ||
| 8 | VERSION - Which version this is and what was changed. | ||
| 9 | KERBEROS - Kerberos version 4 notes. | ||
| 10 | Makefile.PL - An old makefile to build with perl5, not current. | ||
| 11 | Makefile.ssl - The SSLeay makefile | ||
| 12 | Makefile.uni - The normal unix makefile. | ||
| 13 | GNUmakefile - The makefile for use with glibc. | ||
| 14 | makefile.bc - A Borland C makefile | ||
| 15 | times - Some outputs from 'speed' on some machines. | ||
| 16 | vms.com - For use when compiling under VMS | ||
| 17 | |||
| 18 | /* My SunOS des(1) replacement */ | ||
| 19 | des.c - des(1) source code. | ||
| 20 | des.man - des(1) manual. | ||
| 21 | |||
| 22 | /* Testing and timing programs. */ | ||
| 23 | destest.c - Source for libdes.a test program. | ||
| 24 | speed.c - Source for libdes.a timing program. | ||
| 25 | rpw.c - Source for libdes.a testing password reading routines. | ||
| 26 | |||
| 27 | /* libdes.a source code */ | ||
| 28 | des_crypt.man - libdes.a manual page. | ||
| 29 | des.h - Public libdes.a header file. | ||
| 30 | ecb_enc.c - des_ecb_encrypt() source, this contains the basic DES code. | ||
| 31 | ecb3_enc.c - des_ecb3_encrypt() source. | ||
| 32 | cbc_ckm.c - des_cbc_cksum() source. | ||
| 33 | cbc_enc.c - des_cbc_encrypt() source. | ||
| 34 | ncbc_enc.c - des_cbc_encrypt() that is 'normal' in that it copies | ||
| 35 | the new iv values back in the passed iv vector. | ||
| 36 | ede_enc.c - des_ede3_cbc_encrypt() cbc mode des using triple DES. | ||
| 37 | cbc3_enc.c - des_3cbc_encrypt() source, don't use this function. | ||
| 38 | cfb_enc.c - des_cfb_encrypt() source. | ||
| 39 | cfb64enc.c - des_cfb64_encrypt() cfb in 64 bit mode but setup to be | ||
| 40 | used as a stream cipher. | ||
| 41 | cfb64ede.c - des_ede3_cfb64_encrypt() cfb in 64 bit mode but setup to be | ||
| 42 | used as a stream cipher and using triple DES. | ||
| 43 | ofb_enc.c - des_cfb_encrypt() source. | ||
| 44 | ofb64_enc.c - des_ofb_encrypt() ofb in 64 bit mode but setup to be | ||
| 45 | used as a stream cipher. | ||
| 46 | ofb64ede.c - des_ede3_ofb64_encrypt() ofb in 64 bit mode but setup to be | ||
| 47 | used as a stream cipher and using triple DES. | ||
| 48 | enc_read.c - des_enc_read() source. | ||
| 49 | enc_writ.c - des_enc_write() source. | ||
| 50 | pcbc_enc.c - des_pcbc_encrypt() source. | ||
| 51 | qud_cksm.c - quad_cksum() source. | ||
| 52 | rand_key.c - des_random_key() source. | ||
| 53 | read_pwd.c - Source for des_read_password() plus related functions. | ||
| 54 | set_key.c - Source for des_set_key(). | ||
| 55 | str2key.c - Covert a string of any length into a key. | ||
| 56 | fcrypt.c - A small, fast version of crypt(3). | ||
| 57 | des_locl.h - Internal libdes.a header file. | ||
| 58 | podd.h - Odd parity tables - used in des_set_key(). | ||
| 59 | sk.h - Lookup tables used in des_set_key(). | ||
| 60 | spr.h - What is left of the S tables - used in ecb_encrypt(). | ||
| 61 | des_ver.h - header file for the external definition of the | ||
| 62 | version string. | ||
| 63 | des.doc - SSLeay documentation for the library. | ||
| 64 | |||
| 65 | /* The perl scripts - you can ignore these files they are only | ||
| 66 | * included for the curious */ | ||
| 67 | des.pl - des in perl anyone? des_set_key and des_ecb_encrypt | ||
| 68 | both done in a perl library. | ||
| 69 | testdes.pl - Testing program for des.pl | ||
| 70 | doIP - Perl script used to develop IP xor/shift code. | ||
| 71 | doPC1 - Perl script used to develop PC1 xor/shift code. | ||
| 72 | doPC2 - Generates sk.h. | ||
| 73 | PC1 - Output of doPC1 should be the same as output from PC1. | ||
| 74 | PC2 - used in development of doPC2. | ||
| 75 | shifts.pl - Perl library used by my perl scripts. | ||
| 76 | |||
| 77 | /* I started making a perl5 dynamic library for libdes | ||
| 78 | * but did not fully finish, these files are part of that effort. */ | ||
| 79 | DES.pm | ||
| 80 | DES.pod | ||
| 81 | DES.xs | ||
| 82 | t | ||
| 83 | typemap | ||
| 84 | |||
| 85 | /* The following are for use with sun RPC implementaions. */ | ||
| 86 | rpc_des.h | ||
| 87 | rpc_enc.c | ||
| 88 | |||
| 89 | /* The following are contibuted by Mark Murray <mark@grondar.za>. They | ||
| 90 | * are not normally built into libdes due to machine specific routines | ||
| 91 | * contained in them. They are for use in the most recent incarnation of | ||
| 92 | * export kerberos v 4 (eBones). */ | ||
| 93 | supp.c | ||
| 94 | new_rkey.c | ||
| 95 | |||
| 96 | |||
diff --git a/src/lib/libssl/src/crypto/des/MODES.DES b/src/lib/libssl/src/crypto/des/MODES.DES new file mode 100644 index 0000000000..0cbc44f51d --- /dev/null +++ b/src/lib/libssl/src/crypto/des/MODES.DES | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | Modes of DES | ||
| 2 | Quite a bit of the following information has been taken from | ||
| 3 | AS 2805.5.2 | ||
| 4 | Australian Standard | ||
| 5 | Electronic funds transfer - Requirements for interfaces, | ||
| 6 | Part 5.2: Modes of operation for an n-bit block cipher algorithm | ||
| 7 | Appendix A | ||
| 8 | |||
| 9 | There are several different modes in which DES can be used, they are | ||
| 10 | as follows. | ||
| 11 | |||
| 12 | Electronic Codebook Mode (ECB) (des_ecb_encrypt()) | ||
| 13 | - 64 bits are enciphered at a time. | ||
| 14 | - The order of the blocks can be rearranged without detection. | ||
| 15 | - The same plaintext block always produces the same ciphertext block | ||
| 16 | (for the same key) making it vulnerable to a 'dictionary attack'. | ||
| 17 | - An error will only affect one ciphertext block. | ||
| 18 | |||
| 19 | Cipher Block Chaining Mode (CBC) (des_cbc_encrypt()) | ||
| 20 | - a multiple of 64 bits are enciphered at a time. | ||
| 21 | - The CBC mode produces the same ciphertext whenever the same | ||
| 22 | plaintext is encrypted using the same key and starting variable. | ||
| 23 | - The chaining operation makes the ciphertext blocks dependent on the | ||
| 24 | current and all preceding plaintext blocks and therefore blocks can not | ||
| 25 | be rearranged. | ||
| 26 | - The use of different starting variables prevents the same plaintext | ||
| 27 | enciphering to the same ciphertext. | ||
| 28 | - An error will affect the current and the following ciphertext blocks. | ||
| 29 | |||
| 30 | Cipher Feedback Mode (CFB) (des_cfb_encrypt()) | ||
| 31 | - a number of bits (j) <= 64 are enciphered at a time. | ||
| 32 | - The CFB mode produces the same ciphertext whenever the same | ||
| 33 | plaintext is encrypted using the same key and starting variable. | ||
| 34 | - The chaining operation makes the ciphertext variables dependent on the | ||
| 35 | current and all preceding variables and therefore j-bit variables are | ||
| 36 | chained together and con not be rearranged. | ||
| 37 | - The use of different starting variables prevents the same plaintext | ||
| 38 | enciphering to the same ciphertext. | ||
| 39 | - The strength of the CFB mode depends on the size of k (maximal if | ||
| 40 | j == k). In my implementation this is always the case. | ||
| 41 | - Selection of a small value for j will require more cycles through | ||
| 42 | the encipherment algorithm per unit of plaintext and thus cause | ||
| 43 | greater processing overheads. | ||
| 44 | - Only multiples of j bits can be enciphered. | ||
| 45 | - An error will affect the current and the following ciphertext variables. | ||
| 46 | |||
| 47 | Output Feedback Mode (OFB) (des_ofb_encrypt()) | ||
| 48 | - a number of bits (j) <= 64 are enciphered at a time. | ||
| 49 | - The OFB mode produces the same ciphertext whenever the same | ||
| 50 | plaintext enciphered using the same key and starting variable. More | ||
| 51 | over, in the OFB mode the same key stream is produced when the same | ||
| 52 | key and start variable are used. Consequently, for security reasons | ||
| 53 | a specific start variable should be used only once for a given key. | ||
| 54 | - The absence of chaining makes the OFB more vulnerable to specific attacks. | ||
| 55 | - The use of different start variables values prevents the same | ||
| 56 | plaintext enciphering to the same ciphertext, by producing different | ||
| 57 | key streams. | ||
| 58 | - Selection of a small value for j will require more cycles through | ||
| 59 | the encipherment algorithm per unit of plaintext and thus cause | ||
| 60 | greater processing overheads. | ||
| 61 | - Only multiples of j bits can be enciphered. | ||
| 62 | - OFB mode of operation does not extend ciphertext errors in the | ||
| 63 | resultant plaintext output. Every bit error in the ciphertext causes | ||
| 64 | only one bit to be in error in the deciphered plaintext. | ||
| 65 | - OFB mode is not self-synchronising. If the two operation of | ||
| 66 | encipherment and decipherment get out of synchronism, the system needs | ||
| 67 | to be re-initialised. | ||
| 68 | - Each re-initialisation should use a value of the start variable | ||
| 69 | different from the start variable values used before with the same | ||
| 70 | key. The reason for this is that an identical bit stream would be | ||
| 71 | produced each time from the same parameters. This would be | ||
| 72 | susceptible to a 'known plaintext' attack. | ||
| 73 | |||
| 74 | Triple ECB Mode (des_ecb3_encrypt()) | ||
| 75 | - Encrypt with key1, decrypt with key2 and encrypt with key1 again. | ||
| 76 | - As for ECB encryption but increases the effective key length to 112 bits. | ||
| 77 | - If both keys are the same it is equivalent to encrypting once with | ||
| 78 | just one key. | ||
| 79 | |||
| 80 | Triple CBC Mode (des_3cbc_encrypt()) | ||
| 81 | - Encrypt with key1, decrypt with key2 and encrypt with key1 again. | ||
| 82 | - As for CBC encryption but increases the effective key length to 112 bits. | ||
| 83 | - If both keys are the same it is equivalent to encrypting once with | ||
| 84 | just one key. | ||
diff --git a/src/lib/libssl/src/crypto/des/Makefile.PL b/src/lib/libssl/src/crypto/des/Makefile.PL new file mode 100644 index 0000000000..b54a24387c --- /dev/null +++ b/src/lib/libssl/src/crypto/des/Makefile.PL | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | use ExtUtils::MakeMaker; | ||
| 2 | # See lib/ExtUtils/MakeMaker.pm for details of how to influence | ||
| 3 | # the contents of the Makefile being created. | ||
| 4 | &writeMakefile( | ||
| 5 | 'potential_libs' => '', # e.g., '-lm' | ||
| 6 | 'INC' => '', # e.g., '-I/usr/include/other' | ||
| 7 | 'DISTNAME' => 'DES', | ||
| 8 | 'VERSION' => '0.1', | ||
| 9 | 'DEFINE' => '-DPERL5', | ||
| 10 | 'OBJECT' => 'DES.o cbc_cksm.o cbc_enc.o ecb_enc.o pcbc_enc.o \ | ||
| 11 | rand_key.o set_key.o str2key.o \ | ||
| 12 | enc_read.o enc_writ.o fcrypt.o cfb_enc.o \ | ||
| 13 | ecb3_enc.o ofb_enc.o cbc3_enc.o des_enc.o', | ||
| 14 | ); | ||
diff --git a/src/lib/libssl/src/crypto/des/Makefile.lit b/src/lib/libssl/src/crypto/des/Makefile.lit new file mode 100644 index 0000000000..c09f6969da --- /dev/null +++ b/src/lib/libssl/src/crypto/des/Makefile.lit | |||
| @@ -0,0 +1,250 @@ | |||
| 1 | # You must select the correct terminal control system to be used to | ||
| 2 | # turn character echo off when reading passwords. There a 5 systems | ||
| 3 | # SGTTY - the old BSD system | ||
| 4 | # TERMIO - most system V boxes | ||
| 5 | # TERMIOS - SGI (ala IRIX). | ||
| 6 | # VMS - the DEC operating system | ||
| 7 | # MSDOS - we all know what it is :-) | ||
| 8 | # read_pwd.c makes a reasonable guess at what is correct. | ||
| 9 | |||
| 10 | # Targets | ||
| 11 | # make - twidle the options yourself :-) | ||
| 12 | # make cc - standard cc options | ||
| 13 | # make gcc - standard gcc options | ||
| 14 | # make x86-elf - linux-elf etc | ||
| 15 | # make x86-out - linux-a.out, FreeBSD etc | ||
| 16 | # make x86-solaris | ||
| 17 | # make x86-bdsi | ||
| 18 | |||
| 19 | # If you are on a DEC Alpha, edit des.h and change the DES_LONG | ||
| 20 | # define to 'unsigned int'. I have seen this give a %20 speedup. | ||
| 21 | |||
| 22 | OPTS0= -DLIBDES_LIT -DRAND -DTERMIO #-DNOCONST | ||
| 23 | |||
| 24 | # Version 1.94 has changed the strings_to_key function so that it is | ||
| 25 | # now compatible with MITs when the string is longer than 8 characters. | ||
| 26 | # If you wish to keep the old version, uncomment the following line. | ||
| 27 | # This will affect the -E/-D options on des(1). | ||
| 28 | #OPTS1= -DOLD_STR_TO_KEY | ||
| 29 | |||
| 30 | # There are 4 possible performance options | ||
| 31 | # -DDES_PTR | ||
| 32 | # -DDES_RISC1 | ||
| 33 | # -DDES_RISC2 (only one of DES_RISC1 and DES_RISC2) | ||
| 34 | # -DDES_UNROLL | ||
| 35 | # after the initial build, run 'des_opts' to see which options are best | ||
| 36 | # for your platform. There are some listed in options.txt | ||
| 37 | #OPTS2= -DDES_PTR | ||
| 38 | #OPTS3= -DDES_RISC1 # or DES_RISC2 | ||
| 39 | #OPTS4= -DDES_UNROLL | ||
| 40 | |||
| 41 | OPTS= $(OPTS0) $(OPTS1) $(OPTS2) $(OPTS3) $(OPTS4) | ||
| 42 | |||
| 43 | MAKE=make -f Makefile | ||
| 44 | #CC=cc | ||
| 45 | #CFLAG= -O | ||
| 46 | |||
| 47 | CC=gcc | ||
| 48 | #CFLAG= -O4 -funroll-loops -fomit-frame-pointer | ||
| 49 | CFLAG= -O3 -fomit-frame-pointer | ||
| 50 | |||
| 51 | CFLAGS=$(OPTS) $(CFLAG) | ||
| 52 | CPP=$(CC) -E | ||
| 53 | AS=as | ||
| 54 | |||
| 55 | # Assember version of des_encrypt*(). | ||
| 56 | DES_ENC=des_enc.o fcrypt_b.o # normal C version | ||
| 57 | #DES_ENC=asm/dx86-elf.o asm/yx86-elf.o # elf format x86 | ||
| 58 | #DES_ENC=asm/dx86-out.o asm/yx86-out.o # a.out format x86 | ||
| 59 | #DES_ENC=asm/dx86-sol.o asm/yx86-sol.o # solaris format x86 | ||
| 60 | #DES_ENC=asm/dx86bsdi.o asm/yx86basi.o # bsdi format x86 | ||
| 61 | |||
| 62 | LIBDIR=/usr/local/lib | ||
| 63 | BINDIR=/usr/local/bin | ||
| 64 | INCDIR=/usr/local/include | ||
| 65 | MANDIR=/usr/local/man | ||
| 66 | MAN1=1 | ||
| 67 | MAN3=3 | ||
| 68 | SHELL=/bin/sh | ||
| 69 | OBJ_LIT=cbc_enc.o ecb_enc.o $(DES_ENC) fcrypt.o set_key.o | ||
| 70 | OBJ_FULL=cbc_cksm.o $(OBJ_LIT) pcbc_enc.o \ | ||
| 71 | xcbc_enc.o qud_cksm.o \ | ||
| 72 | cfb64ede.o cfb64enc.o cfb_enc.o ecb3_enc.o \ | ||
| 73 | enc_read.o enc_writ.o ofb64ede.o ofb64enc.o ofb_enc.o \ | ||
| 74 | rand_key.o read_pwd.o read2pwd.o rpc_enc.o str2key.o supp.o | ||
| 75 | |||
| 76 | GENERAL_LIT=COPYRIGHT INSTALL README VERSION Makefile des_crypt.man \ | ||
| 77 | des.doc options.txt asm | ||
| 78 | GENERAL_FULL=$(GENERAL_LIT) FILES Imakefile times vms.com KERBEROS MODES.DES \ | ||
| 79 | des.man DES.pm DES.pod DES.xs Makefile.PL dess.cpp des3s.cpp \ | ||
| 80 | Makefile.uni typemap t Makefile.ssl makefile.bc Makefile.lit \ | ||
| 81 | des.org des_locl.org | ||
| 82 | TESTING_LIT= destest speed des_opts | ||
| 83 | TESTING_FULL= rpw $(TESTING_LIT) | ||
| 84 | TESTING_SRC_LIT=destest.c speed.c des_opts.c | ||
| 85 | TESTING_SRC_FULL=rpw.c $(TESTING_SRC_LIT) | ||
| 86 | HEADERS_LIT=des_ver.h des.h des_locl.h podd.h sk.h spr.h | ||
| 87 | HEADERS_FULL= $(HEADERS_LIT) rpc_des.h | ||
| 88 | LIBDES_LIT=cbc_enc.c ecb_enc.c fcrypt.c set_key.c des_enc.c fcrypt_b.c | ||
| 89 | LIBDES_FULL= cbc_cksm.c pcbc_enc.c qud_cksm.c \ | ||
| 90 | cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c \ | ||
| 91 | enc_read.c enc_writ.c ofb64ede.c ofb64enc.c ofb_enc.c \ | ||
| 92 | rand_key.c rpc_enc.c str2key.c supp.c \ | ||
| 93 | xcbc_enc.c $(LIBDES_LIT) read_pwd.c read2pwd.c | ||
| 94 | |||
| 95 | PERL= des.pl testdes.pl doIP doPC1 doPC2 PC1 PC2 shifts.pl | ||
| 96 | |||
| 97 | OBJ= $(OBJ_LIT) | ||
| 98 | GENERAL=$(GENERAL_LIT) | ||
| 99 | TESTING=$(TESTING_LIT) | ||
| 100 | TESTING_SRC=$(TESTING_SRC_LIT) | ||
| 101 | HEADERS=$(HEADERS_LIT) | ||
| 102 | LIBDES= $(LIBDES_LIT) | ||
| 103 | |||
| 104 | ALL= $(GENERAL) $(TESTING_SRC) $(LIBDES) $(PERL) $(HEADERS) | ||
| 105 | |||
| 106 | DLIB= libdes.a | ||
| 107 | |||
| 108 | all: $(DLIB) $(TESTING) | ||
| 109 | |||
| 110 | cc: | ||
| 111 | $(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all | ||
| 112 | |||
| 113 | gcc: | ||
| 114 | $(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all | ||
| 115 | |||
| 116 | x86-elf: | ||
| 117 | $(MAKE) DES_ENC='asm/dx86-elf.o asm/yx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all | ||
| 118 | |||
| 119 | x86-out: | ||
| 120 | $(MAKE) DES_ENC='asm/dx86-out.o asm/yx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all | ||
| 121 | |||
| 122 | x86-solaris: | ||
| 123 | $(MAKE) DES_ENC='asm/dx86-sol.o asm/yx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all | ||
| 124 | |||
| 125 | x86-bsdi: | ||
| 126 | $(MAKE) DES_ENC='asm/dx86bsdi.o asm/yx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all | ||
| 127 | |||
| 128 | # elf | ||
| 129 | asm/dx86-elf.o: asm/dx86unix.cpp | ||
| 130 | $(CPP) -DELF asm/dx86unix.cpp | $(AS) -o asm/dx86-elf.o | ||
| 131 | |||
| 132 | asm/yx86-elf.o: asm/yx86unix.cpp | ||
| 133 | $(CPP) -DELF asm/yx86unix.cpp | $(AS) -o asm/yx86-elf.o | ||
| 134 | |||
| 135 | # solaris | ||
| 136 | asm/dx86-sol.o: asm/dx86unix.cpp | ||
| 137 | $(CC) -E -DSOL asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s | ||
| 138 | as -o asm/dx86-sol.o asm/dx86-sol.s | ||
| 139 | rm -f asm/dx86-sol.s | ||
| 140 | |||
| 141 | asm/yx86-sol.o: asm/yx86unix.cpp | ||
| 142 | $(CC) -E -DSOL asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s | ||
| 143 | as -o asm/yx86-sol.o asm/yx86-sol.s | ||
| 144 | rm -f asm/yx86-sol.s | ||
| 145 | |||
| 146 | # a.out | ||
| 147 | asm/dx86-out.o: asm/dx86unix.cpp | ||
| 148 | $(CPP) -DOUT asm/dx86unix.cpp | $(AS) -o asm/dx86-out.o | ||
| 149 | |||
| 150 | asm/yx86-out.o: asm/yx86unix.cpp | ||
| 151 | $(CPP) -DOUT asm/yx86unix.cpp | $(AS) -o asm/yx86-out.o | ||
| 152 | |||
| 153 | # bsdi | ||
| 154 | asm/dx86bsdi.o: asm/dx86unix.cpp | ||
| 155 | $(CPP) -DBSDI asm/dx86unix.cpp | $(AS) -o asm/dx86bsdi.o | ||
| 156 | |||
| 157 | asm/yx86bsdi.o: asm/yx86unix.cpp | ||
| 158 | $(CPP) -DBSDI asm/yx86unix.cpp | $(AS) -o asm/yx86bsdi.o | ||
| 159 | |||
| 160 | asm/dx86unix.cpp: | ||
| 161 | (cd asm; perl des-586.pl cpp >dx86unix.cpp) | ||
| 162 | |||
| 163 | asm/yx86unix.cpp: | ||
| 164 | (cd asm; perl crypt586.pl cpp >yx86unix.cpp) | ||
| 165 | |||
| 166 | test: all | ||
| 167 | ./destest | ||
| 168 | |||
| 169 | $(DLIB): $(OBJ) | ||
| 170 | /bin/rm -f $(DLIB) | ||
| 171 | ar cr $(DLIB) $(OBJ) | ||
| 172 | -if test -s /bin/ranlib; then /bin/ranlib $(DLIB); \ | ||
| 173 | else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(DLIB); \ | ||
| 174 | else exit 0; fi; fi | ||
| 175 | |||
| 176 | des_opts: des_opts.o $(DLIB) | ||
| 177 | $(CC) $(CFLAGS) -o des_opts des_opts.o $(DLIB) | ||
| 178 | |||
| 179 | destest: destest.o $(DLIB) | ||
| 180 | $(CC) $(CFLAGS) -o destest destest.o $(DLIB) | ||
| 181 | |||
| 182 | rpw: rpw.o $(DLIB) | ||
| 183 | $(CC) $(CFLAGS) -o rpw rpw.o $(DLIB) | ||
| 184 | |||
| 185 | speed: speed.o $(DLIB) | ||
| 186 | $(CC) $(CFLAGS) -o speed speed.o $(DLIB) | ||
| 187 | |||
| 188 | des: des.o $(DLIB) | ||
| 189 | $(CC) $(CFLAGS) -o des des.o $(DLIB) | ||
| 190 | |||
| 191 | tags: | ||
| 192 | ctags $(TESTING_SRC) $(LIBDES) | ||
| 193 | |||
| 194 | tar_lit: | ||
| 195 | /bin/mv Makefile Makefile.tmp | ||
| 196 | /bin/cp Makefile.lit Makefile | ||
| 197 | tar chf libdes-l.tar $(LIBDES_LIT) $(HEADERS_LIT) \ | ||
| 198 | $(GENERAL_LIT) $(TESTING_SRC_LIT) | ||
| 199 | /bin/rm -f Makefile | ||
| 200 | /bin/mv Makefile.tmp Makefile | ||
| 201 | |||
| 202 | tar: | ||
| 203 | tar chf libdes.tar $(ALL) | ||
| 204 | |||
| 205 | shar: | ||
| 206 | shar $(ALL) >libdes.shar | ||
| 207 | |||
| 208 | depend: | ||
| 209 | makedepend $(LIBDES) $(TESTING_SRC) | ||
| 210 | |||
| 211 | clean: | ||
| 212 | /bin/rm -f *.o tags core $(TESTING) $(DLIB) .nfs* *.old *.bak asm/*.o | ||
| 213 | |||
| 214 | dclean: | ||
| 215 | sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new | ||
| 216 | mv -f Makefile.new Makefile | ||
| 217 | |||
| 218 | # Eric is probably going to choke when he next looks at this --tjh | ||
| 219 | install: | ||
| 220 | if test $(INSTALLTOP); then \ | ||
| 221 | echo SSL style install; \ | ||
| 222 | cp $(DLIB) $(INSTALLTOP)/lib; \ | ||
| 223 | if test -s /bin/ranlib; then \ | ||
| 224 | /bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \ | ||
| 225 | else \ | ||
| 226 | if test -s /usr/bin/ranlib; then \ | ||
| 227 | /usr/bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \ | ||
| 228 | fi; fi; \ | ||
| 229 | chmod 644 $(INSTALLTOP)/lib/$(DLIB); \ | ||
| 230 | cp des.h $(INSTALLTOP)/include; \ | ||
| 231 | chmod 644 $(INSTALLTOP)/include/des.h; \ | ||
| 232 | else \ | ||
| 233 | echo Standalone install; \ | ||
| 234 | cp $(DLIB) $(LIBDIR)/$(DLIB); \ | ||
| 235 | if test -s /bin/ranlib; then \ | ||
| 236 | /bin/ranlib $(LIBDIR)/$(DLIB); \ | ||
| 237 | else \ | ||
| 238 | if test -s /usr/bin/ranlib; then \ | ||
| 239 | /usr/bin/ranlib $(LIBDIR)/$(DLIB); \ | ||
| 240 | fi; \ | ||
| 241 | fi; \ | ||
| 242 | chmod 644 $(LIBDIR)/$(DLIB); \ | ||
| 243 | cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \ | ||
| 244 | chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \ | ||
| 245 | cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \ | ||
| 246 | chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \ | ||
| 247 | cp des.h $(INCDIR)/des.h; \ | ||
| 248 | chmod 644 $(INCDIR)/des.h; \ | ||
| 249 | fi | ||
| 250 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/des/Makefile.ssl b/src/lib/libssl/src/crypto/des/Makefile.ssl new file mode 100644 index 0000000000..78b5189ee3 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/Makefile.ssl | |||
| @@ -0,0 +1,140 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/des/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= des | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | CPP= $(CC) -E | ||
| 9 | INCLUDES= | ||
| 10 | CFLAG=-g | ||
| 11 | INSTALLTOP=/usr/local/ssl | ||
| 12 | MAKE= make -f Makefile.ssl | ||
| 13 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 14 | MAKEFILE= Makefile.ssl | ||
| 15 | AR= ar r | ||
| 16 | DES_ENC= des_enc.o fcrypt_b.o | ||
| 17 | # or use | ||
| 18 | #DES_ENC= dx86-elf.o yx86-elf.o | ||
| 19 | |||
| 20 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 21 | |||
| 22 | GENERAL=Makefile des.org des_locl.org | ||
| 23 | TEST=destest.c | ||
| 24 | APPS= | ||
| 25 | |||
| 26 | LIB=$(TOP)/libcrypto.a | ||
| 27 | LIBSRC= cbc_cksm.c cbc_enc.c cfb64enc.c cfb_enc.c \ | ||
| 28 | ecb3_enc.c ecb_enc.c enc_read.c enc_writ.c \ | ||
| 29 | fcrypt.c ofb64enc.c ofb_enc.c pcbc_enc.c \ | ||
| 30 | qud_cksm.c rand_key.c read_pwd.c rpc_enc.c set_key.c \ | ||
| 31 | des_enc.c fcrypt_b.c read2pwd.c \ | ||
| 32 | fcrypt.c xcbc_enc.c \ | ||
| 33 | str2key.c cfb64ede.c ofb64ede.c supp.c | ||
| 34 | |||
| 35 | LIBOBJ= set_key.o ecb_enc.o cbc_enc.o \ | ||
| 36 | ecb3_enc.o cfb64enc.o cfb64ede.o cfb_enc.o ofb64ede.o \ | ||
| 37 | enc_read.o enc_writ.o ofb64enc.o \ | ||
| 38 | ofb_enc.o str2key.o pcbc_enc.o qud_cksm.o rand_key.o \ | ||
| 39 | ${DES_ENC} read2pwd.o \ | ||
| 40 | fcrypt.o xcbc_enc.o read_pwd.o rpc_enc.o cbc_cksm.o supp.o | ||
| 41 | |||
| 42 | SRC= $(LIBSRC) | ||
| 43 | |||
| 44 | EXHEADER= des.h | ||
| 45 | HEADER= des_locl.h rpc_des.h podd.h sk.h spr.h des_ver.h $(EXHEADER) | ||
| 46 | |||
| 47 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 48 | |||
| 49 | top: | ||
| 50 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 51 | |||
| 52 | all: lib | ||
| 53 | |||
| 54 | lib: $(LIBOBJ) | ||
| 55 | $(AR) $(LIB) $(LIBOBJ) | ||
| 56 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 57 | @touch lib | ||
| 58 | |||
| 59 | # elf | ||
| 60 | asm/dx86-elf.o: asm/dx86unix.cpp | ||
| 61 | $(CPP) -DELF asm/dx86unix.cpp | as -o asm/dx86-elf.o | ||
| 62 | |||
| 63 | asm/yx86-elf.o: asm/yx86unix.cpp | ||
| 64 | $(CPP) -DELF asm/yx86unix.cpp | as -o asm/yx86-elf.o | ||
| 65 | |||
| 66 | # solaris | ||
| 67 | asm/dx86-sol.o: asm/dx86unix.cpp | ||
| 68 | $(CC) -E -DSOL asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s | ||
| 69 | as -o asm/dx86-sol.o asm/dx86-sol.s | ||
| 70 | rm -f asm/dx86-sol.s | ||
| 71 | |||
| 72 | asm/yx86-sol.o: asm/yx86unix.cpp | ||
| 73 | $(CC) -E -DSOL asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s | ||
| 74 | as -o asm/yx86-sol.o asm/yx86-sol.s | ||
| 75 | rm -f asm/yx86-sol.s | ||
| 76 | |||
| 77 | # a.out | ||
| 78 | asm/dx86-out.o: asm/dx86unix.cpp | ||
| 79 | $(CPP) -DOUT asm/dx86unix.cpp | as -o asm/dx86-out.o | ||
| 80 | |||
| 81 | asm/yx86-out.o: asm/yx86unix.cpp | ||
| 82 | $(CPP) -DOUT asm/yx86unix.cpp | as -o asm/yx86-out.o | ||
| 83 | |||
| 84 | # bsdi | ||
| 85 | asm/dx86bsdi.o: asm/dx86unix.cpp | ||
| 86 | $(CPP) -DBSDI asm/dx86unix.cpp | as -o asm/dx86bsdi.o | ||
| 87 | |||
| 88 | asm/yx86bsdi.o: asm/yx86unix.cpp | ||
| 89 | $(CPP) -DBSDI asm/yx86unix.cpp | as -o asm/yx86bsdi.o | ||
| 90 | |||
| 91 | asm/dx86unix.cpp: | ||
| 92 | (cd asm; perl des-586.pl cpp >dx86unix.cpp) | ||
| 93 | |||
| 94 | asm/yx86unix.cpp: | ||
| 95 | (cd asm; perl crypt586.pl cpp >yx86unix.cpp) | ||
| 96 | |||
| 97 | files: | ||
| 98 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 99 | |||
| 100 | links: | ||
| 101 | /bin/rm -f Makefile | ||
| 102 | $(TOP)/util/point.sh Makefile.ssl Makefile | ||
| 103 | /bin/rm -f des.doc | ||
| 104 | /bin/rm -fr asm/perlasm | ||
| 105 | $(TOP)/util/point.sh ../../perlasm asm/perlasm | ||
| 106 | $(TOP)/util/point.sh ../../doc/des.doc des.doc | ||
| 107 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 108 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 109 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 110 | |||
| 111 | install: installs | ||
| 112 | |||
| 113 | installs: | ||
| 114 | @for i in $(EXHEADER) ; \ | ||
| 115 | do \ | ||
| 116 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 117 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 118 | done; | ||
| 119 | |||
| 120 | tags: | ||
| 121 | ctags $(SRC) | ||
| 122 | |||
| 123 | tests: | ||
| 124 | |||
| 125 | lint: | ||
| 126 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 127 | |||
| 128 | depend: | ||
| 129 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 130 | |||
| 131 | dclean: | ||
| 132 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 133 | mv -f Makefile.new $(MAKEFILE) | ||
| 134 | |||
| 135 | clean: | ||
| 136 | /bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 137 | |||
| 138 | errors: | ||
| 139 | |||
| 140 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/des/Makefile.uni b/src/lib/libssl/src/crypto/des/Makefile.uni new file mode 100644 index 0000000000..8f1759748a --- /dev/null +++ b/src/lib/libssl/src/crypto/des/Makefile.uni | |||
| @@ -0,0 +1,263 @@ | |||
| 1 | # You must select the correct terminal control system to be used to | ||
| 2 | # turn character echo off when reading passwords. There a 5 systems | ||
| 3 | # SGTTY - the old BSD system | ||
| 4 | # TERMIO - most system V boxes | ||
| 5 | # TERMIOS - SGI (ala IRIX). | ||
| 6 | # VMS - the DEC operating system | ||
| 7 | # MSDOS - we all know what it is :-) | ||
| 8 | # read_pwd.c makes a reasonable guess at what is correct. | ||
| 9 | |||
| 10 | # Targets | ||
| 11 | # make - twidle the options yourself :-) | ||
| 12 | # make cc - standard cc options | ||
| 13 | # make gcc - standard gcc options | ||
| 14 | # make x86-elf - linux-elf etc | ||
| 15 | # make x86-out - linux-a.out, FreeBSD etc | ||
| 16 | # make x86-solaris | ||
| 17 | # make x86-bdsi | ||
| 18 | |||
| 19 | # If you are on a DEC Alpha, edit des.h and change the DES_LONG | ||
| 20 | # define to 'unsigned int'. I have seen this give a %20 speedup. | ||
| 21 | |||
| 22 | OPTS0= -DRAND -DTERMIO #-DNOCONST | ||
| 23 | |||
| 24 | # Version 1.94 has changed the strings_to_key function so that it is | ||
| 25 | # now compatible with MITs when the string is longer than 8 characters. | ||
| 26 | # If you wish to keep the old version, uncomment the following line. | ||
| 27 | # This will affect the -E/-D options on des(1). | ||
| 28 | #OPTS1= -DOLD_STR_TO_KEY | ||
| 29 | |||
| 30 | # There are 4 possible performance options | ||
| 31 | # -DDES_PTR | ||
| 32 | # -DDES_RISC1 | ||
| 33 | # -DDES_RISC2 (only one of DES_RISC1 and DES_RISC2) | ||
| 34 | # -DDES_UNROLL | ||
| 35 | # after the initial build, run 'des_opts' to see which options are best | ||
| 36 | # for your platform. There are some listed in options.txt | ||
| 37 | #OPTS2= -DDES_PTR | ||
| 38 | #OPTS3= -DDES_RISC1 # or DES_RISC2 | ||
| 39 | #OPTS4= -DDES_UNROLL | ||
| 40 | |||
| 41 | OPTS= $(OPTS0) $(OPTS1) $(OPTS2) $(OPTS3) $(OPTS4) | ||
| 42 | |||
| 43 | MAKE=make -f Makefile | ||
| 44 | #CC=cc | ||
| 45 | #CFLAG= -O | ||
| 46 | |||
| 47 | CC=gcc | ||
| 48 | #CFLAG= -O4 -funroll-loops -fomit-frame-pointer | ||
| 49 | CFLAG= -O3 -fomit-frame-pointer | ||
| 50 | |||
| 51 | CFLAGS=$(OPTS) $(CFLAG) | ||
| 52 | CPP=$(CC) -E | ||
| 53 | AS=as | ||
| 54 | |||
| 55 | # Assember version of des_encrypt*(). | ||
| 56 | DES_ENC=des_enc.o fcrypt_b.o # normal C version | ||
| 57 | #DES_ENC=asm/dx86-elf.o asm/yx86-elf.o # elf format x86 | ||
| 58 | #DES_ENC=asm/dx86-out.o asm/yx86-out.o # a.out format x86 | ||
| 59 | #DES_ENC=asm/dx86-sol.o asm/yx86-sol.o # solaris format x86 | ||
| 60 | #DES_ENC=asm/dx86bsdi.o asm/yx86basi.o # bsdi format x86 | ||
| 61 | |||
| 62 | LIBDIR=/usr/local/lib | ||
| 63 | BINDIR=/usr/local/bin | ||
| 64 | INCDIR=/usr/local/include | ||
| 65 | MANDIR=/usr/local/man | ||
| 66 | MAN1=1 | ||
| 67 | MAN3=3 | ||
| 68 | SHELL=/bin/sh | ||
| 69 | OBJ_LIT=cbc_enc.o ecb_enc.o $(DES_ENC) fcrypt.o set_key.o | ||
| 70 | OBJ_FULL=cbc_cksm.o $(OBJ_LIT) pcbc_enc.o \ | ||
| 71 | xcbc_enc.o qud_cksm.o cbc3_enc.o \ | ||
| 72 | cfb64ede.o cfb64enc.o cfb_enc.o ecb3_enc.o \ | ||
| 73 | enc_read.o enc_writ.o ofb64ede.o ofb64enc.o ofb_enc.o \ | ||
| 74 | rand_key.o read_pwd.o read2pwd.o rpc_enc.o str2key.o supp.o | ||
| 75 | |||
| 76 | GENERAL_LIT=COPYRIGHT INSTALL README VERSION Makefile des_crypt.man \ | ||
| 77 | des.doc options.txt asm | ||
| 78 | GENERAL_FULL=$(GENERAL_LIT) FILES Imakefile times vms.com KERBEROS MODES.DES \ | ||
| 79 | des.man DES.pm DES.pod DES.xs Makefile.PL dess.cpp des3s.cpp \ | ||
| 80 | Makefile.uni typemap t Makefile.ssl makefile.bc Makefile.lit \ | ||
| 81 | des.org des_locl.org | ||
| 82 | TESTING_LIT= destest speed des_opts | ||
| 83 | TESTING_FULL= rpw des $(TESTING_LIT) | ||
| 84 | TESTING_SRC_LIT=destest.c speed.c des_opts.c | ||
| 85 | TESTING_SRC_FULL=rpw.c des.c $(TESTING_SRC_LIT) | ||
| 86 | HEADERS_LIT=des_ver.h des.h des_locl.h podd.h sk.h spr.h | ||
| 87 | HEADERS_FULL= $(HEADERS_LIT) rpc_des.h | ||
| 88 | LIBDES_LIT=cbc_enc.c ecb_enc.c fcrypt.c set_key.c des_enc.c fcrypt_b.c | ||
| 89 | LIBDES_FULL= cbc_cksm.c pcbc_enc.c qud_cksm.c cbc3_enc.c \ | ||
| 90 | cfb64ede.c cfb64enc.c cfb_enc.c ecb3_enc.c \ | ||
| 91 | enc_read.c enc_writ.c ofb64ede.c ofb64enc.c ofb_enc.c \ | ||
| 92 | rand_key.c rpc_enc.c str2key.c supp.c \ | ||
| 93 | xcbc_enc.c $(LIBDES_LIT) read_pwd.c read2pwd.c | ||
| 94 | |||
| 95 | PERL= des.pl testdes.pl doIP doPC1 doPC2 PC1 PC2 shifts.pl | ||
| 96 | |||
| 97 | OBJ= $(OBJ_FULL) | ||
| 98 | GENERAL=$(GENERAL_FULL) | ||
| 99 | TESTING=$(TESTING_FULL) | ||
| 100 | TESTING_SRC=$(TESTING_SRC_FULL) | ||
| 101 | HEADERS=$(HEADERS_FULL) | ||
| 102 | LIBDES= $(LIBDES_FULL) | ||
| 103 | |||
| 104 | ALL= $(GENERAL) $(TESTING_SRC) $(LIBDES) $(PERL) $(HEADERS) | ||
| 105 | |||
| 106 | DLIB= libdes.a | ||
| 107 | |||
| 108 | all: $(DLIB) $(TESTING) | ||
| 109 | |||
| 110 | cc: | ||
| 111 | $(MAKE) CC=cc CFLAGS="-O $(OPTS) $(CFLAG)" all | ||
| 112 | |||
| 113 | gcc: | ||
| 114 | $(MAKE) CC=gcc CFLAGS="-O3 -fomit-frame-pointer $(OPTS) $(CFLAG)" all | ||
| 115 | |||
| 116 | x86-elf: | ||
| 117 | $(MAKE) DES_ENC='asm/dx86-elf.o asm/yx86-elf.o' CC=$(CC) CFLAGS="-DELF $(OPTS) $(CFLAG)" all | ||
| 118 | |||
| 119 | x86-out: | ||
| 120 | $(MAKE) DES_ENC='asm/dx86-out.o asm/yx86-out.o' CC=$(CC) CFLAGS="-DOUT $(OPTS) $(CFLAG)" all | ||
| 121 | |||
| 122 | x86-solaris: | ||
| 123 | $(MAKE) DES_ENC='asm/dx86-sol.o asm/yx86-sol.o' CC=$(CC) CFLAGS="-DSOL $(OPTS) $(CFLAG)" all | ||
| 124 | |||
| 125 | x86-bsdi: | ||
| 126 | $(MAKE) DES_ENC='asm/dx86bsdi.o asm/yx86bsdi.o' CC=$(CC) CFLAGS="-DBSDI $(OPTS) $(CFLAG)" all | ||
| 127 | |||
| 128 | # elf | ||
| 129 | asm/dx86-elf.o: asm/dx86unix.cpp | ||
| 130 | $(CPP) -DELF asm/dx86unix.cpp | $(AS) -o asm/dx86-elf.o | ||
| 131 | |||
| 132 | asm/yx86-elf.o: asm/yx86unix.cpp | ||
| 133 | $(CPP) -DELF asm/yx86unix.cpp | $(AS) -o asm/yx86-elf.o | ||
| 134 | |||
| 135 | # solaris | ||
| 136 | asm/dx86-sol.o: asm/dx86unix.cpp | ||
| 137 | $(CC) -E -DSOL asm/dx86unix.cpp | sed 's/^#.*//' > asm/dx86-sol.s | ||
| 138 | as -o asm/dx86-sol.o asm/dx86-sol.s | ||
| 139 | rm -f asm/dx86-sol.s | ||
| 140 | |||
| 141 | asm/yx86-sol.o: asm/yx86unix.cpp | ||
| 142 | $(CC) -E -DSOL asm/yx86unix.cpp | sed 's/^#.*//' > asm/yx86-sol.s | ||
| 143 | as -o asm/yx86-sol.o asm/yx86-sol.s | ||
| 144 | rm -f asm/yx86-sol.s | ||
| 145 | |||
| 146 | # a.out | ||
| 147 | asm/dx86-out.o: asm/dx86unix.cpp | ||
| 148 | $(CPP) -DOUT asm/dx86unix.cpp | $(AS) -o asm/dx86-out.o | ||
| 149 | |||
| 150 | asm/yx86-out.o: asm/yx86unix.cpp | ||
| 151 | $(CPP) -DOUT asm/yx86unix.cpp | $(AS) -o asm/yx86-out.o | ||
| 152 | |||
| 153 | # bsdi | ||
| 154 | asm/dx86bsdi.o: asm/dx86unix.cpp | ||
| 155 | $(CPP) -DBSDI asm/dx86unix.cpp | $(AS) -o asm/dx86bsdi.o | ||
| 156 | |||
| 157 | asm/yx86bsdi.o: asm/yx86unix.cpp | ||
| 158 | $(CPP) -DBSDI asm/yx86unix.cpp | $(AS) -o asm/yx86bsdi.o | ||
| 159 | |||
| 160 | asm/dx86unix.cpp: | ||
| 161 | (cd asm; perl des-586.pl cpp >dx86unix.cpp) | ||
| 162 | |||
| 163 | asm/yx86unix.cpp: | ||
| 164 | (cd asm; perl crypt586.pl cpp >yx86unix.cpp) | ||
| 165 | |||
| 166 | test: all | ||
| 167 | ./destest | ||
| 168 | |||
| 169 | $(DLIB): $(OBJ) | ||
| 170 | /bin/rm -f $(DLIB) | ||
| 171 | ar cr $(DLIB) $(OBJ) | ||
| 172 | -if test -s /bin/ranlib; then /bin/ranlib $(DLIB); \ | ||
| 173 | else if test -s /usr/bin/ranlib; then /usr/bin/ranlib $(DLIB); \ | ||
| 174 | else exit 0; fi; fi | ||
| 175 | |||
| 176 | des_opts: des_opts.o $(DLIB) | ||
| 177 | $(CC) $(CFLAGS) -o des_opts des_opts.o $(DLIB) | ||
| 178 | |||
| 179 | destest: destest.o $(DLIB) | ||
| 180 | $(CC) $(CFLAGS) -o destest destest.o $(DLIB) | ||
| 181 | |||
| 182 | rpw: rpw.o $(DLIB) | ||
| 183 | $(CC) $(CFLAGS) -o rpw rpw.o $(DLIB) | ||
| 184 | |||
| 185 | speed: speed.o $(DLIB) | ||
| 186 | $(CC) $(CFLAGS) -o speed speed.o $(DLIB) | ||
| 187 | |||
| 188 | des: des.o $(DLIB) | ||
| 189 | $(CC) $(CFLAGS) -o des des.o $(DLIB) | ||
| 190 | |||
| 191 | tags: | ||
| 192 | ctags $(TESTING_SRC) $(LIBDES) | ||
| 193 | |||
| 194 | tar_lit: | ||
| 195 | /bin/mv Makefile Makefile.tmp | ||
| 196 | /bin/cp Makefile.lit Makefile | ||
| 197 | for i in $(HEADERS_LIT) $(LIBDES_LIT) $(GENERAL_LIT) $(TESTING_SRC_LIT) ;\ | ||
| 198 | do \ | ||
| 199 | n="$$n des/$$i"; \ | ||
| 200 | done; \ | ||
| 201 | ( cd .. ; tar chf - $$n )| gzip > libdes-l.tgz | ||
| 202 | /bin/rm -f Makefile | ||
| 203 | /bin/mv Makefile.tmp Makefile | ||
| 204 | |||
| 205 | tar: | ||
| 206 | mv Makefile Makefile.tmp | ||
| 207 | /bin/cp Makefile.uni Makefile | ||
| 208 | for i in $(ALL) ;\ | ||
| 209 | do \ | ||
| 210 | n="$$n des/$$i"; \ | ||
| 211 | done; \ | ||
| 212 | ( cd .. ; tar chf - $$n )| gzip > libdes.tgz | ||
| 213 | /bin/rm -f Makefile | ||
| 214 | /bin/mv Makefile.tmp Makefile | ||
| 215 | |||
| 216 | shar: | ||
| 217 | shar $(ALL) >libdes.shar | ||
| 218 | |||
| 219 | depend: | ||
| 220 | makedepend $(LIBDES) $(TESTING_SRC) | ||
| 221 | |||
| 222 | clean: | ||
| 223 | /bin/rm -f *.o tags core $(TESTING) $(DLIB) .nfs* *.old *.bak asm/*.o | ||
| 224 | |||
| 225 | dclean: | ||
| 226 | sed -e '/^# DO NOT DELETE THIS LINE/ q' Makefile >Makefile.new | ||
| 227 | mv -f Makefile.new Makefile | ||
| 228 | |||
| 229 | # Eric is probably going to choke when he next looks at this --tjh | ||
| 230 | install: des | ||
| 231 | if test $(INSTALLTOP); then \ | ||
| 232 | echo SSL style install; \ | ||
| 233 | cp $(DLIB) $(INSTALLTOP)/lib; \ | ||
| 234 | if test -s /bin/ranlib; then \ | ||
| 235 | /bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \ | ||
| 236 | else \ | ||
| 237 | if test -s /usr/bin/ranlib; then \ | ||
| 238 | /usr/bin/ranlib $(INSTALLTOP)/lib/$(DLIB); \ | ||
| 239 | fi; fi; \ | ||
| 240 | chmod 644 $(INSTALLTOP)/lib/$(DLIB); \ | ||
| 241 | cp des.h $(INSTALLTOP)/include; \ | ||
| 242 | chmod 644 $(INSTALLTOP)/include/des.h; \ | ||
| 243 | else \ | ||
| 244 | echo Standalone install; \ | ||
| 245 | cp $(DLIB) $(LIBDIR)/$(DLIB); \ | ||
| 246 | if test -s /bin/ranlib; then \ | ||
| 247 | /bin/ranlib $(LIBDIR)/$(DLIB); \ | ||
| 248 | else \ | ||
| 249 | if test -s /usr/bin/ranlib; then \ | ||
| 250 | /usr/bin/ranlib $(LIBDIR)/$(DLIB); \ | ||
| 251 | fi; \ | ||
| 252 | fi; \ | ||
| 253 | chmod 644 $(LIBDIR)/$(DLIB); \ | ||
| 254 | cp des $(BINDIR)/des; \ | ||
| 255 | chmod 711 $(BINDIR)/des; \ | ||
| 256 | cp des_crypt.man $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \ | ||
| 257 | chmod 644 $(MANDIR)/man$(MAN3)/des_crypt.$(MAN3); \ | ||
| 258 | cp des.man $(MANDIR)/man$(MAN1)/des.$(MAN1); \ | ||
| 259 | chmod 644 $(MANDIR)/man$(MAN1)/des.$(MAN1); \ | ||
| 260 | cp des.h $(INCDIR)/des.h; \ | ||
| 261 | chmod 644 $(INCDIR)/des.h; \ | ||
| 262 | fi | ||
| 263 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/des/PC1 b/src/lib/libssl/src/crypto/des/PC1 new file mode 100644 index 0000000000..efb8348b72 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/PC1 | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | @PC1=( 57,49,41,33,25,17, 9, | ||
| 4 | 1,58,50,42,34,26,18, | ||
| 5 | 10, 2,59,51,43,35,27, | ||
| 6 | 19,11, 3,60,52,44,36, | ||
| 7 | "-","-","-","-", | ||
| 8 | 63,55,47,39,31,23,15, | ||
| 9 | 7,62,54,46,38,30,22, | ||
| 10 | 14, 6,61,53,45,37,29, | ||
| 11 | 21,13, 5,28,20,12, 4, | ||
| 12 | "-","-","-","-", | ||
| 13 | ); | ||
| 14 | |||
| 15 | foreach (@PC1) | ||
| 16 | { | ||
| 17 | if ($_ ne "-") | ||
| 18 | { | ||
| 19 | $_--; | ||
| 20 | $_=int($_/8)*8+7-($_%8); | ||
| 21 | printf "%2d ",$_; | ||
| 22 | } | ||
| 23 | else | ||
| 24 | { print "-- "; } | ||
| 25 | print "\n" if (((++$i) % 8) == 0); | ||
| 26 | print "\n" if ((($i) % 32) == 0); | ||
| 27 | } | ||
| 28 | |||
diff --git a/src/lib/libssl/src/crypto/des/PC2 b/src/lib/libssl/src/crypto/des/PC2 new file mode 100644 index 0000000000..2d560270ec --- /dev/null +++ b/src/lib/libssl/src/crypto/des/PC2 | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | @PC2_C=(14,17,11,24, 1, 5, | ||
| 4 | 3,28,15, 6,21,10, | ||
| 5 | 23,19,12, 4,26, 8, | ||
| 6 | 16, 7,27,20,13, 2, | ||
| 7 | ); | ||
| 8 | |||
| 9 | @PC2_D=(41,52,31,37,47,55, | ||
| 10 | 30,40,51,45,33,48, | ||
| 11 | 44,49,39,56,34,53, | ||
| 12 | 46,42,50,36,29,32, | ||
| 13 | ); | ||
| 14 | |||
| 15 | foreach (@PC2_C) { | ||
| 16 | if ($_ ne "-") | ||
| 17 | { | ||
| 18 | $_--; | ||
| 19 | printf "%2d ",$_; } | ||
| 20 | else { print "-- "; } | ||
| 21 | $C{$_}=1; | ||
| 22 | print "\n" if (((++$i) % 8) == 0); | ||
| 23 | } | ||
| 24 | $i=0; | ||
| 25 | print "\n"; | ||
| 26 | foreach (@PC2_D) { | ||
| 27 | if ($_ ne "-") | ||
| 28 | { | ||
| 29 | $_-=29; | ||
| 30 | printf "%2d ",$_; } | ||
| 31 | else { print "-- "; } | ||
| 32 | $D{$_}=1; | ||
| 33 | print "\n" if (((++$i) % 8) == 0); } | ||
| 34 | |||
| 35 | print "\n"; | ||
| 36 | foreach $i (0 .. 27) | ||
| 37 | { | ||
| 38 | $_=$C{$i}; | ||
| 39 | if ($_ ne "-") {printf "%2d ",$_;} | ||
| 40 | else { print "-- "; } | ||
| 41 | print "\n" if (((++$i) % 8) == 0); | ||
| 42 | } | ||
| 43 | print "\n"; | ||
| 44 | |||
| 45 | print "\n"; | ||
| 46 | foreach $i (0 .. 27) | ||
| 47 | { | ||
| 48 | $_=$D{$i}; | ||
| 49 | if ($_ ne "-") {printf "%2d ",$_;} | ||
| 50 | else { print "-- "; } | ||
| 51 | print "\n" if (((++$i) % 8) == 0); | ||
| 52 | } | ||
| 53 | print "\n"; | ||
| 54 | sub numsort | ||
| 55 | { | ||
| 56 | $a-$b; | ||
| 57 | } | ||
diff --git a/src/lib/libssl/src/crypto/des/asm/d-win32.asm b/src/lib/libssl/src/crypto/des/asm/d-win32.asm new file mode 100644 index 0000000000..9e3dc9cd87 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/asm/d-win32.asm | |||
| @@ -0,0 +1,3132 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by des-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE des-586.asm | ||
| 8 | .386 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _des_encrypt | ||
| 12 | EXTRN _des_SPtrans:DWORD | ||
| 13 | _des_encrypt PROC NEAR | ||
| 14 | push esi | ||
| 15 | push edi | ||
| 16 | ; | ||
| 17 | ; Load the 2 words | ||
| 18 | mov esi, DWORD PTR 12[esp] | ||
| 19 | xor ecx, ecx | ||
| 20 | push ebx | ||
| 21 | push ebp | ||
| 22 | mov eax, DWORD PTR [esi] | ||
| 23 | mov ebx, DWORD PTR 28[esp] | ||
| 24 | mov edi, DWORD PTR 4[esi] | ||
| 25 | ; | ||
| 26 | ; IP | ||
| 27 | rol eax, 4 | ||
| 28 | mov esi, eax | ||
| 29 | xor eax, edi | ||
| 30 | and eax, 0f0f0f0f0h | ||
| 31 | xor esi, eax | ||
| 32 | xor edi, eax | ||
| 33 | ; | ||
| 34 | rol edi, 20 | ||
| 35 | mov eax, edi | ||
| 36 | xor edi, esi | ||
| 37 | and edi, 0fff0000fh | ||
| 38 | xor eax, edi | ||
| 39 | xor esi, edi | ||
| 40 | ; | ||
| 41 | rol eax, 14 | ||
| 42 | mov edi, eax | ||
| 43 | xor eax, esi | ||
| 44 | and eax, 033333333h | ||
| 45 | xor edi, eax | ||
| 46 | xor esi, eax | ||
| 47 | ; | ||
| 48 | rol esi, 22 | ||
| 49 | mov eax, esi | ||
| 50 | xor esi, edi | ||
| 51 | and esi, 003fc03fch | ||
| 52 | xor eax, esi | ||
| 53 | xor edi, esi | ||
| 54 | ; | ||
| 55 | rol eax, 9 | ||
| 56 | mov esi, eax | ||
| 57 | xor eax, edi | ||
| 58 | and eax, 0aaaaaaaah | ||
| 59 | xor esi, eax | ||
| 60 | xor edi, eax | ||
| 61 | ; | ||
| 62 | rol edi, 1 | ||
| 63 | mov ebp, DWORD PTR 24[esp] | ||
| 64 | cmp ebx, 0 | ||
| 65 | je $L000start_decrypt | ||
| 66 | ; | ||
| 67 | ; Round 0 | ||
| 68 | mov eax, DWORD PTR [ebp] | ||
| 69 | xor ebx, ebx | ||
| 70 | mov edx, DWORD PTR 4[ebp] | ||
| 71 | xor eax, esi | ||
| 72 | xor edx, esi | ||
| 73 | and eax, 0fcfcfcfch | ||
| 74 | and edx, 0cfcfcfcfh | ||
| 75 | mov bl, al | ||
| 76 | mov cl, ah | ||
| 77 | ror edx, 4 | ||
| 78 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 79 | mov bl, dl | ||
| 80 | xor edi, ebp | ||
| 81 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 82 | xor edi, ebp | ||
| 83 | mov cl, dh | ||
| 84 | shr eax, 16 | ||
| 85 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 86 | xor edi, ebp | ||
| 87 | mov bl, ah | ||
| 88 | shr edx, 16 | ||
| 89 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 90 | xor edi, ebp | ||
| 91 | mov ebp, DWORD PTR 24[esp] | ||
| 92 | mov cl, dh | ||
| 93 | and eax, 0ffh | ||
| 94 | and edx, 0ffh | ||
| 95 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 96 | xor edi, ebx | ||
| 97 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 98 | xor edi, ebx | ||
| 99 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 100 | xor edi, ebx | ||
| 101 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 102 | xor edi, ebx | ||
| 103 | ; | ||
| 104 | ; Round 1 | ||
| 105 | mov eax, DWORD PTR 8[ebp] | ||
| 106 | xor ebx, ebx | ||
| 107 | mov edx, DWORD PTR 12[ebp] | ||
| 108 | xor eax, edi | ||
| 109 | xor edx, edi | ||
| 110 | and eax, 0fcfcfcfch | ||
| 111 | and edx, 0cfcfcfcfh | ||
| 112 | mov bl, al | ||
| 113 | mov cl, ah | ||
| 114 | ror edx, 4 | ||
| 115 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 116 | mov bl, dl | ||
| 117 | xor esi, ebp | ||
| 118 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 119 | xor esi, ebp | ||
| 120 | mov cl, dh | ||
| 121 | shr eax, 16 | ||
| 122 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 123 | xor esi, ebp | ||
| 124 | mov bl, ah | ||
| 125 | shr edx, 16 | ||
| 126 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 127 | xor esi, ebp | ||
| 128 | mov ebp, DWORD PTR 24[esp] | ||
| 129 | mov cl, dh | ||
| 130 | and eax, 0ffh | ||
| 131 | and edx, 0ffh | ||
| 132 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 133 | xor esi, ebx | ||
| 134 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 135 | xor esi, ebx | ||
| 136 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 137 | xor esi, ebx | ||
| 138 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 139 | xor esi, ebx | ||
| 140 | ; | ||
| 141 | ; Round 2 | ||
| 142 | mov eax, DWORD PTR 16[ebp] | ||
| 143 | xor ebx, ebx | ||
| 144 | mov edx, DWORD PTR 20[ebp] | ||
| 145 | xor eax, esi | ||
| 146 | xor edx, esi | ||
| 147 | and eax, 0fcfcfcfch | ||
| 148 | and edx, 0cfcfcfcfh | ||
| 149 | mov bl, al | ||
| 150 | mov cl, ah | ||
| 151 | ror edx, 4 | ||
| 152 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 153 | mov bl, dl | ||
| 154 | xor edi, ebp | ||
| 155 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 156 | xor edi, ebp | ||
| 157 | mov cl, dh | ||
| 158 | shr eax, 16 | ||
| 159 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 160 | xor edi, ebp | ||
| 161 | mov bl, ah | ||
| 162 | shr edx, 16 | ||
| 163 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 164 | xor edi, ebp | ||
| 165 | mov ebp, DWORD PTR 24[esp] | ||
| 166 | mov cl, dh | ||
| 167 | and eax, 0ffh | ||
| 168 | and edx, 0ffh | ||
| 169 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 170 | xor edi, ebx | ||
| 171 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 172 | xor edi, ebx | ||
| 173 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 174 | xor edi, ebx | ||
| 175 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 176 | xor edi, ebx | ||
| 177 | ; | ||
| 178 | ; Round 3 | ||
| 179 | mov eax, DWORD PTR 24[ebp] | ||
| 180 | xor ebx, ebx | ||
| 181 | mov edx, DWORD PTR 28[ebp] | ||
| 182 | xor eax, edi | ||
| 183 | xor edx, edi | ||
| 184 | and eax, 0fcfcfcfch | ||
| 185 | and edx, 0cfcfcfcfh | ||
| 186 | mov bl, al | ||
| 187 | mov cl, ah | ||
| 188 | ror edx, 4 | ||
| 189 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 190 | mov bl, dl | ||
| 191 | xor esi, ebp | ||
| 192 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 193 | xor esi, ebp | ||
| 194 | mov cl, dh | ||
| 195 | shr eax, 16 | ||
| 196 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 197 | xor esi, ebp | ||
| 198 | mov bl, ah | ||
| 199 | shr edx, 16 | ||
| 200 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 201 | xor esi, ebp | ||
| 202 | mov ebp, DWORD PTR 24[esp] | ||
| 203 | mov cl, dh | ||
| 204 | and eax, 0ffh | ||
| 205 | and edx, 0ffh | ||
| 206 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 207 | xor esi, ebx | ||
| 208 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 209 | xor esi, ebx | ||
| 210 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 211 | xor esi, ebx | ||
| 212 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 213 | xor esi, ebx | ||
| 214 | ; | ||
| 215 | ; Round 4 | ||
| 216 | mov eax, DWORD PTR 32[ebp] | ||
| 217 | xor ebx, ebx | ||
| 218 | mov edx, DWORD PTR 36[ebp] | ||
| 219 | xor eax, esi | ||
| 220 | xor edx, esi | ||
| 221 | and eax, 0fcfcfcfch | ||
| 222 | and edx, 0cfcfcfcfh | ||
| 223 | mov bl, al | ||
| 224 | mov cl, ah | ||
| 225 | ror edx, 4 | ||
| 226 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 227 | mov bl, dl | ||
| 228 | xor edi, ebp | ||
| 229 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 230 | xor edi, ebp | ||
| 231 | mov cl, dh | ||
| 232 | shr eax, 16 | ||
| 233 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 234 | xor edi, ebp | ||
| 235 | mov bl, ah | ||
| 236 | shr edx, 16 | ||
| 237 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 238 | xor edi, ebp | ||
| 239 | mov ebp, DWORD PTR 24[esp] | ||
| 240 | mov cl, dh | ||
| 241 | and eax, 0ffh | ||
| 242 | and edx, 0ffh | ||
| 243 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 244 | xor edi, ebx | ||
| 245 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 246 | xor edi, ebx | ||
| 247 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 248 | xor edi, ebx | ||
| 249 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 250 | xor edi, ebx | ||
| 251 | ; | ||
| 252 | ; Round 5 | ||
| 253 | mov eax, DWORD PTR 40[ebp] | ||
| 254 | xor ebx, ebx | ||
| 255 | mov edx, DWORD PTR 44[ebp] | ||
| 256 | xor eax, edi | ||
| 257 | xor edx, edi | ||
| 258 | and eax, 0fcfcfcfch | ||
| 259 | and edx, 0cfcfcfcfh | ||
| 260 | mov bl, al | ||
| 261 | mov cl, ah | ||
| 262 | ror edx, 4 | ||
| 263 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 264 | mov bl, dl | ||
| 265 | xor esi, ebp | ||
| 266 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 267 | xor esi, ebp | ||
| 268 | mov cl, dh | ||
| 269 | shr eax, 16 | ||
| 270 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 271 | xor esi, ebp | ||
| 272 | mov bl, ah | ||
| 273 | shr edx, 16 | ||
| 274 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 275 | xor esi, ebp | ||
| 276 | mov ebp, DWORD PTR 24[esp] | ||
| 277 | mov cl, dh | ||
| 278 | and eax, 0ffh | ||
| 279 | and edx, 0ffh | ||
| 280 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 281 | xor esi, ebx | ||
| 282 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 283 | xor esi, ebx | ||
| 284 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 285 | xor esi, ebx | ||
| 286 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 287 | xor esi, ebx | ||
| 288 | ; | ||
| 289 | ; Round 6 | ||
| 290 | mov eax, DWORD PTR 48[ebp] | ||
| 291 | xor ebx, ebx | ||
| 292 | mov edx, DWORD PTR 52[ebp] | ||
| 293 | xor eax, esi | ||
| 294 | xor edx, esi | ||
| 295 | and eax, 0fcfcfcfch | ||
| 296 | and edx, 0cfcfcfcfh | ||
| 297 | mov bl, al | ||
| 298 | mov cl, ah | ||
| 299 | ror edx, 4 | ||
| 300 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 301 | mov bl, dl | ||
| 302 | xor edi, ebp | ||
| 303 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 304 | xor edi, ebp | ||
| 305 | mov cl, dh | ||
| 306 | shr eax, 16 | ||
| 307 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 308 | xor edi, ebp | ||
| 309 | mov bl, ah | ||
| 310 | shr edx, 16 | ||
| 311 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 312 | xor edi, ebp | ||
| 313 | mov ebp, DWORD PTR 24[esp] | ||
| 314 | mov cl, dh | ||
| 315 | and eax, 0ffh | ||
| 316 | and edx, 0ffh | ||
| 317 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 318 | xor edi, ebx | ||
| 319 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 320 | xor edi, ebx | ||
| 321 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 322 | xor edi, ebx | ||
| 323 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 324 | xor edi, ebx | ||
| 325 | ; | ||
| 326 | ; Round 7 | ||
| 327 | mov eax, DWORD PTR 56[ebp] | ||
| 328 | xor ebx, ebx | ||
| 329 | mov edx, DWORD PTR 60[ebp] | ||
| 330 | xor eax, edi | ||
| 331 | xor edx, edi | ||
| 332 | and eax, 0fcfcfcfch | ||
| 333 | and edx, 0cfcfcfcfh | ||
| 334 | mov bl, al | ||
| 335 | mov cl, ah | ||
| 336 | ror edx, 4 | ||
| 337 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 338 | mov bl, dl | ||
| 339 | xor esi, ebp | ||
| 340 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 341 | xor esi, ebp | ||
| 342 | mov cl, dh | ||
| 343 | shr eax, 16 | ||
| 344 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 345 | xor esi, ebp | ||
| 346 | mov bl, ah | ||
| 347 | shr edx, 16 | ||
| 348 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 349 | xor esi, ebp | ||
| 350 | mov ebp, DWORD PTR 24[esp] | ||
| 351 | mov cl, dh | ||
| 352 | and eax, 0ffh | ||
| 353 | and edx, 0ffh | ||
| 354 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 355 | xor esi, ebx | ||
| 356 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 357 | xor esi, ebx | ||
| 358 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 359 | xor esi, ebx | ||
| 360 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 361 | xor esi, ebx | ||
| 362 | ; | ||
| 363 | ; Round 8 | ||
| 364 | mov eax, DWORD PTR 64[ebp] | ||
| 365 | xor ebx, ebx | ||
| 366 | mov edx, DWORD PTR 68[ebp] | ||
| 367 | xor eax, esi | ||
| 368 | xor edx, esi | ||
| 369 | and eax, 0fcfcfcfch | ||
| 370 | and edx, 0cfcfcfcfh | ||
| 371 | mov bl, al | ||
| 372 | mov cl, ah | ||
| 373 | ror edx, 4 | ||
| 374 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 375 | mov bl, dl | ||
| 376 | xor edi, ebp | ||
| 377 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 378 | xor edi, ebp | ||
| 379 | mov cl, dh | ||
| 380 | shr eax, 16 | ||
| 381 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 382 | xor edi, ebp | ||
| 383 | mov bl, ah | ||
| 384 | shr edx, 16 | ||
| 385 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 386 | xor edi, ebp | ||
| 387 | mov ebp, DWORD PTR 24[esp] | ||
| 388 | mov cl, dh | ||
| 389 | and eax, 0ffh | ||
| 390 | and edx, 0ffh | ||
| 391 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 392 | xor edi, ebx | ||
| 393 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 394 | xor edi, ebx | ||
| 395 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 396 | xor edi, ebx | ||
| 397 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 398 | xor edi, ebx | ||
| 399 | ; | ||
| 400 | ; Round 9 | ||
| 401 | mov eax, DWORD PTR 72[ebp] | ||
| 402 | xor ebx, ebx | ||
| 403 | mov edx, DWORD PTR 76[ebp] | ||
| 404 | xor eax, edi | ||
| 405 | xor edx, edi | ||
| 406 | and eax, 0fcfcfcfch | ||
| 407 | and edx, 0cfcfcfcfh | ||
| 408 | mov bl, al | ||
| 409 | mov cl, ah | ||
| 410 | ror edx, 4 | ||
| 411 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 412 | mov bl, dl | ||
| 413 | xor esi, ebp | ||
| 414 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 415 | xor esi, ebp | ||
| 416 | mov cl, dh | ||
| 417 | shr eax, 16 | ||
| 418 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 419 | xor esi, ebp | ||
| 420 | mov bl, ah | ||
| 421 | shr edx, 16 | ||
| 422 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 423 | xor esi, ebp | ||
| 424 | mov ebp, DWORD PTR 24[esp] | ||
| 425 | mov cl, dh | ||
| 426 | and eax, 0ffh | ||
| 427 | and edx, 0ffh | ||
| 428 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 429 | xor esi, ebx | ||
| 430 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 431 | xor esi, ebx | ||
| 432 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 433 | xor esi, ebx | ||
| 434 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 435 | xor esi, ebx | ||
| 436 | ; | ||
| 437 | ; Round 10 | ||
| 438 | mov eax, DWORD PTR 80[ebp] | ||
| 439 | xor ebx, ebx | ||
| 440 | mov edx, DWORD PTR 84[ebp] | ||
| 441 | xor eax, esi | ||
| 442 | xor edx, esi | ||
| 443 | and eax, 0fcfcfcfch | ||
| 444 | and edx, 0cfcfcfcfh | ||
| 445 | mov bl, al | ||
| 446 | mov cl, ah | ||
| 447 | ror edx, 4 | ||
| 448 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 449 | mov bl, dl | ||
| 450 | xor edi, ebp | ||
| 451 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 452 | xor edi, ebp | ||
| 453 | mov cl, dh | ||
| 454 | shr eax, 16 | ||
| 455 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 456 | xor edi, ebp | ||
| 457 | mov bl, ah | ||
| 458 | shr edx, 16 | ||
| 459 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 460 | xor edi, ebp | ||
| 461 | mov ebp, DWORD PTR 24[esp] | ||
| 462 | mov cl, dh | ||
| 463 | and eax, 0ffh | ||
| 464 | and edx, 0ffh | ||
| 465 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 466 | xor edi, ebx | ||
| 467 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 468 | xor edi, ebx | ||
| 469 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 470 | xor edi, ebx | ||
| 471 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 472 | xor edi, ebx | ||
| 473 | ; | ||
| 474 | ; Round 11 | ||
| 475 | mov eax, DWORD PTR 88[ebp] | ||
| 476 | xor ebx, ebx | ||
| 477 | mov edx, DWORD PTR 92[ebp] | ||
| 478 | xor eax, edi | ||
| 479 | xor edx, edi | ||
| 480 | and eax, 0fcfcfcfch | ||
| 481 | and edx, 0cfcfcfcfh | ||
| 482 | mov bl, al | ||
| 483 | mov cl, ah | ||
| 484 | ror edx, 4 | ||
| 485 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 486 | mov bl, dl | ||
| 487 | xor esi, ebp | ||
| 488 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 489 | xor esi, ebp | ||
| 490 | mov cl, dh | ||
| 491 | shr eax, 16 | ||
| 492 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 493 | xor esi, ebp | ||
| 494 | mov bl, ah | ||
| 495 | shr edx, 16 | ||
| 496 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 497 | xor esi, ebp | ||
| 498 | mov ebp, DWORD PTR 24[esp] | ||
| 499 | mov cl, dh | ||
| 500 | and eax, 0ffh | ||
| 501 | and edx, 0ffh | ||
| 502 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 503 | xor esi, ebx | ||
| 504 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 505 | xor esi, ebx | ||
| 506 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 507 | xor esi, ebx | ||
| 508 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 509 | xor esi, ebx | ||
| 510 | ; | ||
| 511 | ; Round 12 | ||
| 512 | mov eax, DWORD PTR 96[ebp] | ||
| 513 | xor ebx, ebx | ||
| 514 | mov edx, DWORD PTR 100[ebp] | ||
| 515 | xor eax, esi | ||
| 516 | xor edx, esi | ||
| 517 | and eax, 0fcfcfcfch | ||
| 518 | and edx, 0cfcfcfcfh | ||
| 519 | mov bl, al | ||
| 520 | mov cl, ah | ||
| 521 | ror edx, 4 | ||
| 522 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 523 | mov bl, dl | ||
| 524 | xor edi, ebp | ||
| 525 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 526 | xor edi, ebp | ||
| 527 | mov cl, dh | ||
| 528 | shr eax, 16 | ||
| 529 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 530 | xor edi, ebp | ||
| 531 | mov bl, ah | ||
| 532 | shr edx, 16 | ||
| 533 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 534 | xor edi, ebp | ||
| 535 | mov ebp, DWORD PTR 24[esp] | ||
| 536 | mov cl, dh | ||
| 537 | and eax, 0ffh | ||
| 538 | and edx, 0ffh | ||
| 539 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 540 | xor edi, ebx | ||
| 541 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 542 | xor edi, ebx | ||
| 543 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 544 | xor edi, ebx | ||
| 545 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 546 | xor edi, ebx | ||
| 547 | ; | ||
| 548 | ; Round 13 | ||
| 549 | mov eax, DWORD PTR 104[ebp] | ||
| 550 | xor ebx, ebx | ||
| 551 | mov edx, DWORD PTR 108[ebp] | ||
| 552 | xor eax, edi | ||
| 553 | xor edx, edi | ||
| 554 | and eax, 0fcfcfcfch | ||
| 555 | and edx, 0cfcfcfcfh | ||
| 556 | mov bl, al | ||
| 557 | mov cl, ah | ||
| 558 | ror edx, 4 | ||
| 559 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 560 | mov bl, dl | ||
| 561 | xor esi, ebp | ||
| 562 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 563 | xor esi, ebp | ||
| 564 | mov cl, dh | ||
| 565 | shr eax, 16 | ||
| 566 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 567 | xor esi, ebp | ||
| 568 | mov bl, ah | ||
| 569 | shr edx, 16 | ||
| 570 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 571 | xor esi, ebp | ||
| 572 | mov ebp, DWORD PTR 24[esp] | ||
| 573 | mov cl, dh | ||
| 574 | and eax, 0ffh | ||
| 575 | and edx, 0ffh | ||
| 576 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 577 | xor esi, ebx | ||
| 578 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 579 | xor esi, ebx | ||
| 580 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 581 | xor esi, ebx | ||
| 582 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 583 | xor esi, ebx | ||
| 584 | ; | ||
| 585 | ; Round 14 | ||
| 586 | mov eax, DWORD PTR 112[ebp] | ||
| 587 | xor ebx, ebx | ||
| 588 | mov edx, DWORD PTR 116[ebp] | ||
| 589 | xor eax, esi | ||
| 590 | xor edx, esi | ||
| 591 | and eax, 0fcfcfcfch | ||
| 592 | and edx, 0cfcfcfcfh | ||
| 593 | mov bl, al | ||
| 594 | mov cl, ah | ||
| 595 | ror edx, 4 | ||
| 596 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 597 | mov bl, dl | ||
| 598 | xor edi, ebp | ||
| 599 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 600 | xor edi, ebp | ||
| 601 | mov cl, dh | ||
| 602 | shr eax, 16 | ||
| 603 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 604 | xor edi, ebp | ||
| 605 | mov bl, ah | ||
| 606 | shr edx, 16 | ||
| 607 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 608 | xor edi, ebp | ||
| 609 | mov ebp, DWORD PTR 24[esp] | ||
| 610 | mov cl, dh | ||
| 611 | and eax, 0ffh | ||
| 612 | and edx, 0ffh | ||
| 613 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 614 | xor edi, ebx | ||
| 615 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 616 | xor edi, ebx | ||
| 617 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 618 | xor edi, ebx | ||
| 619 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 620 | xor edi, ebx | ||
| 621 | ; | ||
| 622 | ; Round 15 | ||
| 623 | mov eax, DWORD PTR 120[ebp] | ||
| 624 | xor ebx, ebx | ||
| 625 | mov edx, DWORD PTR 124[ebp] | ||
| 626 | xor eax, edi | ||
| 627 | xor edx, edi | ||
| 628 | and eax, 0fcfcfcfch | ||
| 629 | and edx, 0cfcfcfcfh | ||
| 630 | mov bl, al | ||
| 631 | mov cl, ah | ||
| 632 | ror edx, 4 | ||
| 633 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 634 | mov bl, dl | ||
| 635 | xor esi, ebp | ||
| 636 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 637 | xor esi, ebp | ||
| 638 | mov cl, dh | ||
| 639 | shr eax, 16 | ||
| 640 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 641 | xor esi, ebp | ||
| 642 | mov bl, ah | ||
| 643 | shr edx, 16 | ||
| 644 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 645 | xor esi, ebp | ||
| 646 | mov ebp, DWORD PTR 24[esp] | ||
| 647 | mov cl, dh | ||
| 648 | and eax, 0ffh | ||
| 649 | and edx, 0ffh | ||
| 650 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 651 | xor esi, ebx | ||
| 652 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 653 | xor esi, ebx | ||
| 654 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 655 | xor esi, ebx | ||
| 656 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 657 | xor esi, ebx | ||
| 658 | jmp $L001end | ||
| 659 | $L000start_decrypt: | ||
| 660 | ; | ||
| 661 | ; Round 15 | ||
| 662 | mov eax, DWORD PTR 120[ebp] | ||
| 663 | xor ebx, ebx | ||
| 664 | mov edx, DWORD PTR 124[ebp] | ||
| 665 | xor eax, esi | ||
| 666 | xor edx, esi | ||
| 667 | and eax, 0fcfcfcfch | ||
| 668 | and edx, 0cfcfcfcfh | ||
| 669 | mov bl, al | ||
| 670 | mov cl, ah | ||
| 671 | ror edx, 4 | ||
| 672 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 673 | mov bl, dl | ||
| 674 | xor edi, ebp | ||
| 675 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 676 | xor edi, ebp | ||
| 677 | mov cl, dh | ||
| 678 | shr eax, 16 | ||
| 679 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 680 | xor edi, ebp | ||
| 681 | mov bl, ah | ||
| 682 | shr edx, 16 | ||
| 683 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 684 | xor edi, ebp | ||
| 685 | mov ebp, DWORD PTR 24[esp] | ||
| 686 | mov cl, dh | ||
| 687 | and eax, 0ffh | ||
| 688 | and edx, 0ffh | ||
| 689 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 690 | xor edi, ebx | ||
| 691 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 692 | xor edi, ebx | ||
| 693 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 694 | xor edi, ebx | ||
| 695 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 696 | xor edi, ebx | ||
| 697 | ; | ||
| 698 | ; Round 14 | ||
| 699 | mov eax, DWORD PTR 112[ebp] | ||
| 700 | xor ebx, ebx | ||
| 701 | mov edx, DWORD PTR 116[ebp] | ||
| 702 | xor eax, edi | ||
| 703 | xor edx, edi | ||
| 704 | and eax, 0fcfcfcfch | ||
| 705 | and edx, 0cfcfcfcfh | ||
| 706 | mov bl, al | ||
| 707 | mov cl, ah | ||
| 708 | ror edx, 4 | ||
| 709 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 710 | mov bl, dl | ||
| 711 | xor esi, ebp | ||
| 712 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 713 | xor esi, ebp | ||
| 714 | mov cl, dh | ||
| 715 | shr eax, 16 | ||
| 716 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 717 | xor esi, ebp | ||
| 718 | mov bl, ah | ||
| 719 | shr edx, 16 | ||
| 720 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 721 | xor esi, ebp | ||
| 722 | mov ebp, DWORD PTR 24[esp] | ||
| 723 | mov cl, dh | ||
| 724 | and eax, 0ffh | ||
| 725 | and edx, 0ffh | ||
| 726 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 727 | xor esi, ebx | ||
| 728 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 729 | xor esi, ebx | ||
| 730 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 731 | xor esi, ebx | ||
| 732 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 733 | xor esi, ebx | ||
| 734 | ; | ||
| 735 | ; Round 13 | ||
| 736 | mov eax, DWORD PTR 104[ebp] | ||
| 737 | xor ebx, ebx | ||
| 738 | mov edx, DWORD PTR 108[ebp] | ||
| 739 | xor eax, esi | ||
| 740 | xor edx, esi | ||
| 741 | and eax, 0fcfcfcfch | ||
| 742 | and edx, 0cfcfcfcfh | ||
| 743 | mov bl, al | ||
| 744 | mov cl, ah | ||
| 745 | ror edx, 4 | ||
| 746 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 747 | mov bl, dl | ||
| 748 | xor edi, ebp | ||
| 749 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 750 | xor edi, ebp | ||
| 751 | mov cl, dh | ||
| 752 | shr eax, 16 | ||
| 753 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 754 | xor edi, ebp | ||
| 755 | mov bl, ah | ||
| 756 | shr edx, 16 | ||
| 757 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 758 | xor edi, ebp | ||
| 759 | mov ebp, DWORD PTR 24[esp] | ||
| 760 | mov cl, dh | ||
| 761 | and eax, 0ffh | ||
| 762 | and edx, 0ffh | ||
| 763 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 764 | xor edi, ebx | ||
| 765 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 766 | xor edi, ebx | ||
| 767 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 768 | xor edi, ebx | ||
| 769 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 770 | xor edi, ebx | ||
| 771 | ; | ||
| 772 | ; Round 12 | ||
| 773 | mov eax, DWORD PTR 96[ebp] | ||
| 774 | xor ebx, ebx | ||
| 775 | mov edx, DWORD PTR 100[ebp] | ||
| 776 | xor eax, edi | ||
| 777 | xor edx, edi | ||
| 778 | and eax, 0fcfcfcfch | ||
| 779 | and edx, 0cfcfcfcfh | ||
| 780 | mov bl, al | ||
| 781 | mov cl, ah | ||
| 782 | ror edx, 4 | ||
| 783 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 784 | mov bl, dl | ||
| 785 | xor esi, ebp | ||
| 786 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 787 | xor esi, ebp | ||
| 788 | mov cl, dh | ||
| 789 | shr eax, 16 | ||
| 790 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 791 | xor esi, ebp | ||
| 792 | mov bl, ah | ||
| 793 | shr edx, 16 | ||
| 794 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 795 | xor esi, ebp | ||
| 796 | mov ebp, DWORD PTR 24[esp] | ||
| 797 | mov cl, dh | ||
| 798 | and eax, 0ffh | ||
| 799 | and edx, 0ffh | ||
| 800 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 801 | xor esi, ebx | ||
| 802 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 803 | xor esi, ebx | ||
| 804 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 805 | xor esi, ebx | ||
| 806 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 807 | xor esi, ebx | ||
| 808 | ; | ||
| 809 | ; Round 11 | ||
| 810 | mov eax, DWORD PTR 88[ebp] | ||
| 811 | xor ebx, ebx | ||
| 812 | mov edx, DWORD PTR 92[ebp] | ||
| 813 | xor eax, esi | ||
| 814 | xor edx, esi | ||
| 815 | and eax, 0fcfcfcfch | ||
| 816 | and edx, 0cfcfcfcfh | ||
| 817 | mov bl, al | ||
| 818 | mov cl, ah | ||
| 819 | ror edx, 4 | ||
| 820 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 821 | mov bl, dl | ||
| 822 | xor edi, ebp | ||
| 823 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 824 | xor edi, ebp | ||
| 825 | mov cl, dh | ||
| 826 | shr eax, 16 | ||
| 827 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 828 | xor edi, ebp | ||
| 829 | mov bl, ah | ||
| 830 | shr edx, 16 | ||
| 831 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 832 | xor edi, ebp | ||
| 833 | mov ebp, DWORD PTR 24[esp] | ||
| 834 | mov cl, dh | ||
| 835 | and eax, 0ffh | ||
| 836 | and edx, 0ffh | ||
| 837 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 838 | xor edi, ebx | ||
| 839 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 840 | xor edi, ebx | ||
| 841 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 842 | xor edi, ebx | ||
| 843 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 844 | xor edi, ebx | ||
| 845 | ; | ||
| 846 | ; Round 10 | ||
| 847 | mov eax, DWORD PTR 80[ebp] | ||
| 848 | xor ebx, ebx | ||
| 849 | mov edx, DWORD PTR 84[ebp] | ||
| 850 | xor eax, edi | ||
| 851 | xor edx, edi | ||
| 852 | and eax, 0fcfcfcfch | ||
| 853 | and edx, 0cfcfcfcfh | ||
| 854 | mov bl, al | ||
| 855 | mov cl, ah | ||
| 856 | ror edx, 4 | ||
| 857 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 858 | mov bl, dl | ||
| 859 | xor esi, ebp | ||
| 860 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 861 | xor esi, ebp | ||
| 862 | mov cl, dh | ||
| 863 | shr eax, 16 | ||
| 864 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 865 | xor esi, ebp | ||
| 866 | mov bl, ah | ||
| 867 | shr edx, 16 | ||
| 868 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 869 | xor esi, ebp | ||
| 870 | mov ebp, DWORD PTR 24[esp] | ||
| 871 | mov cl, dh | ||
| 872 | and eax, 0ffh | ||
| 873 | and edx, 0ffh | ||
| 874 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 875 | xor esi, ebx | ||
| 876 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 877 | xor esi, ebx | ||
| 878 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 879 | xor esi, ebx | ||
| 880 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 881 | xor esi, ebx | ||
| 882 | ; | ||
| 883 | ; Round 9 | ||
| 884 | mov eax, DWORD PTR 72[ebp] | ||
| 885 | xor ebx, ebx | ||
| 886 | mov edx, DWORD PTR 76[ebp] | ||
| 887 | xor eax, esi | ||
| 888 | xor edx, esi | ||
| 889 | and eax, 0fcfcfcfch | ||
| 890 | and edx, 0cfcfcfcfh | ||
| 891 | mov bl, al | ||
| 892 | mov cl, ah | ||
| 893 | ror edx, 4 | ||
| 894 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 895 | mov bl, dl | ||
| 896 | xor edi, ebp | ||
| 897 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 898 | xor edi, ebp | ||
| 899 | mov cl, dh | ||
| 900 | shr eax, 16 | ||
| 901 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 902 | xor edi, ebp | ||
| 903 | mov bl, ah | ||
| 904 | shr edx, 16 | ||
| 905 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 906 | xor edi, ebp | ||
| 907 | mov ebp, DWORD PTR 24[esp] | ||
| 908 | mov cl, dh | ||
| 909 | and eax, 0ffh | ||
| 910 | and edx, 0ffh | ||
| 911 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 912 | xor edi, ebx | ||
| 913 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 914 | xor edi, ebx | ||
| 915 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 916 | xor edi, ebx | ||
| 917 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 918 | xor edi, ebx | ||
| 919 | ; | ||
| 920 | ; Round 8 | ||
| 921 | mov eax, DWORD PTR 64[ebp] | ||
| 922 | xor ebx, ebx | ||
| 923 | mov edx, DWORD PTR 68[ebp] | ||
| 924 | xor eax, edi | ||
| 925 | xor edx, edi | ||
| 926 | and eax, 0fcfcfcfch | ||
| 927 | and edx, 0cfcfcfcfh | ||
| 928 | mov bl, al | ||
| 929 | mov cl, ah | ||
| 930 | ror edx, 4 | ||
| 931 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 932 | mov bl, dl | ||
| 933 | xor esi, ebp | ||
| 934 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 935 | xor esi, ebp | ||
| 936 | mov cl, dh | ||
| 937 | shr eax, 16 | ||
| 938 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 939 | xor esi, ebp | ||
| 940 | mov bl, ah | ||
| 941 | shr edx, 16 | ||
| 942 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 943 | xor esi, ebp | ||
| 944 | mov ebp, DWORD PTR 24[esp] | ||
| 945 | mov cl, dh | ||
| 946 | and eax, 0ffh | ||
| 947 | and edx, 0ffh | ||
| 948 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 949 | xor esi, ebx | ||
| 950 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 951 | xor esi, ebx | ||
| 952 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 953 | xor esi, ebx | ||
| 954 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 955 | xor esi, ebx | ||
| 956 | ; | ||
| 957 | ; Round 7 | ||
| 958 | mov eax, DWORD PTR 56[ebp] | ||
| 959 | xor ebx, ebx | ||
| 960 | mov edx, DWORD PTR 60[ebp] | ||
| 961 | xor eax, esi | ||
| 962 | xor edx, esi | ||
| 963 | and eax, 0fcfcfcfch | ||
| 964 | and edx, 0cfcfcfcfh | ||
| 965 | mov bl, al | ||
| 966 | mov cl, ah | ||
| 967 | ror edx, 4 | ||
| 968 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 969 | mov bl, dl | ||
| 970 | xor edi, ebp | ||
| 971 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 972 | xor edi, ebp | ||
| 973 | mov cl, dh | ||
| 974 | shr eax, 16 | ||
| 975 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 976 | xor edi, ebp | ||
| 977 | mov bl, ah | ||
| 978 | shr edx, 16 | ||
| 979 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 980 | xor edi, ebp | ||
| 981 | mov ebp, DWORD PTR 24[esp] | ||
| 982 | mov cl, dh | ||
| 983 | and eax, 0ffh | ||
| 984 | and edx, 0ffh | ||
| 985 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 986 | xor edi, ebx | ||
| 987 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 988 | xor edi, ebx | ||
| 989 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 990 | xor edi, ebx | ||
| 991 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 992 | xor edi, ebx | ||
| 993 | ; | ||
| 994 | ; Round 6 | ||
| 995 | mov eax, DWORD PTR 48[ebp] | ||
| 996 | xor ebx, ebx | ||
| 997 | mov edx, DWORD PTR 52[ebp] | ||
| 998 | xor eax, edi | ||
| 999 | xor edx, edi | ||
| 1000 | and eax, 0fcfcfcfch | ||
| 1001 | and edx, 0cfcfcfcfh | ||
| 1002 | mov bl, al | ||
| 1003 | mov cl, ah | ||
| 1004 | ror edx, 4 | ||
| 1005 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1006 | mov bl, dl | ||
| 1007 | xor esi, ebp | ||
| 1008 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1009 | xor esi, ebp | ||
| 1010 | mov cl, dh | ||
| 1011 | shr eax, 16 | ||
| 1012 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1013 | xor esi, ebp | ||
| 1014 | mov bl, ah | ||
| 1015 | shr edx, 16 | ||
| 1016 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1017 | xor esi, ebp | ||
| 1018 | mov ebp, DWORD PTR 24[esp] | ||
| 1019 | mov cl, dh | ||
| 1020 | and eax, 0ffh | ||
| 1021 | and edx, 0ffh | ||
| 1022 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1023 | xor esi, ebx | ||
| 1024 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1025 | xor esi, ebx | ||
| 1026 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1027 | xor esi, ebx | ||
| 1028 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1029 | xor esi, ebx | ||
| 1030 | ; | ||
| 1031 | ; Round 5 | ||
| 1032 | mov eax, DWORD PTR 40[ebp] | ||
| 1033 | xor ebx, ebx | ||
| 1034 | mov edx, DWORD PTR 44[ebp] | ||
| 1035 | xor eax, esi | ||
| 1036 | xor edx, esi | ||
| 1037 | and eax, 0fcfcfcfch | ||
| 1038 | and edx, 0cfcfcfcfh | ||
| 1039 | mov bl, al | ||
| 1040 | mov cl, ah | ||
| 1041 | ror edx, 4 | ||
| 1042 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1043 | mov bl, dl | ||
| 1044 | xor edi, ebp | ||
| 1045 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1046 | xor edi, ebp | ||
| 1047 | mov cl, dh | ||
| 1048 | shr eax, 16 | ||
| 1049 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1050 | xor edi, ebp | ||
| 1051 | mov bl, ah | ||
| 1052 | shr edx, 16 | ||
| 1053 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1054 | xor edi, ebp | ||
| 1055 | mov ebp, DWORD PTR 24[esp] | ||
| 1056 | mov cl, dh | ||
| 1057 | and eax, 0ffh | ||
| 1058 | and edx, 0ffh | ||
| 1059 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1060 | xor edi, ebx | ||
| 1061 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1062 | xor edi, ebx | ||
| 1063 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1064 | xor edi, ebx | ||
| 1065 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1066 | xor edi, ebx | ||
| 1067 | ; | ||
| 1068 | ; Round 4 | ||
| 1069 | mov eax, DWORD PTR 32[ebp] | ||
| 1070 | xor ebx, ebx | ||
| 1071 | mov edx, DWORD PTR 36[ebp] | ||
| 1072 | xor eax, edi | ||
| 1073 | xor edx, edi | ||
| 1074 | and eax, 0fcfcfcfch | ||
| 1075 | and edx, 0cfcfcfcfh | ||
| 1076 | mov bl, al | ||
| 1077 | mov cl, ah | ||
| 1078 | ror edx, 4 | ||
| 1079 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1080 | mov bl, dl | ||
| 1081 | xor esi, ebp | ||
| 1082 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1083 | xor esi, ebp | ||
| 1084 | mov cl, dh | ||
| 1085 | shr eax, 16 | ||
| 1086 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1087 | xor esi, ebp | ||
| 1088 | mov bl, ah | ||
| 1089 | shr edx, 16 | ||
| 1090 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1091 | xor esi, ebp | ||
| 1092 | mov ebp, DWORD PTR 24[esp] | ||
| 1093 | mov cl, dh | ||
| 1094 | and eax, 0ffh | ||
| 1095 | and edx, 0ffh | ||
| 1096 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1097 | xor esi, ebx | ||
| 1098 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1099 | xor esi, ebx | ||
| 1100 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1101 | xor esi, ebx | ||
| 1102 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1103 | xor esi, ebx | ||
| 1104 | ; | ||
| 1105 | ; Round 3 | ||
| 1106 | mov eax, DWORD PTR 24[ebp] | ||
| 1107 | xor ebx, ebx | ||
| 1108 | mov edx, DWORD PTR 28[ebp] | ||
| 1109 | xor eax, esi | ||
| 1110 | xor edx, esi | ||
| 1111 | and eax, 0fcfcfcfch | ||
| 1112 | and edx, 0cfcfcfcfh | ||
| 1113 | mov bl, al | ||
| 1114 | mov cl, ah | ||
| 1115 | ror edx, 4 | ||
| 1116 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1117 | mov bl, dl | ||
| 1118 | xor edi, ebp | ||
| 1119 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1120 | xor edi, ebp | ||
| 1121 | mov cl, dh | ||
| 1122 | shr eax, 16 | ||
| 1123 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1124 | xor edi, ebp | ||
| 1125 | mov bl, ah | ||
| 1126 | shr edx, 16 | ||
| 1127 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1128 | xor edi, ebp | ||
| 1129 | mov ebp, DWORD PTR 24[esp] | ||
| 1130 | mov cl, dh | ||
| 1131 | and eax, 0ffh | ||
| 1132 | and edx, 0ffh | ||
| 1133 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1134 | xor edi, ebx | ||
| 1135 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1136 | xor edi, ebx | ||
| 1137 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1138 | xor edi, ebx | ||
| 1139 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1140 | xor edi, ebx | ||
| 1141 | ; | ||
| 1142 | ; Round 2 | ||
| 1143 | mov eax, DWORD PTR 16[ebp] | ||
| 1144 | xor ebx, ebx | ||
| 1145 | mov edx, DWORD PTR 20[ebp] | ||
| 1146 | xor eax, edi | ||
| 1147 | xor edx, edi | ||
| 1148 | and eax, 0fcfcfcfch | ||
| 1149 | and edx, 0cfcfcfcfh | ||
| 1150 | mov bl, al | ||
| 1151 | mov cl, ah | ||
| 1152 | ror edx, 4 | ||
| 1153 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1154 | mov bl, dl | ||
| 1155 | xor esi, ebp | ||
| 1156 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1157 | xor esi, ebp | ||
| 1158 | mov cl, dh | ||
| 1159 | shr eax, 16 | ||
| 1160 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1161 | xor esi, ebp | ||
| 1162 | mov bl, ah | ||
| 1163 | shr edx, 16 | ||
| 1164 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1165 | xor esi, ebp | ||
| 1166 | mov ebp, DWORD PTR 24[esp] | ||
| 1167 | mov cl, dh | ||
| 1168 | and eax, 0ffh | ||
| 1169 | and edx, 0ffh | ||
| 1170 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1171 | xor esi, ebx | ||
| 1172 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1173 | xor esi, ebx | ||
| 1174 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1175 | xor esi, ebx | ||
| 1176 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1177 | xor esi, ebx | ||
| 1178 | ; | ||
| 1179 | ; Round 1 | ||
| 1180 | mov eax, DWORD PTR 8[ebp] | ||
| 1181 | xor ebx, ebx | ||
| 1182 | mov edx, DWORD PTR 12[ebp] | ||
| 1183 | xor eax, esi | ||
| 1184 | xor edx, esi | ||
| 1185 | and eax, 0fcfcfcfch | ||
| 1186 | and edx, 0cfcfcfcfh | ||
| 1187 | mov bl, al | ||
| 1188 | mov cl, ah | ||
| 1189 | ror edx, 4 | ||
| 1190 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1191 | mov bl, dl | ||
| 1192 | xor edi, ebp | ||
| 1193 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1194 | xor edi, ebp | ||
| 1195 | mov cl, dh | ||
| 1196 | shr eax, 16 | ||
| 1197 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1198 | xor edi, ebp | ||
| 1199 | mov bl, ah | ||
| 1200 | shr edx, 16 | ||
| 1201 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1202 | xor edi, ebp | ||
| 1203 | mov ebp, DWORD PTR 24[esp] | ||
| 1204 | mov cl, dh | ||
| 1205 | and eax, 0ffh | ||
| 1206 | and edx, 0ffh | ||
| 1207 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1208 | xor edi, ebx | ||
| 1209 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1210 | xor edi, ebx | ||
| 1211 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1212 | xor edi, ebx | ||
| 1213 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1214 | xor edi, ebx | ||
| 1215 | ; | ||
| 1216 | ; Round 0 | ||
| 1217 | mov eax, DWORD PTR [ebp] | ||
| 1218 | xor ebx, ebx | ||
| 1219 | mov edx, DWORD PTR 4[ebp] | ||
| 1220 | xor eax, edi | ||
| 1221 | xor edx, edi | ||
| 1222 | and eax, 0fcfcfcfch | ||
| 1223 | and edx, 0cfcfcfcfh | ||
| 1224 | mov bl, al | ||
| 1225 | mov cl, ah | ||
| 1226 | ror edx, 4 | ||
| 1227 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1228 | mov bl, dl | ||
| 1229 | xor esi, ebp | ||
| 1230 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1231 | xor esi, ebp | ||
| 1232 | mov cl, dh | ||
| 1233 | shr eax, 16 | ||
| 1234 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1235 | xor esi, ebp | ||
| 1236 | mov bl, ah | ||
| 1237 | shr edx, 16 | ||
| 1238 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1239 | xor esi, ebp | ||
| 1240 | mov ebp, DWORD PTR 24[esp] | ||
| 1241 | mov cl, dh | ||
| 1242 | and eax, 0ffh | ||
| 1243 | and edx, 0ffh | ||
| 1244 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1245 | xor esi, ebx | ||
| 1246 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1247 | xor esi, ebx | ||
| 1248 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1249 | xor esi, ebx | ||
| 1250 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1251 | xor esi, ebx | ||
| 1252 | $L001end: | ||
| 1253 | ; | ||
| 1254 | ; FP | ||
| 1255 | mov edx, DWORD PTR 20[esp] | ||
| 1256 | ror esi, 1 | ||
| 1257 | mov eax, edi | ||
| 1258 | xor edi, esi | ||
| 1259 | and edi, 0aaaaaaaah | ||
| 1260 | xor eax, edi | ||
| 1261 | xor esi, edi | ||
| 1262 | ; | ||
| 1263 | rol eax, 23 | ||
| 1264 | mov edi, eax | ||
| 1265 | xor eax, esi | ||
| 1266 | and eax, 003fc03fch | ||
| 1267 | xor edi, eax | ||
| 1268 | xor esi, eax | ||
| 1269 | ; | ||
| 1270 | rol edi, 10 | ||
| 1271 | mov eax, edi | ||
| 1272 | xor edi, esi | ||
| 1273 | and edi, 033333333h | ||
| 1274 | xor eax, edi | ||
| 1275 | xor esi, edi | ||
| 1276 | ; | ||
| 1277 | rol esi, 18 | ||
| 1278 | mov edi, esi | ||
| 1279 | xor esi, eax | ||
| 1280 | and esi, 0fff0000fh | ||
| 1281 | xor edi, esi | ||
| 1282 | xor eax, esi | ||
| 1283 | ; | ||
| 1284 | rol edi, 12 | ||
| 1285 | mov esi, edi | ||
| 1286 | xor edi, eax | ||
| 1287 | and edi, 0f0f0f0f0h | ||
| 1288 | xor esi, edi | ||
| 1289 | xor eax, edi | ||
| 1290 | ; | ||
| 1291 | ror eax, 4 | ||
| 1292 | mov DWORD PTR [edx],eax | ||
| 1293 | mov DWORD PTR 4[edx],esi | ||
| 1294 | pop ebp | ||
| 1295 | pop ebx | ||
| 1296 | pop edi | ||
| 1297 | pop esi | ||
| 1298 | ret | ||
| 1299 | _des_encrypt ENDP | ||
| 1300 | _TEXT ENDS | ||
| 1301 | _TEXT SEGMENT | ||
| 1302 | PUBLIC _des_encrypt2 | ||
| 1303 | EXTRN _des_SPtrans:DWORD | ||
| 1304 | _des_encrypt2 PROC NEAR | ||
| 1305 | push esi | ||
| 1306 | push edi | ||
| 1307 | ; | ||
| 1308 | ; Load the 2 words | ||
| 1309 | mov eax, DWORD PTR 12[esp] | ||
| 1310 | xor ecx, ecx | ||
| 1311 | push ebx | ||
| 1312 | push ebp | ||
| 1313 | mov esi, DWORD PTR [eax] | ||
| 1314 | mov ebx, DWORD PTR 28[esp] | ||
| 1315 | rol esi, 3 | ||
| 1316 | mov edi, DWORD PTR 4[eax] | ||
| 1317 | rol edi, 3 | ||
| 1318 | mov ebp, DWORD PTR 24[esp] | ||
| 1319 | cmp ebx, 0 | ||
| 1320 | je $L002start_decrypt | ||
| 1321 | ; | ||
| 1322 | ; Round 0 | ||
| 1323 | mov eax, DWORD PTR [ebp] | ||
| 1324 | xor ebx, ebx | ||
| 1325 | mov edx, DWORD PTR 4[ebp] | ||
| 1326 | xor eax, esi | ||
| 1327 | xor edx, esi | ||
| 1328 | and eax, 0fcfcfcfch | ||
| 1329 | and edx, 0cfcfcfcfh | ||
| 1330 | mov bl, al | ||
| 1331 | mov cl, ah | ||
| 1332 | ror edx, 4 | ||
| 1333 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1334 | mov bl, dl | ||
| 1335 | xor edi, ebp | ||
| 1336 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1337 | xor edi, ebp | ||
| 1338 | mov cl, dh | ||
| 1339 | shr eax, 16 | ||
| 1340 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1341 | xor edi, ebp | ||
| 1342 | mov bl, ah | ||
| 1343 | shr edx, 16 | ||
| 1344 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1345 | xor edi, ebp | ||
| 1346 | mov ebp, DWORD PTR 24[esp] | ||
| 1347 | mov cl, dh | ||
| 1348 | and eax, 0ffh | ||
| 1349 | and edx, 0ffh | ||
| 1350 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1351 | xor edi, ebx | ||
| 1352 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1353 | xor edi, ebx | ||
| 1354 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1355 | xor edi, ebx | ||
| 1356 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1357 | xor edi, ebx | ||
| 1358 | ; | ||
| 1359 | ; Round 1 | ||
| 1360 | mov eax, DWORD PTR 8[ebp] | ||
| 1361 | xor ebx, ebx | ||
| 1362 | mov edx, DWORD PTR 12[ebp] | ||
| 1363 | xor eax, edi | ||
| 1364 | xor edx, edi | ||
| 1365 | and eax, 0fcfcfcfch | ||
| 1366 | and edx, 0cfcfcfcfh | ||
| 1367 | mov bl, al | ||
| 1368 | mov cl, ah | ||
| 1369 | ror edx, 4 | ||
| 1370 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1371 | mov bl, dl | ||
| 1372 | xor esi, ebp | ||
| 1373 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1374 | xor esi, ebp | ||
| 1375 | mov cl, dh | ||
| 1376 | shr eax, 16 | ||
| 1377 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1378 | xor esi, ebp | ||
| 1379 | mov bl, ah | ||
| 1380 | shr edx, 16 | ||
| 1381 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1382 | xor esi, ebp | ||
| 1383 | mov ebp, DWORD PTR 24[esp] | ||
| 1384 | mov cl, dh | ||
| 1385 | and eax, 0ffh | ||
| 1386 | and edx, 0ffh | ||
| 1387 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1388 | xor esi, ebx | ||
| 1389 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1390 | xor esi, ebx | ||
| 1391 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1392 | xor esi, ebx | ||
| 1393 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1394 | xor esi, ebx | ||
| 1395 | ; | ||
| 1396 | ; Round 2 | ||
| 1397 | mov eax, DWORD PTR 16[ebp] | ||
| 1398 | xor ebx, ebx | ||
| 1399 | mov edx, DWORD PTR 20[ebp] | ||
| 1400 | xor eax, esi | ||
| 1401 | xor edx, esi | ||
| 1402 | and eax, 0fcfcfcfch | ||
| 1403 | and edx, 0cfcfcfcfh | ||
| 1404 | mov bl, al | ||
| 1405 | mov cl, ah | ||
| 1406 | ror edx, 4 | ||
| 1407 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1408 | mov bl, dl | ||
| 1409 | xor edi, ebp | ||
| 1410 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1411 | xor edi, ebp | ||
| 1412 | mov cl, dh | ||
| 1413 | shr eax, 16 | ||
| 1414 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1415 | xor edi, ebp | ||
| 1416 | mov bl, ah | ||
| 1417 | shr edx, 16 | ||
| 1418 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1419 | xor edi, ebp | ||
| 1420 | mov ebp, DWORD PTR 24[esp] | ||
| 1421 | mov cl, dh | ||
| 1422 | and eax, 0ffh | ||
| 1423 | and edx, 0ffh | ||
| 1424 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1425 | xor edi, ebx | ||
| 1426 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1427 | xor edi, ebx | ||
| 1428 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1429 | xor edi, ebx | ||
| 1430 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1431 | xor edi, ebx | ||
| 1432 | ; | ||
| 1433 | ; Round 3 | ||
| 1434 | mov eax, DWORD PTR 24[ebp] | ||
| 1435 | xor ebx, ebx | ||
| 1436 | mov edx, DWORD PTR 28[ebp] | ||
| 1437 | xor eax, edi | ||
| 1438 | xor edx, edi | ||
| 1439 | and eax, 0fcfcfcfch | ||
| 1440 | and edx, 0cfcfcfcfh | ||
| 1441 | mov bl, al | ||
| 1442 | mov cl, ah | ||
| 1443 | ror edx, 4 | ||
| 1444 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1445 | mov bl, dl | ||
| 1446 | xor esi, ebp | ||
| 1447 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1448 | xor esi, ebp | ||
| 1449 | mov cl, dh | ||
| 1450 | shr eax, 16 | ||
| 1451 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1452 | xor esi, ebp | ||
| 1453 | mov bl, ah | ||
| 1454 | shr edx, 16 | ||
| 1455 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1456 | xor esi, ebp | ||
| 1457 | mov ebp, DWORD PTR 24[esp] | ||
| 1458 | mov cl, dh | ||
| 1459 | and eax, 0ffh | ||
| 1460 | and edx, 0ffh | ||
| 1461 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1462 | xor esi, ebx | ||
| 1463 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1464 | xor esi, ebx | ||
| 1465 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1466 | xor esi, ebx | ||
| 1467 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1468 | xor esi, ebx | ||
| 1469 | ; | ||
| 1470 | ; Round 4 | ||
| 1471 | mov eax, DWORD PTR 32[ebp] | ||
| 1472 | xor ebx, ebx | ||
| 1473 | mov edx, DWORD PTR 36[ebp] | ||
| 1474 | xor eax, esi | ||
| 1475 | xor edx, esi | ||
| 1476 | and eax, 0fcfcfcfch | ||
| 1477 | and edx, 0cfcfcfcfh | ||
| 1478 | mov bl, al | ||
| 1479 | mov cl, ah | ||
| 1480 | ror edx, 4 | ||
| 1481 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1482 | mov bl, dl | ||
| 1483 | xor edi, ebp | ||
| 1484 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1485 | xor edi, ebp | ||
| 1486 | mov cl, dh | ||
| 1487 | shr eax, 16 | ||
| 1488 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1489 | xor edi, ebp | ||
| 1490 | mov bl, ah | ||
| 1491 | shr edx, 16 | ||
| 1492 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1493 | xor edi, ebp | ||
| 1494 | mov ebp, DWORD PTR 24[esp] | ||
| 1495 | mov cl, dh | ||
| 1496 | and eax, 0ffh | ||
| 1497 | and edx, 0ffh | ||
| 1498 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1499 | xor edi, ebx | ||
| 1500 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1501 | xor edi, ebx | ||
| 1502 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1503 | xor edi, ebx | ||
| 1504 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1505 | xor edi, ebx | ||
| 1506 | ; | ||
| 1507 | ; Round 5 | ||
| 1508 | mov eax, DWORD PTR 40[ebp] | ||
| 1509 | xor ebx, ebx | ||
| 1510 | mov edx, DWORD PTR 44[ebp] | ||
| 1511 | xor eax, edi | ||
| 1512 | xor edx, edi | ||
| 1513 | and eax, 0fcfcfcfch | ||
| 1514 | and edx, 0cfcfcfcfh | ||
| 1515 | mov bl, al | ||
| 1516 | mov cl, ah | ||
| 1517 | ror edx, 4 | ||
| 1518 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1519 | mov bl, dl | ||
| 1520 | xor esi, ebp | ||
| 1521 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1522 | xor esi, ebp | ||
| 1523 | mov cl, dh | ||
| 1524 | shr eax, 16 | ||
| 1525 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1526 | xor esi, ebp | ||
| 1527 | mov bl, ah | ||
| 1528 | shr edx, 16 | ||
| 1529 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1530 | xor esi, ebp | ||
| 1531 | mov ebp, DWORD PTR 24[esp] | ||
| 1532 | mov cl, dh | ||
| 1533 | and eax, 0ffh | ||
| 1534 | and edx, 0ffh | ||
| 1535 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1536 | xor esi, ebx | ||
| 1537 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1538 | xor esi, ebx | ||
| 1539 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1540 | xor esi, ebx | ||
| 1541 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1542 | xor esi, ebx | ||
| 1543 | ; | ||
| 1544 | ; Round 6 | ||
| 1545 | mov eax, DWORD PTR 48[ebp] | ||
| 1546 | xor ebx, ebx | ||
| 1547 | mov edx, DWORD PTR 52[ebp] | ||
| 1548 | xor eax, esi | ||
| 1549 | xor edx, esi | ||
| 1550 | and eax, 0fcfcfcfch | ||
| 1551 | and edx, 0cfcfcfcfh | ||
| 1552 | mov bl, al | ||
| 1553 | mov cl, ah | ||
| 1554 | ror edx, 4 | ||
| 1555 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1556 | mov bl, dl | ||
| 1557 | xor edi, ebp | ||
| 1558 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1559 | xor edi, ebp | ||
| 1560 | mov cl, dh | ||
| 1561 | shr eax, 16 | ||
| 1562 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1563 | xor edi, ebp | ||
| 1564 | mov bl, ah | ||
| 1565 | shr edx, 16 | ||
| 1566 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1567 | xor edi, ebp | ||
| 1568 | mov ebp, DWORD PTR 24[esp] | ||
| 1569 | mov cl, dh | ||
| 1570 | and eax, 0ffh | ||
| 1571 | and edx, 0ffh | ||
| 1572 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1573 | xor edi, ebx | ||
| 1574 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1575 | xor edi, ebx | ||
| 1576 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1577 | xor edi, ebx | ||
| 1578 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1579 | xor edi, ebx | ||
| 1580 | ; | ||
| 1581 | ; Round 7 | ||
| 1582 | mov eax, DWORD PTR 56[ebp] | ||
| 1583 | xor ebx, ebx | ||
| 1584 | mov edx, DWORD PTR 60[ebp] | ||
| 1585 | xor eax, edi | ||
| 1586 | xor edx, edi | ||
| 1587 | and eax, 0fcfcfcfch | ||
| 1588 | and edx, 0cfcfcfcfh | ||
| 1589 | mov bl, al | ||
| 1590 | mov cl, ah | ||
| 1591 | ror edx, 4 | ||
| 1592 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1593 | mov bl, dl | ||
| 1594 | xor esi, ebp | ||
| 1595 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1596 | xor esi, ebp | ||
| 1597 | mov cl, dh | ||
| 1598 | shr eax, 16 | ||
| 1599 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1600 | xor esi, ebp | ||
| 1601 | mov bl, ah | ||
| 1602 | shr edx, 16 | ||
| 1603 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1604 | xor esi, ebp | ||
| 1605 | mov ebp, DWORD PTR 24[esp] | ||
| 1606 | mov cl, dh | ||
| 1607 | and eax, 0ffh | ||
| 1608 | and edx, 0ffh | ||
| 1609 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1610 | xor esi, ebx | ||
| 1611 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1612 | xor esi, ebx | ||
| 1613 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1614 | xor esi, ebx | ||
| 1615 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1616 | xor esi, ebx | ||
| 1617 | ; | ||
| 1618 | ; Round 8 | ||
| 1619 | mov eax, DWORD PTR 64[ebp] | ||
| 1620 | xor ebx, ebx | ||
| 1621 | mov edx, DWORD PTR 68[ebp] | ||
| 1622 | xor eax, esi | ||
| 1623 | xor edx, esi | ||
| 1624 | and eax, 0fcfcfcfch | ||
| 1625 | and edx, 0cfcfcfcfh | ||
| 1626 | mov bl, al | ||
| 1627 | mov cl, ah | ||
| 1628 | ror edx, 4 | ||
| 1629 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1630 | mov bl, dl | ||
| 1631 | xor edi, ebp | ||
| 1632 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1633 | xor edi, ebp | ||
| 1634 | mov cl, dh | ||
| 1635 | shr eax, 16 | ||
| 1636 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1637 | xor edi, ebp | ||
| 1638 | mov bl, ah | ||
| 1639 | shr edx, 16 | ||
| 1640 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1641 | xor edi, ebp | ||
| 1642 | mov ebp, DWORD PTR 24[esp] | ||
| 1643 | mov cl, dh | ||
| 1644 | and eax, 0ffh | ||
| 1645 | and edx, 0ffh | ||
| 1646 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1647 | xor edi, ebx | ||
| 1648 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1649 | xor edi, ebx | ||
| 1650 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1651 | xor edi, ebx | ||
| 1652 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1653 | xor edi, ebx | ||
| 1654 | ; | ||
| 1655 | ; Round 9 | ||
| 1656 | mov eax, DWORD PTR 72[ebp] | ||
| 1657 | xor ebx, ebx | ||
| 1658 | mov edx, DWORD PTR 76[ebp] | ||
| 1659 | xor eax, edi | ||
| 1660 | xor edx, edi | ||
| 1661 | and eax, 0fcfcfcfch | ||
| 1662 | and edx, 0cfcfcfcfh | ||
| 1663 | mov bl, al | ||
| 1664 | mov cl, ah | ||
| 1665 | ror edx, 4 | ||
| 1666 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1667 | mov bl, dl | ||
| 1668 | xor esi, ebp | ||
| 1669 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1670 | xor esi, ebp | ||
| 1671 | mov cl, dh | ||
| 1672 | shr eax, 16 | ||
| 1673 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1674 | xor esi, ebp | ||
| 1675 | mov bl, ah | ||
| 1676 | shr edx, 16 | ||
| 1677 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1678 | xor esi, ebp | ||
| 1679 | mov ebp, DWORD PTR 24[esp] | ||
| 1680 | mov cl, dh | ||
| 1681 | and eax, 0ffh | ||
| 1682 | and edx, 0ffh | ||
| 1683 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1684 | xor esi, ebx | ||
| 1685 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1686 | xor esi, ebx | ||
| 1687 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1688 | xor esi, ebx | ||
| 1689 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1690 | xor esi, ebx | ||
| 1691 | ; | ||
| 1692 | ; Round 10 | ||
| 1693 | mov eax, DWORD PTR 80[ebp] | ||
| 1694 | xor ebx, ebx | ||
| 1695 | mov edx, DWORD PTR 84[ebp] | ||
| 1696 | xor eax, esi | ||
| 1697 | xor edx, esi | ||
| 1698 | and eax, 0fcfcfcfch | ||
| 1699 | and edx, 0cfcfcfcfh | ||
| 1700 | mov bl, al | ||
| 1701 | mov cl, ah | ||
| 1702 | ror edx, 4 | ||
| 1703 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1704 | mov bl, dl | ||
| 1705 | xor edi, ebp | ||
| 1706 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1707 | xor edi, ebp | ||
| 1708 | mov cl, dh | ||
| 1709 | shr eax, 16 | ||
| 1710 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1711 | xor edi, ebp | ||
| 1712 | mov bl, ah | ||
| 1713 | shr edx, 16 | ||
| 1714 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1715 | xor edi, ebp | ||
| 1716 | mov ebp, DWORD PTR 24[esp] | ||
| 1717 | mov cl, dh | ||
| 1718 | and eax, 0ffh | ||
| 1719 | and edx, 0ffh | ||
| 1720 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1721 | xor edi, ebx | ||
| 1722 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1723 | xor edi, ebx | ||
| 1724 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1725 | xor edi, ebx | ||
| 1726 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1727 | xor edi, ebx | ||
| 1728 | ; | ||
| 1729 | ; Round 11 | ||
| 1730 | mov eax, DWORD PTR 88[ebp] | ||
| 1731 | xor ebx, ebx | ||
| 1732 | mov edx, DWORD PTR 92[ebp] | ||
| 1733 | xor eax, edi | ||
| 1734 | xor edx, edi | ||
| 1735 | and eax, 0fcfcfcfch | ||
| 1736 | and edx, 0cfcfcfcfh | ||
| 1737 | mov bl, al | ||
| 1738 | mov cl, ah | ||
| 1739 | ror edx, 4 | ||
| 1740 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1741 | mov bl, dl | ||
| 1742 | xor esi, ebp | ||
| 1743 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1744 | xor esi, ebp | ||
| 1745 | mov cl, dh | ||
| 1746 | shr eax, 16 | ||
| 1747 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1748 | xor esi, ebp | ||
| 1749 | mov bl, ah | ||
| 1750 | shr edx, 16 | ||
| 1751 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1752 | xor esi, ebp | ||
| 1753 | mov ebp, DWORD PTR 24[esp] | ||
| 1754 | mov cl, dh | ||
| 1755 | and eax, 0ffh | ||
| 1756 | and edx, 0ffh | ||
| 1757 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1758 | xor esi, ebx | ||
| 1759 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1760 | xor esi, ebx | ||
| 1761 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1762 | xor esi, ebx | ||
| 1763 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1764 | xor esi, ebx | ||
| 1765 | ; | ||
| 1766 | ; Round 12 | ||
| 1767 | mov eax, DWORD PTR 96[ebp] | ||
| 1768 | xor ebx, ebx | ||
| 1769 | mov edx, DWORD PTR 100[ebp] | ||
| 1770 | xor eax, esi | ||
| 1771 | xor edx, esi | ||
| 1772 | and eax, 0fcfcfcfch | ||
| 1773 | and edx, 0cfcfcfcfh | ||
| 1774 | mov bl, al | ||
| 1775 | mov cl, ah | ||
| 1776 | ror edx, 4 | ||
| 1777 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1778 | mov bl, dl | ||
| 1779 | xor edi, ebp | ||
| 1780 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1781 | xor edi, ebp | ||
| 1782 | mov cl, dh | ||
| 1783 | shr eax, 16 | ||
| 1784 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1785 | xor edi, ebp | ||
| 1786 | mov bl, ah | ||
| 1787 | shr edx, 16 | ||
| 1788 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1789 | xor edi, ebp | ||
| 1790 | mov ebp, DWORD PTR 24[esp] | ||
| 1791 | mov cl, dh | ||
| 1792 | and eax, 0ffh | ||
| 1793 | and edx, 0ffh | ||
| 1794 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1795 | xor edi, ebx | ||
| 1796 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1797 | xor edi, ebx | ||
| 1798 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1799 | xor edi, ebx | ||
| 1800 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1801 | xor edi, ebx | ||
| 1802 | ; | ||
| 1803 | ; Round 13 | ||
| 1804 | mov eax, DWORD PTR 104[ebp] | ||
| 1805 | xor ebx, ebx | ||
| 1806 | mov edx, DWORD PTR 108[ebp] | ||
| 1807 | xor eax, edi | ||
| 1808 | xor edx, edi | ||
| 1809 | and eax, 0fcfcfcfch | ||
| 1810 | and edx, 0cfcfcfcfh | ||
| 1811 | mov bl, al | ||
| 1812 | mov cl, ah | ||
| 1813 | ror edx, 4 | ||
| 1814 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1815 | mov bl, dl | ||
| 1816 | xor esi, ebp | ||
| 1817 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1818 | xor esi, ebp | ||
| 1819 | mov cl, dh | ||
| 1820 | shr eax, 16 | ||
| 1821 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1822 | xor esi, ebp | ||
| 1823 | mov bl, ah | ||
| 1824 | shr edx, 16 | ||
| 1825 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1826 | xor esi, ebp | ||
| 1827 | mov ebp, DWORD PTR 24[esp] | ||
| 1828 | mov cl, dh | ||
| 1829 | and eax, 0ffh | ||
| 1830 | and edx, 0ffh | ||
| 1831 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1832 | xor esi, ebx | ||
| 1833 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1834 | xor esi, ebx | ||
| 1835 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1836 | xor esi, ebx | ||
| 1837 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1838 | xor esi, ebx | ||
| 1839 | ; | ||
| 1840 | ; Round 14 | ||
| 1841 | mov eax, DWORD PTR 112[ebp] | ||
| 1842 | xor ebx, ebx | ||
| 1843 | mov edx, DWORD PTR 116[ebp] | ||
| 1844 | xor eax, esi | ||
| 1845 | xor edx, esi | ||
| 1846 | and eax, 0fcfcfcfch | ||
| 1847 | and edx, 0cfcfcfcfh | ||
| 1848 | mov bl, al | ||
| 1849 | mov cl, ah | ||
| 1850 | ror edx, 4 | ||
| 1851 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1852 | mov bl, dl | ||
| 1853 | xor edi, ebp | ||
| 1854 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1855 | xor edi, ebp | ||
| 1856 | mov cl, dh | ||
| 1857 | shr eax, 16 | ||
| 1858 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1859 | xor edi, ebp | ||
| 1860 | mov bl, ah | ||
| 1861 | shr edx, 16 | ||
| 1862 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1863 | xor edi, ebp | ||
| 1864 | mov ebp, DWORD PTR 24[esp] | ||
| 1865 | mov cl, dh | ||
| 1866 | and eax, 0ffh | ||
| 1867 | and edx, 0ffh | ||
| 1868 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1869 | xor edi, ebx | ||
| 1870 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1871 | xor edi, ebx | ||
| 1872 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1873 | xor edi, ebx | ||
| 1874 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1875 | xor edi, ebx | ||
| 1876 | ; | ||
| 1877 | ; Round 15 | ||
| 1878 | mov eax, DWORD PTR 120[ebp] | ||
| 1879 | xor ebx, ebx | ||
| 1880 | mov edx, DWORD PTR 124[ebp] | ||
| 1881 | xor eax, edi | ||
| 1882 | xor edx, edi | ||
| 1883 | and eax, 0fcfcfcfch | ||
| 1884 | and edx, 0cfcfcfcfh | ||
| 1885 | mov bl, al | ||
| 1886 | mov cl, ah | ||
| 1887 | ror edx, 4 | ||
| 1888 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1889 | mov bl, dl | ||
| 1890 | xor esi, ebp | ||
| 1891 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1892 | xor esi, ebp | ||
| 1893 | mov cl, dh | ||
| 1894 | shr eax, 16 | ||
| 1895 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1896 | xor esi, ebp | ||
| 1897 | mov bl, ah | ||
| 1898 | shr edx, 16 | ||
| 1899 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1900 | xor esi, ebp | ||
| 1901 | mov ebp, DWORD PTR 24[esp] | ||
| 1902 | mov cl, dh | ||
| 1903 | and eax, 0ffh | ||
| 1904 | and edx, 0ffh | ||
| 1905 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1906 | xor esi, ebx | ||
| 1907 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1908 | xor esi, ebx | ||
| 1909 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1910 | xor esi, ebx | ||
| 1911 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1912 | xor esi, ebx | ||
| 1913 | jmp $L003end | ||
| 1914 | $L002start_decrypt: | ||
| 1915 | ; | ||
| 1916 | ; Round 15 | ||
| 1917 | mov eax, DWORD PTR 120[ebp] | ||
| 1918 | xor ebx, ebx | ||
| 1919 | mov edx, DWORD PTR 124[ebp] | ||
| 1920 | xor eax, esi | ||
| 1921 | xor edx, esi | ||
| 1922 | and eax, 0fcfcfcfch | ||
| 1923 | and edx, 0cfcfcfcfh | ||
| 1924 | mov bl, al | ||
| 1925 | mov cl, ah | ||
| 1926 | ror edx, 4 | ||
| 1927 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1928 | mov bl, dl | ||
| 1929 | xor edi, ebp | ||
| 1930 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1931 | xor edi, ebp | ||
| 1932 | mov cl, dh | ||
| 1933 | shr eax, 16 | ||
| 1934 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1935 | xor edi, ebp | ||
| 1936 | mov bl, ah | ||
| 1937 | shr edx, 16 | ||
| 1938 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1939 | xor edi, ebp | ||
| 1940 | mov ebp, DWORD PTR 24[esp] | ||
| 1941 | mov cl, dh | ||
| 1942 | and eax, 0ffh | ||
| 1943 | and edx, 0ffh | ||
| 1944 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1945 | xor edi, ebx | ||
| 1946 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1947 | xor edi, ebx | ||
| 1948 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1949 | xor edi, ebx | ||
| 1950 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1951 | xor edi, ebx | ||
| 1952 | ; | ||
| 1953 | ; Round 14 | ||
| 1954 | mov eax, DWORD PTR 112[ebp] | ||
| 1955 | xor ebx, ebx | ||
| 1956 | mov edx, DWORD PTR 116[ebp] | ||
| 1957 | xor eax, edi | ||
| 1958 | xor edx, edi | ||
| 1959 | and eax, 0fcfcfcfch | ||
| 1960 | and edx, 0cfcfcfcfh | ||
| 1961 | mov bl, al | ||
| 1962 | mov cl, ah | ||
| 1963 | ror edx, 4 | ||
| 1964 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 1965 | mov bl, dl | ||
| 1966 | xor esi, ebp | ||
| 1967 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 1968 | xor esi, ebp | ||
| 1969 | mov cl, dh | ||
| 1970 | shr eax, 16 | ||
| 1971 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 1972 | xor esi, ebp | ||
| 1973 | mov bl, ah | ||
| 1974 | shr edx, 16 | ||
| 1975 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 1976 | xor esi, ebp | ||
| 1977 | mov ebp, DWORD PTR 24[esp] | ||
| 1978 | mov cl, dh | ||
| 1979 | and eax, 0ffh | ||
| 1980 | and edx, 0ffh | ||
| 1981 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 1982 | xor esi, ebx | ||
| 1983 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 1984 | xor esi, ebx | ||
| 1985 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 1986 | xor esi, ebx | ||
| 1987 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 1988 | xor esi, ebx | ||
| 1989 | ; | ||
| 1990 | ; Round 13 | ||
| 1991 | mov eax, DWORD PTR 104[ebp] | ||
| 1992 | xor ebx, ebx | ||
| 1993 | mov edx, DWORD PTR 108[ebp] | ||
| 1994 | xor eax, esi | ||
| 1995 | xor edx, esi | ||
| 1996 | and eax, 0fcfcfcfch | ||
| 1997 | and edx, 0cfcfcfcfh | ||
| 1998 | mov bl, al | ||
| 1999 | mov cl, ah | ||
| 2000 | ror edx, 4 | ||
| 2001 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2002 | mov bl, dl | ||
| 2003 | xor edi, ebp | ||
| 2004 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2005 | xor edi, ebp | ||
| 2006 | mov cl, dh | ||
| 2007 | shr eax, 16 | ||
| 2008 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2009 | xor edi, ebp | ||
| 2010 | mov bl, ah | ||
| 2011 | shr edx, 16 | ||
| 2012 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2013 | xor edi, ebp | ||
| 2014 | mov ebp, DWORD PTR 24[esp] | ||
| 2015 | mov cl, dh | ||
| 2016 | and eax, 0ffh | ||
| 2017 | and edx, 0ffh | ||
| 2018 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2019 | xor edi, ebx | ||
| 2020 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2021 | xor edi, ebx | ||
| 2022 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2023 | xor edi, ebx | ||
| 2024 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2025 | xor edi, ebx | ||
| 2026 | ; | ||
| 2027 | ; Round 12 | ||
| 2028 | mov eax, DWORD PTR 96[ebp] | ||
| 2029 | xor ebx, ebx | ||
| 2030 | mov edx, DWORD PTR 100[ebp] | ||
| 2031 | xor eax, edi | ||
| 2032 | xor edx, edi | ||
| 2033 | and eax, 0fcfcfcfch | ||
| 2034 | and edx, 0cfcfcfcfh | ||
| 2035 | mov bl, al | ||
| 2036 | mov cl, ah | ||
| 2037 | ror edx, 4 | ||
| 2038 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2039 | mov bl, dl | ||
| 2040 | xor esi, ebp | ||
| 2041 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2042 | xor esi, ebp | ||
| 2043 | mov cl, dh | ||
| 2044 | shr eax, 16 | ||
| 2045 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2046 | xor esi, ebp | ||
| 2047 | mov bl, ah | ||
| 2048 | shr edx, 16 | ||
| 2049 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2050 | xor esi, ebp | ||
| 2051 | mov ebp, DWORD PTR 24[esp] | ||
| 2052 | mov cl, dh | ||
| 2053 | and eax, 0ffh | ||
| 2054 | and edx, 0ffh | ||
| 2055 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2056 | xor esi, ebx | ||
| 2057 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2058 | xor esi, ebx | ||
| 2059 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2060 | xor esi, ebx | ||
| 2061 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2062 | xor esi, ebx | ||
| 2063 | ; | ||
| 2064 | ; Round 11 | ||
| 2065 | mov eax, DWORD PTR 88[ebp] | ||
| 2066 | xor ebx, ebx | ||
| 2067 | mov edx, DWORD PTR 92[ebp] | ||
| 2068 | xor eax, esi | ||
| 2069 | xor edx, esi | ||
| 2070 | and eax, 0fcfcfcfch | ||
| 2071 | and edx, 0cfcfcfcfh | ||
| 2072 | mov bl, al | ||
| 2073 | mov cl, ah | ||
| 2074 | ror edx, 4 | ||
| 2075 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2076 | mov bl, dl | ||
| 2077 | xor edi, ebp | ||
| 2078 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2079 | xor edi, ebp | ||
| 2080 | mov cl, dh | ||
| 2081 | shr eax, 16 | ||
| 2082 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2083 | xor edi, ebp | ||
| 2084 | mov bl, ah | ||
| 2085 | shr edx, 16 | ||
| 2086 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2087 | xor edi, ebp | ||
| 2088 | mov ebp, DWORD PTR 24[esp] | ||
| 2089 | mov cl, dh | ||
| 2090 | and eax, 0ffh | ||
| 2091 | and edx, 0ffh | ||
| 2092 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2093 | xor edi, ebx | ||
| 2094 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2095 | xor edi, ebx | ||
| 2096 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2097 | xor edi, ebx | ||
| 2098 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2099 | xor edi, ebx | ||
| 2100 | ; | ||
| 2101 | ; Round 10 | ||
| 2102 | mov eax, DWORD PTR 80[ebp] | ||
| 2103 | xor ebx, ebx | ||
| 2104 | mov edx, DWORD PTR 84[ebp] | ||
| 2105 | xor eax, edi | ||
| 2106 | xor edx, edi | ||
| 2107 | and eax, 0fcfcfcfch | ||
| 2108 | and edx, 0cfcfcfcfh | ||
| 2109 | mov bl, al | ||
| 2110 | mov cl, ah | ||
| 2111 | ror edx, 4 | ||
| 2112 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2113 | mov bl, dl | ||
| 2114 | xor esi, ebp | ||
| 2115 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2116 | xor esi, ebp | ||
| 2117 | mov cl, dh | ||
| 2118 | shr eax, 16 | ||
| 2119 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2120 | xor esi, ebp | ||
| 2121 | mov bl, ah | ||
| 2122 | shr edx, 16 | ||
| 2123 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2124 | xor esi, ebp | ||
| 2125 | mov ebp, DWORD PTR 24[esp] | ||
| 2126 | mov cl, dh | ||
| 2127 | and eax, 0ffh | ||
| 2128 | and edx, 0ffh | ||
| 2129 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2130 | xor esi, ebx | ||
| 2131 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2132 | xor esi, ebx | ||
| 2133 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2134 | xor esi, ebx | ||
| 2135 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2136 | xor esi, ebx | ||
| 2137 | ; | ||
| 2138 | ; Round 9 | ||
| 2139 | mov eax, DWORD PTR 72[ebp] | ||
| 2140 | xor ebx, ebx | ||
| 2141 | mov edx, DWORD PTR 76[ebp] | ||
| 2142 | xor eax, esi | ||
| 2143 | xor edx, esi | ||
| 2144 | and eax, 0fcfcfcfch | ||
| 2145 | and edx, 0cfcfcfcfh | ||
| 2146 | mov bl, al | ||
| 2147 | mov cl, ah | ||
| 2148 | ror edx, 4 | ||
| 2149 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2150 | mov bl, dl | ||
| 2151 | xor edi, ebp | ||
| 2152 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2153 | xor edi, ebp | ||
| 2154 | mov cl, dh | ||
| 2155 | shr eax, 16 | ||
| 2156 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2157 | xor edi, ebp | ||
| 2158 | mov bl, ah | ||
| 2159 | shr edx, 16 | ||
| 2160 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2161 | xor edi, ebp | ||
| 2162 | mov ebp, DWORD PTR 24[esp] | ||
| 2163 | mov cl, dh | ||
| 2164 | and eax, 0ffh | ||
| 2165 | and edx, 0ffh | ||
| 2166 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2167 | xor edi, ebx | ||
| 2168 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2169 | xor edi, ebx | ||
| 2170 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2171 | xor edi, ebx | ||
| 2172 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2173 | xor edi, ebx | ||
| 2174 | ; | ||
| 2175 | ; Round 8 | ||
| 2176 | mov eax, DWORD PTR 64[ebp] | ||
| 2177 | xor ebx, ebx | ||
| 2178 | mov edx, DWORD PTR 68[ebp] | ||
| 2179 | xor eax, edi | ||
| 2180 | xor edx, edi | ||
| 2181 | and eax, 0fcfcfcfch | ||
| 2182 | and edx, 0cfcfcfcfh | ||
| 2183 | mov bl, al | ||
| 2184 | mov cl, ah | ||
| 2185 | ror edx, 4 | ||
| 2186 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2187 | mov bl, dl | ||
| 2188 | xor esi, ebp | ||
| 2189 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2190 | xor esi, ebp | ||
| 2191 | mov cl, dh | ||
| 2192 | shr eax, 16 | ||
| 2193 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2194 | xor esi, ebp | ||
| 2195 | mov bl, ah | ||
| 2196 | shr edx, 16 | ||
| 2197 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2198 | xor esi, ebp | ||
| 2199 | mov ebp, DWORD PTR 24[esp] | ||
| 2200 | mov cl, dh | ||
| 2201 | and eax, 0ffh | ||
| 2202 | and edx, 0ffh | ||
| 2203 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2204 | xor esi, ebx | ||
| 2205 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2206 | xor esi, ebx | ||
| 2207 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2208 | xor esi, ebx | ||
| 2209 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2210 | xor esi, ebx | ||
| 2211 | ; | ||
| 2212 | ; Round 7 | ||
| 2213 | mov eax, DWORD PTR 56[ebp] | ||
| 2214 | xor ebx, ebx | ||
| 2215 | mov edx, DWORD PTR 60[ebp] | ||
| 2216 | xor eax, esi | ||
| 2217 | xor edx, esi | ||
| 2218 | and eax, 0fcfcfcfch | ||
| 2219 | and edx, 0cfcfcfcfh | ||
| 2220 | mov bl, al | ||
| 2221 | mov cl, ah | ||
| 2222 | ror edx, 4 | ||
| 2223 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2224 | mov bl, dl | ||
| 2225 | xor edi, ebp | ||
| 2226 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2227 | xor edi, ebp | ||
| 2228 | mov cl, dh | ||
| 2229 | shr eax, 16 | ||
| 2230 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2231 | xor edi, ebp | ||
| 2232 | mov bl, ah | ||
| 2233 | shr edx, 16 | ||
| 2234 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2235 | xor edi, ebp | ||
| 2236 | mov ebp, DWORD PTR 24[esp] | ||
| 2237 | mov cl, dh | ||
| 2238 | and eax, 0ffh | ||
| 2239 | and edx, 0ffh | ||
| 2240 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2241 | xor edi, ebx | ||
| 2242 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2243 | xor edi, ebx | ||
| 2244 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2245 | xor edi, ebx | ||
| 2246 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2247 | xor edi, ebx | ||
| 2248 | ; | ||
| 2249 | ; Round 6 | ||
| 2250 | mov eax, DWORD PTR 48[ebp] | ||
| 2251 | xor ebx, ebx | ||
| 2252 | mov edx, DWORD PTR 52[ebp] | ||
| 2253 | xor eax, edi | ||
| 2254 | xor edx, edi | ||
| 2255 | and eax, 0fcfcfcfch | ||
| 2256 | and edx, 0cfcfcfcfh | ||
| 2257 | mov bl, al | ||
| 2258 | mov cl, ah | ||
| 2259 | ror edx, 4 | ||
| 2260 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2261 | mov bl, dl | ||
| 2262 | xor esi, ebp | ||
| 2263 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2264 | xor esi, ebp | ||
| 2265 | mov cl, dh | ||
| 2266 | shr eax, 16 | ||
| 2267 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2268 | xor esi, ebp | ||
| 2269 | mov bl, ah | ||
| 2270 | shr edx, 16 | ||
| 2271 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2272 | xor esi, ebp | ||
| 2273 | mov ebp, DWORD PTR 24[esp] | ||
| 2274 | mov cl, dh | ||
| 2275 | and eax, 0ffh | ||
| 2276 | and edx, 0ffh | ||
| 2277 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2278 | xor esi, ebx | ||
| 2279 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2280 | xor esi, ebx | ||
| 2281 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2282 | xor esi, ebx | ||
| 2283 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2284 | xor esi, ebx | ||
| 2285 | ; | ||
| 2286 | ; Round 5 | ||
| 2287 | mov eax, DWORD PTR 40[ebp] | ||
| 2288 | xor ebx, ebx | ||
| 2289 | mov edx, DWORD PTR 44[ebp] | ||
| 2290 | xor eax, esi | ||
| 2291 | xor edx, esi | ||
| 2292 | and eax, 0fcfcfcfch | ||
| 2293 | and edx, 0cfcfcfcfh | ||
| 2294 | mov bl, al | ||
| 2295 | mov cl, ah | ||
| 2296 | ror edx, 4 | ||
| 2297 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2298 | mov bl, dl | ||
| 2299 | xor edi, ebp | ||
| 2300 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2301 | xor edi, ebp | ||
| 2302 | mov cl, dh | ||
| 2303 | shr eax, 16 | ||
| 2304 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2305 | xor edi, ebp | ||
| 2306 | mov bl, ah | ||
| 2307 | shr edx, 16 | ||
| 2308 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2309 | xor edi, ebp | ||
| 2310 | mov ebp, DWORD PTR 24[esp] | ||
| 2311 | mov cl, dh | ||
| 2312 | and eax, 0ffh | ||
| 2313 | and edx, 0ffh | ||
| 2314 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2315 | xor edi, ebx | ||
| 2316 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2317 | xor edi, ebx | ||
| 2318 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2319 | xor edi, ebx | ||
| 2320 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2321 | xor edi, ebx | ||
| 2322 | ; | ||
| 2323 | ; Round 4 | ||
| 2324 | mov eax, DWORD PTR 32[ebp] | ||
| 2325 | xor ebx, ebx | ||
| 2326 | mov edx, DWORD PTR 36[ebp] | ||
| 2327 | xor eax, edi | ||
| 2328 | xor edx, edi | ||
| 2329 | and eax, 0fcfcfcfch | ||
| 2330 | and edx, 0cfcfcfcfh | ||
| 2331 | mov bl, al | ||
| 2332 | mov cl, ah | ||
| 2333 | ror edx, 4 | ||
| 2334 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2335 | mov bl, dl | ||
| 2336 | xor esi, ebp | ||
| 2337 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2338 | xor esi, ebp | ||
| 2339 | mov cl, dh | ||
| 2340 | shr eax, 16 | ||
| 2341 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2342 | xor esi, ebp | ||
| 2343 | mov bl, ah | ||
| 2344 | shr edx, 16 | ||
| 2345 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2346 | xor esi, ebp | ||
| 2347 | mov ebp, DWORD PTR 24[esp] | ||
| 2348 | mov cl, dh | ||
| 2349 | and eax, 0ffh | ||
| 2350 | and edx, 0ffh | ||
| 2351 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2352 | xor esi, ebx | ||
| 2353 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2354 | xor esi, ebx | ||
| 2355 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2356 | xor esi, ebx | ||
| 2357 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2358 | xor esi, ebx | ||
| 2359 | ; | ||
| 2360 | ; Round 3 | ||
| 2361 | mov eax, DWORD PTR 24[ebp] | ||
| 2362 | xor ebx, ebx | ||
| 2363 | mov edx, DWORD PTR 28[ebp] | ||
| 2364 | xor eax, esi | ||
| 2365 | xor edx, esi | ||
| 2366 | and eax, 0fcfcfcfch | ||
| 2367 | and edx, 0cfcfcfcfh | ||
| 2368 | mov bl, al | ||
| 2369 | mov cl, ah | ||
| 2370 | ror edx, 4 | ||
| 2371 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2372 | mov bl, dl | ||
| 2373 | xor edi, ebp | ||
| 2374 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2375 | xor edi, ebp | ||
| 2376 | mov cl, dh | ||
| 2377 | shr eax, 16 | ||
| 2378 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2379 | xor edi, ebp | ||
| 2380 | mov bl, ah | ||
| 2381 | shr edx, 16 | ||
| 2382 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2383 | xor edi, ebp | ||
| 2384 | mov ebp, DWORD PTR 24[esp] | ||
| 2385 | mov cl, dh | ||
| 2386 | and eax, 0ffh | ||
| 2387 | and edx, 0ffh | ||
| 2388 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2389 | xor edi, ebx | ||
| 2390 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2391 | xor edi, ebx | ||
| 2392 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2393 | xor edi, ebx | ||
| 2394 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2395 | xor edi, ebx | ||
| 2396 | ; | ||
| 2397 | ; Round 2 | ||
| 2398 | mov eax, DWORD PTR 16[ebp] | ||
| 2399 | xor ebx, ebx | ||
| 2400 | mov edx, DWORD PTR 20[ebp] | ||
| 2401 | xor eax, edi | ||
| 2402 | xor edx, edi | ||
| 2403 | and eax, 0fcfcfcfch | ||
| 2404 | and edx, 0cfcfcfcfh | ||
| 2405 | mov bl, al | ||
| 2406 | mov cl, ah | ||
| 2407 | ror edx, 4 | ||
| 2408 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2409 | mov bl, dl | ||
| 2410 | xor esi, ebp | ||
| 2411 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2412 | xor esi, ebp | ||
| 2413 | mov cl, dh | ||
| 2414 | shr eax, 16 | ||
| 2415 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2416 | xor esi, ebp | ||
| 2417 | mov bl, ah | ||
| 2418 | shr edx, 16 | ||
| 2419 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2420 | xor esi, ebp | ||
| 2421 | mov ebp, DWORD PTR 24[esp] | ||
| 2422 | mov cl, dh | ||
| 2423 | and eax, 0ffh | ||
| 2424 | and edx, 0ffh | ||
| 2425 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2426 | xor esi, ebx | ||
| 2427 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2428 | xor esi, ebx | ||
| 2429 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2430 | xor esi, ebx | ||
| 2431 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2432 | xor esi, ebx | ||
| 2433 | ; | ||
| 2434 | ; Round 1 | ||
| 2435 | mov eax, DWORD PTR 8[ebp] | ||
| 2436 | xor ebx, ebx | ||
| 2437 | mov edx, DWORD PTR 12[ebp] | ||
| 2438 | xor eax, esi | ||
| 2439 | xor edx, esi | ||
| 2440 | and eax, 0fcfcfcfch | ||
| 2441 | and edx, 0cfcfcfcfh | ||
| 2442 | mov bl, al | ||
| 2443 | mov cl, ah | ||
| 2444 | ror edx, 4 | ||
| 2445 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2446 | mov bl, dl | ||
| 2447 | xor edi, ebp | ||
| 2448 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2449 | xor edi, ebp | ||
| 2450 | mov cl, dh | ||
| 2451 | shr eax, 16 | ||
| 2452 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2453 | xor edi, ebp | ||
| 2454 | mov bl, ah | ||
| 2455 | shr edx, 16 | ||
| 2456 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2457 | xor edi, ebp | ||
| 2458 | mov ebp, DWORD PTR 24[esp] | ||
| 2459 | mov cl, dh | ||
| 2460 | and eax, 0ffh | ||
| 2461 | and edx, 0ffh | ||
| 2462 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2463 | xor edi, ebx | ||
| 2464 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2465 | xor edi, ebx | ||
| 2466 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2467 | xor edi, ebx | ||
| 2468 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2469 | xor edi, ebx | ||
| 2470 | ; | ||
| 2471 | ; Round 0 | ||
| 2472 | mov eax, DWORD PTR [ebp] | ||
| 2473 | xor ebx, ebx | ||
| 2474 | mov edx, DWORD PTR 4[ebp] | ||
| 2475 | xor eax, edi | ||
| 2476 | xor edx, edi | ||
| 2477 | and eax, 0fcfcfcfch | ||
| 2478 | and edx, 0cfcfcfcfh | ||
| 2479 | mov bl, al | ||
| 2480 | mov cl, ah | ||
| 2481 | ror edx, 4 | ||
| 2482 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 2483 | mov bl, dl | ||
| 2484 | xor esi, ebp | ||
| 2485 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 2486 | xor esi, ebp | ||
| 2487 | mov cl, dh | ||
| 2488 | shr eax, 16 | ||
| 2489 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 2490 | xor esi, ebp | ||
| 2491 | mov bl, ah | ||
| 2492 | shr edx, 16 | ||
| 2493 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 2494 | xor esi, ebp | ||
| 2495 | mov ebp, DWORD PTR 24[esp] | ||
| 2496 | mov cl, dh | ||
| 2497 | and eax, 0ffh | ||
| 2498 | and edx, 0ffh | ||
| 2499 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 2500 | xor esi, ebx | ||
| 2501 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 2502 | xor esi, ebx | ||
| 2503 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 2504 | xor esi, ebx | ||
| 2505 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 2506 | xor esi, ebx | ||
| 2507 | $L003end: | ||
| 2508 | ; | ||
| 2509 | ; Fixup | ||
| 2510 | ror edi, 3 | ||
| 2511 | mov eax, DWORD PTR 20[esp] | ||
| 2512 | ror esi, 3 | ||
| 2513 | mov DWORD PTR [eax],edi | ||
| 2514 | mov DWORD PTR 4[eax],esi | ||
| 2515 | pop ebp | ||
| 2516 | pop ebx | ||
| 2517 | pop edi | ||
| 2518 | pop esi | ||
| 2519 | ret | ||
| 2520 | _des_encrypt2 ENDP | ||
| 2521 | _TEXT ENDS | ||
| 2522 | _TEXT SEGMENT | ||
| 2523 | PUBLIC _des_encrypt3 | ||
| 2524 | |||
| 2525 | _des_encrypt3 PROC NEAR | ||
| 2526 | push ebx | ||
| 2527 | mov ebx, DWORD PTR 8[esp] | ||
| 2528 | push ebp | ||
| 2529 | push esi | ||
| 2530 | push edi | ||
| 2531 | ; | ||
| 2532 | ; Load the data words | ||
| 2533 | mov edi, DWORD PTR [ebx] | ||
| 2534 | mov esi, DWORD PTR 4[ebx] | ||
| 2535 | sub esp, 12 | ||
| 2536 | ; | ||
| 2537 | ; IP | ||
| 2538 | rol edi, 4 | ||
| 2539 | mov edx, edi | ||
| 2540 | xor edi, esi | ||
| 2541 | and edi, 0f0f0f0f0h | ||
| 2542 | xor edx, edi | ||
| 2543 | xor esi, edi | ||
| 2544 | ; | ||
| 2545 | rol esi, 20 | ||
| 2546 | mov edi, esi | ||
| 2547 | xor esi, edx | ||
| 2548 | and esi, 0fff0000fh | ||
| 2549 | xor edi, esi | ||
| 2550 | xor edx, esi | ||
| 2551 | ; | ||
| 2552 | rol edi, 14 | ||
| 2553 | mov esi, edi | ||
| 2554 | xor edi, edx | ||
| 2555 | and edi, 033333333h | ||
| 2556 | xor esi, edi | ||
| 2557 | xor edx, edi | ||
| 2558 | ; | ||
| 2559 | rol edx, 22 | ||
| 2560 | mov edi, edx | ||
| 2561 | xor edx, esi | ||
| 2562 | and edx, 003fc03fch | ||
| 2563 | xor edi, edx | ||
| 2564 | xor esi, edx | ||
| 2565 | ; | ||
| 2566 | rol edi, 9 | ||
| 2567 | mov edx, edi | ||
| 2568 | xor edi, esi | ||
| 2569 | and edi, 0aaaaaaaah | ||
| 2570 | xor edx, edi | ||
| 2571 | xor esi, edi | ||
| 2572 | ; | ||
| 2573 | ror edx, 3 | ||
| 2574 | ror esi, 2 | ||
| 2575 | mov DWORD PTR 4[ebx],esi | ||
| 2576 | mov eax, DWORD PTR 36[esp] | ||
| 2577 | mov DWORD PTR [ebx],edx | ||
| 2578 | mov edi, DWORD PTR 40[esp] | ||
| 2579 | mov esi, DWORD PTR 44[esp] | ||
| 2580 | mov DWORD PTR 8[esp],1 | ||
| 2581 | mov DWORD PTR 4[esp],eax | ||
| 2582 | mov DWORD PTR [esp],ebx | ||
| 2583 | call _des_encrypt2 | ||
| 2584 | mov DWORD PTR 8[esp],0 | ||
| 2585 | mov DWORD PTR 4[esp],edi | ||
| 2586 | mov DWORD PTR [esp],ebx | ||
| 2587 | call _des_encrypt2 | ||
| 2588 | mov DWORD PTR 8[esp],1 | ||
| 2589 | mov DWORD PTR 4[esp],esi | ||
| 2590 | mov DWORD PTR [esp],ebx | ||
| 2591 | call _des_encrypt2 | ||
| 2592 | add esp, 12 | ||
| 2593 | mov edi, DWORD PTR [ebx] | ||
| 2594 | mov esi, DWORD PTR 4[ebx] | ||
| 2595 | ; | ||
| 2596 | ; FP | ||
| 2597 | rol esi, 2 | ||
| 2598 | rol edi, 3 | ||
| 2599 | mov eax, edi | ||
| 2600 | xor edi, esi | ||
| 2601 | and edi, 0aaaaaaaah | ||
| 2602 | xor eax, edi | ||
| 2603 | xor esi, edi | ||
| 2604 | ; | ||
| 2605 | rol eax, 23 | ||
| 2606 | mov edi, eax | ||
| 2607 | xor eax, esi | ||
| 2608 | and eax, 003fc03fch | ||
| 2609 | xor edi, eax | ||
| 2610 | xor esi, eax | ||
| 2611 | ; | ||
| 2612 | rol edi, 10 | ||
| 2613 | mov eax, edi | ||
| 2614 | xor edi, esi | ||
| 2615 | and edi, 033333333h | ||
| 2616 | xor eax, edi | ||
| 2617 | xor esi, edi | ||
| 2618 | ; | ||
| 2619 | rol esi, 18 | ||
| 2620 | mov edi, esi | ||
| 2621 | xor esi, eax | ||
| 2622 | and esi, 0fff0000fh | ||
| 2623 | xor edi, esi | ||
| 2624 | xor eax, esi | ||
| 2625 | ; | ||
| 2626 | rol edi, 12 | ||
| 2627 | mov esi, edi | ||
| 2628 | xor edi, eax | ||
| 2629 | and edi, 0f0f0f0f0h | ||
| 2630 | xor esi, edi | ||
| 2631 | xor eax, edi | ||
| 2632 | ; | ||
| 2633 | ror eax, 4 | ||
| 2634 | mov DWORD PTR [ebx],eax | ||
| 2635 | mov DWORD PTR 4[ebx],esi | ||
| 2636 | pop edi | ||
| 2637 | pop esi | ||
| 2638 | pop ebp | ||
| 2639 | pop ebx | ||
| 2640 | ret | ||
| 2641 | _des_encrypt3 ENDP | ||
| 2642 | _TEXT ENDS | ||
| 2643 | _TEXT SEGMENT | ||
| 2644 | PUBLIC _des_decrypt3 | ||
| 2645 | |||
| 2646 | _des_decrypt3 PROC NEAR | ||
| 2647 | push ebx | ||
| 2648 | mov ebx, DWORD PTR 8[esp] | ||
| 2649 | push ebp | ||
| 2650 | push esi | ||
| 2651 | push edi | ||
| 2652 | ; | ||
| 2653 | ; Load the data words | ||
| 2654 | mov edi, DWORD PTR [ebx] | ||
| 2655 | mov esi, DWORD PTR 4[ebx] | ||
| 2656 | sub esp, 12 | ||
| 2657 | ; | ||
| 2658 | ; IP | ||
| 2659 | rol edi, 4 | ||
| 2660 | mov edx, edi | ||
| 2661 | xor edi, esi | ||
| 2662 | and edi, 0f0f0f0f0h | ||
| 2663 | xor edx, edi | ||
| 2664 | xor esi, edi | ||
| 2665 | ; | ||
| 2666 | rol esi, 20 | ||
| 2667 | mov edi, esi | ||
| 2668 | xor esi, edx | ||
| 2669 | and esi, 0fff0000fh | ||
| 2670 | xor edi, esi | ||
| 2671 | xor edx, esi | ||
| 2672 | ; | ||
| 2673 | rol edi, 14 | ||
| 2674 | mov esi, edi | ||
| 2675 | xor edi, edx | ||
| 2676 | and edi, 033333333h | ||
| 2677 | xor esi, edi | ||
| 2678 | xor edx, edi | ||
| 2679 | ; | ||
| 2680 | rol edx, 22 | ||
| 2681 | mov edi, edx | ||
| 2682 | xor edx, esi | ||
| 2683 | and edx, 003fc03fch | ||
| 2684 | xor edi, edx | ||
| 2685 | xor esi, edx | ||
| 2686 | ; | ||
| 2687 | rol edi, 9 | ||
| 2688 | mov edx, edi | ||
| 2689 | xor edi, esi | ||
| 2690 | and edi, 0aaaaaaaah | ||
| 2691 | xor edx, edi | ||
| 2692 | xor esi, edi | ||
| 2693 | ; | ||
| 2694 | ror edx, 3 | ||
| 2695 | ror esi, 2 | ||
| 2696 | mov DWORD PTR 4[ebx],esi | ||
| 2697 | mov esi, DWORD PTR 36[esp] | ||
| 2698 | mov DWORD PTR [ebx],edx | ||
| 2699 | mov edi, DWORD PTR 40[esp] | ||
| 2700 | mov eax, DWORD PTR 44[esp] | ||
| 2701 | mov DWORD PTR 8[esp],0 | ||
| 2702 | mov DWORD PTR 4[esp],eax | ||
| 2703 | mov DWORD PTR [esp],ebx | ||
| 2704 | call _des_encrypt2 | ||
| 2705 | mov DWORD PTR 8[esp],1 | ||
| 2706 | mov DWORD PTR 4[esp],edi | ||
| 2707 | mov DWORD PTR [esp],ebx | ||
| 2708 | call _des_encrypt2 | ||
| 2709 | mov DWORD PTR 8[esp],0 | ||
| 2710 | mov DWORD PTR 4[esp],esi | ||
| 2711 | mov DWORD PTR [esp],ebx | ||
| 2712 | call _des_encrypt2 | ||
| 2713 | add esp, 12 | ||
| 2714 | mov edi, DWORD PTR [ebx] | ||
| 2715 | mov esi, DWORD PTR 4[ebx] | ||
| 2716 | ; | ||
| 2717 | ; FP | ||
| 2718 | rol esi, 2 | ||
| 2719 | rol edi, 3 | ||
| 2720 | mov eax, edi | ||
| 2721 | xor edi, esi | ||
| 2722 | and edi, 0aaaaaaaah | ||
| 2723 | xor eax, edi | ||
| 2724 | xor esi, edi | ||
| 2725 | ; | ||
| 2726 | rol eax, 23 | ||
| 2727 | mov edi, eax | ||
| 2728 | xor eax, esi | ||
| 2729 | and eax, 003fc03fch | ||
| 2730 | xor edi, eax | ||
| 2731 | xor esi, eax | ||
| 2732 | ; | ||
| 2733 | rol edi, 10 | ||
| 2734 | mov eax, edi | ||
| 2735 | xor edi, esi | ||
| 2736 | and edi, 033333333h | ||
| 2737 | xor eax, edi | ||
| 2738 | xor esi, edi | ||
| 2739 | ; | ||
| 2740 | rol esi, 18 | ||
| 2741 | mov edi, esi | ||
| 2742 | xor esi, eax | ||
| 2743 | and esi, 0fff0000fh | ||
| 2744 | xor edi, esi | ||
| 2745 | xor eax, esi | ||
| 2746 | ; | ||
| 2747 | rol edi, 12 | ||
| 2748 | mov esi, edi | ||
| 2749 | xor edi, eax | ||
| 2750 | and edi, 0f0f0f0f0h | ||
| 2751 | xor esi, edi | ||
| 2752 | xor eax, edi | ||
| 2753 | ; | ||
| 2754 | ror eax, 4 | ||
| 2755 | mov DWORD PTR [ebx],eax | ||
| 2756 | mov DWORD PTR 4[ebx],esi | ||
| 2757 | pop edi | ||
| 2758 | pop esi | ||
| 2759 | pop ebp | ||
| 2760 | pop ebx | ||
| 2761 | ret | ||
| 2762 | _des_decrypt3 ENDP | ||
| 2763 | _TEXT ENDS | ||
| 2764 | _TEXT SEGMENT | ||
| 2765 | PUBLIC _des_ncbc_encrypt | ||
| 2766 | |||
| 2767 | _des_ncbc_encrypt PROC NEAR | ||
| 2768 | ; | ||
| 2769 | push ebp | ||
| 2770 | push ebx | ||
| 2771 | push esi | ||
| 2772 | push edi | ||
| 2773 | mov ebp, DWORD PTR 28[esp] | ||
| 2774 | ; getting iv ptr from parameter 4 | ||
| 2775 | mov ebx, DWORD PTR 36[esp] | ||
| 2776 | mov esi, DWORD PTR [ebx] | ||
| 2777 | mov edi, DWORD PTR 4[ebx] | ||
| 2778 | push edi | ||
| 2779 | push esi | ||
| 2780 | push edi | ||
| 2781 | push esi | ||
| 2782 | mov ebx, esp | ||
| 2783 | mov esi, DWORD PTR 36[esp] | ||
| 2784 | mov edi, DWORD PTR 40[esp] | ||
| 2785 | ; getting encrypt flag from parameter 5 | ||
| 2786 | mov ecx, DWORD PTR 56[esp] | ||
| 2787 | ; get and push parameter 5 | ||
| 2788 | push ecx | ||
| 2789 | ; get and push parameter 3 | ||
| 2790 | mov eax, DWORD PTR 52[esp] | ||
| 2791 | push eax | ||
| 2792 | push ebx | ||
| 2793 | cmp ecx, 0 | ||
| 2794 | jz $L004decrypt | ||
| 2795 | and ebp, 4294967288 | ||
| 2796 | mov eax, DWORD PTR 12[esp] | ||
| 2797 | mov ebx, DWORD PTR 16[esp] | ||
| 2798 | jz $L005encrypt_finish | ||
| 2799 | L006encrypt_loop: | ||
| 2800 | mov ecx, DWORD PTR [esi] | ||
| 2801 | mov edx, DWORD PTR 4[esi] | ||
| 2802 | xor eax, ecx | ||
| 2803 | xor ebx, edx | ||
| 2804 | mov DWORD PTR 12[esp],eax | ||
| 2805 | mov DWORD PTR 16[esp],ebx | ||
| 2806 | call _des_encrypt | ||
| 2807 | mov eax, DWORD PTR 12[esp] | ||
| 2808 | mov ebx, DWORD PTR 16[esp] | ||
| 2809 | mov DWORD PTR [edi],eax | ||
| 2810 | mov DWORD PTR 4[edi],ebx | ||
| 2811 | add esi, 8 | ||
| 2812 | add edi, 8 | ||
| 2813 | sub ebp, 8 | ||
| 2814 | jnz L006encrypt_loop | ||
| 2815 | $L005encrypt_finish: | ||
| 2816 | mov ebp, DWORD PTR 56[esp] | ||
| 2817 | and ebp, 7 | ||
| 2818 | jz $L007finish | ||
| 2819 | xor ecx, ecx | ||
| 2820 | xor edx, edx | ||
| 2821 | mov ebp, DWORD PTR $L008cbc_enc_jmp_table[ebp*4] | ||
| 2822 | jmp ebp | ||
| 2823 | L009ej7: | ||
| 2824 | mov dh, BYTE PTR 6[esi] | ||
| 2825 | shl edx, 8 | ||
| 2826 | L010ej6: | ||
| 2827 | mov dh, BYTE PTR 5[esi] | ||
| 2828 | L011ej5: | ||
| 2829 | mov dl, BYTE PTR 4[esi] | ||
| 2830 | L012ej4: | ||
| 2831 | mov ecx, DWORD PTR [esi] | ||
| 2832 | jmp $L013ejend | ||
| 2833 | L014ej3: | ||
| 2834 | mov ch, BYTE PTR 2[esi] | ||
| 2835 | shl ecx, 8 | ||
| 2836 | L015ej2: | ||
| 2837 | mov ch, BYTE PTR 1[esi] | ||
| 2838 | L016ej1: | ||
| 2839 | mov cl, BYTE PTR [esi] | ||
| 2840 | $L013ejend: | ||
| 2841 | xor eax, ecx | ||
| 2842 | xor ebx, edx | ||
| 2843 | mov DWORD PTR 12[esp],eax | ||
| 2844 | mov DWORD PTR 16[esp],ebx | ||
| 2845 | call _des_encrypt | ||
| 2846 | mov eax, DWORD PTR 12[esp] | ||
| 2847 | mov ebx, DWORD PTR 16[esp] | ||
| 2848 | mov DWORD PTR [edi],eax | ||
| 2849 | mov DWORD PTR 4[edi],ebx | ||
| 2850 | jmp $L007finish | ||
| 2851 | $L004decrypt: | ||
| 2852 | and ebp, 4294967288 | ||
| 2853 | mov eax, DWORD PTR 20[esp] | ||
| 2854 | mov ebx, DWORD PTR 24[esp] | ||
| 2855 | jz $L017decrypt_finish | ||
| 2856 | L018decrypt_loop: | ||
| 2857 | mov eax, DWORD PTR [esi] | ||
| 2858 | mov ebx, DWORD PTR 4[esi] | ||
| 2859 | mov DWORD PTR 12[esp],eax | ||
| 2860 | mov DWORD PTR 16[esp],ebx | ||
| 2861 | call _des_encrypt | ||
| 2862 | mov eax, DWORD PTR 12[esp] | ||
| 2863 | mov ebx, DWORD PTR 16[esp] | ||
| 2864 | mov ecx, DWORD PTR 20[esp] | ||
| 2865 | mov edx, DWORD PTR 24[esp] | ||
| 2866 | xor ecx, eax | ||
| 2867 | xor edx, ebx | ||
| 2868 | mov eax, DWORD PTR [esi] | ||
| 2869 | mov ebx, DWORD PTR 4[esi] | ||
| 2870 | mov DWORD PTR [edi],ecx | ||
| 2871 | mov DWORD PTR 4[edi],edx | ||
| 2872 | mov DWORD PTR 20[esp],eax | ||
| 2873 | mov DWORD PTR 24[esp],ebx | ||
| 2874 | add esi, 8 | ||
| 2875 | add edi, 8 | ||
| 2876 | sub ebp, 8 | ||
| 2877 | jnz L018decrypt_loop | ||
| 2878 | $L017decrypt_finish: | ||
| 2879 | mov ebp, DWORD PTR 56[esp] | ||
| 2880 | and ebp, 7 | ||
| 2881 | jz $L007finish | ||
| 2882 | mov eax, DWORD PTR [esi] | ||
| 2883 | mov ebx, DWORD PTR 4[esi] | ||
| 2884 | mov DWORD PTR 12[esp],eax | ||
| 2885 | mov DWORD PTR 16[esp],ebx | ||
| 2886 | call _des_encrypt | ||
| 2887 | mov eax, DWORD PTR 12[esp] | ||
| 2888 | mov ebx, DWORD PTR 16[esp] | ||
| 2889 | mov ecx, DWORD PTR 20[esp] | ||
| 2890 | mov edx, DWORD PTR 24[esp] | ||
| 2891 | xor ecx, eax | ||
| 2892 | xor edx, ebx | ||
| 2893 | mov eax, DWORD PTR [esi] | ||
| 2894 | mov ebx, DWORD PTR 4[esi] | ||
| 2895 | L019dj7: | ||
| 2896 | ror edx, 16 | ||
| 2897 | mov BYTE PTR 6[edi],dl | ||
| 2898 | shr edx, 16 | ||
| 2899 | L020dj6: | ||
| 2900 | mov BYTE PTR 5[edi],dh | ||
| 2901 | L021dj5: | ||
| 2902 | mov BYTE PTR 4[edi],dl | ||
| 2903 | L022dj4: | ||
| 2904 | mov DWORD PTR [edi],ecx | ||
| 2905 | jmp $L023djend | ||
| 2906 | L024dj3: | ||
| 2907 | ror ecx, 16 | ||
| 2908 | mov BYTE PTR 2[edi],cl | ||
| 2909 | shl ecx, 16 | ||
| 2910 | L025dj2: | ||
| 2911 | mov BYTE PTR 1[esi],ch | ||
| 2912 | L026dj1: | ||
| 2913 | mov BYTE PTR [esi], cl | ||
| 2914 | $L023djend: | ||
| 2915 | jmp $L007finish | ||
| 2916 | $L007finish: | ||
| 2917 | mov ecx, DWORD PTR 64[esp] | ||
| 2918 | add esp, 28 | ||
| 2919 | mov DWORD PTR [ecx],eax | ||
| 2920 | mov DWORD PTR 4[ecx],ebx | ||
| 2921 | pop edi | ||
| 2922 | pop esi | ||
| 2923 | pop ebx | ||
| 2924 | pop ebp | ||
| 2925 | ret | ||
| 2926 | $L008cbc_enc_jmp_table: | ||
| 2927 | DD 0 | ||
| 2928 | DD L016ej1 | ||
| 2929 | DD L015ej2 | ||
| 2930 | DD L014ej3 | ||
| 2931 | DD L012ej4 | ||
| 2932 | DD L011ej5 | ||
| 2933 | DD L010ej6 | ||
| 2934 | DD L009ej7 | ||
| 2935 | L027cbc_dec_jmp_table: | ||
| 2936 | DD 0 | ||
| 2937 | DD L026dj1 | ||
| 2938 | DD L025dj2 | ||
| 2939 | DD L024dj3 | ||
| 2940 | DD L022dj4 | ||
| 2941 | DD L021dj5 | ||
| 2942 | DD L020dj6 | ||
| 2943 | DD L019dj7 | ||
| 2944 | _des_ncbc_encrypt ENDP | ||
| 2945 | _TEXT ENDS | ||
| 2946 | _TEXT SEGMENT | ||
| 2947 | PUBLIC _des_ede3_cbc_encrypt | ||
| 2948 | |||
| 2949 | _des_ede3_cbc_encrypt PROC NEAR | ||
| 2950 | ; | ||
| 2951 | push ebp | ||
| 2952 | push ebx | ||
| 2953 | push esi | ||
| 2954 | push edi | ||
| 2955 | mov ebp, DWORD PTR 28[esp] | ||
| 2956 | ; getting iv ptr from parameter 6 | ||
| 2957 | mov ebx, DWORD PTR 44[esp] | ||
| 2958 | mov esi, DWORD PTR [ebx] | ||
| 2959 | mov edi, DWORD PTR 4[ebx] | ||
| 2960 | push edi | ||
| 2961 | push esi | ||
| 2962 | push edi | ||
| 2963 | push esi | ||
| 2964 | mov ebx, esp | ||
| 2965 | mov esi, DWORD PTR 36[esp] | ||
| 2966 | mov edi, DWORD PTR 40[esp] | ||
| 2967 | ; getting encrypt flag from parameter 7 | ||
| 2968 | mov ecx, DWORD PTR 64[esp] | ||
| 2969 | ; get and push parameter 5 | ||
| 2970 | mov eax, DWORD PTR 56[esp] | ||
| 2971 | push eax | ||
| 2972 | ; get and push parameter 4 | ||
| 2973 | mov eax, DWORD PTR 56[esp] | ||
| 2974 | push eax | ||
| 2975 | ; get and push parameter 3 | ||
| 2976 | mov eax, DWORD PTR 56[esp] | ||
| 2977 | push eax | ||
| 2978 | push ebx | ||
| 2979 | cmp ecx, 0 | ||
| 2980 | jz $L028decrypt | ||
| 2981 | and ebp, 4294967288 | ||
| 2982 | mov eax, DWORD PTR 16[esp] | ||
| 2983 | mov ebx, DWORD PTR 20[esp] | ||
| 2984 | jz $L029encrypt_finish | ||
| 2985 | L030encrypt_loop: | ||
| 2986 | mov ecx, DWORD PTR [esi] | ||
| 2987 | mov edx, DWORD PTR 4[esi] | ||
| 2988 | xor eax, ecx | ||
| 2989 | xor ebx, edx | ||
| 2990 | mov DWORD PTR 16[esp],eax | ||
| 2991 | mov DWORD PTR 20[esp],ebx | ||
| 2992 | call _des_encrypt3 | ||
| 2993 | mov eax, DWORD PTR 16[esp] | ||
| 2994 | mov ebx, DWORD PTR 20[esp] | ||
| 2995 | mov DWORD PTR [edi],eax | ||
| 2996 | mov DWORD PTR 4[edi],ebx | ||
| 2997 | add esi, 8 | ||
| 2998 | add edi, 8 | ||
| 2999 | sub ebp, 8 | ||
| 3000 | jnz L030encrypt_loop | ||
| 3001 | $L029encrypt_finish: | ||
| 3002 | mov ebp, DWORD PTR 60[esp] | ||
| 3003 | and ebp, 7 | ||
| 3004 | jz $L031finish | ||
| 3005 | xor ecx, ecx | ||
| 3006 | xor edx, edx | ||
| 3007 | mov ebp, DWORD PTR $L032cbc_enc_jmp_table[ebp*4] | ||
| 3008 | jmp ebp | ||
| 3009 | L033ej7: | ||
| 3010 | mov dh, BYTE PTR 6[esi] | ||
| 3011 | shl edx, 8 | ||
| 3012 | L034ej6: | ||
| 3013 | mov dh, BYTE PTR 5[esi] | ||
| 3014 | L035ej5: | ||
| 3015 | mov dl, BYTE PTR 4[esi] | ||
| 3016 | L036ej4: | ||
| 3017 | mov ecx, DWORD PTR [esi] | ||
| 3018 | jmp $L037ejend | ||
| 3019 | L038ej3: | ||
| 3020 | mov ch, BYTE PTR 2[esi] | ||
| 3021 | shl ecx, 8 | ||
| 3022 | L039ej2: | ||
| 3023 | mov ch, BYTE PTR 1[esi] | ||
| 3024 | L040ej1: | ||
| 3025 | mov cl, BYTE PTR [esi] | ||
| 3026 | $L037ejend: | ||
| 3027 | xor eax, ecx | ||
| 3028 | xor ebx, edx | ||
| 3029 | mov DWORD PTR 16[esp],eax | ||
| 3030 | mov DWORD PTR 20[esp],ebx | ||
| 3031 | call _des_encrypt3 | ||
| 3032 | mov eax, DWORD PTR 16[esp] | ||
| 3033 | mov ebx, DWORD PTR 20[esp] | ||
| 3034 | mov DWORD PTR [edi],eax | ||
| 3035 | mov DWORD PTR 4[edi],ebx | ||
| 3036 | jmp $L031finish | ||
| 3037 | $L028decrypt: | ||
| 3038 | and ebp, 4294967288 | ||
| 3039 | mov eax, DWORD PTR 24[esp] | ||
| 3040 | mov ebx, DWORD PTR 28[esp] | ||
| 3041 | jz $L041decrypt_finish | ||
| 3042 | L042decrypt_loop: | ||
| 3043 | mov eax, DWORD PTR [esi] | ||
| 3044 | mov ebx, DWORD PTR 4[esi] | ||
| 3045 | mov DWORD PTR 16[esp],eax | ||
| 3046 | mov DWORD PTR 20[esp],ebx | ||
| 3047 | call _des_decrypt3 | ||
| 3048 | mov eax, DWORD PTR 16[esp] | ||
| 3049 | mov ebx, DWORD PTR 20[esp] | ||
| 3050 | mov ecx, DWORD PTR 24[esp] | ||
| 3051 | mov edx, DWORD PTR 28[esp] | ||
| 3052 | xor ecx, eax | ||
| 3053 | xor edx, ebx | ||
| 3054 | mov eax, DWORD PTR [esi] | ||
| 3055 | mov ebx, DWORD PTR 4[esi] | ||
| 3056 | mov DWORD PTR [edi],ecx | ||
| 3057 | mov DWORD PTR 4[edi],edx | ||
| 3058 | mov DWORD PTR 24[esp],eax | ||
| 3059 | mov DWORD PTR 28[esp],ebx | ||
| 3060 | add esi, 8 | ||
| 3061 | add edi, 8 | ||
| 3062 | sub ebp, 8 | ||
| 3063 | jnz L042decrypt_loop | ||
| 3064 | $L041decrypt_finish: | ||
| 3065 | mov ebp, DWORD PTR 60[esp] | ||
| 3066 | and ebp, 7 | ||
| 3067 | jz $L031finish | ||
| 3068 | mov eax, DWORD PTR [esi] | ||
| 3069 | mov ebx, DWORD PTR 4[esi] | ||
| 3070 | mov DWORD PTR 16[esp],eax | ||
| 3071 | mov DWORD PTR 20[esp],ebx | ||
| 3072 | call _des_decrypt3 | ||
| 3073 | mov eax, DWORD PTR 16[esp] | ||
| 3074 | mov ebx, DWORD PTR 20[esp] | ||
| 3075 | mov ecx, DWORD PTR 24[esp] | ||
| 3076 | mov edx, DWORD PTR 28[esp] | ||
| 3077 | xor ecx, eax | ||
| 3078 | xor edx, ebx | ||
| 3079 | mov eax, DWORD PTR [esi] | ||
| 3080 | mov ebx, DWORD PTR 4[esi] | ||
| 3081 | L043dj7: | ||
| 3082 | ror edx, 16 | ||
| 3083 | mov BYTE PTR 6[edi],dl | ||
| 3084 | shr edx, 16 | ||
| 3085 | L044dj6: | ||
| 3086 | mov BYTE PTR 5[edi],dh | ||
| 3087 | L045dj5: | ||
| 3088 | mov BYTE PTR 4[edi],dl | ||
| 3089 | L046dj4: | ||
| 3090 | mov DWORD PTR [edi],ecx | ||
| 3091 | jmp $L047djend | ||
| 3092 | L048dj3: | ||
| 3093 | ror ecx, 16 | ||
| 3094 | mov BYTE PTR 2[edi],cl | ||
| 3095 | shl ecx, 16 | ||
| 3096 | L049dj2: | ||
| 3097 | mov BYTE PTR 1[esi],ch | ||
| 3098 | L050dj1: | ||
| 3099 | mov BYTE PTR [esi], cl | ||
| 3100 | $L047djend: | ||
| 3101 | jmp $L031finish | ||
| 3102 | $L031finish: | ||
| 3103 | mov ecx, DWORD PTR 76[esp] | ||
| 3104 | add esp, 32 | ||
| 3105 | mov DWORD PTR [ecx],eax | ||
| 3106 | mov DWORD PTR 4[ecx],ebx | ||
| 3107 | pop edi | ||
| 3108 | pop esi | ||
| 3109 | pop ebx | ||
| 3110 | pop ebp | ||
| 3111 | ret | ||
| 3112 | $L032cbc_enc_jmp_table: | ||
| 3113 | DD 0 | ||
| 3114 | DD L040ej1 | ||
| 3115 | DD L039ej2 | ||
| 3116 | DD L038ej3 | ||
| 3117 | DD L036ej4 | ||
| 3118 | DD L035ej5 | ||
| 3119 | DD L034ej6 | ||
| 3120 | DD L033ej7 | ||
| 3121 | L051cbc_dec_jmp_table: | ||
| 3122 | DD 0 | ||
| 3123 | DD L050dj1 | ||
| 3124 | DD L049dj2 | ||
| 3125 | DD L048dj3 | ||
| 3126 | DD L046dj4 | ||
| 3127 | DD L045dj5 | ||
| 3128 | DD L044dj6 | ||
| 3129 | DD L043dj7 | ||
| 3130 | _des_ede3_cbc_encrypt ENDP | ||
| 3131 | _TEXT ENDS | ||
| 3132 | END | ||
diff --git a/src/lib/libssl/src/crypto/des/asm/dx86unix.cpp b/src/lib/libssl/src/crypto/des/asm/dx86unix.cpp new file mode 100644 index 0000000000..6fca9afa16 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/asm/dx86unix.cpp | |||
| @@ -0,0 +1,3202 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define des_SPtrans _des_SPtrans | ||
| 13 | #define des_encrypt _des_encrypt | ||
| 14 | #define des_encrypt2 _des_encrypt2 | ||
| 15 | #define des_encrypt3 _des_encrypt3 | ||
| 16 | #define des_decrypt3 _des_decrypt3 | ||
| 17 | #define des_ncbc_encrypt _des_ncbc_encrypt | ||
| 18 | #define des_ede3_cbc_encrypt _des_ede3_cbc_encrypt | ||
| 19 | |||
| 20 | #endif | ||
| 21 | |||
| 22 | #ifdef OUT | ||
| 23 | #define OK 1 | ||
| 24 | #define ALIGN 4 | ||
| 25 | #endif | ||
| 26 | |||
| 27 | #ifdef BSDI | ||
| 28 | #define OK 1 | ||
| 29 | #define ALIGN 4 | ||
| 30 | #undef SIZE | ||
| 31 | #undef TYPE | ||
| 32 | #define SIZE(a,b) | ||
| 33 | #define TYPE(a,b) | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #if defined(ELF) || defined(SOL) | ||
| 37 | #define OK 1 | ||
| 38 | #define ALIGN 16 | ||
| 39 | #endif | ||
| 40 | |||
| 41 | #ifndef OK | ||
| 42 | You need to define one of | ||
| 43 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 44 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 45 | SOL - solaris systems, which are elf with strange comment lines | ||
| 46 | BSDI - a.out with a very primative version of as. | ||
| 47 | #endif | ||
| 48 | |||
| 49 | /* Let the Assembler begin :-) */ | ||
| 50 | /* Don't even think of reading this code */ | ||
| 51 | /* It was automatically generated by des-586.pl */ | ||
| 52 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 53 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 54 | /* eric <eay@cryptsoft.com> */ | ||
| 55 | |||
| 56 | .file "des-586.s" | ||
| 57 | .version "01.01" | ||
| 58 | gcc2_compiled.: | ||
| 59 | .text | ||
| 60 | .align ALIGN | ||
| 61 | .globl des_encrypt | ||
| 62 | TYPE(des_encrypt,@function) | ||
| 63 | des_encrypt: | ||
| 64 | pushl %esi | ||
| 65 | pushl %edi | ||
| 66 | |||
| 67 | /* Load the 2 words */ | ||
| 68 | movl 12(%esp), %esi | ||
| 69 | xorl %ecx, %ecx | ||
| 70 | pushl %ebx | ||
| 71 | pushl %ebp | ||
| 72 | movl (%esi), %eax | ||
| 73 | movl 28(%esp), %ebx | ||
| 74 | movl 4(%esi), %edi | ||
| 75 | |||
| 76 | /* IP */ | ||
| 77 | roll $4, %eax | ||
| 78 | movl %eax, %esi | ||
| 79 | xorl %edi, %eax | ||
| 80 | andl $0xf0f0f0f0, %eax | ||
| 81 | xorl %eax, %esi | ||
| 82 | xorl %eax, %edi | ||
| 83 | |||
| 84 | roll $20, %edi | ||
| 85 | movl %edi, %eax | ||
| 86 | xorl %esi, %edi | ||
| 87 | andl $0xfff0000f, %edi | ||
| 88 | xorl %edi, %eax | ||
| 89 | xorl %edi, %esi | ||
| 90 | |||
| 91 | roll $14, %eax | ||
| 92 | movl %eax, %edi | ||
| 93 | xorl %esi, %eax | ||
| 94 | andl $0x33333333, %eax | ||
| 95 | xorl %eax, %edi | ||
| 96 | xorl %eax, %esi | ||
| 97 | |||
| 98 | roll $22, %esi | ||
| 99 | movl %esi, %eax | ||
| 100 | xorl %edi, %esi | ||
| 101 | andl $0x03fc03fc, %esi | ||
| 102 | xorl %esi, %eax | ||
| 103 | xorl %esi, %edi | ||
| 104 | |||
| 105 | roll $9, %eax | ||
| 106 | movl %eax, %esi | ||
| 107 | xorl %edi, %eax | ||
| 108 | andl $0xaaaaaaaa, %eax | ||
| 109 | xorl %eax, %esi | ||
| 110 | xorl %eax, %edi | ||
| 111 | |||
| 112 | .byte 209 | ||
| 113 | .byte 199 /* roll $1 %edi */ | ||
| 114 | movl 24(%esp), %ebp | ||
| 115 | cmpl $0, %ebx | ||
| 116 | je .L000start_decrypt | ||
| 117 | |||
| 118 | /* Round 0 */ | ||
| 119 | movl (%ebp), %eax | ||
| 120 | xorl %ebx, %ebx | ||
| 121 | movl 4(%ebp), %edx | ||
| 122 | xorl %esi, %eax | ||
| 123 | xorl %esi, %edx | ||
| 124 | andl $0xfcfcfcfc, %eax | ||
| 125 | andl $0xcfcfcfcf, %edx | ||
| 126 | movb %al, %bl | ||
| 127 | movb %ah, %cl | ||
| 128 | rorl $4, %edx | ||
| 129 | movl des_SPtrans(%ebx),%ebp | ||
| 130 | movb %dl, %bl | ||
| 131 | xorl %ebp, %edi | ||
| 132 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 133 | xorl %ebp, %edi | ||
| 134 | movb %dh, %cl | ||
| 135 | shrl $16, %eax | ||
| 136 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 137 | xorl %ebp, %edi | ||
| 138 | movb %ah, %bl | ||
| 139 | shrl $16, %edx | ||
| 140 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 141 | xorl %ebp, %edi | ||
| 142 | movl 24(%esp), %ebp | ||
| 143 | movb %dh, %cl | ||
| 144 | andl $0xff, %eax | ||
| 145 | andl $0xff, %edx | ||
| 146 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 147 | xorl %ebx, %edi | ||
| 148 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 149 | xorl %ebx, %edi | ||
| 150 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 151 | xorl %ebx, %edi | ||
| 152 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 153 | xorl %ebx, %edi | ||
| 154 | |||
| 155 | /* Round 1 */ | ||
| 156 | movl 8(%ebp), %eax | ||
| 157 | xorl %ebx, %ebx | ||
| 158 | movl 12(%ebp), %edx | ||
| 159 | xorl %edi, %eax | ||
| 160 | xorl %edi, %edx | ||
| 161 | andl $0xfcfcfcfc, %eax | ||
| 162 | andl $0xcfcfcfcf, %edx | ||
| 163 | movb %al, %bl | ||
| 164 | movb %ah, %cl | ||
| 165 | rorl $4, %edx | ||
| 166 | movl des_SPtrans(%ebx),%ebp | ||
| 167 | movb %dl, %bl | ||
| 168 | xorl %ebp, %esi | ||
| 169 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 170 | xorl %ebp, %esi | ||
| 171 | movb %dh, %cl | ||
| 172 | shrl $16, %eax | ||
| 173 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 174 | xorl %ebp, %esi | ||
| 175 | movb %ah, %bl | ||
| 176 | shrl $16, %edx | ||
| 177 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 178 | xorl %ebp, %esi | ||
| 179 | movl 24(%esp), %ebp | ||
| 180 | movb %dh, %cl | ||
| 181 | andl $0xff, %eax | ||
| 182 | andl $0xff, %edx | ||
| 183 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 184 | xorl %ebx, %esi | ||
| 185 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 186 | xorl %ebx, %esi | ||
| 187 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 188 | xorl %ebx, %esi | ||
| 189 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 190 | xorl %ebx, %esi | ||
| 191 | |||
| 192 | /* Round 2 */ | ||
| 193 | movl 16(%ebp), %eax | ||
| 194 | xorl %ebx, %ebx | ||
| 195 | movl 20(%ebp), %edx | ||
| 196 | xorl %esi, %eax | ||
| 197 | xorl %esi, %edx | ||
| 198 | andl $0xfcfcfcfc, %eax | ||
| 199 | andl $0xcfcfcfcf, %edx | ||
| 200 | movb %al, %bl | ||
| 201 | movb %ah, %cl | ||
| 202 | rorl $4, %edx | ||
| 203 | movl des_SPtrans(%ebx),%ebp | ||
| 204 | movb %dl, %bl | ||
| 205 | xorl %ebp, %edi | ||
| 206 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 207 | xorl %ebp, %edi | ||
| 208 | movb %dh, %cl | ||
| 209 | shrl $16, %eax | ||
| 210 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 211 | xorl %ebp, %edi | ||
| 212 | movb %ah, %bl | ||
| 213 | shrl $16, %edx | ||
| 214 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 215 | xorl %ebp, %edi | ||
| 216 | movl 24(%esp), %ebp | ||
| 217 | movb %dh, %cl | ||
| 218 | andl $0xff, %eax | ||
| 219 | andl $0xff, %edx | ||
| 220 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 221 | xorl %ebx, %edi | ||
| 222 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 223 | xorl %ebx, %edi | ||
| 224 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 225 | xorl %ebx, %edi | ||
| 226 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 227 | xorl %ebx, %edi | ||
| 228 | |||
| 229 | /* Round 3 */ | ||
| 230 | movl 24(%ebp), %eax | ||
| 231 | xorl %ebx, %ebx | ||
| 232 | movl 28(%ebp), %edx | ||
| 233 | xorl %edi, %eax | ||
| 234 | xorl %edi, %edx | ||
| 235 | andl $0xfcfcfcfc, %eax | ||
| 236 | andl $0xcfcfcfcf, %edx | ||
| 237 | movb %al, %bl | ||
| 238 | movb %ah, %cl | ||
| 239 | rorl $4, %edx | ||
| 240 | movl des_SPtrans(%ebx),%ebp | ||
| 241 | movb %dl, %bl | ||
| 242 | xorl %ebp, %esi | ||
| 243 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 244 | xorl %ebp, %esi | ||
| 245 | movb %dh, %cl | ||
| 246 | shrl $16, %eax | ||
| 247 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 248 | xorl %ebp, %esi | ||
| 249 | movb %ah, %bl | ||
| 250 | shrl $16, %edx | ||
| 251 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 252 | xorl %ebp, %esi | ||
| 253 | movl 24(%esp), %ebp | ||
| 254 | movb %dh, %cl | ||
| 255 | andl $0xff, %eax | ||
| 256 | andl $0xff, %edx | ||
| 257 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 258 | xorl %ebx, %esi | ||
| 259 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 260 | xorl %ebx, %esi | ||
| 261 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 262 | xorl %ebx, %esi | ||
| 263 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 264 | xorl %ebx, %esi | ||
| 265 | |||
| 266 | /* Round 4 */ | ||
| 267 | movl 32(%ebp), %eax | ||
| 268 | xorl %ebx, %ebx | ||
| 269 | movl 36(%ebp), %edx | ||
| 270 | xorl %esi, %eax | ||
| 271 | xorl %esi, %edx | ||
| 272 | andl $0xfcfcfcfc, %eax | ||
| 273 | andl $0xcfcfcfcf, %edx | ||
| 274 | movb %al, %bl | ||
| 275 | movb %ah, %cl | ||
| 276 | rorl $4, %edx | ||
| 277 | movl des_SPtrans(%ebx),%ebp | ||
| 278 | movb %dl, %bl | ||
| 279 | xorl %ebp, %edi | ||
| 280 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 281 | xorl %ebp, %edi | ||
| 282 | movb %dh, %cl | ||
| 283 | shrl $16, %eax | ||
| 284 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 285 | xorl %ebp, %edi | ||
| 286 | movb %ah, %bl | ||
| 287 | shrl $16, %edx | ||
| 288 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 289 | xorl %ebp, %edi | ||
| 290 | movl 24(%esp), %ebp | ||
| 291 | movb %dh, %cl | ||
| 292 | andl $0xff, %eax | ||
| 293 | andl $0xff, %edx | ||
| 294 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 295 | xorl %ebx, %edi | ||
| 296 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 297 | xorl %ebx, %edi | ||
| 298 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 299 | xorl %ebx, %edi | ||
| 300 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 301 | xorl %ebx, %edi | ||
| 302 | |||
| 303 | /* Round 5 */ | ||
| 304 | movl 40(%ebp), %eax | ||
| 305 | xorl %ebx, %ebx | ||
| 306 | movl 44(%ebp), %edx | ||
| 307 | xorl %edi, %eax | ||
| 308 | xorl %edi, %edx | ||
| 309 | andl $0xfcfcfcfc, %eax | ||
| 310 | andl $0xcfcfcfcf, %edx | ||
| 311 | movb %al, %bl | ||
| 312 | movb %ah, %cl | ||
| 313 | rorl $4, %edx | ||
| 314 | movl des_SPtrans(%ebx),%ebp | ||
| 315 | movb %dl, %bl | ||
| 316 | xorl %ebp, %esi | ||
| 317 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 318 | xorl %ebp, %esi | ||
| 319 | movb %dh, %cl | ||
| 320 | shrl $16, %eax | ||
| 321 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 322 | xorl %ebp, %esi | ||
| 323 | movb %ah, %bl | ||
| 324 | shrl $16, %edx | ||
| 325 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 326 | xorl %ebp, %esi | ||
| 327 | movl 24(%esp), %ebp | ||
| 328 | movb %dh, %cl | ||
| 329 | andl $0xff, %eax | ||
| 330 | andl $0xff, %edx | ||
| 331 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 332 | xorl %ebx, %esi | ||
| 333 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 334 | xorl %ebx, %esi | ||
| 335 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 336 | xorl %ebx, %esi | ||
| 337 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 338 | xorl %ebx, %esi | ||
| 339 | |||
| 340 | /* Round 6 */ | ||
| 341 | movl 48(%ebp), %eax | ||
| 342 | xorl %ebx, %ebx | ||
| 343 | movl 52(%ebp), %edx | ||
| 344 | xorl %esi, %eax | ||
| 345 | xorl %esi, %edx | ||
| 346 | andl $0xfcfcfcfc, %eax | ||
| 347 | andl $0xcfcfcfcf, %edx | ||
| 348 | movb %al, %bl | ||
| 349 | movb %ah, %cl | ||
| 350 | rorl $4, %edx | ||
| 351 | movl des_SPtrans(%ebx),%ebp | ||
| 352 | movb %dl, %bl | ||
| 353 | xorl %ebp, %edi | ||
| 354 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 355 | xorl %ebp, %edi | ||
| 356 | movb %dh, %cl | ||
| 357 | shrl $16, %eax | ||
| 358 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 359 | xorl %ebp, %edi | ||
| 360 | movb %ah, %bl | ||
| 361 | shrl $16, %edx | ||
| 362 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 363 | xorl %ebp, %edi | ||
| 364 | movl 24(%esp), %ebp | ||
| 365 | movb %dh, %cl | ||
| 366 | andl $0xff, %eax | ||
| 367 | andl $0xff, %edx | ||
| 368 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 369 | xorl %ebx, %edi | ||
| 370 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 371 | xorl %ebx, %edi | ||
| 372 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 373 | xorl %ebx, %edi | ||
| 374 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 375 | xorl %ebx, %edi | ||
| 376 | |||
| 377 | /* Round 7 */ | ||
| 378 | movl 56(%ebp), %eax | ||
| 379 | xorl %ebx, %ebx | ||
| 380 | movl 60(%ebp), %edx | ||
| 381 | xorl %edi, %eax | ||
| 382 | xorl %edi, %edx | ||
| 383 | andl $0xfcfcfcfc, %eax | ||
| 384 | andl $0xcfcfcfcf, %edx | ||
| 385 | movb %al, %bl | ||
| 386 | movb %ah, %cl | ||
| 387 | rorl $4, %edx | ||
| 388 | movl des_SPtrans(%ebx),%ebp | ||
| 389 | movb %dl, %bl | ||
| 390 | xorl %ebp, %esi | ||
| 391 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 392 | xorl %ebp, %esi | ||
| 393 | movb %dh, %cl | ||
| 394 | shrl $16, %eax | ||
| 395 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 396 | xorl %ebp, %esi | ||
| 397 | movb %ah, %bl | ||
| 398 | shrl $16, %edx | ||
| 399 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 400 | xorl %ebp, %esi | ||
| 401 | movl 24(%esp), %ebp | ||
| 402 | movb %dh, %cl | ||
| 403 | andl $0xff, %eax | ||
| 404 | andl $0xff, %edx | ||
| 405 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 406 | xorl %ebx, %esi | ||
| 407 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 408 | xorl %ebx, %esi | ||
| 409 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 410 | xorl %ebx, %esi | ||
| 411 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 412 | xorl %ebx, %esi | ||
| 413 | |||
| 414 | /* Round 8 */ | ||
| 415 | movl 64(%ebp), %eax | ||
| 416 | xorl %ebx, %ebx | ||
| 417 | movl 68(%ebp), %edx | ||
| 418 | xorl %esi, %eax | ||
| 419 | xorl %esi, %edx | ||
| 420 | andl $0xfcfcfcfc, %eax | ||
| 421 | andl $0xcfcfcfcf, %edx | ||
| 422 | movb %al, %bl | ||
| 423 | movb %ah, %cl | ||
| 424 | rorl $4, %edx | ||
| 425 | movl des_SPtrans(%ebx),%ebp | ||
| 426 | movb %dl, %bl | ||
| 427 | xorl %ebp, %edi | ||
| 428 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 429 | xorl %ebp, %edi | ||
| 430 | movb %dh, %cl | ||
| 431 | shrl $16, %eax | ||
| 432 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 433 | xorl %ebp, %edi | ||
| 434 | movb %ah, %bl | ||
| 435 | shrl $16, %edx | ||
| 436 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 437 | xorl %ebp, %edi | ||
| 438 | movl 24(%esp), %ebp | ||
| 439 | movb %dh, %cl | ||
| 440 | andl $0xff, %eax | ||
| 441 | andl $0xff, %edx | ||
| 442 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 443 | xorl %ebx, %edi | ||
| 444 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 445 | xorl %ebx, %edi | ||
| 446 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 447 | xorl %ebx, %edi | ||
| 448 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 449 | xorl %ebx, %edi | ||
| 450 | |||
| 451 | /* Round 9 */ | ||
| 452 | movl 72(%ebp), %eax | ||
| 453 | xorl %ebx, %ebx | ||
| 454 | movl 76(%ebp), %edx | ||
| 455 | xorl %edi, %eax | ||
| 456 | xorl %edi, %edx | ||
| 457 | andl $0xfcfcfcfc, %eax | ||
| 458 | andl $0xcfcfcfcf, %edx | ||
| 459 | movb %al, %bl | ||
| 460 | movb %ah, %cl | ||
| 461 | rorl $4, %edx | ||
| 462 | movl des_SPtrans(%ebx),%ebp | ||
| 463 | movb %dl, %bl | ||
| 464 | xorl %ebp, %esi | ||
| 465 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 466 | xorl %ebp, %esi | ||
| 467 | movb %dh, %cl | ||
| 468 | shrl $16, %eax | ||
| 469 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 470 | xorl %ebp, %esi | ||
| 471 | movb %ah, %bl | ||
| 472 | shrl $16, %edx | ||
| 473 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 474 | xorl %ebp, %esi | ||
| 475 | movl 24(%esp), %ebp | ||
| 476 | movb %dh, %cl | ||
| 477 | andl $0xff, %eax | ||
| 478 | andl $0xff, %edx | ||
| 479 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 480 | xorl %ebx, %esi | ||
| 481 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 482 | xorl %ebx, %esi | ||
| 483 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 484 | xorl %ebx, %esi | ||
| 485 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 486 | xorl %ebx, %esi | ||
| 487 | |||
| 488 | /* Round 10 */ | ||
| 489 | movl 80(%ebp), %eax | ||
| 490 | xorl %ebx, %ebx | ||
| 491 | movl 84(%ebp), %edx | ||
| 492 | xorl %esi, %eax | ||
| 493 | xorl %esi, %edx | ||
| 494 | andl $0xfcfcfcfc, %eax | ||
| 495 | andl $0xcfcfcfcf, %edx | ||
| 496 | movb %al, %bl | ||
| 497 | movb %ah, %cl | ||
| 498 | rorl $4, %edx | ||
| 499 | movl des_SPtrans(%ebx),%ebp | ||
| 500 | movb %dl, %bl | ||
| 501 | xorl %ebp, %edi | ||
| 502 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 503 | xorl %ebp, %edi | ||
| 504 | movb %dh, %cl | ||
| 505 | shrl $16, %eax | ||
| 506 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 507 | xorl %ebp, %edi | ||
| 508 | movb %ah, %bl | ||
| 509 | shrl $16, %edx | ||
| 510 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 511 | xorl %ebp, %edi | ||
| 512 | movl 24(%esp), %ebp | ||
| 513 | movb %dh, %cl | ||
| 514 | andl $0xff, %eax | ||
| 515 | andl $0xff, %edx | ||
| 516 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 517 | xorl %ebx, %edi | ||
| 518 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 519 | xorl %ebx, %edi | ||
| 520 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 521 | xorl %ebx, %edi | ||
| 522 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 523 | xorl %ebx, %edi | ||
| 524 | |||
| 525 | /* Round 11 */ | ||
| 526 | movl 88(%ebp), %eax | ||
| 527 | xorl %ebx, %ebx | ||
| 528 | movl 92(%ebp), %edx | ||
| 529 | xorl %edi, %eax | ||
| 530 | xorl %edi, %edx | ||
| 531 | andl $0xfcfcfcfc, %eax | ||
| 532 | andl $0xcfcfcfcf, %edx | ||
| 533 | movb %al, %bl | ||
| 534 | movb %ah, %cl | ||
| 535 | rorl $4, %edx | ||
| 536 | movl des_SPtrans(%ebx),%ebp | ||
| 537 | movb %dl, %bl | ||
| 538 | xorl %ebp, %esi | ||
| 539 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 540 | xorl %ebp, %esi | ||
| 541 | movb %dh, %cl | ||
| 542 | shrl $16, %eax | ||
| 543 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 544 | xorl %ebp, %esi | ||
| 545 | movb %ah, %bl | ||
| 546 | shrl $16, %edx | ||
| 547 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 548 | xorl %ebp, %esi | ||
| 549 | movl 24(%esp), %ebp | ||
| 550 | movb %dh, %cl | ||
| 551 | andl $0xff, %eax | ||
| 552 | andl $0xff, %edx | ||
| 553 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 554 | xorl %ebx, %esi | ||
| 555 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 556 | xorl %ebx, %esi | ||
| 557 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 558 | xorl %ebx, %esi | ||
| 559 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 560 | xorl %ebx, %esi | ||
| 561 | |||
| 562 | /* Round 12 */ | ||
| 563 | movl 96(%ebp), %eax | ||
| 564 | xorl %ebx, %ebx | ||
| 565 | movl 100(%ebp), %edx | ||
| 566 | xorl %esi, %eax | ||
| 567 | xorl %esi, %edx | ||
| 568 | andl $0xfcfcfcfc, %eax | ||
| 569 | andl $0xcfcfcfcf, %edx | ||
| 570 | movb %al, %bl | ||
| 571 | movb %ah, %cl | ||
| 572 | rorl $4, %edx | ||
| 573 | movl des_SPtrans(%ebx),%ebp | ||
| 574 | movb %dl, %bl | ||
| 575 | xorl %ebp, %edi | ||
| 576 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 577 | xorl %ebp, %edi | ||
| 578 | movb %dh, %cl | ||
| 579 | shrl $16, %eax | ||
| 580 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 581 | xorl %ebp, %edi | ||
| 582 | movb %ah, %bl | ||
| 583 | shrl $16, %edx | ||
| 584 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 585 | xorl %ebp, %edi | ||
| 586 | movl 24(%esp), %ebp | ||
| 587 | movb %dh, %cl | ||
| 588 | andl $0xff, %eax | ||
| 589 | andl $0xff, %edx | ||
| 590 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 591 | xorl %ebx, %edi | ||
| 592 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 593 | xorl %ebx, %edi | ||
| 594 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 595 | xorl %ebx, %edi | ||
| 596 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 597 | xorl %ebx, %edi | ||
| 598 | |||
| 599 | /* Round 13 */ | ||
| 600 | movl 104(%ebp), %eax | ||
| 601 | xorl %ebx, %ebx | ||
| 602 | movl 108(%ebp), %edx | ||
| 603 | xorl %edi, %eax | ||
| 604 | xorl %edi, %edx | ||
| 605 | andl $0xfcfcfcfc, %eax | ||
| 606 | andl $0xcfcfcfcf, %edx | ||
| 607 | movb %al, %bl | ||
| 608 | movb %ah, %cl | ||
| 609 | rorl $4, %edx | ||
| 610 | movl des_SPtrans(%ebx),%ebp | ||
| 611 | movb %dl, %bl | ||
| 612 | xorl %ebp, %esi | ||
| 613 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 614 | xorl %ebp, %esi | ||
| 615 | movb %dh, %cl | ||
| 616 | shrl $16, %eax | ||
| 617 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 618 | xorl %ebp, %esi | ||
| 619 | movb %ah, %bl | ||
| 620 | shrl $16, %edx | ||
| 621 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 622 | xorl %ebp, %esi | ||
| 623 | movl 24(%esp), %ebp | ||
| 624 | movb %dh, %cl | ||
| 625 | andl $0xff, %eax | ||
| 626 | andl $0xff, %edx | ||
| 627 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 628 | xorl %ebx, %esi | ||
| 629 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 630 | xorl %ebx, %esi | ||
| 631 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 632 | xorl %ebx, %esi | ||
| 633 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 634 | xorl %ebx, %esi | ||
| 635 | |||
| 636 | /* Round 14 */ | ||
| 637 | movl 112(%ebp), %eax | ||
| 638 | xorl %ebx, %ebx | ||
| 639 | movl 116(%ebp), %edx | ||
| 640 | xorl %esi, %eax | ||
| 641 | xorl %esi, %edx | ||
| 642 | andl $0xfcfcfcfc, %eax | ||
| 643 | andl $0xcfcfcfcf, %edx | ||
| 644 | movb %al, %bl | ||
| 645 | movb %ah, %cl | ||
| 646 | rorl $4, %edx | ||
| 647 | movl des_SPtrans(%ebx),%ebp | ||
| 648 | movb %dl, %bl | ||
| 649 | xorl %ebp, %edi | ||
| 650 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 651 | xorl %ebp, %edi | ||
| 652 | movb %dh, %cl | ||
| 653 | shrl $16, %eax | ||
| 654 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 655 | xorl %ebp, %edi | ||
| 656 | movb %ah, %bl | ||
| 657 | shrl $16, %edx | ||
| 658 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 659 | xorl %ebp, %edi | ||
| 660 | movl 24(%esp), %ebp | ||
| 661 | movb %dh, %cl | ||
| 662 | andl $0xff, %eax | ||
| 663 | andl $0xff, %edx | ||
| 664 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 665 | xorl %ebx, %edi | ||
| 666 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 667 | xorl %ebx, %edi | ||
| 668 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 669 | xorl %ebx, %edi | ||
| 670 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 671 | xorl %ebx, %edi | ||
| 672 | |||
| 673 | /* Round 15 */ | ||
| 674 | movl 120(%ebp), %eax | ||
| 675 | xorl %ebx, %ebx | ||
| 676 | movl 124(%ebp), %edx | ||
| 677 | xorl %edi, %eax | ||
| 678 | xorl %edi, %edx | ||
| 679 | andl $0xfcfcfcfc, %eax | ||
| 680 | andl $0xcfcfcfcf, %edx | ||
| 681 | movb %al, %bl | ||
| 682 | movb %ah, %cl | ||
| 683 | rorl $4, %edx | ||
| 684 | movl des_SPtrans(%ebx),%ebp | ||
| 685 | movb %dl, %bl | ||
| 686 | xorl %ebp, %esi | ||
| 687 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 688 | xorl %ebp, %esi | ||
| 689 | movb %dh, %cl | ||
| 690 | shrl $16, %eax | ||
| 691 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 692 | xorl %ebp, %esi | ||
| 693 | movb %ah, %bl | ||
| 694 | shrl $16, %edx | ||
| 695 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 696 | xorl %ebp, %esi | ||
| 697 | movl 24(%esp), %ebp | ||
| 698 | movb %dh, %cl | ||
| 699 | andl $0xff, %eax | ||
| 700 | andl $0xff, %edx | ||
| 701 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 702 | xorl %ebx, %esi | ||
| 703 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 704 | xorl %ebx, %esi | ||
| 705 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 706 | xorl %ebx, %esi | ||
| 707 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 708 | xorl %ebx, %esi | ||
| 709 | jmp .L001end | ||
| 710 | .L000start_decrypt: | ||
| 711 | |||
| 712 | /* Round 15 */ | ||
| 713 | movl 120(%ebp), %eax | ||
| 714 | xorl %ebx, %ebx | ||
| 715 | movl 124(%ebp), %edx | ||
| 716 | xorl %esi, %eax | ||
| 717 | xorl %esi, %edx | ||
| 718 | andl $0xfcfcfcfc, %eax | ||
| 719 | andl $0xcfcfcfcf, %edx | ||
| 720 | movb %al, %bl | ||
| 721 | movb %ah, %cl | ||
| 722 | rorl $4, %edx | ||
| 723 | movl des_SPtrans(%ebx),%ebp | ||
| 724 | movb %dl, %bl | ||
| 725 | xorl %ebp, %edi | ||
| 726 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 727 | xorl %ebp, %edi | ||
| 728 | movb %dh, %cl | ||
| 729 | shrl $16, %eax | ||
| 730 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 731 | xorl %ebp, %edi | ||
| 732 | movb %ah, %bl | ||
| 733 | shrl $16, %edx | ||
| 734 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 735 | xorl %ebp, %edi | ||
| 736 | movl 24(%esp), %ebp | ||
| 737 | movb %dh, %cl | ||
| 738 | andl $0xff, %eax | ||
| 739 | andl $0xff, %edx | ||
| 740 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 741 | xorl %ebx, %edi | ||
| 742 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 743 | xorl %ebx, %edi | ||
| 744 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 745 | xorl %ebx, %edi | ||
| 746 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 747 | xorl %ebx, %edi | ||
| 748 | |||
| 749 | /* Round 14 */ | ||
| 750 | movl 112(%ebp), %eax | ||
| 751 | xorl %ebx, %ebx | ||
| 752 | movl 116(%ebp), %edx | ||
| 753 | xorl %edi, %eax | ||
| 754 | xorl %edi, %edx | ||
| 755 | andl $0xfcfcfcfc, %eax | ||
| 756 | andl $0xcfcfcfcf, %edx | ||
| 757 | movb %al, %bl | ||
| 758 | movb %ah, %cl | ||
| 759 | rorl $4, %edx | ||
| 760 | movl des_SPtrans(%ebx),%ebp | ||
| 761 | movb %dl, %bl | ||
| 762 | xorl %ebp, %esi | ||
| 763 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 764 | xorl %ebp, %esi | ||
| 765 | movb %dh, %cl | ||
| 766 | shrl $16, %eax | ||
| 767 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 768 | xorl %ebp, %esi | ||
| 769 | movb %ah, %bl | ||
| 770 | shrl $16, %edx | ||
| 771 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 772 | xorl %ebp, %esi | ||
| 773 | movl 24(%esp), %ebp | ||
| 774 | movb %dh, %cl | ||
| 775 | andl $0xff, %eax | ||
| 776 | andl $0xff, %edx | ||
| 777 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 778 | xorl %ebx, %esi | ||
| 779 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 780 | xorl %ebx, %esi | ||
| 781 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 782 | xorl %ebx, %esi | ||
| 783 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 784 | xorl %ebx, %esi | ||
| 785 | |||
| 786 | /* Round 13 */ | ||
| 787 | movl 104(%ebp), %eax | ||
| 788 | xorl %ebx, %ebx | ||
| 789 | movl 108(%ebp), %edx | ||
| 790 | xorl %esi, %eax | ||
| 791 | xorl %esi, %edx | ||
| 792 | andl $0xfcfcfcfc, %eax | ||
| 793 | andl $0xcfcfcfcf, %edx | ||
| 794 | movb %al, %bl | ||
| 795 | movb %ah, %cl | ||
| 796 | rorl $4, %edx | ||
| 797 | movl des_SPtrans(%ebx),%ebp | ||
| 798 | movb %dl, %bl | ||
| 799 | xorl %ebp, %edi | ||
| 800 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 801 | xorl %ebp, %edi | ||
| 802 | movb %dh, %cl | ||
| 803 | shrl $16, %eax | ||
| 804 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 805 | xorl %ebp, %edi | ||
| 806 | movb %ah, %bl | ||
| 807 | shrl $16, %edx | ||
| 808 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 809 | xorl %ebp, %edi | ||
| 810 | movl 24(%esp), %ebp | ||
| 811 | movb %dh, %cl | ||
| 812 | andl $0xff, %eax | ||
| 813 | andl $0xff, %edx | ||
| 814 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 815 | xorl %ebx, %edi | ||
| 816 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 817 | xorl %ebx, %edi | ||
| 818 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 819 | xorl %ebx, %edi | ||
| 820 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 821 | xorl %ebx, %edi | ||
| 822 | |||
| 823 | /* Round 12 */ | ||
| 824 | movl 96(%ebp), %eax | ||
| 825 | xorl %ebx, %ebx | ||
| 826 | movl 100(%ebp), %edx | ||
| 827 | xorl %edi, %eax | ||
| 828 | xorl %edi, %edx | ||
| 829 | andl $0xfcfcfcfc, %eax | ||
| 830 | andl $0xcfcfcfcf, %edx | ||
| 831 | movb %al, %bl | ||
| 832 | movb %ah, %cl | ||
| 833 | rorl $4, %edx | ||
| 834 | movl des_SPtrans(%ebx),%ebp | ||
| 835 | movb %dl, %bl | ||
| 836 | xorl %ebp, %esi | ||
| 837 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 838 | xorl %ebp, %esi | ||
| 839 | movb %dh, %cl | ||
| 840 | shrl $16, %eax | ||
| 841 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 842 | xorl %ebp, %esi | ||
| 843 | movb %ah, %bl | ||
| 844 | shrl $16, %edx | ||
| 845 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 846 | xorl %ebp, %esi | ||
| 847 | movl 24(%esp), %ebp | ||
| 848 | movb %dh, %cl | ||
| 849 | andl $0xff, %eax | ||
| 850 | andl $0xff, %edx | ||
| 851 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 852 | xorl %ebx, %esi | ||
| 853 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 854 | xorl %ebx, %esi | ||
| 855 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 856 | xorl %ebx, %esi | ||
| 857 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 858 | xorl %ebx, %esi | ||
| 859 | |||
| 860 | /* Round 11 */ | ||
| 861 | movl 88(%ebp), %eax | ||
| 862 | xorl %ebx, %ebx | ||
| 863 | movl 92(%ebp), %edx | ||
| 864 | xorl %esi, %eax | ||
| 865 | xorl %esi, %edx | ||
| 866 | andl $0xfcfcfcfc, %eax | ||
| 867 | andl $0xcfcfcfcf, %edx | ||
| 868 | movb %al, %bl | ||
| 869 | movb %ah, %cl | ||
| 870 | rorl $4, %edx | ||
| 871 | movl des_SPtrans(%ebx),%ebp | ||
| 872 | movb %dl, %bl | ||
| 873 | xorl %ebp, %edi | ||
| 874 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 875 | xorl %ebp, %edi | ||
| 876 | movb %dh, %cl | ||
| 877 | shrl $16, %eax | ||
| 878 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 879 | xorl %ebp, %edi | ||
| 880 | movb %ah, %bl | ||
| 881 | shrl $16, %edx | ||
| 882 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 883 | xorl %ebp, %edi | ||
| 884 | movl 24(%esp), %ebp | ||
| 885 | movb %dh, %cl | ||
| 886 | andl $0xff, %eax | ||
| 887 | andl $0xff, %edx | ||
| 888 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 889 | xorl %ebx, %edi | ||
| 890 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 891 | xorl %ebx, %edi | ||
| 892 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 893 | xorl %ebx, %edi | ||
| 894 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 895 | xorl %ebx, %edi | ||
| 896 | |||
| 897 | /* Round 10 */ | ||
| 898 | movl 80(%ebp), %eax | ||
| 899 | xorl %ebx, %ebx | ||
| 900 | movl 84(%ebp), %edx | ||
| 901 | xorl %edi, %eax | ||
| 902 | xorl %edi, %edx | ||
| 903 | andl $0xfcfcfcfc, %eax | ||
| 904 | andl $0xcfcfcfcf, %edx | ||
| 905 | movb %al, %bl | ||
| 906 | movb %ah, %cl | ||
| 907 | rorl $4, %edx | ||
| 908 | movl des_SPtrans(%ebx),%ebp | ||
| 909 | movb %dl, %bl | ||
| 910 | xorl %ebp, %esi | ||
| 911 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 912 | xorl %ebp, %esi | ||
| 913 | movb %dh, %cl | ||
| 914 | shrl $16, %eax | ||
| 915 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 916 | xorl %ebp, %esi | ||
| 917 | movb %ah, %bl | ||
| 918 | shrl $16, %edx | ||
| 919 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 920 | xorl %ebp, %esi | ||
| 921 | movl 24(%esp), %ebp | ||
| 922 | movb %dh, %cl | ||
| 923 | andl $0xff, %eax | ||
| 924 | andl $0xff, %edx | ||
| 925 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 926 | xorl %ebx, %esi | ||
| 927 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 928 | xorl %ebx, %esi | ||
| 929 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 930 | xorl %ebx, %esi | ||
| 931 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 932 | xorl %ebx, %esi | ||
| 933 | |||
| 934 | /* Round 9 */ | ||
| 935 | movl 72(%ebp), %eax | ||
| 936 | xorl %ebx, %ebx | ||
| 937 | movl 76(%ebp), %edx | ||
| 938 | xorl %esi, %eax | ||
| 939 | xorl %esi, %edx | ||
| 940 | andl $0xfcfcfcfc, %eax | ||
| 941 | andl $0xcfcfcfcf, %edx | ||
| 942 | movb %al, %bl | ||
| 943 | movb %ah, %cl | ||
| 944 | rorl $4, %edx | ||
| 945 | movl des_SPtrans(%ebx),%ebp | ||
| 946 | movb %dl, %bl | ||
| 947 | xorl %ebp, %edi | ||
| 948 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 949 | xorl %ebp, %edi | ||
| 950 | movb %dh, %cl | ||
| 951 | shrl $16, %eax | ||
| 952 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 953 | xorl %ebp, %edi | ||
| 954 | movb %ah, %bl | ||
| 955 | shrl $16, %edx | ||
| 956 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 957 | xorl %ebp, %edi | ||
| 958 | movl 24(%esp), %ebp | ||
| 959 | movb %dh, %cl | ||
| 960 | andl $0xff, %eax | ||
| 961 | andl $0xff, %edx | ||
| 962 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 963 | xorl %ebx, %edi | ||
| 964 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 965 | xorl %ebx, %edi | ||
| 966 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 967 | xorl %ebx, %edi | ||
| 968 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 969 | xorl %ebx, %edi | ||
| 970 | |||
| 971 | /* Round 8 */ | ||
| 972 | movl 64(%ebp), %eax | ||
| 973 | xorl %ebx, %ebx | ||
| 974 | movl 68(%ebp), %edx | ||
| 975 | xorl %edi, %eax | ||
| 976 | xorl %edi, %edx | ||
| 977 | andl $0xfcfcfcfc, %eax | ||
| 978 | andl $0xcfcfcfcf, %edx | ||
| 979 | movb %al, %bl | ||
| 980 | movb %ah, %cl | ||
| 981 | rorl $4, %edx | ||
| 982 | movl des_SPtrans(%ebx),%ebp | ||
| 983 | movb %dl, %bl | ||
| 984 | xorl %ebp, %esi | ||
| 985 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 986 | xorl %ebp, %esi | ||
| 987 | movb %dh, %cl | ||
| 988 | shrl $16, %eax | ||
| 989 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 990 | xorl %ebp, %esi | ||
| 991 | movb %ah, %bl | ||
| 992 | shrl $16, %edx | ||
| 993 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 994 | xorl %ebp, %esi | ||
| 995 | movl 24(%esp), %ebp | ||
| 996 | movb %dh, %cl | ||
| 997 | andl $0xff, %eax | ||
| 998 | andl $0xff, %edx | ||
| 999 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1000 | xorl %ebx, %esi | ||
| 1001 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1002 | xorl %ebx, %esi | ||
| 1003 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1004 | xorl %ebx, %esi | ||
| 1005 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1006 | xorl %ebx, %esi | ||
| 1007 | |||
| 1008 | /* Round 7 */ | ||
| 1009 | movl 56(%ebp), %eax | ||
| 1010 | xorl %ebx, %ebx | ||
| 1011 | movl 60(%ebp), %edx | ||
| 1012 | xorl %esi, %eax | ||
| 1013 | xorl %esi, %edx | ||
| 1014 | andl $0xfcfcfcfc, %eax | ||
| 1015 | andl $0xcfcfcfcf, %edx | ||
| 1016 | movb %al, %bl | ||
| 1017 | movb %ah, %cl | ||
| 1018 | rorl $4, %edx | ||
| 1019 | movl des_SPtrans(%ebx),%ebp | ||
| 1020 | movb %dl, %bl | ||
| 1021 | xorl %ebp, %edi | ||
| 1022 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1023 | xorl %ebp, %edi | ||
| 1024 | movb %dh, %cl | ||
| 1025 | shrl $16, %eax | ||
| 1026 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1027 | xorl %ebp, %edi | ||
| 1028 | movb %ah, %bl | ||
| 1029 | shrl $16, %edx | ||
| 1030 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1031 | xorl %ebp, %edi | ||
| 1032 | movl 24(%esp), %ebp | ||
| 1033 | movb %dh, %cl | ||
| 1034 | andl $0xff, %eax | ||
| 1035 | andl $0xff, %edx | ||
| 1036 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1037 | xorl %ebx, %edi | ||
| 1038 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1039 | xorl %ebx, %edi | ||
| 1040 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1041 | xorl %ebx, %edi | ||
| 1042 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1043 | xorl %ebx, %edi | ||
| 1044 | |||
| 1045 | /* Round 6 */ | ||
| 1046 | movl 48(%ebp), %eax | ||
| 1047 | xorl %ebx, %ebx | ||
| 1048 | movl 52(%ebp), %edx | ||
| 1049 | xorl %edi, %eax | ||
| 1050 | xorl %edi, %edx | ||
| 1051 | andl $0xfcfcfcfc, %eax | ||
| 1052 | andl $0xcfcfcfcf, %edx | ||
| 1053 | movb %al, %bl | ||
| 1054 | movb %ah, %cl | ||
| 1055 | rorl $4, %edx | ||
| 1056 | movl des_SPtrans(%ebx),%ebp | ||
| 1057 | movb %dl, %bl | ||
| 1058 | xorl %ebp, %esi | ||
| 1059 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1060 | xorl %ebp, %esi | ||
| 1061 | movb %dh, %cl | ||
| 1062 | shrl $16, %eax | ||
| 1063 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1064 | xorl %ebp, %esi | ||
| 1065 | movb %ah, %bl | ||
| 1066 | shrl $16, %edx | ||
| 1067 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1068 | xorl %ebp, %esi | ||
| 1069 | movl 24(%esp), %ebp | ||
| 1070 | movb %dh, %cl | ||
| 1071 | andl $0xff, %eax | ||
| 1072 | andl $0xff, %edx | ||
| 1073 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1074 | xorl %ebx, %esi | ||
| 1075 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1076 | xorl %ebx, %esi | ||
| 1077 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1078 | xorl %ebx, %esi | ||
| 1079 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1080 | xorl %ebx, %esi | ||
| 1081 | |||
| 1082 | /* Round 5 */ | ||
| 1083 | movl 40(%ebp), %eax | ||
| 1084 | xorl %ebx, %ebx | ||
| 1085 | movl 44(%ebp), %edx | ||
| 1086 | xorl %esi, %eax | ||
| 1087 | xorl %esi, %edx | ||
| 1088 | andl $0xfcfcfcfc, %eax | ||
| 1089 | andl $0xcfcfcfcf, %edx | ||
| 1090 | movb %al, %bl | ||
| 1091 | movb %ah, %cl | ||
| 1092 | rorl $4, %edx | ||
| 1093 | movl des_SPtrans(%ebx),%ebp | ||
| 1094 | movb %dl, %bl | ||
| 1095 | xorl %ebp, %edi | ||
| 1096 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1097 | xorl %ebp, %edi | ||
| 1098 | movb %dh, %cl | ||
| 1099 | shrl $16, %eax | ||
| 1100 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1101 | xorl %ebp, %edi | ||
| 1102 | movb %ah, %bl | ||
| 1103 | shrl $16, %edx | ||
| 1104 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1105 | xorl %ebp, %edi | ||
| 1106 | movl 24(%esp), %ebp | ||
| 1107 | movb %dh, %cl | ||
| 1108 | andl $0xff, %eax | ||
| 1109 | andl $0xff, %edx | ||
| 1110 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1111 | xorl %ebx, %edi | ||
| 1112 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1113 | xorl %ebx, %edi | ||
| 1114 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1115 | xorl %ebx, %edi | ||
| 1116 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1117 | xorl %ebx, %edi | ||
| 1118 | |||
| 1119 | /* Round 4 */ | ||
| 1120 | movl 32(%ebp), %eax | ||
| 1121 | xorl %ebx, %ebx | ||
| 1122 | movl 36(%ebp), %edx | ||
| 1123 | xorl %edi, %eax | ||
| 1124 | xorl %edi, %edx | ||
| 1125 | andl $0xfcfcfcfc, %eax | ||
| 1126 | andl $0xcfcfcfcf, %edx | ||
| 1127 | movb %al, %bl | ||
| 1128 | movb %ah, %cl | ||
| 1129 | rorl $4, %edx | ||
| 1130 | movl des_SPtrans(%ebx),%ebp | ||
| 1131 | movb %dl, %bl | ||
| 1132 | xorl %ebp, %esi | ||
| 1133 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1134 | xorl %ebp, %esi | ||
| 1135 | movb %dh, %cl | ||
| 1136 | shrl $16, %eax | ||
| 1137 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1138 | xorl %ebp, %esi | ||
| 1139 | movb %ah, %bl | ||
| 1140 | shrl $16, %edx | ||
| 1141 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1142 | xorl %ebp, %esi | ||
| 1143 | movl 24(%esp), %ebp | ||
| 1144 | movb %dh, %cl | ||
| 1145 | andl $0xff, %eax | ||
| 1146 | andl $0xff, %edx | ||
| 1147 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1148 | xorl %ebx, %esi | ||
| 1149 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1150 | xorl %ebx, %esi | ||
| 1151 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1152 | xorl %ebx, %esi | ||
| 1153 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1154 | xorl %ebx, %esi | ||
| 1155 | |||
| 1156 | /* Round 3 */ | ||
| 1157 | movl 24(%ebp), %eax | ||
| 1158 | xorl %ebx, %ebx | ||
| 1159 | movl 28(%ebp), %edx | ||
| 1160 | xorl %esi, %eax | ||
| 1161 | xorl %esi, %edx | ||
| 1162 | andl $0xfcfcfcfc, %eax | ||
| 1163 | andl $0xcfcfcfcf, %edx | ||
| 1164 | movb %al, %bl | ||
| 1165 | movb %ah, %cl | ||
| 1166 | rorl $4, %edx | ||
| 1167 | movl des_SPtrans(%ebx),%ebp | ||
| 1168 | movb %dl, %bl | ||
| 1169 | xorl %ebp, %edi | ||
| 1170 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1171 | xorl %ebp, %edi | ||
| 1172 | movb %dh, %cl | ||
| 1173 | shrl $16, %eax | ||
| 1174 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1175 | xorl %ebp, %edi | ||
| 1176 | movb %ah, %bl | ||
| 1177 | shrl $16, %edx | ||
| 1178 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1179 | xorl %ebp, %edi | ||
| 1180 | movl 24(%esp), %ebp | ||
| 1181 | movb %dh, %cl | ||
| 1182 | andl $0xff, %eax | ||
| 1183 | andl $0xff, %edx | ||
| 1184 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1185 | xorl %ebx, %edi | ||
| 1186 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1187 | xorl %ebx, %edi | ||
| 1188 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1189 | xorl %ebx, %edi | ||
| 1190 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1191 | xorl %ebx, %edi | ||
| 1192 | |||
| 1193 | /* Round 2 */ | ||
| 1194 | movl 16(%ebp), %eax | ||
| 1195 | xorl %ebx, %ebx | ||
| 1196 | movl 20(%ebp), %edx | ||
| 1197 | xorl %edi, %eax | ||
| 1198 | xorl %edi, %edx | ||
| 1199 | andl $0xfcfcfcfc, %eax | ||
| 1200 | andl $0xcfcfcfcf, %edx | ||
| 1201 | movb %al, %bl | ||
| 1202 | movb %ah, %cl | ||
| 1203 | rorl $4, %edx | ||
| 1204 | movl des_SPtrans(%ebx),%ebp | ||
| 1205 | movb %dl, %bl | ||
| 1206 | xorl %ebp, %esi | ||
| 1207 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1208 | xorl %ebp, %esi | ||
| 1209 | movb %dh, %cl | ||
| 1210 | shrl $16, %eax | ||
| 1211 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1212 | xorl %ebp, %esi | ||
| 1213 | movb %ah, %bl | ||
| 1214 | shrl $16, %edx | ||
| 1215 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1216 | xorl %ebp, %esi | ||
| 1217 | movl 24(%esp), %ebp | ||
| 1218 | movb %dh, %cl | ||
| 1219 | andl $0xff, %eax | ||
| 1220 | andl $0xff, %edx | ||
| 1221 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1222 | xorl %ebx, %esi | ||
| 1223 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1224 | xorl %ebx, %esi | ||
| 1225 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1226 | xorl %ebx, %esi | ||
| 1227 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1228 | xorl %ebx, %esi | ||
| 1229 | |||
| 1230 | /* Round 1 */ | ||
| 1231 | movl 8(%ebp), %eax | ||
| 1232 | xorl %ebx, %ebx | ||
| 1233 | movl 12(%ebp), %edx | ||
| 1234 | xorl %esi, %eax | ||
| 1235 | xorl %esi, %edx | ||
| 1236 | andl $0xfcfcfcfc, %eax | ||
| 1237 | andl $0xcfcfcfcf, %edx | ||
| 1238 | movb %al, %bl | ||
| 1239 | movb %ah, %cl | ||
| 1240 | rorl $4, %edx | ||
| 1241 | movl des_SPtrans(%ebx),%ebp | ||
| 1242 | movb %dl, %bl | ||
| 1243 | xorl %ebp, %edi | ||
| 1244 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1245 | xorl %ebp, %edi | ||
| 1246 | movb %dh, %cl | ||
| 1247 | shrl $16, %eax | ||
| 1248 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1249 | xorl %ebp, %edi | ||
| 1250 | movb %ah, %bl | ||
| 1251 | shrl $16, %edx | ||
| 1252 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1253 | xorl %ebp, %edi | ||
| 1254 | movl 24(%esp), %ebp | ||
| 1255 | movb %dh, %cl | ||
| 1256 | andl $0xff, %eax | ||
| 1257 | andl $0xff, %edx | ||
| 1258 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1259 | xorl %ebx, %edi | ||
| 1260 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1261 | xorl %ebx, %edi | ||
| 1262 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1263 | xorl %ebx, %edi | ||
| 1264 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1265 | xorl %ebx, %edi | ||
| 1266 | |||
| 1267 | /* Round 0 */ | ||
| 1268 | movl (%ebp), %eax | ||
| 1269 | xorl %ebx, %ebx | ||
| 1270 | movl 4(%ebp), %edx | ||
| 1271 | xorl %edi, %eax | ||
| 1272 | xorl %edi, %edx | ||
| 1273 | andl $0xfcfcfcfc, %eax | ||
| 1274 | andl $0xcfcfcfcf, %edx | ||
| 1275 | movb %al, %bl | ||
| 1276 | movb %ah, %cl | ||
| 1277 | rorl $4, %edx | ||
| 1278 | movl des_SPtrans(%ebx),%ebp | ||
| 1279 | movb %dl, %bl | ||
| 1280 | xorl %ebp, %esi | ||
| 1281 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1282 | xorl %ebp, %esi | ||
| 1283 | movb %dh, %cl | ||
| 1284 | shrl $16, %eax | ||
| 1285 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1286 | xorl %ebp, %esi | ||
| 1287 | movb %ah, %bl | ||
| 1288 | shrl $16, %edx | ||
| 1289 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1290 | xorl %ebp, %esi | ||
| 1291 | movl 24(%esp), %ebp | ||
| 1292 | movb %dh, %cl | ||
| 1293 | andl $0xff, %eax | ||
| 1294 | andl $0xff, %edx | ||
| 1295 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1296 | xorl %ebx, %esi | ||
| 1297 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1298 | xorl %ebx, %esi | ||
| 1299 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1300 | xorl %ebx, %esi | ||
| 1301 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1302 | xorl %ebx, %esi | ||
| 1303 | .L001end: | ||
| 1304 | |||
| 1305 | /* FP */ | ||
| 1306 | movl 20(%esp), %edx | ||
| 1307 | .byte 209 | ||
| 1308 | .byte 206 /* rorl $1 %esi */ | ||
| 1309 | movl %edi, %eax | ||
| 1310 | xorl %esi, %edi | ||
| 1311 | andl $0xaaaaaaaa, %edi | ||
| 1312 | xorl %edi, %eax | ||
| 1313 | xorl %edi, %esi | ||
| 1314 | |||
| 1315 | roll $23, %eax | ||
| 1316 | movl %eax, %edi | ||
| 1317 | xorl %esi, %eax | ||
| 1318 | andl $0x03fc03fc, %eax | ||
| 1319 | xorl %eax, %edi | ||
| 1320 | xorl %eax, %esi | ||
| 1321 | |||
| 1322 | roll $10, %edi | ||
| 1323 | movl %edi, %eax | ||
| 1324 | xorl %esi, %edi | ||
| 1325 | andl $0x33333333, %edi | ||
| 1326 | xorl %edi, %eax | ||
| 1327 | xorl %edi, %esi | ||
| 1328 | |||
| 1329 | roll $18, %esi | ||
| 1330 | movl %esi, %edi | ||
| 1331 | xorl %eax, %esi | ||
| 1332 | andl $0xfff0000f, %esi | ||
| 1333 | xorl %esi, %edi | ||
| 1334 | xorl %esi, %eax | ||
| 1335 | |||
| 1336 | roll $12, %edi | ||
| 1337 | movl %edi, %esi | ||
| 1338 | xorl %eax, %edi | ||
| 1339 | andl $0xf0f0f0f0, %edi | ||
| 1340 | xorl %edi, %esi | ||
| 1341 | xorl %edi, %eax | ||
| 1342 | |||
| 1343 | rorl $4, %eax | ||
| 1344 | movl %eax, (%edx) | ||
| 1345 | movl %esi, 4(%edx) | ||
| 1346 | popl %ebp | ||
| 1347 | popl %ebx | ||
| 1348 | popl %edi | ||
| 1349 | popl %esi | ||
| 1350 | ret | ||
| 1351 | .des_encrypt_end: | ||
| 1352 | SIZE(des_encrypt,.des_encrypt_end-des_encrypt) | ||
| 1353 | .ident "desasm.pl" | ||
| 1354 | .text | ||
| 1355 | .align ALIGN | ||
| 1356 | .globl des_encrypt2 | ||
| 1357 | TYPE(des_encrypt2,@function) | ||
| 1358 | des_encrypt2: | ||
| 1359 | pushl %esi | ||
| 1360 | pushl %edi | ||
| 1361 | |||
| 1362 | /* Load the 2 words */ | ||
| 1363 | movl 12(%esp), %eax | ||
| 1364 | xorl %ecx, %ecx | ||
| 1365 | pushl %ebx | ||
| 1366 | pushl %ebp | ||
| 1367 | movl (%eax), %esi | ||
| 1368 | movl 28(%esp), %ebx | ||
| 1369 | roll $3, %esi | ||
| 1370 | movl 4(%eax), %edi | ||
| 1371 | roll $3, %edi | ||
| 1372 | movl 24(%esp), %ebp | ||
| 1373 | cmpl $0, %ebx | ||
| 1374 | je .L002start_decrypt | ||
| 1375 | |||
| 1376 | /* Round 0 */ | ||
| 1377 | movl (%ebp), %eax | ||
| 1378 | xorl %ebx, %ebx | ||
| 1379 | movl 4(%ebp), %edx | ||
| 1380 | xorl %esi, %eax | ||
| 1381 | xorl %esi, %edx | ||
| 1382 | andl $0xfcfcfcfc, %eax | ||
| 1383 | andl $0xcfcfcfcf, %edx | ||
| 1384 | movb %al, %bl | ||
| 1385 | movb %ah, %cl | ||
| 1386 | rorl $4, %edx | ||
| 1387 | movl des_SPtrans(%ebx),%ebp | ||
| 1388 | movb %dl, %bl | ||
| 1389 | xorl %ebp, %edi | ||
| 1390 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1391 | xorl %ebp, %edi | ||
| 1392 | movb %dh, %cl | ||
| 1393 | shrl $16, %eax | ||
| 1394 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1395 | xorl %ebp, %edi | ||
| 1396 | movb %ah, %bl | ||
| 1397 | shrl $16, %edx | ||
| 1398 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1399 | xorl %ebp, %edi | ||
| 1400 | movl 24(%esp), %ebp | ||
| 1401 | movb %dh, %cl | ||
| 1402 | andl $0xff, %eax | ||
| 1403 | andl $0xff, %edx | ||
| 1404 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1405 | xorl %ebx, %edi | ||
| 1406 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1407 | xorl %ebx, %edi | ||
| 1408 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1409 | xorl %ebx, %edi | ||
| 1410 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1411 | xorl %ebx, %edi | ||
| 1412 | |||
| 1413 | /* Round 1 */ | ||
| 1414 | movl 8(%ebp), %eax | ||
| 1415 | xorl %ebx, %ebx | ||
| 1416 | movl 12(%ebp), %edx | ||
| 1417 | xorl %edi, %eax | ||
| 1418 | xorl %edi, %edx | ||
| 1419 | andl $0xfcfcfcfc, %eax | ||
| 1420 | andl $0xcfcfcfcf, %edx | ||
| 1421 | movb %al, %bl | ||
| 1422 | movb %ah, %cl | ||
| 1423 | rorl $4, %edx | ||
| 1424 | movl des_SPtrans(%ebx),%ebp | ||
| 1425 | movb %dl, %bl | ||
| 1426 | xorl %ebp, %esi | ||
| 1427 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1428 | xorl %ebp, %esi | ||
| 1429 | movb %dh, %cl | ||
| 1430 | shrl $16, %eax | ||
| 1431 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1432 | xorl %ebp, %esi | ||
| 1433 | movb %ah, %bl | ||
| 1434 | shrl $16, %edx | ||
| 1435 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1436 | xorl %ebp, %esi | ||
| 1437 | movl 24(%esp), %ebp | ||
| 1438 | movb %dh, %cl | ||
| 1439 | andl $0xff, %eax | ||
| 1440 | andl $0xff, %edx | ||
| 1441 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1442 | xorl %ebx, %esi | ||
| 1443 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1444 | xorl %ebx, %esi | ||
| 1445 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1446 | xorl %ebx, %esi | ||
| 1447 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1448 | xorl %ebx, %esi | ||
| 1449 | |||
| 1450 | /* Round 2 */ | ||
| 1451 | movl 16(%ebp), %eax | ||
| 1452 | xorl %ebx, %ebx | ||
| 1453 | movl 20(%ebp), %edx | ||
| 1454 | xorl %esi, %eax | ||
| 1455 | xorl %esi, %edx | ||
| 1456 | andl $0xfcfcfcfc, %eax | ||
| 1457 | andl $0xcfcfcfcf, %edx | ||
| 1458 | movb %al, %bl | ||
| 1459 | movb %ah, %cl | ||
| 1460 | rorl $4, %edx | ||
| 1461 | movl des_SPtrans(%ebx),%ebp | ||
| 1462 | movb %dl, %bl | ||
| 1463 | xorl %ebp, %edi | ||
| 1464 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1465 | xorl %ebp, %edi | ||
| 1466 | movb %dh, %cl | ||
| 1467 | shrl $16, %eax | ||
| 1468 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1469 | xorl %ebp, %edi | ||
| 1470 | movb %ah, %bl | ||
| 1471 | shrl $16, %edx | ||
| 1472 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1473 | xorl %ebp, %edi | ||
| 1474 | movl 24(%esp), %ebp | ||
| 1475 | movb %dh, %cl | ||
| 1476 | andl $0xff, %eax | ||
| 1477 | andl $0xff, %edx | ||
| 1478 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1479 | xorl %ebx, %edi | ||
| 1480 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1481 | xorl %ebx, %edi | ||
| 1482 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1483 | xorl %ebx, %edi | ||
| 1484 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1485 | xorl %ebx, %edi | ||
| 1486 | |||
| 1487 | /* Round 3 */ | ||
| 1488 | movl 24(%ebp), %eax | ||
| 1489 | xorl %ebx, %ebx | ||
| 1490 | movl 28(%ebp), %edx | ||
| 1491 | xorl %edi, %eax | ||
| 1492 | xorl %edi, %edx | ||
| 1493 | andl $0xfcfcfcfc, %eax | ||
| 1494 | andl $0xcfcfcfcf, %edx | ||
| 1495 | movb %al, %bl | ||
| 1496 | movb %ah, %cl | ||
| 1497 | rorl $4, %edx | ||
| 1498 | movl des_SPtrans(%ebx),%ebp | ||
| 1499 | movb %dl, %bl | ||
| 1500 | xorl %ebp, %esi | ||
| 1501 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1502 | xorl %ebp, %esi | ||
| 1503 | movb %dh, %cl | ||
| 1504 | shrl $16, %eax | ||
| 1505 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1506 | xorl %ebp, %esi | ||
| 1507 | movb %ah, %bl | ||
| 1508 | shrl $16, %edx | ||
| 1509 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1510 | xorl %ebp, %esi | ||
| 1511 | movl 24(%esp), %ebp | ||
| 1512 | movb %dh, %cl | ||
| 1513 | andl $0xff, %eax | ||
| 1514 | andl $0xff, %edx | ||
| 1515 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1516 | xorl %ebx, %esi | ||
| 1517 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1518 | xorl %ebx, %esi | ||
| 1519 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1520 | xorl %ebx, %esi | ||
| 1521 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1522 | xorl %ebx, %esi | ||
| 1523 | |||
| 1524 | /* Round 4 */ | ||
| 1525 | movl 32(%ebp), %eax | ||
| 1526 | xorl %ebx, %ebx | ||
| 1527 | movl 36(%ebp), %edx | ||
| 1528 | xorl %esi, %eax | ||
| 1529 | xorl %esi, %edx | ||
| 1530 | andl $0xfcfcfcfc, %eax | ||
| 1531 | andl $0xcfcfcfcf, %edx | ||
| 1532 | movb %al, %bl | ||
| 1533 | movb %ah, %cl | ||
| 1534 | rorl $4, %edx | ||
| 1535 | movl des_SPtrans(%ebx),%ebp | ||
| 1536 | movb %dl, %bl | ||
| 1537 | xorl %ebp, %edi | ||
| 1538 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1539 | xorl %ebp, %edi | ||
| 1540 | movb %dh, %cl | ||
| 1541 | shrl $16, %eax | ||
| 1542 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1543 | xorl %ebp, %edi | ||
| 1544 | movb %ah, %bl | ||
| 1545 | shrl $16, %edx | ||
| 1546 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1547 | xorl %ebp, %edi | ||
| 1548 | movl 24(%esp), %ebp | ||
| 1549 | movb %dh, %cl | ||
| 1550 | andl $0xff, %eax | ||
| 1551 | andl $0xff, %edx | ||
| 1552 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1553 | xorl %ebx, %edi | ||
| 1554 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1555 | xorl %ebx, %edi | ||
| 1556 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1557 | xorl %ebx, %edi | ||
| 1558 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1559 | xorl %ebx, %edi | ||
| 1560 | |||
| 1561 | /* Round 5 */ | ||
| 1562 | movl 40(%ebp), %eax | ||
| 1563 | xorl %ebx, %ebx | ||
| 1564 | movl 44(%ebp), %edx | ||
| 1565 | xorl %edi, %eax | ||
| 1566 | xorl %edi, %edx | ||
| 1567 | andl $0xfcfcfcfc, %eax | ||
| 1568 | andl $0xcfcfcfcf, %edx | ||
| 1569 | movb %al, %bl | ||
| 1570 | movb %ah, %cl | ||
| 1571 | rorl $4, %edx | ||
| 1572 | movl des_SPtrans(%ebx),%ebp | ||
| 1573 | movb %dl, %bl | ||
| 1574 | xorl %ebp, %esi | ||
| 1575 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1576 | xorl %ebp, %esi | ||
| 1577 | movb %dh, %cl | ||
| 1578 | shrl $16, %eax | ||
| 1579 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1580 | xorl %ebp, %esi | ||
| 1581 | movb %ah, %bl | ||
| 1582 | shrl $16, %edx | ||
| 1583 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1584 | xorl %ebp, %esi | ||
| 1585 | movl 24(%esp), %ebp | ||
| 1586 | movb %dh, %cl | ||
| 1587 | andl $0xff, %eax | ||
| 1588 | andl $0xff, %edx | ||
| 1589 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1590 | xorl %ebx, %esi | ||
| 1591 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1592 | xorl %ebx, %esi | ||
| 1593 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1594 | xorl %ebx, %esi | ||
| 1595 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1596 | xorl %ebx, %esi | ||
| 1597 | |||
| 1598 | /* Round 6 */ | ||
| 1599 | movl 48(%ebp), %eax | ||
| 1600 | xorl %ebx, %ebx | ||
| 1601 | movl 52(%ebp), %edx | ||
| 1602 | xorl %esi, %eax | ||
| 1603 | xorl %esi, %edx | ||
| 1604 | andl $0xfcfcfcfc, %eax | ||
| 1605 | andl $0xcfcfcfcf, %edx | ||
| 1606 | movb %al, %bl | ||
| 1607 | movb %ah, %cl | ||
| 1608 | rorl $4, %edx | ||
| 1609 | movl des_SPtrans(%ebx),%ebp | ||
| 1610 | movb %dl, %bl | ||
| 1611 | xorl %ebp, %edi | ||
| 1612 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1613 | xorl %ebp, %edi | ||
| 1614 | movb %dh, %cl | ||
| 1615 | shrl $16, %eax | ||
| 1616 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1617 | xorl %ebp, %edi | ||
| 1618 | movb %ah, %bl | ||
| 1619 | shrl $16, %edx | ||
| 1620 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1621 | xorl %ebp, %edi | ||
| 1622 | movl 24(%esp), %ebp | ||
| 1623 | movb %dh, %cl | ||
| 1624 | andl $0xff, %eax | ||
| 1625 | andl $0xff, %edx | ||
| 1626 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1627 | xorl %ebx, %edi | ||
| 1628 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1629 | xorl %ebx, %edi | ||
| 1630 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1631 | xorl %ebx, %edi | ||
| 1632 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1633 | xorl %ebx, %edi | ||
| 1634 | |||
| 1635 | /* Round 7 */ | ||
| 1636 | movl 56(%ebp), %eax | ||
| 1637 | xorl %ebx, %ebx | ||
| 1638 | movl 60(%ebp), %edx | ||
| 1639 | xorl %edi, %eax | ||
| 1640 | xorl %edi, %edx | ||
| 1641 | andl $0xfcfcfcfc, %eax | ||
| 1642 | andl $0xcfcfcfcf, %edx | ||
| 1643 | movb %al, %bl | ||
| 1644 | movb %ah, %cl | ||
| 1645 | rorl $4, %edx | ||
| 1646 | movl des_SPtrans(%ebx),%ebp | ||
| 1647 | movb %dl, %bl | ||
| 1648 | xorl %ebp, %esi | ||
| 1649 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1650 | xorl %ebp, %esi | ||
| 1651 | movb %dh, %cl | ||
| 1652 | shrl $16, %eax | ||
| 1653 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1654 | xorl %ebp, %esi | ||
| 1655 | movb %ah, %bl | ||
| 1656 | shrl $16, %edx | ||
| 1657 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1658 | xorl %ebp, %esi | ||
| 1659 | movl 24(%esp), %ebp | ||
| 1660 | movb %dh, %cl | ||
| 1661 | andl $0xff, %eax | ||
| 1662 | andl $0xff, %edx | ||
| 1663 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1664 | xorl %ebx, %esi | ||
| 1665 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1666 | xorl %ebx, %esi | ||
| 1667 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1668 | xorl %ebx, %esi | ||
| 1669 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1670 | xorl %ebx, %esi | ||
| 1671 | |||
| 1672 | /* Round 8 */ | ||
| 1673 | movl 64(%ebp), %eax | ||
| 1674 | xorl %ebx, %ebx | ||
| 1675 | movl 68(%ebp), %edx | ||
| 1676 | xorl %esi, %eax | ||
| 1677 | xorl %esi, %edx | ||
| 1678 | andl $0xfcfcfcfc, %eax | ||
| 1679 | andl $0xcfcfcfcf, %edx | ||
| 1680 | movb %al, %bl | ||
| 1681 | movb %ah, %cl | ||
| 1682 | rorl $4, %edx | ||
| 1683 | movl des_SPtrans(%ebx),%ebp | ||
| 1684 | movb %dl, %bl | ||
| 1685 | xorl %ebp, %edi | ||
| 1686 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1687 | xorl %ebp, %edi | ||
| 1688 | movb %dh, %cl | ||
| 1689 | shrl $16, %eax | ||
| 1690 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1691 | xorl %ebp, %edi | ||
| 1692 | movb %ah, %bl | ||
| 1693 | shrl $16, %edx | ||
| 1694 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1695 | xorl %ebp, %edi | ||
| 1696 | movl 24(%esp), %ebp | ||
| 1697 | movb %dh, %cl | ||
| 1698 | andl $0xff, %eax | ||
| 1699 | andl $0xff, %edx | ||
| 1700 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1701 | xorl %ebx, %edi | ||
| 1702 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1703 | xorl %ebx, %edi | ||
| 1704 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1705 | xorl %ebx, %edi | ||
| 1706 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1707 | xorl %ebx, %edi | ||
| 1708 | |||
| 1709 | /* Round 9 */ | ||
| 1710 | movl 72(%ebp), %eax | ||
| 1711 | xorl %ebx, %ebx | ||
| 1712 | movl 76(%ebp), %edx | ||
| 1713 | xorl %edi, %eax | ||
| 1714 | xorl %edi, %edx | ||
| 1715 | andl $0xfcfcfcfc, %eax | ||
| 1716 | andl $0xcfcfcfcf, %edx | ||
| 1717 | movb %al, %bl | ||
| 1718 | movb %ah, %cl | ||
| 1719 | rorl $4, %edx | ||
| 1720 | movl des_SPtrans(%ebx),%ebp | ||
| 1721 | movb %dl, %bl | ||
| 1722 | xorl %ebp, %esi | ||
| 1723 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1724 | xorl %ebp, %esi | ||
| 1725 | movb %dh, %cl | ||
| 1726 | shrl $16, %eax | ||
| 1727 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1728 | xorl %ebp, %esi | ||
| 1729 | movb %ah, %bl | ||
| 1730 | shrl $16, %edx | ||
| 1731 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1732 | xorl %ebp, %esi | ||
| 1733 | movl 24(%esp), %ebp | ||
| 1734 | movb %dh, %cl | ||
| 1735 | andl $0xff, %eax | ||
| 1736 | andl $0xff, %edx | ||
| 1737 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1738 | xorl %ebx, %esi | ||
| 1739 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1740 | xorl %ebx, %esi | ||
| 1741 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1742 | xorl %ebx, %esi | ||
| 1743 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1744 | xorl %ebx, %esi | ||
| 1745 | |||
| 1746 | /* Round 10 */ | ||
| 1747 | movl 80(%ebp), %eax | ||
| 1748 | xorl %ebx, %ebx | ||
| 1749 | movl 84(%ebp), %edx | ||
| 1750 | xorl %esi, %eax | ||
| 1751 | xorl %esi, %edx | ||
| 1752 | andl $0xfcfcfcfc, %eax | ||
| 1753 | andl $0xcfcfcfcf, %edx | ||
| 1754 | movb %al, %bl | ||
| 1755 | movb %ah, %cl | ||
| 1756 | rorl $4, %edx | ||
| 1757 | movl des_SPtrans(%ebx),%ebp | ||
| 1758 | movb %dl, %bl | ||
| 1759 | xorl %ebp, %edi | ||
| 1760 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1761 | xorl %ebp, %edi | ||
| 1762 | movb %dh, %cl | ||
| 1763 | shrl $16, %eax | ||
| 1764 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1765 | xorl %ebp, %edi | ||
| 1766 | movb %ah, %bl | ||
| 1767 | shrl $16, %edx | ||
| 1768 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1769 | xorl %ebp, %edi | ||
| 1770 | movl 24(%esp), %ebp | ||
| 1771 | movb %dh, %cl | ||
| 1772 | andl $0xff, %eax | ||
| 1773 | andl $0xff, %edx | ||
| 1774 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1775 | xorl %ebx, %edi | ||
| 1776 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1777 | xorl %ebx, %edi | ||
| 1778 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1779 | xorl %ebx, %edi | ||
| 1780 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1781 | xorl %ebx, %edi | ||
| 1782 | |||
| 1783 | /* Round 11 */ | ||
| 1784 | movl 88(%ebp), %eax | ||
| 1785 | xorl %ebx, %ebx | ||
| 1786 | movl 92(%ebp), %edx | ||
| 1787 | xorl %edi, %eax | ||
| 1788 | xorl %edi, %edx | ||
| 1789 | andl $0xfcfcfcfc, %eax | ||
| 1790 | andl $0xcfcfcfcf, %edx | ||
| 1791 | movb %al, %bl | ||
| 1792 | movb %ah, %cl | ||
| 1793 | rorl $4, %edx | ||
| 1794 | movl des_SPtrans(%ebx),%ebp | ||
| 1795 | movb %dl, %bl | ||
| 1796 | xorl %ebp, %esi | ||
| 1797 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1798 | xorl %ebp, %esi | ||
| 1799 | movb %dh, %cl | ||
| 1800 | shrl $16, %eax | ||
| 1801 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1802 | xorl %ebp, %esi | ||
| 1803 | movb %ah, %bl | ||
| 1804 | shrl $16, %edx | ||
| 1805 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1806 | xorl %ebp, %esi | ||
| 1807 | movl 24(%esp), %ebp | ||
| 1808 | movb %dh, %cl | ||
| 1809 | andl $0xff, %eax | ||
| 1810 | andl $0xff, %edx | ||
| 1811 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1812 | xorl %ebx, %esi | ||
| 1813 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1814 | xorl %ebx, %esi | ||
| 1815 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1816 | xorl %ebx, %esi | ||
| 1817 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1818 | xorl %ebx, %esi | ||
| 1819 | |||
| 1820 | /* Round 12 */ | ||
| 1821 | movl 96(%ebp), %eax | ||
| 1822 | xorl %ebx, %ebx | ||
| 1823 | movl 100(%ebp), %edx | ||
| 1824 | xorl %esi, %eax | ||
| 1825 | xorl %esi, %edx | ||
| 1826 | andl $0xfcfcfcfc, %eax | ||
| 1827 | andl $0xcfcfcfcf, %edx | ||
| 1828 | movb %al, %bl | ||
| 1829 | movb %ah, %cl | ||
| 1830 | rorl $4, %edx | ||
| 1831 | movl des_SPtrans(%ebx),%ebp | ||
| 1832 | movb %dl, %bl | ||
| 1833 | xorl %ebp, %edi | ||
| 1834 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1835 | xorl %ebp, %edi | ||
| 1836 | movb %dh, %cl | ||
| 1837 | shrl $16, %eax | ||
| 1838 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1839 | xorl %ebp, %edi | ||
| 1840 | movb %ah, %bl | ||
| 1841 | shrl $16, %edx | ||
| 1842 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1843 | xorl %ebp, %edi | ||
| 1844 | movl 24(%esp), %ebp | ||
| 1845 | movb %dh, %cl | ||
| 1846 | andl $0xff, %eax | ||
| 1847 | andl $0xff, %edx | ||
| 1848 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1849 | xorl %ebx, %edi | ||
| 1850 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1851 | xorl %ebx, %edi | ||
| 1852 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1853 | xorl %ebx, %edi | ||
| 1854 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1855 | xorl %ebx, %edi | ||
| 1856 | |||
| 1857 | /* Round 13 */ | ||
| 1858 | movl 104(%ebp), %eax | ||
| 1859 | xorl %ebx, %ebx | ||
| 1860 | movl 108(%ebp), %edx | ||
| 1861 | xorl %edi, %eax | ||
| 1862 | xorl %edi, %edx | ||
| 1863 | andl $0xfcfcfcfc, %eax | ||
| 1864 | andl $0xcfcfcfcf, %edx | ||
| 1865 | movb %al, %bl | ||
| 1866 | movb %ah, %cl | ||
| 1867 | rorl $4, %edx | ||
| 1868 | movl des_SPtrans(%ebx),%ebp | ||
| 1869 | movb %dl, %bl | ||
| 1870 | xorl %ebp, %esi | ||
| 1871 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1872 | xorl %ebp, %esi | ||
| 1873 | movb %dh, %cl | ||
| 1874 | shrl $16, %eax | ||
| 1875 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1876 | xorl %ebp, %esi | ||
| 1877 | movb %ah, %bl | ||
| 1878 | shrl $16, %edx | ||
| 1879 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1880 | xorl %ebp, %esi | ||
| 1881 | movl 24(%esp), %ebp | ||
| 1882 | movb %dh, %cl | ||
| 1883 | andl $0xff, %eax | ||
| 1884 | andl $0xff, %edx | ||
| 1885 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1886 | xorl %ebx, %esi | ||
| 1887 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1888 | xorl %ebx, %esi | ||
| 1889 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1890 | xorl %ebx, %esi | ||
| 1891 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1892 | xorl %ebx, %esi | ||
| 1893 | |||
| 1894 | /* Round 14 */ | ||
| 1895 | movl 112(%ebp), %eax | ||
| 1896 | xorl %ebx, %ebx | ||
| 1897 | movl 116(%ebp), %edx | ||
| 1898 | xorl %esi, %eax | ||
| 1899 | xorl %esi, %edx | ||
| 1900 | andl $0xfcfcfcfc, %eax | ||
| 1901 | andl $0xcfcfcfcf, %edx | ||
| 1902 | movb %al, %bl | ||
| 1903 | movb %ah, %cl | ||
| 1904 | rorl $4, %edx | ||
| 1905 | movl des_SPtrans(%ebx),%ebp | ||
| 1906 | movb %dl, %bl | ||
| 1907 | xorl %ebp, %edi | ||
| 1908 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1909 | xorl %ebp, %edi | ||
| 1910 | movb %dh, %cl | ||
| 1911 | shrl $16, %eax | ||
| 1912 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1913 | xorl %ebp, %edi | ||
| 1914 | movb %ah, %bl | ||
| 1915 | shrl $16, %edx | ||
| 1916 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1917 | xorl %ebp, %edi | ||
| 1918 | movl 24(%esp), %ebp | ||
| 1919 | movb %dh, %cl | ||
| 1920 | andl $0xff, %eax | ||
| 1921 | andl $0xff, %edx | ||
| 1922 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1923 | xorl %ebx, %edi | ||
| 1924 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1925 | xorl %ebx, %edi | ||
| 1926 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1927 | xorl %ebx, %edi | ||
| 1928 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1929 | xorl %ebx, %edi | ||
| 1930 | |||
| 1931 | /* Round 15 */ | ||
| 1932 | movl 120(%ebp), %eax | ||
| 1933 | xorl %ebx, %ebx | ||
| 1934 | movl 124(%ebp), %edx | ||
| 1935 | xorl %edi, %eax | ||
| 1936 | xorl %edi, %edx | ||
| 1937 | andl $0xfcfcfcfc, %eax | ||
| 1938 | andl $0xcfcfcfcf, %edx | ||
| 1939 | movb %al, %bl | ||
| 1940 | movb %ah, %cl | ||
| 1941 | rorl $4, %edx | ||
| 1942 | movl des_SPtrans(%ebx),%ebp | ||
| 1943 | movb %dl, %bl | ||
| 1944 | xorl %ebp, %esi | ||
| 1945 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1946 | xorl %ebp, %esi | ||
| 1947 | movb %dh, %cl | ||
| 1948 | shrl $16, %eax | ||
| 1949 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1950 | xorl %ebp, %esi | ||
| 1951 | movb %ah, %bl | ||
| 1952 | shrl $16, %edx | ||
| 1953 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1954 | xorl %ebp, %esi | ||
| 1955 | movl 24(%esp), %ebp | ||
| 1956 | movb %dh, %cl | ||
| 1957 | andl $0xff, %eax | ||
| 1958 | andl $0xff, %edx | ||
| 1959 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1960 | xorl %ebx, %esi | ||
| 1961 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 1962 | xorl %ebx, %esi | ||
| 1963 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 1964 | xorl %ebx, %esi | ||
| 1965 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 1966 | xorl %ebx, %esi | ||
| 1967 | jmp .L003end | ||
| 1968 | .L002start_decrypt: | ||
| 1969 | |||
| 1970 | /* Round 15 */ | ||
| 1971 | movl 120(%ebp), %eax | ||
| 1972 | xorl %ebx, %ebx | ||
| 1973 | movl 124(%ebp), %edx | ||
| 1974 | xorl %esi, %eax | ||
| 1975 | xorl %esi, %edx | ||
| 1976 | andl $0xfcfcfcfc, %eax | ||
| 1977 | andl $0xcfcfcfcf, %edx | ||
| 1978 | movb %al, %bl | ||
| 1979 | movb %ah, %cl | ||
| 1980 | rorl $4, %edx | ||
| 1981 | movl des_SPtrans(%ebx),%ebp | ||
| 1982 | movb %dl, %bl | ||
| 1983 | xorl %ebp, %edi | ||
| 1984 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 1985 | xorl %ebp, %edi | ||
| 1986 | movb %dh, %cl | ||
| 1987 | shrl $16, %eax | ||
| 1988 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 1989 | xorl %ebp, %edi | ||
| 1990 | movb %ah, %bl | ||
| 1991 | shrl $16, %edx | ||
| 1992 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 1993 | xorl %ebp, %edi | ||
| 1994 | movl 24(%esp), %ebp | ||
| 1995 | movb %dh, %cl | ||
| 1996 | andl $0xff, %eax | ||
| 1997 | andl $0xff, %edx | ||
| 1998 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 1999 | xorl %ebx, %edi | ||
| 2000 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2001 | xorl %ebx, %edi | ||
| 2002 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2003 | xorl %ebx, %edi | ||
| 2004 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2005 | xorl %ebx, %edi | ||
| 2006 | |||
| 2007 | /* Round 14 */ | ||
| 2008 | movl 112(%ebp), %eax | ||
| 2009 | xorl %ebx, %ebx | ||
| 2010 | movl 116(%ebp), %edx | ||
| 2011 | xorl %edi, %eax | ||
| 2012 | xorl %edi, %edx | ||
| 2013 | andl $0xfcfcfcfc, %eax | ||
| 2014 | andl $0xcfcfcfcf, %edx | ||
| 2015 | movb %al, %bl | ||
| 2016 | movb %ah, %cl | ||
| 2017 | rorl $4, %edx | ||
| 2018 | movl des_SPtrans(%ebx),%ebp | ||
| 2019 | movb %dl, %bl | ||
| 2020 | xorl %ebp, %esi | ||
| 2021 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2022 | xorl %ebp, %esi | ||
| 2023 | movb %dh, %cl | ||
| 2024 | shrl $16, %eax | ||
| 2025 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2026 | xorl %ebp, %esi | ||
| 2027 | movb %ah, %bl | ||
| 2028 | shrl $16, %edx | ||
| 2029 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2030 | xorl %ebp, %esi | ||
| 2031 | movl 24(%esp), %ebp | ||
| 2032 | movb %dh, %cl | ||
| 2033 | andl $0xff, %eax | ||
| 2034 | andl $0xff, %edx | ||
| 2035 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2036 | xorl %ebx, %esi | ||
| 2037 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2038 | xorl %ebx, %esi | ||
| 2039 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2040 | xorl %ebx, %esi | ||
| 2041 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2042 | xorl %ebx, %esi | ||
| 2043 | |||
| 2044 | /* Round 13 */ | ||
| 2045 | movl 104(%ebp), %eax | ||
| 2046 | xorl %ebx, %ebx | ||
| 2047 | movl 108(%ebp), %edx | ||
| 2048 | xorl %esi, %eax | ||
| 2049 | xorl %esi, %edx | ||
| 2050 | andl $0xfcfcfcfc, %eax | ||
| 2051 | andl $0xcfcfcfcf, %edx | ||
| 2052 | movb %al, %bl | ||
| 2053 | movb %ah, %cl | ||
| 2054 | rorl $4, %edx | ||
| 2055 | movl des_SPtrans(%ebx),%ebp | ||
| 2056 | movb %dl, %bl | ||
| 2057 | xorl %ebp, %edi | ||
| 2058 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2059 | xorl %ebp, %edi | ||
| 2060 | movb %dh, %cl | ||
| 2061 | shrl $16, %eax | ||
| 2062 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2063 | xorl %ebp, %edi | ||
| 2064 | movb %ah, %bl | ||
| 2065 | shrl $16, %edx | ||
| 2066 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2067 | xorl %ebp, %edi | ||
| 2068 | movl 24(%esp), %ebp | ||
| 2069 | movb %dh, %cl | ||
| 2070 | andl $0xff, %eax | ||
| 2071 | andl $0xff, %edx | ||
| 2072 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2073 | xorl %ebx, %edi | ||
| 2074 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2075 | xorl %ebx, %edi | ||
| 2076 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2077 | xorl %ebx, %edi | ||
| 2078 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2079 | xorl %ebx, %edi | ||
| 2080 | |||
| 2081 | /* Round 12 */ | ||
| 2082 | movl 96(%ebp), %eax | ||
| 2083 | xorl %ebx, %ebx | ||
| 2084 | movl 100(%ebp), %edx | ||
| 2085 | xorl %edi, %eax | ||
| 2086 | xorl %edi, %edx | ||
| 2087 | andl $0xfcfcfcfc, %eax | ||
| 2088 | andl $0xcfcfcfcf, %edx | ||
| 2089 | movb %al, %bl | ||
| 2090 | movb %ah, %cl | ||
| 2091 | rorl $4, %edx | ||
| 2092 | movl des_SPtrans(%ebx),%ebp | ||
| 2093 | movb %dl, %bl | ||
| 2094 | xorl %ebp, %esi | ||
| 2095 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2096 | xorl %ebp, %esi | ||
| 2097 | movb %dh, %cl | ||
| 2098 | shrl $16, %eax | ||
| 2099 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2100 | xorl %ebp, %esi | ||
| 2101 | movb %ah, %bl | ||
| 2102 | shrl $16, %edx | ||
| 2103 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2104 | xorl %ebp, %esi | ||
| 2105 | movl 24(%esp), %ebp | ||
| 2106 | movb %dh, %cl | ||
| 2107 | andl $0xff, %eax | ||
| 2108 | andl $0xff, %edx | ||
| 2109 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2110 | xorl %ebx, %esi | ||
| 2111 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2112 | xorl %ebx, %esi | ||
| 2113 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2114 | xorl %ebx, %esi | ||
| 2115 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2116 | xorl %ebx, %esi | ||
| 2117 | |||
| 2118 | /* Round 11 */ | ||
| 2119 | movl 88(%ebp), %eax | ||
| 2120 | xorl %ebx, %ebx | ||
| 2121 | movl 92(%ebp), %edx | ||
| 2122 | xorl %esi, %eax | ||
| 2123 | xorl %esi, %edx | ||
| 2124 | andl $0xfcfcfcfc, %eax | ||
| 2125 | andl $0xcfcfcfcf, %edx | ||
| 2126 | movb %al, %bl | ||
| 2127 | movb %ah, %cl | ||
| 2128 | rorl $4, %edx | ||
| 2129 | movl des_SPtrans(%ebx),%ebp | ||
| 2130 | movb %dl, %bl | ||
| 2131 | xorl %ebp, %edi | ||
| 2132 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2133 | xorl %ebp, %edi | ||
| 2134 | movb %dh, %cl | ||
| 2135 | shrl $16, %eax | ||
| 2136 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2137 | xorl %ebp, %edi | ||
| 2138 | movb %ah, %bl | ||
| 2139 | shrl $16, %edx | ||
| 2140 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2141 | xorl %ebp, %edi | ||
| 2142 | movl 24(%esp), %ebp | ||
| 2143 | movb %dh, %cl | ||
| 2144 | andl $0xff, %eax | ||
| 2145 | andl $0xff, %edx | ||
| 2146 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2147 | xorl %ebx, %edi | ||
| 2148 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2149 | xorl %ebx, %edi | ||
| 2150 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2151 | xorl %ebx, %edi | ||
| 2152 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2153 | xorl %ebx, %edi | ||
| 2154 | |||
| 2155 | /* Round 10 */ | ||
| 2156 | movl 80(%ebp), %eax | ||
| 2157 | xorl %ebx, %ebx | ||
| 2158 | movl 84(%ebp), %edx | ||
| 2159 | xorl %edi, %eax | ||
| 2160 | xorl %edi, %edx | ||
| 2161 | andl $0xfcfcfcfc, %eax | ||
| 2162 | andl $0xcfcfcfcf, %edx | ||
| 2163 | movb %al, %bl | ||
| 2164 | movb %ah, %cl | ||
| 2165 | rorl $4, %edx | ||
| 2166 | movl des_SPtrans(%ebx),%ebp | ||
| 2167 | movb %dl, %bl | ||
| 2168 | xorl %ebp, %esi | ||
| 2169 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2170 | xorl %ebp, %esi | ||
| 2171 | movb %dh, %cl | ||
| 2172 | shrl $16, %eax | ||
| 2173 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2174 | xorl %ebp, %esi | ||
| 2175 | movb %ah, %bl | ||
| 2176 | shrl $16, %edx | ||
| 2177 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2178 | xorl %ebp, %esi | ||
| 2179 | movl 24(%esp), %ebp | ||
| 2180 | movb %dh, %cl | ||
| 2181 | andl $0xff, %eax | ||
| 2182 | andl $0xff, %edx | ||
| 2183 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2184 | xorl %ebx, %esi | ||
| 2185 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2186 | xorl %ebx, %esi | ||
| 2187 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2188 | xorl %ebx, %esi | ||
| 2189 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2190 | xorl %ebx, %esi | ||
| 2191 | |||
| 2192 | /* Round 9 */ | ||
| 2193 | movl 72(%ebp), %eax | ||
| 2194 | xorl %ebx, %ebx | ||
| 2195 | movl 76(%ebp), %edx | ||
| 2196 | xorl %esi, %eax | ||
| 2197 | xorl %esi, %edx | ||
| 2198 | andl $0xfcfcfcfc, %eax | ||
| 2199 | andl $0xcfcfcfcf, %edx | ||
| 2200 | movb %al, %bl | ||
| 2201 | movb %ah, %cl | ||
| 2202 | rorl $4, %edx | ||
| 2203 | movl des_SPtrans(%ebx),%ebp | ||
| 2204 | movb %dl, %bl | ||
| 2205 | xorl %ebp, %edi | ||
| 2206 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2207 | xorl %ebp, %edi | ||
| 2208 | movb %dh, %cl | ||
| 2209 | shrl $16, %eax | ||
| 2210 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2211 | xorl %ebp, %edi | ||
| 2212 | movb %ah, %bl | ||
| 2213 | shrl $16, %edx | ||
| 2214 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2215 | xorl %ebp, %edi | ||
| 2216 | movl 24(%esp), %ebp | ||
| 2217 | movb %dh, %cl | ||
| 2218 | andl $0xff, %eax | ||
| 2219 | andl $0xff, %edx | ||
| 2220 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2221 | xorl %ebx, %edi | ||
| 2222 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2223 | xorl %ebx, %edi | ||
| 2224 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2225 | xorl %ebx, %edi | ||
| 2226 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2227 | xorl %ebx, %edi | ||
| 2228 | |||
| 2229 | /* Round 8 */ | ||
| 2230 | movl 64(%ebp), %eax | ||
| 2231 | xorl %ebx, %ebx | ||
| 2232 | movl 68(%ebp), %edx | ||
| 2233 | xorl %edi, %eax | ||
| 2234 | xorl %edi, %edx | ||
| 2235 | andl $0xfcfcfcfc, %eax | ||
| 2236 | andl $0xcfcfcfcf, %edx | ||
| 2237 | movb %al, %bl | ||
| 2238 | movb %ah, %cl | ||
| 2239 | rorl $4, %edx | ||
| 2240 | movl des_SPtrans(%ebx),%ebp | ||
| 2241 | movb %dl, %bl | ||
| 2242 | xorl %ebp, %esi | ||
| 2243 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2244 | xorl %ebp, %esi | ||
| 2245 | movb %dh, %cl | ||
| 2246 | shrl $16, %eax | ||
| 2247 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2248 | xorl %ebp, %esi | ||
| 2249 | movb %ah, %bl | ||
| 2250 | shrl $16, %edx | ||
| 2251 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2252 | xorl %ebp, %esi | ||
| 2253 | movl 24(%esp), %ebp | ||
| 2254 | movb %dh, %cl | ||
| 2255 | andl $0xff, %eax | ||
| 2256 | andl $0xff, %edx | ||
| 2257 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2258 | xorl %ebx, %esi | ||
| 2259 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2260 | xorl %ebx, %esi | ||
| 2261 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2262 | xorl %ebx, %esi | ||
| 2263 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2264 | xorl %ebx, %esi | ||
| 2265 | |||
| 2266 | /* Round 7 */ | ||
| 2267 | movl 56(%ebp), %eax | ||
| 2268 | xorl %ebx, %ebx | ||
| 2269 | movl 60(%ebp), %edx | ||
| 2270 | xorl %esi, %eax | ||
| 2271 | xorl %esi, %edx | ||
| 2272 | andl $0xfcfcfcfc, %eax | ||
| 2273 | andl $0xcfcfcfcf, %edx | ||
| 2274 | movb %al, %bl | ||
| 2275 | movb %ah, %cl | ||
| 2276 | rorl $4, %edx | ||
| 2277 | movl des_SPtrans(%ebx),%ebp | ||
| 2278 | movb %dl, %bl | ||
| 2279 | xorl %ebp, %edi | ||
| 2280 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2281 | xorl %ebp, %edi | ||
| 2282 | movb %dh, %cl | ||
| 2283 | shrl $16, %eax | ||
| 2284 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2285 | xorl %ebp, %edi | ||
| 2286 | movb %ah, %bl | ||
| 2287 | shrl $16, %edx | ||
| 2288 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2289 | xorl %ebp, %edi | ||
| 2290 | movl 24(%esp), %ebp | ||
| 2291 | movb %dh, %cl | ||
| 2292 | andl $0xff, %eax | ||
| 2293 | andl $0xff, %edx | ||
| 2294 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2295 | xorl %ebx, %edi | ||
| 2296 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2297 | xorl %ebx, %edi | ||
| 2298 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2299 | xorl %ebx, %edi | ||
| 2300 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2301 | xorl %ebx, %edi | ||
| 2302 | |||
| 2303 | /* Round 6 */ | ||
| 2304 | movl 48(%ebp), %eax | ||
| 2305 | xorl %ebx, %ebx | ||
| 2306 | movl 52(%ebp), %edx | ||
| 2307 | xorl %edi, %eax | ||
| 2308 | xorl %edi, %edx | ||
| 2309 | andl $0xfcfcfcfc, %eax | ||
| 2310 | andl $0xcfcfcfcf, %edx | ||
| 2311 | movb %al, %bl | ||
| 2312 | movb %ah, %cl | ||
| 2313 | rorl $4, %edx | ||
| 2314 | movl des_SPtrans(%ebx),%ebp | ||
| 2315 | movb %dl, %bl | ||
| 2316 | xorl %ebp, %esi | ||
| 2317 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2318 | xorl %ebp, %esi | ||
| 2319 | movb %dh, %cl | ||
| 2320 | shrl $16, %eax | ||
| 2321 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2322 | xorl %ebp, %esi | ||
| 2323 | movb %ah, %bl | ||
| 2324 | shrl $16, %edx | ||
| 2325 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2326 | xorl %ebp, %esi | ||
| 2327 | movl 24(%esp), %ebp | ||
| 2328 | movb %dh, %cl | ||
| 2329 | andl $0xff, %eax | ||
| 2330 | andl $0xff, %edx | ||
| 2331 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2332 | xorl %ebx, %esi | ||
| 2333 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2334 | xorl %ebx, %esi | ||
| 2335 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2336 | xorl %ebx, %esi | ||
| 2337 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2338 | xorl %ebx, %esi | ||
| 2339 | |||
| 2340 | /* Round 5 */ | ||
| 2341 | movl 40(%ebp), %eax | ||
| 2342 | xorl %ebx, %ebx | ||
| 2343 | movl 44(%ebp), %edx | ||
| 2344 | xorl %esi, %eax | ||
| 2345 | xorl %esi, %edx | ||
| 2346 | andl $0xfcfcfcfc, %eax | ||
| 2347 | andl $0xcfcfcfcf, %edx | ||
| 2348 | movb %al, %bl | ||
| 2349 | movb %ah, %cl | ||
| 2350 | rorl $4, %edx | ||
| 2351 | movl des_SPtrans(%ebx),%ebp | ||
| 2352 | movb %dl, %bl | ||
| 2353 | xorl %ebp, %edi | ||
| 2354 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2355 | xorl %ebp, %edi | ||
| 2356 | movb %dh, %cl | ||
| 2357 | shrl $16, %eax | ||
| 2358 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2359 | xorl %ebp, %edi | ||
| 2360 | movb %ah, %bl | ||
| 2361 | shrl $16, %edx | ||
| 2362 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2363 | xorl %ebp, %edi | ||
| 2364 | movl 24(%esp), %ebp | ||
| 2365 | movb %dh, %cl | ||
| 2366 | andl $0xff, %eax | ||
| 2367 | andl $0xff, %edx | ||
| 2368 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2369 | xorl %ebx, %edi | ||
| 2370 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2371 | xorl %ebx, %edi | ||
| 2372 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2373 | xorl %ebx, %edi | ||
| 2374 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2375 | xorl %ebx, %edi | ||
| 2376 | |||
| 2377 | /* Round 4 */ | ||
| 2378 | movl 32(%ebp), %eax | ||
| 2379 | xorl %ebx, %ebx | ||
| 2380 | movl 36(%ebp), %edx | ||
| 2381 | xorl %edi, %eax | ||
| 2382 | xorl %edi, %edx | ||
| 2383 | andl $0xfcfcfcfc, %eax | ||
| 2384 | andl $0xcfcfcfcf, %edx | ||
| 2385 | movb %al, %bl | ||
| 2386 | movb %ah, %cl | ||
| 2387 | rorl $4, %edx | ||
| 2388 | movl des_SPtrans(%ebx),%ebp | ||
| 2389 | movb %dl, %bl | ||
| 2390 | xorl %ebp, %esi | ||
| 2391 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2392 | xorl %ebp, %esi | ||
| 2393 | movb %dh, %cl | ||
| 2394 | shrl $16, %eax | ||
| 2395 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2396 | xorl %ebp, %esi | ||
| 2397 | movb %ah, %bl | ||
| 2398 | shrl $16, %edx | ||
| 2399 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2400 | xorl %ebp, %esi | ||
| 2401 | movl 24(%esp), %ebp | ||
| 2402 | movb %dh, %cl | ||
| 2403 | andl $0xff, %eax | ||
| 2404 | andl $0xff, %edx | ||
| 2405 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2406 | xorl %ebx, %esi | ||
| 2407 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2408 | xorl %ebx, %esi | ||
| 2409 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2410 | xorl %ebx, %esi | ||
| 2411 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2412 | xorl %ebx, %esi | ||
| 2413 | |||
| 2414 | /* Round 3 */ | ||
| 2415 | movl 24(%ebp), %eax | ||
| 2416 | xorl %ebx, %ebx | ||
| 2417 | movl 28(%ebp), %edx | ||
| 2418 | xorl %esi, %eax | ||
| 2419 | xorl %esi, %edx | ||
| 2420 | andl $0xfcfcfcfc, %eax | ||
| 2421 | andl $0xcfcfcfcf, %edx | ||
| 2422 | movb %al, %bl | ||
| 2423 | movb %ah, %cl | ||
| 2424 | rorl $4, %edx | ||
| 2425 | movl des_SPtrans(%ebx),%ebp | ||
| 2426 | movb %dl, %bl | ||
| 2427 | xorl %ebp, %edi | ||
| 2428 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2429 | xorl %ebp, %edi | ||
| 2430 | movb %dh, %cl | ||
| 2431 | shrl $16, %eax | ||
| 2432 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2433 | xorl %ebp, %edi | ||
| 2434 | movb %ah, %bl | ||
| 2435 | shrl $16, %edx | ||
| 2436 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2437 | xorl %ebp, %edi | ||
| 2438 | movl 24(%esp), %ebp | ||
| 2439 | movb %dh, %cl | ||
| 2440 | andl $0xff, %eax | ||
| 2441 | andl $0xff, %edx | ||
| 2442 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2443 | xorl %ebx, %edi | ||
| 2444 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2445 | xorl %ebx, %edi | ||
| 2446 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2447 | xorl %ebx, %edi | ||
| 2448 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2449 | xorl %ebx, %edi | ||
| 2450 | |||
| 2451 | /* Round 2 */ | ||
| 2452 | movl 16(%ebp), %eax | ||
| 2453 | xorl %ebx, %ebx | ||
| 2454 | movl 20(%ebp), %edx | ||
| 2455 | xorl %edi, %eax | ||
| 2456 | xorl %edi, %edx | ||
| 2457 | andl $0xfcfcfcfc, %eax | ||
| 2458 | andl $0xcfcfcfcf, %edx | ||
| 2459 | movb %al, %bl | ||
| 2460 | movb %ah, %cl | ||
| 2461 | rorl $4, %edx | ||
| 2462 | movl des_SPtrans(%ebx),%ebp | ||
| 2463 | movb %dl, %bl | ||
| 2464 | xorl %ebp, %esi | ||
| 2465 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2466 | xorl %ebp, %esi | ||
| 2467 | movb %dh, %cl | ||
| 2468 | shrl $16, %eax | ||
| 2469 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2470 | xorl %ebp, %esi | ||
| 2471 | movb %ah, %bl | ||
| 2472 | shrl $16, %edx | ||
| 2473 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2474 | xorl %ebp, %esi | ||
| 2475 | movl 24(%esp), %ebp | ||
| 2476 | movb %dh, %cl | ||
| 2477 | andl $0xff, %eax | ||
| 2478 | andl $0xff, %edx | ||
| 2479 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2480 | xorl %ebx, %esi | ||
| 2481 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2482 | xorl %ebx, %esi | ||
| 2483 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2484 | xorl %ebx, %esi | ||
| 2485 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2486 | xorl %ebx, %esi | ||
| 2487 | |||
| 2488 | /* Round 1 */ | ||
| 2489 | movl 8(%ebp), %eax | ||
| 2490 | xorl %ebx, %ebx | ||
| 2491 | movl 12(%ebp), %edx | ||
| 2492 | xorl %esi, %eax | ||
| 2493 | xorl %esi, %edx | ||
| 2494 | andl $0xfcfcfcfc, %eax | ||
| 2495 | andl $0xcfcfcfcf, %edx | ||
| 2496 | movb %al, %bl | ||
| 2497 | movb %ah, %cl | ||
| 2498 | rorl $4, %edx | ||
| 2499 | movl des_SPtrans(%ebx),%ebp | ||
| 2500 | movb %dl, %bl | ||
| 2501 | xorl %ebp, %edi | ||
| 2502 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2503 | xorl %ebp, %edi | ||
| 2504 | movb %dh, %cl | ||
| 2505 | shrl $16, %eax | ||
| 2506 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2507 | xorl %ebp, %edi | ||
| 2508 | movb %ah, %bl | ||
| 2509 | shrl $16, %edx | ||
| 2510 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2511 | xorl %ebp, %edi | ||
| 2512 | movl 24(%esp), %ebp | ||
| 2513 | movb %dh, %cl | ||
| 2514 | andl $0xff, %eax | ||
| 2515 | andl $0xff, %edx | ||
| 2516 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2517 | xorl %ebx, %edi | ||
| 2518 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2519 | xorl %ebx, %edi | ||
| 2520 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2521 | xorl %ebx, %edi | ||
| 2522 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2523 | xorl %ebx, %edi | ||
| 2524 | |||
| 2525 | /* Round 0 */ | ||
| 2526 | movl (%ebp), %eax | ||
| 2527 | xorl %ebx, %ebx | ||
| 2528 | movl 4(%ebp), %edx | ||
| 2529 | xorl %edi, %eax | ||
| 2530 | xorl %edi, %edx | ||
| 2531 | andl $0xfcfcfcfc, %eax | ||
| 2532 | andl $0xcfcfcfcf, %edx | ||
| 2533 | movb %al, %bl | ||
| 2534 | movb %ah, %cl | ||
| 2535 | rorl $4, %edx | ||
| 2536 | movl des_SPtrans(%ebx),%ebp | ||
| 2537 | movb %dl, %bl | ||
| 2538 | xorl %ebp, %esi | ||
| 2539 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 2540 | xorl %ebp, %esi | ||
| 2541 | movb %dh, %cl | ||
| 2542 | shrl $16, %eax | ||
| 2543 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 2544 | xorl %ebp, %esi | ||
| 2545 | movb %ah, %bl | ||
| 2546 | shrl $16, %edx | ||
| 2547 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 2548 | xorl %ebp, %esi | ||
| 2549 | movl 24(%esp), %ebp | ||
| 2550 | movb %dh, %cl | ||
| 2551 | andl $0xff, %eax | ||
| 2552 | andl $0xff, %edx | ||
| 2553 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 2554 | xorl %ebx, %esi | ||
| 2555 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 2556 | xorl %ebx, %esi | ||
| 2557 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 2558 | xorl %ebx, %esi | ||
| 2559 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 2560 | xorl %ebx, %esi | ||
| 2561 | .L003end: | ||
| 2562 | |||
| 2563 | /* Fixup */ | ||
| 2564 | rorl $3, %edi | ||
| 2565 | movl 20(%esp), %eax | ||
| 2566 | rorl $3, %esi | ||
| 2567 | movl %edi, (%eax) | ||
| 2568 | movl %esi, 4(%eax) | ||
| 2569 | popl %ebp | ||
| 2570 | popl %ebx | ||
| 2571 | popl %edi | ||
| 2572 | popl %esi | ||
| 2573 | ret | ||
| 2574 | .des_encrypt2_end: | ||
| 2575 | SIZE(des_encrypt2,.des_encrypt2_end-des_encrypt2) | ||
| 2576 | .ident "desasm.pl" | ||
| 2577 | .text | ||
| 2578 | .align ALIGN | ||
| 2579 | .globl des_encrypt3 | ||
| 2580 | TYPE(des_encrypt3,@function) | ||
| 2581 | des_encrypt3: | ||
| 2582 | pushl %ebx | ||
| 2583 | movl 8(%esp), %ebx | ||
| 2584 | pushl %ebp | ||
| 2585 | pushl %esi | ||
| 2586 | pushl %edi | ||
| 2587 | |||
| 2588 | /* Load the data words */ | ||
| 2589 | movl (%ebx), %edi | ||
| 2590 | movl 4(%ebx), %esi | ||
| 2591 | subl $12, %esp | ||
| 2592 | |||
| 2593 | /* IP */ | ||
| 2594 | roll $4, %edi | ||
| 2595 | movl %edi, %edx | ||
| 2596 | xorl %esi, %edi | ||
| 2597 | andl $0xf0f0f0f0, %edi | ||
| 2598 | xorl %edi, %edx | ||
| 2599 | xorl %edi, %esi | ||
| 2600 | |||
| 2601 | roll $20, %esi | ||
| 2602 | movl %esi, %edi | ||
| 2603 | xorl %edx, %esi | ||
| 2604 | andl $0xfff0000f, %esi | ||
| 2605 | xorl %esi, %edi | ||
| 2606 | xorl %esi, %edx | ||
| 2607 | |||
| 2608 | roll $14, %edi | ||
| 2609 | movl %edi, %esi | ||
| 2610 | xorl %edx, %edi | ||
| 2611 | andl $0x33333333, %edi | ||
| 2612 | xorl %edi, %esi | ||
| 2613 | xorl %edi, %edx | ||
| 2614 | |||
| 2615 | roll $22, %edx | ||
| 2616 | movl %edx, %edi | ||
| 2617 | xorl %esi, %edx | ||
| 2618 | andl $0x03fc03fc, %edx | ||
| 2619 | xorl %edx, %edi | ||
| 2620 | xorl %edx, %esi | ||
| 2621 | |||
| 2622 | roll $9, %edi | ||
| 2623 | movl %edi, %edx | ||
| 2624 | xorl %esi, %edi | ||
| 2625 | andl $0xaaaaaaaa, %edi | ||
| 2626 | xorl %edi, %edx | ||
| 2627 | xorl %edi, %esi | ||
| 2628 | |||
| 2629 | rorl $3, %edx | ||
| 2630 | rorl $2, %esi | ||
| 2631 | movl %esi, 4(%ebx) | ||
| 2632 | movl 36(%esp), %eax | ||
| 2633 | movl %edx, (%ebx) | ||
| 2634 | movl 40(%esp), %edi | ||
| 2635 | movl 44(%esp), %esi | ||
| 2636 | movl $1, 8(%esp) | ||
| 2637 | movl %eax, 4(%esp) | ||
| 2638 | movl %ebx, (%esp) | ||
| 2639 | call des_encrypt2 | ||
| 2640 | movl $0, 8(%esp) | ||
| 2641 | movl %edi, 4(%esp) | ||
| 2642 | movl %ebx, (%esp) | ||
| 2643 | call des_encrypt2 | ||
| 2644 | movl $1, 8(%esp) | ||
| 2645 | movl %esi, 4(%esp) | ||
| 2646 | movl %ebx, (%esp) | ||
| 2647 | call des_encrypt2 | ||
| 2648 | addl $12, %esp | ||
| 2649 | movl (%ebx), %edi | ||
| 2650 | movl 4(%ebx), %esi | ||
| 2651 | |||
| 2652 | /* FP */ | ||
| 2653 | roll $2, %esi | ||
| 2654 | roll $3, %edi | ||
| 2655 | movl %edi, %eax | ||
| 2656 | xorl %esi, %edi | ||
| 2657 | andl $0xaaaaaaaa, %edi | ||
| 2658 | xorl %edi, %eax | ||
| 2659 | xorl %edi, %esi | ||
| 2660 | |||
| 2661 | roll $23, %eax | ||
| 2662 | movl %eax, %edi | ||
| 2663 | xorl %esi, %eax | ||
| 2664 | andl $0x03fc03fc, %eax | ||
| 2665 | xorl %eax, %edi | ||
| 2666 | xorl %eax, %esi | ||
| 2667 | |||
| 2668 | roll $10, %edi | ||
| 2669 | movl %edi, %eax | ||
| 2670 | xorl %esi, %edi | ||
| 2671 | andl $0x33333333, %edi | ||
| 2672 | xorl %edi, %eax | ||
| 2673 | xorl %edi, %esi | ||
| 2674 | |||
| 2675 | roll $18, %esi | ||
| 2676 | movl %esi, %edi | ||
| 2677 | xorl %eax, %esi | ||
| 2678 | andl $0xfff0000f, %esi | ||
| 2679 | xorl %esi, %edi | ||
| 2680 | xorl %esi, %eax | ||
| 2681 | |||
| 2682 | roll $12, %edi | ||
| 2683 | movl %edi, %esi | ||
| 2684 | xorl %eax, %edi | ||
| 2685 | andl $0xf0f0f0f0, %edi | ||
| 2686 | xorl %edi, %esi | ||
| 2687 | xorl %edi, %eax | ||
| 2688 | |||
| 2689 | rorl $4, %eax | ||
| 2690 | movl %eax, (%ebx) | ||
| 2691 | movl %esi, 4(%ebx) | ||
| 2692 | popl %edi | ||
| 2693 | popl %esi | ||
| 2694 | popl %ebp | ||
| 2695 | popl %ebx | ||
| 2696 | ret | ||
| 2697 | .des_encrypt3_end: | ||
| 2698 | SIZE(des_encrypt3,.des_encrypt3_end-des_encrypt3) | ||
| 2699 | .ident "desasm.pl" | ||
| 2700 | .text | ||
| 2701 | .align ALIGN | ||
| 2702 | .globl des_decrypt3 | ||
| 2703 | TYPE(des_decrypt3,@function) | ||
| 2704 | des_decrypt3: | ||
| 2705 | pushl %ebx | ||
| 2706 | movl 8(%esp), %ebx | ||
| 2707 | pushl %ebp | ||
| 2708 | pushl %esi | ||
| 2709 | pushl %edi | ||
| 2710 | |||
| 2711 | /* Load the data words */ | ||
| 2712 | movl (%ebx), %edi | ||
| 2713 | movl 4(%ebx), %esi | ||
| 2714 | subl $12, %esp | ||
| 2715 | |||
| 2716 | /* IP */ | ||
| 2717 | roll $4, %edi | ||
| 2718 | movl %edi, %edx | ||
| 2719 | xorl %esi, %edi | ||
| 2720 | andl $0xf0f0f0f0, %edi | ||
| 2721 | xorl %edi, %edx | ||
| 2722 | xorl %edi, %esi | ||
| 2723 | |||
| 2724 | roll $20, %esi | ||
| 2725 | movl %esi, %edi | ||
| 2726 | xorl %edx, %esi | ||
| 2727 | andl $0xfff0000f, %esi | ||
| 2728 | xorl %esi, %edi | ||
| 2729 | xorl %esi, %edx | ||
| 2730 | |||
| 2731 | roll $14, %edi | ||
| 2732 | movl %edi, %esi | ||
| 2733 | xorl %edx, %edi | ||
| 2734 | andl $0x33333333, %edi | ||
| 2735 | xorl %edi, %esi | ||
| 2736 | xorl %edi, %edx | ||
| 2737 | |||
| 2738 | roll $22, %edx | ||
| 2739 | movl %edx, %edi | ||
| 2740 | xorl %esi, %edx | ||
| 2741 | andl $0x03fc03fc, %edx | ||
| 2742 | xorl %edx, %edi | ||
| 2743 | xorl %edx, %esi | ||
| 2744 | |||
| 2745 | roll $9, %edi | ||
| 2746 | movl %edi, %edx | ||
| 2747 | xorl %esi, %edi | ||
| 2748 | andl $0xaaaaaaaa, %edi | ||
| 2749 | xorl %edi, %edx | ||
| 2750 | xorl %edi, %esi | ||
| 2751 | |||
| 2752 | rorl $3, %edx | ||
| 2753 | rorl $2, %esi | ||
| 2754 | movl %esi, 4(%ebx) | ||
| 2755 | movl 36(%esp), %esi | ||
| 2756 | movl %edx, (%ebx) | ||
| 2757 | movl 40(%esp), %edi | ||
| 2758 | movl 44(%esp), %eax | ||
| 2759 | movl $0, 8(%esp) | ||
| 2760 | movl %eax, 4(%esp) | ||
| 2761 | movl %ebx, (%esp) | ||
| 2762 | call des_encrypt2 | ||
| 2763 | movl $1, 8(%esp) | ||
| 2764 | movl %edi, 4(%esp) | ||
| 2765 | movl %ebx, (%esp) | ||
| 2766 | call des_encrypt2 | ||
| 2767 | movl $0, 8(%esp) | ||
| 2768 | movl %esi, 4(%esp) | ||
| 2769 | movl %ebx, (%esp) | ||
| 2770 | call des_encrypt2 | ||
| 2771 | addl $12, %esp | ||
| 2772 | movl (%ebx), %edi | ||
| 2773 | movl 4(%ebx), %esi | ||
| 2774 | |||
| 2775 | /* FP */ | ||
| 2776 | roll $2, %esi | ||
| 2777 | roll $3, %edi | ||
| 2778 | movl %edi, %eax | ||
| 2779 | xorl %esi, %edi | ||
| 2780 | andl $0xaaaaaaaa, %edi | ||
| 2781 | xorl %edi, %eax | ||
| 2782 | xorl %edi, %esi | ||
| 2783 | |||
| 2784 | roll $23, %eax | ||
| 2785 | movl %eax, %edi | ||
| 2786 | xorl %esi, %eax | ||
| 2787 | andl $0x03fc03fc, %eax | ||
| 2788 | xorl %eax, %edi | ||
| 2789 | xorl %eax, %esi | ||
| 2790 | |||
| 2791 | roll $10, %edi | ||
| 2792 | movl %edi, %eax | ||
| 2793 | xorl %esi, %edi | ||
| 2794 | andl $0x33333333, %edi | ||
| 2795 | xorl %edi, %eax | ||
| 2796 | xorl %edi, %esi | ||
| 2797 | |||
| 2798 | roll $18, %esi | ||
| 2799 | movl %esi, %edi | ||
| 2800 | xorl %eax, %esi | ||
| 2801 | andl $0xfff0000f, %esi | ||
| 2802 | xorl %esi, %edi | ||
| 2803 | xorl %esi, %eax | ||
| 2804 | |||
| 2805 | roll $12, %edi | ||
| 2806 | movl %edi, %esi | ||
| 2807 | xorl %eax, %edi | ||
| 2808 | andl $0xf0f0f0f0, %edi | ||
| 2809 | xorl %edi, %esi | ||
| 2810 | xorl %edi, %eax | ||
| 2811 | |||
| 2812 | rorl $4, %eax | ||
| 2813 | movl %eax, (%ebx) | ||
| 2814 | movl %esi, 4(%ebx) | ||
| 2815 | popl %edi | ||
| 2816 | popl %esi | ||
| 2817 | popl %ebp | ||
| 2818 | popl %ebx | ||
| 2819 | ret | ||
| 2820 | .des_decrypt3_end: | ||
| 2821 | SIZE(des_decrypt3,.des_decrypt3_end-des_decrypt3) | ||
| 2822 | .ident "desasm.pl" | ||
| 2823 | .text | ||
| 2824 | .align ALIGN | ||
| 2825 | .globl des_ncbc_encrypt | ||
| 2826 | TYPE(des_ncbc_encrypt,@function) | ||
| 2827 | des_ncbc_encrypt: | ||
| 2828 | |||
| 2829 | pushl %ebp | ||
| 2830 | pushl %ebx | ||
| 2831 | pushl %esi | ||
| 2832 | pushl %edi | ||
| 2833 | movl 28(%esp), %ebp | ||
| 2834 | /* getting iv ptr from parameter 4 */ | ||
| 2835 | movl 36(%esp), %ebx | ||
| 2836 | movl (%ebx), %esi | ||
| 2837 | movl 4(%ebx), %edi | ||
| 2838 | pushl %edi | ||
| 2839 | pushl %esi | ||
| 2840 | pushl %edi | ||
| 2841 | pushl %esi | ||
| 2842 | movl %esp, %ebx | ||
| 2843 | movl 36(%esp), %esi | ||
| 2844 | movl 40(%esp), %edi | ||
| 2845 | /* getting encrypt flag from parameter 5 */ | ||
| 2846 | movl 56(%esp), %ecx | ||
| 2847 | /* get and push parameter 5 */ | ||
| 2848 | pushl %ecx | ||
| 2849 | /* get and push parameter 3 */ | ||
| 2850 | movl 52(%esp), %eax | ||
| 2851 | pushl %eax | ||
| 2852 | pushl %ebx | ||
| 2853 | cmpl $0, %ecx | ||
| 2854 | jz .L004decrypt | ||
| 2855 | andl $4294967288, %ebp | ||
| 2856 | movl 12(%esp), %eax | ||
| 2857 | movl 16(%esp), %ebx | ||
| 2858 | jz .L005encrypt_finish | ||
| 2859 | .L006encrypt_loop: | ||
| 2860 | movl (%esi), %ecx | ||
| 2861 | movl 4(%esi), %edx | ||
| 2862 | xorl %ecx, %eax | ||
| 2863 | xorl %edx, %ebx | ||
| 2864 | movl %eax, 12(%esp) | ||
| 2865 | movl %ebx, 16(%esp) | ||
| 2866 | call des_encrypt | ||
| 2867 | movl 12(%esp), %eax | ||
| 2868 | movl 16(%esp), %ebx | ||
| 2869 | movl %eax, (%edi) | ||
| 2870 | movl %ebx, 4(%edi) | ||
| 2871 | addl $8, %esi | ||
| 2872 | addl $8, %edi | ||
| 2873 | subl $8, %ebp | ||
| 2874 | jnz .L006encrypt_loop | ||
| 2875 | .L005encrypt_finish: | ||
| 2876 | movl 56(%esp), %ebp | ||
| 2877 | andl $7, %ebp | ||
| 2878 | jz .L007finish | ||
| 2879 | xorl %ecx, %ecx | ||
| 2880 | xorl %edx, %edx | ||
| 2881 | movl .L008cbc_enc_jmp_table(,%ebp,4),%ebp | ||
| 2882 | jmp *%ebp | ||
| 2883 | .L009ej7: | ||
| 2884 | movb 6(%esi), %dh | ||
| 2885 | sall $8, %edx | ||
| 2886 | .L010ej6: | ||
| 2887 | movb 5(%esi), %dh | ||
| 2888 | .L011ej5: | ||
| 2889 | movb 4(%esi), %dl | ||
| 2890 | .L012ej4: | ||
| 2891 | movl (%esi), %ecx | ||
| 2892 | jmp .L013ejend | ||
| 2893 | .L014ej3: | ||
| 2894 | movb 2(%esi), %ch | ||
| 2895 | sall $8, %ecx | ||
| 2896 | .L015ej2: | ||
| 2897 | movb 1(%esi), %ch | ||
| 2898 | .L016ej1: | ||
| 2899 | movb (%esi), %cl | ||
| 2900 | .L013ejend: | ||
| 2901 | xorl %ecx, %eax | ||
| 2902 | xorl %edx, %ebx | ||
| 2903 | movl %eax, 12(%esp) | ||
| 2904 | movl %ebx, 16(%esp) | ||
| 2905 | call des_encrypt | ||
| 2906 | movl 12(%esp), %eax | ||
| 2907 | movl 16(%esp), %ebx | ||
| 2908 | movl %eax, (%edi) | ||
| 2909 | movl %ebx, 4(%edi) | ||
| 2910 | jmp .L007finish | ||
| 2911 | .align ALIGN | ||
| 2912 | .L004decrypt: | ||
| 2913 | andl $4294967288, %ebp | ||
| 2914 | movl 20(%esp), %eax | ||
| 2915 | movl 24(%esp), %ebx | ||
| 2916 | jz .L017decrypt_finish | ||
| 2917 | .L018decrypt_loop: | ||
| 2918 | movl (%esi), %eax | ||
| 2919 | movl 4(%esi), %ebx | ||
| 2920 | movl %eax, 12(%esp) | ||
| 2921 | movl %ebx, 16(%esp) | ||
| 2922 | call des_encrypt | ||
| 2923 | movl 12(%esp), %eax | ||
| 2924 | movl 16(%esp), %ebx | ||
| 2925 | movl 20(%esp), %ecx | ||
| 2926 | movl 24(%esp), %edx | ||
| 2927 | xorl %eax, %ecx | ||
| 2928 | xorl %ebx, %edx | ||
| 2929 | movl (%esi), %eax | ||
| 2930 | movl 4(%esi), %ebx | ||
| 2931 | movl %ecx, (%edi) | ||
| 2932 | movl %edx, 4(%edi) | ||
| 2933 | movl %eax, 20(%esp) | ||
| 2934 | movl %ebx, 24(%esp) | ||
| 2935 | addl $8, %esi | ||
| 2936 | addl $8, %edi | ||
| 2937 | subl $8, %ebp | ||
| 2938 | jnz .L018decrypt_loop | ||
| 2939 | .L017decrypt_finish: | ||
| 2940 | movl 56(%esp), %ebp | ||
| 2941 | andl $7, %ebp | ||
| 2942 | jz .L007finish | ||
| 2943 | movl (%esi), %eax | ||
| 2944 | movl 4(%esi), %ebx | ||
| 2945 | movl %eax, 12(%esp) | ||
| 2946 | movl %ebx, 16(%esp) | ||
| 2947 | call des_encrypt | ||
| 2948 | movl 12(%esp), %eax | ||
| 2949 | movl 16(%esp), %ebx | ||
| 2950 | movl 20(%esp), %ecx | ||
| 2951 | movl 24(%esp), %edx | ||
| 2952 | xorl %eax, %ecx | ||
| 2953 | xorl %ebx, %edx | ||
| 2954 | movl (%esi), %eax | ||
| 2955 | movl 4(%esi), %ebx | ||
| 2956 | .L019dj7: | ||
| 2957 | rorl $16, %edx | ||
| 2958 | movb %dl, 6(%edi) | ||
| 2959 | shrl $16, %edx | ||
| 2960 | .L020dj6: | ||
| 2961 | movb %dh, 5(%edi) | ||
| 2962 | .L021dj5: | ||
| 2963 | movb %dl, 4(%edi) | ||
| 2964 | .L022dj4: | ||
| 2965 | movl %ecx, (%edi) | ||
| 2966 | jmp .L023djend | ||
| 2967 | .L024dj3: | ||
| 2968 | rorl $16, %ecx | ||
| 2969 | movb %cl, 2(%edi) | ||
| 2970 | sall $16, %ecx | ||
| 2971 | .L025dj2: | ||
| 2972 | movb %ch, 1(%esi) | ||
| 2973 | .L026dj1: | ||
| 2974 | movb %cl, (%esi) | ||
| 2975 | .L023djend: | ||
| 2976 | jmp .L007finish | ||
| 2977 | .align ALIGN | ||
| 2978 | .L007finish: | ||
| 2979 | movl 64(%esp), %ecx | ||
| 2980 | addl $28, %esp | ||
| 2981 | movl %eax, (%ecx) | ||
| 2982 | movl %ebx, 4(%ecx) | ||
| 2983 | popl %edi | ||
| 2984 | popl %esi | ||
| 2985 | popl %ebx | ||
| 2986 | popl %ebp | ||
| 2987 | ret | ||
| 2988 | .align ALIGN | ||
| 2989 | .L008cbc_enc_jmp_table: | ||
| 2990 | .long 0 | ||
| 2991 | .long .L016ej1 | ||
| 2992 | .long .L015ej2 | ||
| 2993 | .long .L014ej3 | ||
| 2994 | .long .L012ej4 | ||
| 2995 | .long .L011ej5 | ||
| 2996 | .long .L010ej6 | ||
| 2997 | .long .L009ej7 | ||
| 2998 | .align ALIGN | ||
| 2999 | .L027cbc_dec_jmp_table: | ||
| 3000 | .long 0 | ||
| 3001 | .long .L026dj1 | ||
| 3002 | .long .L025dj2 | ||
| 3003 | .long .L024dj3 | ||
| 3004 | .long .L022dj4 | ||
| 3005 | .long .L021dj5 | ||
| 3006 | .long .L020dj6 | ||
| 3007 | .long .L019dj7 | ||
| 3008 | .des_ncbc_encrypt_end: | ||
| 3009 | SIZE(des_ncbc_encrypt,.des_ncbc_encrypt_end-des_ncbc_encrypt) | ||
| 3010 | .ident "desasm.pl" | ||
| 3011 | .text | ||
| 3012 | .align ALIGN | ||
| 3013 | .globl des_ede3_cbc_encrypt | ||
| 3014 | TYPE(des_ede3_cbc_encrypt,@function) | ||
| 3015 | des_ede3_cbc_encrypt: | ||
| 3016 | |||
| 3017 | pushl %ebp | ||
| 3018 | pushl %ebx | ||
| 3019 | pushl %esi | ||
| 3020 | pushl %edi | ||
| 3021 | movl 28(%esp), %ebp | ||
| 3022 | /* getting iv ptr from parameter 6 */ | ||
| 3023 | movl 44(%esp), %ebx | ||
| 3024 | movl (%ebx), %esi | ||
| 3025 | movl 4(%ebx), %edi | ||
| 3026 | pushl %edi | ||
| 3027 | pushl %esi | ||
| 3028 | pushl %edi | ||
| 3029 | pushl %esi | ||
| 3030 | movl %esp, %ebx | ||
| 3031 | movl 36(%esp), %esi | ||
| 3032 | movl 40(%esp), %edi | ||
| 3033 | /* getting encrypt flag from parameter 7 */ | ||
| 3034 | movl 64(%esp), %ecx | ||
| 3035 | /* get and push parameter 5 */ | ||
| 3036 | movl 56(%esp), %eax | ||
| 3037 | pushl %eax | ||
| 3038 | /* get and push parameter 4 */ | ||
| 3039 | movl 56(%esp), %eax | ||
| 3040 | pushl %eax | ||
| 3041 | /* get and push parameter 3 */ | ||
| 3042 | movl 56(%esp), %eax | ||
| 3043 | pushl %eax | ||
| 3044 | pushl %ebx | ||
| 3045 | cmpl $0, %ecx | ||
| 3046 | jz .L028decrypt | ||
| 3047 | andl $4294967288, %ebp | ||
| 3048 | movl 16(%esp), %eax | ||
| 3049 | movl 20(%esp), %ebx | ||
| 3050 | jz .L029encrypt_finish | ||
| 3051 | .L030encrypt_loop: | ||
| 3052 | movl (%esi), %ecx | ||
| 3053 | movl 4(%esi), %edx | ||
| 3054 | xorl %ecx, %eax | ||
| 3055 | xorl %edx, %ebx | ||
| 3056 | movl %eax, 16(%esp) | ||
| 3057 | movl %ebx, 20(%esp) | ||
| 3058 | call des_encrypt3 | ||
| 3059 | movl 16(%esp), %eax | ||
| 3060 | movl 20(%esp), %ebx | ||
| 3061 | movl %eax, (%edi) | ||
| 3062 | movl %ebx, 4(%edi) | ||
| 3063 | addl $8, %esi | ||
| 3064 | addl $8, %edi | ||
| 3065 | subl $8, %ebp | ||
| 3066 | jnz .L030encrypt_loop | ||
| 3067 | .L029encrypt_finish: | ||
| 3068 | movl 60(%esp), %ebp | ||
| 3069 | andl $7, %ebp | ||
| 3070 | jz .L031finish | ||
| 3071 | xorl %ecx, %ecx | ||
| 3072 | xorl %edx, %edx | ||
| 3073 | movl .L032cbc_enc_jmp_table(,%ebp,4),%ebp | ||
| 3074 | jmp *%ebp | ||
| 3075 | .L033ej7: | ||
| 3076 | movb 6(%esi), %dh | ||
| 3077 | sall $8, %edx | ||
| 3078 | .L034ej6: | ||
| 3079 | movb 5(%esi), %dh | ||
| 3080 | .L035ej5: | ||
| 3081 | movb 4(%esi), %dl | ||
| 3082 | .L036ej4: | ||
| 3083 | movl (%esi), %ecx | ||
| 3084 | jmp .L037ejend | ||
| 3085 | .L038ej3: | ||
| 3086 | movb 2(%esi), %ch | ||
| 3087 | sall $8, %ecx | ||
| 3088 | .L039ej2: | ||
| 3089 | movb 1(%esi), %ch | ||
| 3090 | .L040ej1: | ||
| 3091 | movb (%esi), %cl | ||
| 3092 | .L037ejend: | ||
| 3093 | xorl %ecx, %eax | ||
| 3094 | xorl %edx, %ebx | ||
| 3095 | movl %eax, 16(%esp) | ||
| 3096 | movl %ebx, 20(%esp) | ||
| 3097 | call des_encrypt3 | ||
| 3098 | movl 16(%esp), %eax | ||
| 3099 | movl 20(%esp), %ebx | ||
| 3100 | movl %eax, (%edi) | ||
| 3101 | movl %ebx, 4(%edi) | ||
| 3102 | jmp .L031finish | ||
| 3103 | .align ALIGN | ||
| 3104 | .L028decrypt: | ||
| 3105 | andl $4294967288, %ebp | ||
| 3106 | movl 24(%esp), %eax | ||
| 3107 | movl 28(%esp), %ebx | ||
| 3108 | jz .L041decrypt_finish | ||
| 3109 | .L042decrypt_loop: | ||
| 3110 | movl (%esi), %eax | ||
| 3111 | movl 4(%esi), %ebx | ||
| 3112 | movl %eax, 16(%esp) | ||
| 3113 | movl %ebx, 20(%esp) | ||
| 3114 | call des_decrypt3 | ||
| 3115 | movl 16(%esp), %eax | ||
| 3116 | movl 20(%esp), %ebx | ||
| 3117 | movl 24(%esp), %ecx | ||
| 3118 | movl 28(%esp), %edx | ||
| 3119 | xorl %eax, %ecx | ||
| 3120 | xorl %ebx, %edx | ||
| 3121 | movl (%esi), %eax | ||
| 3122 | movl 4(%esi), %ebx | ||
| 3123 | movl %ecx, (%edi) | ||
| 3124 | movl %edx, 4(%edi) | ||
| 3125 | movl %eax, 24(%esp) | ||
| 3126 | movl %ebx, 28(%esp) | ||
| 3127 | addl $8, %esi | ||
| 3128 | addl $8, %edi | ||
| 3129 | subl $8, %ebp | ||
| 3130 | jnz .L042decrypt_loop | ||
| 3131 | .L041decrypt_finish: | ||
| 3132 | movl 60(%esp), %ebp | ||
| 3133 | andl $7, %ebp | ||
| 3134 | jz .L031finish | ||
| 3135 | movl (%esi), %eax | ||
| 3136 | movl 4(%esi), %ebx | ||
| 3137 | movl %eax, 16(%esp) | ||
| 3138 | movl %ebx, 20(%esp) | ||
| 3139 | call des_decrypt3 | ||
| 3140 | movl 16(%esp), %eax | ||
| 3141 | movl 20(%esp), %ebx | ||
| 3142 | movl 24(%esp), %ecx | ||
| 3143 | movl 28(%esp), %edx | ||
| 3144 | xorl %eax, %ecx | ||
| 3145 | xorl %ebx, %edx | ||
| 3146 | movl (%esi), %eax | ||
| 3147 | movl 4(%esi), %ebx | ||
| 3148 | .L043dj7: | ||
| 3149 | rorl $16, %edx | ||
| 3150 | movb %dl, 6(%edi) | ||
| 3151 | shrl $16, %edx | ||
| 3152 | .L044dj6: | ||
| 3153 | movb %dh, 5(%edi) | ||
| 3154 | .L045dj5: | ||
| 3155 | movb %dl, 4(%edi) | ||
| 3156 | .L046dj4: | ||
| 3157 | movl %ecx, (%edi) | ||
| 3158 | jmp .L047djend | ||
| 3159 | .L048dj3: | ||
| 3160 | rorl $16, %ecx | ||
| 3161 | movb %cl, 2(%edi) | ||
| 3162 | sall $16, %ecx | ||
| 3163 | .L049dj2: | ||
| 3164 | movb %ch, 1(%esi) | ||
| 3165 | .L050dj1: | ||
| 3166 | movb %cl, (%esi) | ||
| 3167 | .L047djend: | ||
| 3168 | jmp .L031finish | ||
| 3169 | .align ALIGN | ||
| 3170 | .L031finish: | ||
| 3171 | movl 76(%esp), %ecx | ||
| 3172 | addl $32, %esp | ||
| 3173 | movl %eax, (%ecx) | ||
| 3174 | movl %ebx, 4(%ecx) | ||
| 3175 | popl %edi | ||
| 3176 | popl %esi | ||
| 3177 | popl %ebx | ||
| 3178 | popl %ebp | ||
| 3179 | ret | ||
| 3180 | .align ALIGN | ||
| 3181 | .L032cbc_enc_jmp_table: | ||
| 3182 | .long 0 | ||
| 3183 | .long .L040ej1 | ||
| 3184 | .long .L039ej2 | ||
| 3185 | .long .L038ej3 | ||
| 3186 | .long .L036ej4 | ||
| 3187 | .long .L035ej5 | ||
| 3188 | .long .L034ej6 | ||
| 3189 | .long .L033ej7 | ||
| 3190 | .align ALIGN | ||
| 3191 | .L051cbc_dec_jmp_table: | ||
| 3192 | .long 0 | ||
| 3193 | .long .L050dj1 | ||
| 3194 | .long .L049dj2 | ||
| 3195 | .long .L048dj3 | ||
| 3196 | .long .L046dj4 | ||
| 3197 | .long .L045dj5 | ||
| 3198 | .long .L044dj6 | ||
| 3199 | .long .L043dj7 | ||
| 3200 | .des_ede3_cbc_encrypt_end: | ||
| 3201 | SIZE(des_ede3_cbc_encrypt,.des_ede3_cbc_encrypt_end-des_ede3_cbc_encrypt) | ||
| 3202 | .ident "desasm.pl" | ||
diff --git a/src/lib/libssl/src/crypto/des/asm/y-win32.asm b/src/lib/libssl/src/crypto/des/asm/y-win32.asm new file mode 100644 index 0000000000..af5c102422 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/asm/y-win32.asm | |||
| @@ -0,0 +1,929 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by crypt586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE crypt586.asm | ||
| 8 | .386 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _fcrypt_body | ||
| 12 | EXTRN _des_SPtrans:DWORD | ||
| 13 | _fcrypt_body PROC NEAR | ||
| 14 | push ebp | ||
| 15 | push ebx | ||
| 16 | push esi | ||
| 17 | push edi | ||
| 18 | ; | ||
| 19 | ; Load the 2 words | ||
| 20 | xor edi, edi | ||
| 21 | xor esi, esi | ||
| 22 | mov ebp, DWORD PTR 24[esp] | ||
| 23 | push 25 | ||
| 24 | L000start: | ||
| 25 | ; | ||
| 26 | ; Round 0 | ||
| 27 | mov eax, DWORD PTR 32[esp] | ||
| 28 | mov edx, esi | ||
| 29 | shr edx, 16 | ||
| 30 | mov ecx, DWORD PTR 36[esp] | ||
| 31 | xor edx, esi | ||
| 32 | and eax, edx | ||
| 33 | and edx, ecx | ||
| 34 | mov ebx, eax | ||
| 35 | shl ebx, 16 | ||
| 36 | mov ecx, edx | ||
| 37 | shl ecx, 16 | ||
| 38 | xor eax, ebx | ||
| 39 | xor edx, ecx | ||
| 40 | mov ebx, DWORD PTR [ebp] | ||
| 41 | xor eax, ebx | ||
| 42 | mov ecx, DWORD PTR 4[ebp] | ||
| 43 | xor eax, esi | ||
| 44 | xor edx, esi | ||
| 45 | xor edx, ecx | ||
| 46 | and eax, 0fcfcfcfch | ||
| 47 | xor ebx, ebx | ||
| 48 | and edx, 0cfcfcfcfh | ||
| 49 | xor ecx, ecx | ||
| 50 | mov bl, al | ||
| 51 | mov cl, ah | ||
| 52 | ror edx, 4 | ||
| 53 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 54 | mov bl, dl | ||
| 55 | xor edi, ebp | ||
| 56 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 57 | xor edi, ebp | ||
| 58 | mov cl, dh | ||
| 59 | shr eax, 16 | ||
| 60 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 61 | xor edi, ebp | ||
| 62 | mov bl, ah | ||
| 63 | shr edx, 16 | ||
| 64 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 65 | xor edi, ebp | ||
| 66 | mov ebp, DWORD PTR 28[esp] | ||
| 67 | mov cl, dh | ||
| 68 | and eax, 0ffh | ||
| 69 | and edx, 0ffh | ||
| 70 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 71 | xor edi, ebx | ||
| 72 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 73 | xor edi, ebx | ||
| 74 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 75 | xor edi, ebx | ||
| 76 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 77 | xor edi, ebx | ||
| 78 | ; | ||
| 79 | ; Round 1 | ||
| 80 | mov eax, DWORD PTR 32[esp] | ||
| 81 | mov edx, edi | ||
| 82 | shr edx, 16 | ||
| 83 | mov ecx, DWORD PTR 36[esp] | ||
| 84 | xor edx, edi | ||
| 85 | and eax, edx | ||
| 86 | and edx, ecx | ||
| 87 | mov ebx, eax | ||
| 88 | shl ebx, 16 | ||
| 89 | mov ecx, edx | ||
| 90 | shl ecx, 16 | ||
| 91 | xor eax, ebx | ||
| 92 | xor edx, ecx | ||
| 93 | mov ebx, DWORD PTR 8[ebp] | ||
| 94 | xor eax, ebx | ||
| 95 | mov ecx, DWORD PTR 12[ebp] | ||
| 96 | xor eax, edi | ||
| 97 | xor edx, edi | ||
| 98 | xor edx, ecx | ||
| 99 | and eax, 0fcfcfcfch | ||
| 100 | xor ebx, ebx | ||
| 101 | and edx, 0cfcfcfcfh | ||
| 102 | xor ecx, ecx | ||
| 103 | mov bl, al | ||
| 104 | mov cl, ah | ||
| 105 | ror edx, 4 | ||
| 106 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 107 | mov bl, dl | ||
| 108 | xor esi, ebp | ||
| 109 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 110 | xor esi, ebp | ||
| 111 | mov cl, dh | ||
| 112 | shr eax, 16 | ||
| 113 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 114 | xor esi, ebp | ||
| 115 | mov bl, ah | ||
| 116 | shr edx, 16 | ||
| 117 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 118 | xor esi, ebp | ||
| 119 | mov ebp, DWORD PTR 28[esp] | ||
| 120 | mov cl, dh | ||
| 121 | and eax, 0ffh | ||
| 122 | and edx, 0ffh | ||
| 123 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 124 | xor esi, ebx | ||
| 125 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 126 | xor esi, ebx | ||
| 127 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 128 | xor esi, ebx | ||
| 129 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 130 | xor esi, ebx | ||
| 131 | ; | ||
| 132 | ; Round 2 | ||
| 133 | mov eax, DWORD PTR 32[esp] | ||
| 134 | mov edx, esi | ||
| 135 | shr edx, 16 | ||
| 136 | mov ecx, DWORD PTR 36[esp] | ||
| 137 | xor edx, esi | ||
| 138 | and eax, edx | ||
| 139 | and edx, ecx | ||
| 140 | mov ebx, eax | ||
| 141 | shl ebx, 16 | ||
| 142 | mov ecx, edx | ||
| 143 | shl ecx, 16 | ||
| 144 | xor eax, ebx | ||
| 145 | xor edx, ecx | ||
| 146 | mov ebx, DWORD PTR 16[ebp] | ||
| 147 | xor eax, ebx | ||
| 148 | mov ecx, DWORD PTR 20[ebp] | ||
| 149 | xor eax, esi | ||
| 150 | xor edx, esi | ||
| 151 | xor edx, ecx | ||
| 152 | and eax, 0fcfcfcfch | ||
| 153 | xor ebx, ebx | ||
| 154 | and edx, 0cfcfcfcfh | ||
| 155 | xor ecx, ecx | ||
| 156 | mov bl, al | ||
| 157 | mov cl, ah | ||
| 158 | ror edx, 4 | ||
| 159 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 160 | mov bl, dl | ||
| 161 | xor edi, ebp | ||
| 162 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 163 | xor edi, ebp | ||
| 164 | mov cl, dh | ||
| 165 | shr eax, 16 | ||
| 166 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 167 | xor edi, ebp | ||
| 168 | mov bl, ah | ||
| 169 | shr edx, 16 | ||
| 170 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 171 | xor edi, ebp | ||
| 172 | mov ebp, DWORD PTR 28[esp] | ||
| 173 | mov cl, dh | ||
| 174 | and eax, 0ffh | ||
| 175 | and edx, 0ffh | ||
| 176 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 177 | xor edi, ebx | ||
| 178 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 179 | xor edi, ebx | ||
| 180 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 181 | xor edi, ebx | ||
| 182 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 183 | xor edi, ebx | ||
| 184 | ; | ||
| 185 | ; Round 3 | ||
| 186 | mov eax, DWORD PTR 32[esp] | ||
| 187 | mov edx, edi | ||
| 188 | shr edx, 16 | ||
| 189 | mov ecx, DWORD PTR 36[esp] | ||
| 190 | xor edx, edi | ||
| 191 | and eax, edx | ||
| 192 | and edx, ecx | ||
| 193 | mov ebx, eax | ||
| 194 | shl ebx, 16 | ||
| 195 | mov ecx, edx | ||
| 196 | shl ecx, 16 | ||
| 197 | xor eax, ebx | ||
| 198 | xor edx, ecx | ||
| 199 | mov ebx, DWORD PTR 24[ebp] | ||
| 200 | xor eax, ebx | ||
| 201 | mov ecx, DWORD PTR 28[ebp] | ||
| 202 | xor eax, edi | ||
| 203 | xor edx, edi | ||
| 204 | xor edx, ecx | ||
| 205 | and eax, 0fcfcfcfch | ||
| 206 | xor ebx, ebx | ||
| 207 | and edx, 0cfcfcfcfh | ||
| 208 | xor ecx, ecx | ||
| 209 | mov bl, al | ||
| 210 | mov cl, ah | ||
| 211 | ror edx, 4 | ||
| 212 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 213 | mov bl, dl | ||
| 214 | xor esi, ebp | ||
| 215 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 216 | xor esi, ebp | ||
| 217 | mov cl, dh | ||
| 218 | shr eax, 16 | ||
| 219 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 220 | xor esi, ebp | ||
| 221 | mov bl, ah | ||
| 222 | shr edx, 16 | ||
| 223 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 224 | xor esi, ebp | ||
| 225 | mov ebp, DWORD PTR 28[esp] | ||
| 226 | mov cl, dh | ||
| 227 | and eax, 0ffh | ||
| 228 | and edx, 0ffh | ||
| 229 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 230 | xor esi, ebx | ||
| 231 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 232 | xor esi, ebx | ||
| 233 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 234 | xor esi, ebx | ||
| 235 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 236 | xor esi, ebx | ||
| 237 | ; | ||
| 238 | ; Round 4 | ||
| 239 | mov eax, DWORD PTR 32[esp] | ||
| 240 | mov edx, esi | ||
| 241 | shr edx, 16 | ||
| 242 | mov ecx, DWORD PTR 36[esp] | ||
| 243 | xor edx, esi | ||
| 244 | and eax, edx | ||
| 245 | and edx, ecx | ||
| 246 | mov ebx, eax | ||
| 247 | shl ebx, 16 | ||
| 248 | mov ecx, edx | ||
| 249 | shl ecx, 16 | ||
| 250 | xor eax, ebx | ||
| 251 | xor edx, ecx | ||
| 252 | mov ebx, DWORD PTR 32[ebp] | ||
| 253 | xor eax, ebx | ||
| 254 | mov ecx, DWORD PTR 36[ebp] | ||
| 255 | xor eax, esi | ||
| 256 | xor edx, esi | ||
| 257 | xor edx, ecx | ||
| 258 | and eax, 0fcfcfcfch | ||
| 259 | xor ebx, ebx | ||
| 260 | and edx, 0cfcfcfcfh | ||
| 261 | xor ecx, ecx | ||
| 262 | mov bl, al | ||
| 263 | mov cl, ah | ||
| 264 | ror edx, 4 | ||
| 265 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 266 | mov bl, dl | ||
| 267 | xor edi, ebp | ||
| 268 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 269 | xor edi, ebp | ||
| 270 | mov cl, dh | ||
| 271 | shr eax, 16 | ||
| 272 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 273 | xor edi, ebp | ||
| 274 | mov bl, ah | ||
| 275 | shr edx, 16 | ||
| 276 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 277 | xor edi, ebp | ||
| 278 | mov ebp, DWORD PTR 28[esp] | ||
| 279 | mov cl, dh | ||
| 280 | and eax, 0ffh | ||
| 281 | and edx, 0ffh | ||
| 282 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 283 | xor edi, ebx | ||
| 284 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 285 | xor edi, ebx | ||
| 286 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 287 | xor edi, ebx | ||
| 288 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 289 | xor edi, ebx | ||
| 290 | ; | ||
| 291 | ; Round 5 | ||
| 292 | mov eax, DWORD PTR 32[esp] | ||
| 293 | mov edx, edi | ||
| 294 | shr edx, 16 | ||
| 295 | mov ecx, DWORD PTR 36[esp] | ||
| 296 | xor edx, edi | ||
| 297 | and eax, edx | ||
| 298 | and edx, ecx | ||
| 299 | mov ebx, eax | ||
| 300 | shl ebx, 16 | ||
| 301 | mov ecx, edx | ||
| 302 | shl ecx, 16 | ||
| 303 | xor eax, ebx | ||
| 304 | xor edx, ecx | ||
| 305 | mov ebx, DWORD PTR 40[ebp] | ||
| 306 | xor eax, ebx | ||
| 307 | mov ecx, DWORD PTR 44[ebp] | ||
| 308 | xor eax, edi | ||
| 309 | xor edx, edi | ||
| 310 | xor edx, ecx | ||
| 311 | and eax, 0fcfcfcfch | ||
| 312 | xor ebx, ebx | ||
| 313 | and edx, 0cfcfcfcfh | ||
| 314 | xor ecx, ecx | ||
| 315 | mov bl, al | ||
| 316 | mov cl, ah | ||
| 317 | ror edx, 4 | ||
| 318 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 319 | mov bl, dl | ||
| 320 | xor esi, ebp | ||
| 321 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 322 | xor esi, ebp | ||
| 323 | mov cl, dh | ||
| 324 | shr eax, 16 | ||
| 325 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 326 | xor esi, ebp | ||
| 327 | mov bl, ah | ||
| 328 | shr edx, 16 | ||
| 329 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 330 | xor esi, ebp | ||
| 331 | mov ebp, DWORD PTR 28[esp] | ||
| 332 | mov cl, dh | ||
| 333 | and eax, 0ffh | ||
| 334 | and edx, 0ffh | ||
| 335 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 336 | xor esi, ebx | ||
| 337 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 338 | xor esi, ebx | ||
| 339 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 340 | xor esi, ebx | ||
| 341 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 342 | xor esi, ebx | ||
| 343 | ; | ||
| 344 | ; Round 6 | ||
| 345 | mov eax, DWORD PTR 32[esp] | ||
| 346 | mov edx, esi | ||
| 347 | shr edx, 16 | ||
| 348 | mov ecx, DWORD PTR 36[esp] | ||
| 349 | xor edx, esi | ||
| 350 | and eax, edx | ||
| 351 | and edx, ecx | ||
| 352 | mov ebx, eax | ||
| 353 | shl ebx, 16 | ||
| 354 | mov ecx, edx | ||
| 355 | shl ecx, 16 | ||
| 356 | xor eax, ebx | ||
| 357 | xor edx, ecx | ||
| 358 | mov ebx, DWORD PTR 48[ebp] | ||
| 359 | xor eax, ebx | ||
| 360 | mov ecx, DWORD PTR 52[ebp] | ||
| 361 | xor eax, esi | ||
| 362 | xor edx, esi | ||
| 363 | xor edx, ecx | ||
| 364 | and eax, 0fcfcfcfch | ||
| 365 | xor ebx, ebx | ||
| 366 | and edx, 0cfcfcfcfh | ||
| 367 | xor ecx, ecx | ||
| 368 | mov bl, al | ||
| 369 | mov cl, ah | ||
| 370 | ror edx, 4 | ||
| 371 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 372 | mov bl, dl | ||
| 373 | xor edi, ebp | ||
| 374 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 375 | xor edi, ebp | ||
| 376 | mov cl, dh | ||
| 377 | shr eax, 16 | ||
| 378 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 379 | xor edi, ebp | ||
| 380 | mov bl, ah | ||
| 381 | shr edx, 16 | ||
| 382 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 383 | xor edi, ebp | ||
| 384 | mov ebp, DWORD PTR 28[esp] | ||
| 385 | mov cl, dh | ||
| 386 | and eax, 0ffh | ||
| 387 | and edx, 0ffh | ||
| 388 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 389 | xor edi, ebx | ||
| 390 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 391 | xor edi, ebx | ||
| 392 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 393 | xor edi, ebx | ||
| 394 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 395 | xor edi, ebx | ||
| 396 | ; | ||
| 397 | ; Round 7 | ||
| 398 | mov eax, DWORD PTR 32[esp] | ||
| 399 | mov edx, edi | ||
| 400 | shr edx, 16 | ||
| 401 | mov ecx, DWORD PTR 36[esp] | ||
| 402 | xor edx, edi | ||
| 403 | and eax, edx | ||
| 404 | and edx, ecx | ||
| 405 | mov ebx, eax | ||
| 406 | shl ebx, 16 | ||
| 407 | mov ecx, edx | ||
| 408 | shl ecx, 16 | ||
| 409 | xor eax, ebx | ||
| 410 | xor edx, ecx | ||
| 411 | mov ebx, DWORD PTR 56[ebp] | ||
| 412 | xor eax, ebx | ||
| 413 | mov ecx, DWORD PTR 60[ebp] | ||
| 414 | xor eax, edi | ||
| 415 | xor edx, edi | ||
| 416 | xor edx, ecx | ||
| 417 | and eax, 0fcfcfcfch | ||
| 418 | xor ebx, ebx | ||
| 419 | and edx, 0cfcfcfcfh | ||
| 420 | xor ecx, ecx | ||
| 421 | mov bl, al | ||
| 422 | mov cl, ah | ||
| 423 | ror edx, 4 | ||
| 424 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 425 | mov bl, dl | ||
| 426 | xor esi, ebp | ||
| 427 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 428 | xor esi, ebp | ||
| 429 | mov cl, dh | ||
| 430 | shr eax, 16 | ||
| 431 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 432 | xor esi, ebp | ||
| 433 | mov bl, ah | ||
| 434 | shr edx, 16 | ||
| 435 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 436 | xor esi, ebp | ||
| 437 | mov ebp, DWORD PTR 28[esp] | ||
| 438 | mov cl, dh | ||
| 439 | and eax, 0ffh | ||
| 440 | and edx, 0ffh | ||
| 441 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 442 | xor esi, ebx | ||
| 443 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 444 | xor esi, ebx | ||
| 445 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 446 | xor esi, ebx | ||
| 447 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 448 | xor esi, ebx | ||
| 449 | ; | ||
| 450 | ; Round 8 | ||
| 451 | mov eax, DWORD PTR 32[esp] | ||
| 452 | mov edx, esi | ||
| 453 | shr edx, 16 | ||
| 454 | mov ecx, DWORD PTR 36[esp] | ||
| 455 | xor edx, esi | ||
| 456 | and eax, edx | ||
| 457 | and edx, ecx | ||
| 458 | mov ebx, eax | ||
| 459 | shl ebx, 16 | ||
| 460 | mov ecx, edx | ||
| 461 | shl ecx, 16 | ||
| 462 | xor eax, ebx | ||
| 463 | xor edx, ecx | ||
| 464 | mov ebx, DWORD PTR 64[ebp] | ||
| 465 | xor eax, ebx | ||
| 466 | mov ecx, DWORD PTR 68[ebp] | ||
| 467 | xor eax, esi | ||
| 468 | xor edx, esi | ||
| 469 | xor edx, ecx | ||
| 470 | and eax, 0fcfcfcfch | ||
| 471 | xor ebx, ebx | ||
| 472 | and edx, 0cfcfcfcfh | ||
| 473 | xor ecx, ecx | ||
| 474 | mov bl, al | ||
| 475 | mov cl, ah | ||
| 476 | ror edx, 4 | ||
| 477 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 478 | mov bl, dl | ||
| 479 | xor edi, ebp | ||
| 480 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 481 | xor edi, ebp | ||
| 482 | mov cl, dh | ||
| 483 | shr eax, 16 | ||
| 484 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 485 | xor edi, ebp | ||
| 486 | mov bl, ah | ||
| 487 | shr edx, 16 | ||
| 488 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 489 | xor edi, ebp | ||
| 490 | mov ebp, DWORD PTR 28[esp] | ||
| 491 | mov cl, dh | ||
| 492 | and eax, 0ffh | ||
| 493 | and edx, 0ffh | ||
| 494 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 495 | xor edi, ebx | ||
| 496 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 497 | xor edi, ebx | ||
| 498 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 499 | xor edi, ebx | ||
| 500 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 501 | xor edi, ebx | ||
| 502 | ; | ||
| 503 | ; Round 9 | ||
| 504 | mov eax, DWORD PTR 32[esp] | ||
| 505 | mov edx, edi | ||
| 506 | shr edx, 16 | ||
| 507 | mov ecx, DWORD PTR 36[esp] | ||
| 508 | xor edx, edi | ||
| 509 | and eax, edx | ||
| 510 | and edx, ecx | ||
| 511 | mov ebx, eax | ||
| 512 | shl ebx, 16 | ||
| 513 | mov ecx, edx | ||
| 514 | shl ecx, 16 | ||
| 515 | xor eax, ebx | ||
| 516 | xor edx, ecx | ||
| 517 | mov ebx, DWORD PTR 72[ebp] | ||
| 518 | xor eax, ebx | ||
| 519 | mov ecx, DWORD PTR 76[ebp] | ||
| 520 | xor eax, edi | ||
| 521 | xor edx, edi | ||
| 522 | xor edx, ecx | ||
| 523 | and eax, 0fcfcfcfch | ||
| 524 | xor ebx, ebx | ||
| 525 | and edx, 0cfcfcfcfh | ||
| 526 | xor ecx, ecx | ||
| 527 | mov bl, al | ||
| 528 | mov cl, ah | ||
| 529 | ror edx, 4 | ||
| 530 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 531 | mov bl, dl | ||
| 532 | xor esi, ebp | ||
| 533 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 534 | xor esi, ebp | ||
| 535 | mov cl, dh | ||
| 536 | shr eax, 16 | ||
| 537 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 538 | xor esi, ebp | ||
| 539 | mov bl, ah | ||
| 540 | shr edx, 16 | ||
| 541 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 542 | xor esi, ebp | ||
| 543 | mov ebp, DWORD PTR 28[esp] | ||
| 544 | mov cl, dh | ||
| 545 | and eax, 0ffh | ||
| 546 | and edx, 0ffh | ||
| 547 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 548 | xor esi, ebx | ||
| 549 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 550 | xor esi, ebx | ||
| 551 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 552 | xor esi, ebx | ||
| 553 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 554 | xor esi, ebx | ||
| 555 | ; | ||
| 556 | ; Round 10 | ||
| 557 | mov eax, DWORD PTR 32[esp] | ||
| 558 | mov edx, esi | ||
| 559 | shr edx, 16 | ||
| 560 | mov ecx, DWORD PTR 36[esp] | ||
| 561 | xor edx, esi | ||
| 562 | and eax, edx | ||
| 563 | and edx, ecx | ||
| 564 | mov ebx, eax | ||
| 565 | shl ebx, 16 | ||
| 566 | mov ecx, edx | ||
| 567 | shl ecx, 16 | ||
| 568 | xor eax, ebx | ||
| 569 | xor edx, ecx | ||
| 570 | mov ebx, DWORD PTR 80[ebp] | ||
| 571 | xor eax, ebx | ||
| 572 | mov ecx, DWORD PTR 84[ebp] | ||
| 573 | xor eax, esi | ||
| 574 | xor edx, esi | ||
| 575 | xor edx, ecx | ||
| 576 | and eax, 0fcfcfcfch | ||
| 577 | xor ebx, ebx | ||
| 578 | and edx, 0cfcfcfcfh | ||
| 579 | xor ecx, ecx | ||
| 580 | mov bl, al | ||
| 581 | mov cl, ah | ||
| 582 | ror edx, 4 | ||
| 583 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 584 | mov bl, dl | ||
| 585 | xor edi, ebp | ||
| 586 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 587 | xor edi, ebp | ||
| 588 | mov cl, dh | ||
| 589 | shr eax, 16 | ||
| 590 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 591 | xor edi, ebp | ||
| 592 | mov bl, ah | ||
| 593 | shr edx, 16 | ||
| 594 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 595 | xor edi, ebp | ||
| 596 | mov ebp, DWORD PTR 28[esp] | ||
| 597 | mov cl, dh | ||
| 598 | and eax, 0ffh | ||
| 599 | and edx, 0ffh | ||
| 600 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 601 | xor edi, ebx | ||
| 602 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 603 | xor edi, ebx | ||
| 604 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 605 | xor edi, ebx | ||
| 606 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 607 | xor edi, ebx | ||
| 608 | ; | ||
| 609 | ; Round 11 | ||
| 610 | mov eax, DWORD PTR 32[esp] | ||
| 611 | mov edx, edi | ||
| 612 | shr edx, 16 | ||
| 613 | mov ecx, DWORD PTR 36[esp] | ||
| 614 | xor edx, edi | ||
| 615 | and eax, edx | ||
| 616 | and edx, ecx | ||
| 617 | mov ebx, eax | ||
| 618 | shl ebx, 16 | ||
| 619 | mov ecx, edx | ||
| 620 | shl ecx, 16 | ||
| 621 | xor eax, ebx | ||
| 622 | xor edx, ecx | ||
| 623 | mov ebx, DWORD PTR 88[ebp] | ||
| 624 | xor eax, ebx | ||
| 625 | mov ecx, DWORD PTR 92[ebp] | ||
| 626 | xor eax, edi | ||
| 627 | xor edx, edi | ||
| 628 | xor edx, ecx | ||
| 629 | and eax, 0fcfcfcfch | ||
| 630 | xor ebx, ebx | ||
| 631 | and edx, 0cfcfcfcfh | ||
| 632 | xor ecx, ecx | ||
| 633 | mov bl, al | ||
| 634 | mov cl, ah | ||
| 635 | ror edx, 4 | ||
| 636 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 637 | mov bl, dl | ||
| 638 | xor esi, ebp | ||
| 639 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 640 | xor esi, ebp | ||
| 641 | mov cl, dh | ||
| 642 | shr eax, 16 | ||
| 643 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 644 | xor esi, ebp | ||
| 645 | mov bl, ah | ||
| 646 | shr edx, 16 | ||
| 647 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 648 | xor esi, ebp | ||
| 649 | mov ebp, DWORD PTR 28[esp] | ||
| 650 | mov cl, dh | ||
| 651 | and eax, 0ffh | ||
| 652 | and edx, 0ffh | ||
| 653 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 654 | xor esi, ebx | ||
| 655 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 656 | xor esi, ebx | ||
| 657 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 658 | xor esi, ebx | ||
| 659 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 660 | xor esi, ebx | ||
| 661 | ; | ||
| 662 | ; Round 12 | ||
| 663 | mov eax, DWORD PTR 32[esp] | ||
| 664 | mov edx, esi | ||
| 665 | shr edx, 16 | ||
| 666 | mov ecx, DWORD PTR 36[esp] | ||
| 667 | xor edx, esi | ||
| 668 | and eax, edx | ||
| 669 | and edx, ecx | ||
| 670 | mov ebx, eax | ||
| 671 | shl ebx, 16 | ||
| 672 | mov ecx, edx | ||
| 673 | shl ecx, 16 | ||
| 674 | xor eax, ebx | ||
| 675 | xor edx, ecx | ||
| 676 | mov ebx, DWORD PTR 96[ebp] | ||
| 677 | xor eax, ebx | ||
| 678 | mov ecx, DWORD PTR 100[ebp] | ||
| 679 | xor eax, esi | ||
| 680 | xor edx, esi | ||
| 681 | xor edx, ecx | ||
| 682 | and eax, 0fcfcfcfch | ||
| 683 | xor ebx, ebx | ||
| 684 | and edx, 0cfcfcfcfh | ||
| 685 | xor ecx, ecx | ||
| 686 | mov bl, al | ||
| 687 | mov cl, ah | ||
| 688 | ror edx, 4 | ||
| 689 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 690 | mov bl, dl | ||
| 691 | xor edi, ebp | ||
| 692 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 693 | xor edi, ebp | ||
| 694 | mov cl, dh | ||
| 695 | shr eax, 16 | ||
| 696 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 697 | xor edi, ebp | ||
| 698 | mov bl, ah | ||
| 699 | shr edx, 16 | ||
| 700 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 701 | xor edi, ebp | ||
| 702 | mov ebp, DWORD PTR 28[esp] | ||
| 703 | mov cl, dh | ||
| 704 | and eax, 0ffh | ||
| 705 | and edx, 0ffh | ||
| 706 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 707 | xor edi, ebx | ||
| 708 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 709 | xor edi, ebx | ||
| 710 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 711 | xor edi, ebx | ||
| 712 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 713 | xor edi, ebx | ||
| 714 | ; | ||
| 715 | ; Round 13 | ||
| 716 | mov eax, DWORD PTR 32[esp] | ||
| 717 | mov edx, edi | ||
| 718 | shr edx, 16 | ||
| 719 | mov ecx, DWORD PTR 36[esp] | ||
| 720 | xor edx, edi | ||
| 721 | and eax, edx | ||
| 722 | and edx, ecx | ||
| 723 | mov ebx, eax | ||
| 724 | shl ebx, 16 | ||
| 725 | mov ecx, edx | ||
| 726 | shl ecx, 16 | ||
| 727 | xor eax, ebx | ||
| 728 | xor edx, ecx | ||
| 729 | mov ebx, DWORD PTR 104[ebp] | ||
| 730 | xor eax, ebx | ||
| 731 | mov ecx, DWORD PTR 108[ebp] | ||
| 732 | xor eax, edi | ||
| 733 | xor edx, edi | ||
| 734 | xor edx, ecx | ||
| 735 | and eax, 0fcfcfcfch | ||
| 736 | xor ebx, ebx | ||
| 737 | and edx, 0cfcfcfcfh | ||
| 738 | xor ecx, ecx | ||
| 739 | mov bl, al | ||
| 740 | mov cl, ah | ||
| 741 | ror edx, 4 | ||
| 742 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 743 | mov bl, dl | ||
| 744 | xor esi, ebp | ||
| 745 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 746 | xor esi, ebp | ||
| 747 | mov cl, dh | ||
| 748 | shr eax, 16 | ||
| 749 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 750 | xor esi, ebp | ||
| 751 | mov bl, ah | ||
| 752 | shr edx, 16 | ||
| 753 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 754 | xor esi, ebp | ||
| 755 | mov ebp, DWORD PTR 28[esp] | ||
| 756 | mov cl, dh | ||
| 757 | and eax, 0ffh | ||
| 758 | and edx, 0ffh | ||
| 759 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 760 | xor esi, ebx | ||
| 761 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 762 | xor esi, ebx | ||
| 763 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 764 | xor esi, ebx | ||
| 765 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 766 | xor esi, ebx | ||
| 767 | ; | ||
| 768 | ; Round 14 | ||
| 769 | mov eax, DWORD PTR 32[esp] | ||
| 770 | mov edx, esi | ||
| 771 | shr edx, 16 | ||
| 772 | mov ecx, DWORD PTR 36[esp] | ||
| 773 | xor edx, esi | ||
| 774 | and eax, edx | ||
| 775 | and edx, ecx | ||
| 776 | mov ebx, eax | ||
| 777 | shl ebx, 16 | ||
| 778 | mov ecx, edx | ||
| 779 | shl ecx, 16 | ||
| 780 | xor eax, ebx | ||
| 781 | xor edx, ecx | ||
| 782 | mov ebx, DWORD PTR 112[ebp] | ||
| 783 | xor eax, ebx | ||
| 784 | mov ecx, DWORD PTR 116[ebp] | ||
| 785 | xor eax, esi | ||
| 786 | xor edx, esi | ||
| 787 | xor edx, ecx | ||
| 788 | and eax, 0fcfcfcfch | ||
| 789 | xor ebx, ebx | ||
| 790 | and edx, 0cfcfcfcfh | ||
| 791 | xor ecx, ecx | ||
| 792 | mov bl, al | ||
| 793 | mov cl, ah | ||
| 794 | ror edx, 4 | ||
| 795 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 796 | mov bl, dl | ||
| 797 | xor edi, ebp | ||
| 798 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 799 | xor edi, ebp | ||
| 800 | mov cl, dh | ||
| 801 | shr eax, 16 | ||
| 802 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 803 | xor edi, ebp | ||
| 804 | mov bl, ah | ||
| 805 | shr edx, 16 | ||
| 806 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 807 | xor edi, ebp | ||
| 808 | mov ebp, DWORD PTR 28[esp] | ||
| 809 | mov cl, dh | ||
| 810 | and eax, 0ffh | ||
| 811 | and edx, 0ffh | ||
| 812 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 813 | xor edi, ebx | ||
| 814 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 815 | xor edi, ebx | ||
| 816 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 817 | xor edi, ebx | ||
| 818 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 819 | xor edi, ebx | ||
| 820 | ; | ||
| 821 | ; Round 15 | ||
| 822 | mov eax, DWORD PTR 32[esp] | ||
| 823 | mov edx, edi | ||
| 824 | shr edx, 16 | ||
| 825 | mov ecx, DWORD PTR 36[esp] | ||
| 826 | xor edx, edi | ||
| 827 | and eax, edx | ||
| 828 | and edx, ecx | ||
| 829 | mov ebx, eax | ||
| 830 | shl ebx, 16 | ||
| 831 | mov ecx, edx | ||
| 832 | shl ecx, 16 | ||
| 833 | xor eax, ebx | ||
| 834 | xor edx, ecx | ||
| 835 | mov ebx, DWORD PTR 120[ebp] | ||
| 836 | xor eax, ebx | ||
| 837 | mov ecx, DWORD PTR 124[ebp] | ||
| 838 | xor eax, edi | ||
| 839 | xor edx, edi | ||
| 840 | xor edx, ecx | ||
| 841 | and eax, 0fcfcfcfch | ||
| 842 | xor ebx, ebx | ||
| 843 | and edx, 0cfcfcfcfh | ||
| 844 | xor ecx, ecx | ||
| 845 | mov bl, al | ||
| 846 | mov cl, ah | ||
| 847 | ror edx, 4 | ||
| 848 | mov ebp, DWORD PTR _des_SPtrans[ebx] | ||
| 849 | mov bl, dl | ||
| 850 | xor esi, ebp | ||
| 851 | mov ebp, DWORD PTR _des_SPtrans[0200h+ecx] | ||
| 852 | xor esi, ebp | ||
| 853 | mov cl, dh | ||
| 854 | shr eax, 16 | ||
| 855 | mov ebp, DWORD PTR _des_SPtrans[0100h+ebx] | ||
| 856 | xor esi, ebp | ||
| 857 | mov bl, ah | ||
| 858 | shr edx, 16 | ||
| 859 | mov ebp, DWORD PTR _des_SPtrans[0300h+ecx] | ||
| 860 | xor esi, ebp | ||
| 861 | mov ebp, DWORD PTR 28[esp] | ||
| 862 | mov cl, dh | ||
| 863 | and eax, 0ffh | ||
| 864 | and edx, 0ffh | ||
| 865 | mov ebx, DWORD PTR _des_SPtrans[0600h+ebx] | ||
| 866 | xor esi, ebx | ||
| 867 | mov ebx, DWORD PTR _des_SPtrans[0700h+ecx] | ||
| 868 | xor esi, ebx | ||
| 869 | mov ebx, DWORD PTR _des_SPtrans[0400h+eax] | ||
| 870 | xor esi, ebx | ||
| 871 | mov ebx, DWORD PTR _des_SPtrans[0500h+edx] | ||
| 872 | xor esi, ebx | ||
| 873 | mov ebx, DWORD PTR [esp] | ||
| 874 | mov eax, edi | ||
| 875 | dec ebx | ||
| 876 | mov edi, esi | ||
| 877 | mov esi, eax | ||
| 878 | mov DWORD PTR [esp],ebx | ||
| 879 | jnz L000start | ||
| 880 | ; | ||
| 881 | ; FP | ||
| 882 | mov edx, DWORD PTR 24[esp] | ||
| 883 | ror edi, 1 | ||
| 884 | mov eax, esi | ||
| 885 | xor esi, edi | ||
| 886 | and esi, 0aaaaaaaah | ||
| 887 | xor eax, esi | ||
| 888 | xor edi, esi | ||
| 889 | ; | ||
| 890 | rol eax, 23 | ||
| 891 | mov esi, eax | ||
| 892 | xor eax, edi | ||
| 893 | and eax, 003fc03fch | ||
| 894 | xor esi, eax | ||
| 895 | xor edi, eax | ||
| 896 | ; | ||
| 897 | rol esi, 10 | ||
| 898 | mov eax, esi | ||
| 899 | xor esi, edi | ||
| 900 | and esi, 033333333h | ||
| 901 | xor eax, esi | ||
| 902 | xor edi, esi | ||
| 903 | ; | ||
| 904 | rol edi, 18 | ||
| 905 | mov esi, edi | ||
| 906 | xor edi, eax | ||
| 907 | and edi, 0fff0000fh | ||
| 908 | xor esi, edi | ||
| 909 | xor eax, edi | ||
| 910 | ; | ||
| 911 | rol esi, 12 | ||
| 912 | mov edi, esi | ||
| 913 | xor esi, eax | ||
| 914 | and esi, 0f0f0f0f0h | ||
| 915 | xor edi, esi | ||
| 916 | xor eax, esi | ||
| 917 | ; | ||
| 918 | ror eax, 4 | ||
| 919 | mov DWORD PTR [edx],eax | ||
| 920 | mov DWORD PTR 4[edx],edi | ||
| 921 | pop ecx | ||
| 922 | pop edi | ||
| 923 | pop esi | ||
| 924 | pop ebx | ||
| 925 | pop ebp | ||
| 926 | ret | ||
| 927 | _fcrypt_body ENDP | ||
| 928 | _TEXT ENDS | ||
| 929 | END | ||
diff --git a/src/lib/libssl/src/crypto/des/asm/yx86unix.cpp b/src/lib/libssl/src/crypto/des/asm/yx86unix.cpp new file mode 100644 index 0000000000..8719e38607 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/asm/yx86unix.cpp | |||
| @@ -0,0 +1,976 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define des_SPtrans _des_SPtrans | ||
| 13 | #define fcrypt_body _fcrypt_body | ||
| 14 | |||
| 15 | #endif | ||
| 16 | |||
| 17 | #ifdef OUT | ||
| 18 | #define OK 1 | ||
| 19 | #define ALIGN 4 | ||
| 20 | #endif | ||
| 21 | |||
| 22 | #ifdef BSDI | ||
| 23 | #define OK 1 | ||
| 24 | #define ALIGN 4 | ||
| 25 | #undef SIZE | ||
| 26 | #undef TYPE | ||
| 27 | #define SIZE(a,b) | ||
| 28 | #define TYPE(a,b) | ||
| 29 | #endif | ||
| 30 | |||
| 31 | #if defined(ELF) || defined(SOL) | ||
| 32 | #define OK 1 | ||
| 33 | #define ALIGN 16 | ||
| 34 | #endif | ||
| 35 | |||
| 36 | #ifndef OK | ||
| 37 | You need to define one of | ||
| 38 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 39 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 40 | SOL - solaris systems, which are elf with strange comment lines | ||
| 41 | BSDI - a.out with a very primative version of as. | ||
| 42 | #endif | ||
| 43 | |||
| 44 | /* Let the Assembler begin :-) */ | ||
| 45 | /* Don't even think of reading this code */ | ||
| 46 | /* It was automatically generated by crypt586.pl */ | ||
| 47 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 48 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 49 | /* eric <eay@cryptsoft.com> */ | ||
| 50 | |||
| 51 | .file "crypt586.s" | ||
| 52 | .version "01.01" | ||
| 53 | gcc2_compiled.: | ||
| 54 | .text | ||
| 55 | .align ALIGN | ||
| 56 | .globl fcrypt_body | ||
| 57 | TYPE(fcrypt_body,@function) | ||
| 58 | fcrypt_body: | ||
| 59 | pushl %ebp | ||
| 60 | pushl %ebx | ||
| 61 | pushl %esi | ||
| 62 | pushl %edi | ||
| 63 | |||
| 64 | |||
| 65 | /* Load the 2 words */ | ||
| 66 | xorl %edi, %edi | ||
| 67 | xorl %esi, %esi | ||
| 68 | movl 24(%esp), %ebp | ||
| 69 | pushl $25 | ||
| 70 | .L000start: | ||
| 71 | |||
| 72 | /* Round 0 */ | ||
| 73 | movl 32(%esp), %eax | ||
| 74 | movl %esi, %edx | ||
| 75 | shrl $16, %edx | ||
| 76 | movl 36(%esp), %ecx | ||
| 77 | xorl %esi, %edx | ||
| 78 | andl %edx, %eax | ||
| 79 | andl %ecx, %edx | ||
| 80 | movl %eax, %ebx | ||
| 81 | sall $16, %ebx | ||
| 82 | movl %edx, %ecx | ||
| 83 | sall $16, %ecx | ||
| 84 | xorl %ebx, %eax | ||
| 85 | xorl %ecx, %edx | ||
| 86 | movl (%ebp), %ebx | ||
| 87 | xorl %ebx, %eax | ||
| 88 | movl 4(%ebp), %ecx | ||
| 89 | xorl %esi, %eax | ||
| 90 | xorl %esi, %edx | ||
| 91 | xorl %ecx, %edx | ||
| 92 | andl $0xfcfcfcfc, %eax | ||
| 93 | xorl %ebx, %ebx | ||
| 94 | andl $0xcfcfcfcf, %edx | ||
| 95 | xorl %ecx, %ecx | ||
| 96 | movb %al, %bl | ||
| 97 | movb %ah, %cl | ||
| 98 | rorl $4, %edx | ||
| 99 | movl des_SPtrans(%ebx),%ebp | ||
| 100 | movb %dl, %bl | ||
| 101 | xorl %ebp, %edi | ||
| 102 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 103 | xorl %ebp, %edi | ||
| 104 | movb %dh, %cl | ||
| 105 | shrl $16, %eax | ||
| 106 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 107 | xorl %ebp, %edi | ||
| 108 | movb %ah, %bl | ||
| 109 | shrl $16, %edx | ||
| 110 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 111 | xorl %ebp, %edi | ||
| 112 | movl 28(%esp), %ebp | ||
| 113 | movb %dh, %cl | ||
| 114 | andl $0xff, %eax | ||
| 115 | andl $0xff, %edx | ||
| 116 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 117 | xorl %ebx, %edi | ||
| 118 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 119 | xorl %ebx, %edi | ||
| 120 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 121 | xorl %ebx, %edi | ||
| 122 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 123 | xorl %ebx, %edi | ||
| 124 | |||
| 125 | /* Round 1 */ | ||
| 126 | movl 32(%esp), %eax | ||
| 127 | movl %edi, %edx | ||
| 128 | shrl $16, %edx | ||
| 129 | movl 36(%esp), %ecx | ||
| 130 | xorl %edi, %edx | ||
| 131 | andl %edx, %eax | ||
| 132 | andl %ecx, %edx | ||
| 133 | movl %eax, %ebx | ||
| 134 | sall $16, %ebx | ||
| 135 | movl %edx, %ecx | ||
| 136 | sall $16, %ecx | ||
| 137 | xorl %ebx, %eax | ||
| 138 | xorl %ecx, %edx | ||
| 139 | movl 8(%ebp), %ebx | ||
| 140 | xorl %ebx, %eax | ||
| 141 | movl 12(%ebp), %ecx | ||
| 142 | xorl %edi, %eax | ||
| 143 | xorl %edi, %edx | ||
| 144 | xorl %ecx, %edx | ||
| 145 | andl $0xfcfcfcfc, %eax | ||
| 146 | xorl %ebx, %ebx | ||
| 147 | andl $0xcfcfcfcf, %edx | ||
| 148 | xorl %ecx, %ecx | ||
| 149 | movb %al, %bl | ||
| 150 | movb %ah, %cl | ||
| 151 | rorl $4, %edx | ||
| 152 | movl des_SPtrans(%ebx),%ebp | ||
| 153 | movb %dl, %bl | ||
| 154 | xorl %ebp, %esi | ||
| 155 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 156 | xorl %ebp, %esi | ||
| 157 | movb %dh, %cl | ||
| 158 | shrl $16, %eax | ||
| 159 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 160 | xorl %ebp, %esi | ||
| 161 | movb %ah, %bl | ||
| 162 | shrl $16, %edx | ||
| 163 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 164 | xorl %ebp, %esi | ||
| 165 | movl 28(%esp), %ebp | ||
| 166 | movb %dh, %cl | ||
| 167 | andl $0xff, %eax | ||
| 168 | andl $0xff, %edx | ||
| 169 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 170 | xorl %ebx, %esi | ||
| 171 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 172 | xorl %ebx, %esi | ||
| 173 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 174 | xorl %ebx, %esi | ||
| 175 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 176 | xorl %ebx, %esi | ||
| 177 | |||
| 178 | /* Round 2 */ | ||
| 179 | movl 32(%esp), %eax | ||
| 180 | movl %esi, %edx | ||
| 181 | shrl $16, %edx | ||
| 182 | movl 36(%esp), %ecx | ||
| 183 | xorl %esi, %edx | ||
| 184 | andl %edx, %eax | ||
| 185 | andl %ecx, %edx | ||
| 186 | movl %eax, %ebx | ||
| 187 | sall $16, %ebx | ||
| 188 | movl %edx, %ecx | ||
| 189 | sall $16, %ecx | ||
| 190 | xorl %ebx, %eax | ||
| 191 | xorl %ecx, %edx | ||
| 192 | movl 16(%ebp), %ebx | ||
| 193 | xorl %ebx, %eax | ||
| 194 | movl 20(%ebp), %ecx | ||
| 195 | xorl %esi, %eax | ||
| 196 | xorl %esi, %edx | ||
| 197 | xorl %ecx, %edx | ||
| 198 | andl $0xfcfcfcfc, %eax | ||
| 199 | xorl %ebx, %ebx | ||
| 200 | andl $0xcfcfcfcf, %edx | ||
| 201 | xorl %ecx, %ecx | ||
| 202 | movb %al, %bl | ||
| 203 | movb %ah, %cl | ||
| 204 | rorl $4, %edx | ||
| 205 | movl des_SPtrans(%ebx),%ebp | ||
| 206 | movb %dl, %bl | ||
| 207 | xorl %ebp, %edi | ||
| 208 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 209 | xorl %ebp, %edi | ||
| 210 | movb %dh, %cl | ||
| 211 | shrl $16, %eax | ||
| 212 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 213 | xorl %ebp, %edi | ||
| 214 | movb %ah, %bl | ||
| 215 | shrl $16, %edx | ||
| 216 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 217 | xorl %ebp, %edi | ||
| 218 | movl 28(%esp), %ebp | ||
| 219 | movb %dh, %cl | ||
| 220 | andl $0xff, %eax | ||
| 221 | andl $0xff, %edx | ||
| 222 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 223 | xorl %ebx, %edi | ||
| 224 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 225 | xorl %ebx, %edi | ||
| 226 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 227 | xorl %ebx, %edi | ||
| 228 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 229 | xorl %ebx, %edi | ||
| 230 | |||
| 231 | /* Round 3 */ | ||
| 232 | movl 32(%esp), %eax | ||
| 233 | movl %edi, %edx | ||
| 234 | shrl $16, %edx | ||
| 235 | movl 36(%esp), %ecx | ||
| 236 | xorl %edi, %edx | ||
| 237 | andl %edx, %eax | ||
| 238 | andl %ecx, %edx | ||
| 239 | movl %eax, %ebx | ||
| 240 | sall $16, %ebx | ||
| 241 | movl %edx, %ecx | ||
| 242 | sall $16, %ecx | ||
| 243 | xorl %ebx, %eax | ||
| 244 | xorl %ecx, %edx | ||
| 245 | movl 24(%ebp), %ebx | ||
| 246 | xorl %ebx, %eax | ||
| 247 | movl 28(%ebp), %ecx | ||
| 248 | xorl %edi, %eax | ||
| 249 | xorl %edi, %edx | ||
| 250 | xorl %ecx, %edx | ||
| 251 | andl $0xfcfcfcfc, %eax | ||
| 252 | xorl %ebx, %ebx | ||
| 253 | andl $0xcfcfcfcf, %edx | ||
| 254 | xorl %ecx, %ecx | ||
| 255 | movb %al, %bl | ||
| 256 | movb %ah, %cl | ||
| 257 | rorl $4, %edx | ||
| 258 | movl des_SPtrans(%ebx),%ebp | ||
| 259 | movb %dl, %bl | ||
| 260 | xorl %ebp, %esi | ||
| 261 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 262 | xorl %ebp, %esi | ||
| 263 | movb %dh, %cl | ||
| 264 | shrl $16, %eax | ||
| 265 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 266 | xorl %ebp, %esi | ||
| 267 | movb %ah, %bl | ||
| 268 | shrl $16, %edx | ||
| 269 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 270 | xorl %ebp, %esi | ||
| 271 | movl 28(%esp), %ebp | ||
| 272 | movb %dh, %cl | ||
| 273 | andl $0xff, %eax | ||
| 274 | andl $0xff, %edx | ||
| 275 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 276 | xorl %ebx, %esi | ||
| 277 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 278 | xorl %ebx, %esi | ||
| 279 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 280 | xorl %ebx, %esi | ||
| 281 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 282 | xorl %ebx, %esi | ||
| 283 | |||
| 284 | /* Round 4 */ | ||
| 285 | movl 32(%esp), %eax | ||
| 286 | movl %esi, %edx | ||
| 287 | shrl $16, %edx | ||
| 288 | movl 36(%esp), %ecx | ||
| 289 | xorl %esi, %edx | ||
| 290 | andl %edx, %eax | ||
| 291 | andl %ecx, %edx | ||
| 292 | movl %eax, %ebx | ||
| 293 | sall $16, %ebx | ||
| 294 | movl %edx, %ecx | ||
| 295 | sall $16, %ecx | ||
| 296 | xorl %ebx, %eax | ||
| 297 | xorl %ecx, %edx | ||
| 298 | movl 32(%ebp), %ebx | ||
| 299 | xorl %ebx, %eax | ||
| 300 | movl 36(%ebp), %ecx | ||
| 301 | xorl %esi, %eax | ||
| 302 | xorl %esi, %edx | ||
| 303 | xorl %ecx, %edx | ||
| 304 | andl $0xfcfcfcfc, %eax | ||
| 305 | xorl %ebx, %ebx | ||
| 306 | andl $0xcfcfcfcf, %edx | ||
| 307 | xorl %ecx, %ecx | ||
| 308 | movb %al, %bl | ||
| 309 | movb %ah, %cl | ||
| 310 | rorl $4, %edx | ||
| 311 | movl des_SPtrans(%ebx),%ebp | ||
| 312 | movb %dl, %bl | ||
| 313 | xorl %ebp, %edi | ||
| 314 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 315 | xorl %ebp, %edi | ||
| 316 | movb %dh, %cl | ||
| 317 | shrl $16, %eax | ||
| 318 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 319 | xorl %ebp, %edi | ||
| 320 | movb %ah, %bl | ||
| 321 | shrl $16, %edx | ||
| 322 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 323 | xorl %ebp, %edi | ||
| 324 | movl 28(%esp), %ebp | ||
| 325 | movb %dh, %cl | ||
| 326 | andl $0xff, %eax | ||
| 327 | andl $0xff, %edx | ||
| 328 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 329 | xorl %ebx, %edi | ||
| 330 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 331 | xorl %ebx, %edi | ||
| 332 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 333 | xorl %ebx, %edi | ||
| 334 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 335 | xorl %ebx, %edi | ||
| 336 | |||
| 337 | /* Round 5 */ | ||
| 338 | movl 32(%esp), %eax | ||
| 339 | movl %edi, %edx | ||
| 340 | shrl $16, %edx | ||
| 341 | movl 36(%esp), %ecx | ||
| 342 | xorl %edi, %edx | ||
| 343 | andl %edx, %eax | ||
| 344 | andl %ecx, %edx | ||
| 345 | movl %eax, %ebx | ||
| 346 | sall $16, %ebx | ||
| 347 | movl %edx, %ecx | ||
| 348 | sall $16, %ecx | ||
| 349 | xorl %ebx, %eax | ||
| 350 | xorl %ecx, %edx | ||
| 351 | movl 40(%ebp), %ebx | ||
| 352 | xorl %ebx, %eax | ||
| 353 | movl 44(%ebp), %ecx | ||
| 354 | xorl %edi, %eax | ||
| 355 | xorl %edi, %edx | ||
| 356 | xorl %ecx, %edx | ||
| 357 | andl $0xfcfcfcfc, %eax | ||
| 358 | xorl %ebx, %ebx | ||
| 359 | andl $0xcfcfcfcf, %edx | ||
| 360 | xorl %ecx, %ecx | ||
| 361 | movb %al, %bl | ||
| 362 | movb %ah, %cl | ||
| 363 | rorl $4, %edx | ||
| 364 | movl des_SPtrans(%ebx),%ebp | ||
| 365 | movb %dl, %bl | ||
| 366 | xorl %ebp, %esi | ||
| 367 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 368 | xorl %ebp, %esi | ||
| 369 | movb %dh, %cl | ||
| 370 | shrl $16, %eax | ||
| 371 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 372 | xorl %ebp, %esi | ||
| 373 | movb %ah, %bl | ||
| 374 | shrl $16, %edx | ||
| 375 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 376 | xorl %ebp, %esi | ||
| 377 | movl 28(%esp), %ebp | ||
| 378 | movb %dh, %cl | ||
| 379 | andl $0xff, %eax | ||
| 380 | andl $0xff, %edx | ||
| 381 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 382 | xorl %ebx, %esi | ||
| 383 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 384 | xorl %ebx, %esi | ||
| 385 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 386 | xorl %ebx, %esi | ||
| 387 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 388 | xorl %ebx, %esi | ||
| 389 | |||
| 390 | /* Round 6 */ | ||
| 391 | movl 32(%esp), %eax | ||
| 392 | movl %esi, %edx | ||
| 393 | shrl $16, %edx | ||
| 394 | movl 36(%esp), %ecx | ||
| 395 | xorl %esi, %edx | ||
| 396 | andl %edx, %eax | ||
| 397 | andl %ecx, %edx | ||
| 398 | movl %eax, %ebx | ||
| 399 | sall $16, %ebx | ||
| 400 | movl %edx, %ecx | ||
| 401 | sall $16, %ecx | ||
| 402 | xorl %ebx, %eax | ||
| 403 | xorl %ecx, %edx | ||
| 404 | movl 48(%ebp), %ebx | ||
| 405 | xorl %ebx, %eax | ||
| 406 | movl 52(%ebp), %ecx | ||
| 407 | xorl %esi, %eax | ||
| 408 | xorl %esi, %edx | ||
| 409 | xorl %ecx, %edx | ||
| 410 | andl $0xfcfcfcfc, %eax | ||
| 411 | xorl %ebx, %ebx | ||
| 412 | andl $0xcfcfcfcf, %edx | ||
| 413 | xorl %ecx, %ecx | ||
| 414 | movb %al, %bl | ||
| 415 | movb %ah, %cl | ||
| 416 | rorl $4, %edx | ||
| 417 | movl des_SPtrans(%ebx),%ebp | ||
| 418 | movb %dl, %bl | ||
| 419 | xorl %ebp, %edi | ||
| 420 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 421 | xorl %ebp, %edi | ||
| 422 | movb %dh, %cl | ||
| 423 | shrl $16, %eax | ||
| 424 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 425 | xorl %ebp, %edi | ||
| 426 | movb %ah, %bl | ||
| 427 | shrl $16, %edx | ||
| 428 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 429 | xorl %ebp, %edi | ||
| 430 | movl 28(%esp), %ebp | ||
| 431 | movb %dh, %cl | ||
| 432 | andl $0xff, %eax | ||
| 433 | andl $0xff, %edx | ||
| 434 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 435 | xorl %ebx, %edi | ||
| 436 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 437 | xorl %ebx, %edi | ||
| 438 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 439 | xorl %ebx, %edi | ||
| 440 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 441 | xorl %ebx, %edi | ||
| 442 | |||
| 443 | /* Round 7 */ | ||
| 444 | movl 32(%esp), %eax | ||
| 445 | movl %edi, %edx | ||
| 446 | shrl $16, %edx | ||
| 447 | movl 36(%esp), %ecx | ||
| 448 | xorl %edi, %edx | ||
| 449 | andl %edx, %eax | ||
| 450 | andl %ecx, %edx | ||
| 451 | movl %eax, %ebx | ||
| 452 | sall $16, %ebx | ||
| 453 | movl %edx, %ecx | ||
| 454 | sall $16, %ecx | ||
| 455 | xorl %ebx, %eax | ||
| 456 | xorl %ecx, %edx | ||
| 457 | movl 56(%ebp), %ebx | ||
| 458 | xorl %ebx, %eax | ||
| 459 | movl 60(%ebp), %ecx | ||
| 460 | xorl %edi, %eax | ||
| 461 | xorl %edi, %edx | ||
| 462 | xorl %ecx, %edx | ||
| 463 | andl $0xfcfcfcfc, %eax | ||
| 464 | xorl %ebx, %ebx | ||
| 465 | andl $0xcfcfcfcf, %edx | ||
| 466 | xorl %ecx, %ecx | ||
| 467 | movb %al, %bl | ||
| 468 | movb %ah, %cl | ||
| 469 | rorl $4, %edx | ||
| 470 | movl des_SPtrans(%ebx),%ebp | ||
| 471 | movb %dl, %bl | ||
| 472 | xorl %ebp, %esi | ||
| 473 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 474 | xorl %ebp, %esi | ||
| 475 | movb %dh, %cl | ||
| 476 | shrl $16, %eax | ||
| 477 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 478 | xorl %ebp, %esi | ||
| 479 | movb %ah, %bl | ||
| 480 | shrl $16, %edx | ||
| 481 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 482 | xorl %ebp, %esi | ||
| 483 | movl 28(%esp), %ebp | ||
| 484 | movb %dh, %cl | ||
| 485 | andl $0xff, %eax | ||
| 486 | andl $0xff, %edx | ||
| 487 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 488 | xorl %ebx, %esi | ||
| 489 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 490 | xorl %ebx, %esi | ||
| 491 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 492 | xorl %ebx, %esi | ||
| 493 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 494 | xorl %ebx, %esi | ||
| 495 | |||
| 496 | /* Round 8 */ | ||
| 497 | movl 32(%esp), %eax | ||
| 498 | movl %esi, %edx | ||
| 499 | shrl $16, %edx | ||
| 500 | movl 36(%esp), %ecx | ||
| 501 | xorl %esi, %edx | ||
| 502 | andl %edx, %eax | ||
| 503 | andl %ecx, %edx | ||
| 504 | movl %eax, %ebx | ||
| 505 | sall $16, %ebx | ||
| 506 | movl %edx, %ecx | ||
| 507 | sall $16, %ecx | ||
| 508 | xorl %ebx, %eax | ||
| 509 | xorl %ecx, %edx | ||
| 510 | movl 64(%ebp), %ebx | ||
| 511 | xorl %ebx, %eax | ||
| 512 | movl 68(%ebp), %ecx | ||
| 513 | xorl %esi, %eax | ||
| 514 | xorl %esi, %edx | ||
| 515 | xorl %ecx, %edx | ||
| 516 | andl $0xfcfcfcfc, %eax | ||
| 517 | xorl %ebx, %ebx | ||
| 518 | andl $0xcfcfcfcf, %edx | ||
| 519 | xorl %ecx, %ecx | ||
| 520 | movb %al, %bl | ||
| 521 | movb %ah, %cl | ||
| 522 | rorl $4, %edx | ||
| 523 | movl des_SPtrans(%ebx),%ebp | ||
| 524 | movb %dl, %bl | ||
| 525 | xorl %ebp, %edi | ||
| 526 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 527 | xorl %ebp, %edi | ||
| 528 | movb %dh, %cl | ||
| 529 | shrl $16, %eax | ||
| 530 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 531 | xorl %ebp, %edi | ||
| 532 | movb %ah, %bl | ||
| 533 | shrl $16, %edx | ||
| 534 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 535 | xorl %ebp, %edi | ||
| 536 | movl 28(%esp), %ebp | ||
| 537 | movb %dh, %cl | ||
| 538 | andl $0xff, %eax | ||
| 539 | andl $0xff, %edx | ||
| 540 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 541 | xorl %ebx, %edi | ||
| 542 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 543 | xorl %ebx, %edi | ||
| 544 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 545 | xorl %ebx, %edi | ||
| 546 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 547 | xorl %ebx, %edi | ||
| 548 | |||
| 549 | /* Round 9 */ | ||
| 550 | movl 32(%esp), %eax | ||
| 551 | movl %edi, %edx | ||
| 552 | shrl $16, %edx | ||
| 553 | movl 36(%esp), %ecx | ||
| 554 | xorl %edi, %edx | ||
| 555 | andl %edx, %eax | ||
| 556 | andl %ecx, %edx | ||
| 557 | movl %eax, %ebx | ||
| 558 | sall $16, %ebx | ||
| 559 | movl %edx, %ecx | ||
| 560 | sall $16, %ecx | ||
| 561 | xorl %ebx, %eax | ||
| 562 | xorl %ecx, %edx | ||
| 563 | movl 72(%ebp), %ebx | ||
| 564 | xorl %ebx, %eax | ||
| 565 | movl 76(%ebp), %ecx | ||
| 566 | xorl %edi, %eax | ||
| 567 | xorl %edi, %edx | ||
| 568 | xorl %ecx, %edx | ||
| 569 | andl $0xfcfcfcfc, %eax | ||
| 570 | xorl %ebx, %ebx | ||
| 571 | andl $0xcfcfcfcf, %edx | ||
| 572 | xorl %ecx, %ecx | ||
| 573 | movb %al, %bl | ||
| 574 | movb %ah, %cl | ||
| 575 | rorl $4, %edx | ||
| 576 | movl des_SPtrans(%ebx),%ebp | ||
| 577 | movb %dl, %bl | ||
| 578 | xorl %ebp, %esi | ||
| 579 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 580 | xorl %ebp, %esi | ||
| 581 | movb %dh, %cl | ||
| 582 | shrl $16, %eax | ||
| 583 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 584 | xorl %ebp, %esi | ||
| 585 | movb %ah, %bl | ||
| 586 | shrl $16, %edx | ||
| 587 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 588 | xorl %ebp, %esi | ||
| 589 | movl 28(%esp), %ebp | ||
| 590 | movb %dh, %cl | ||
| 591 | andl $0xff, %eax | ||
| 592 | andl $0xff, %edx | ||
| 593 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 594 | xorl %ebx, %esi | ||
| 595 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 596 | xorl %ebx, %esi | ||
| 597 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 598 | xorl %ebx, %esi | ||
| 599 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 600 | xorl %ebx, %esi | ||
| 601 | |||
| 602 | /* Round 10 */ | ||
| 603 | movl 32(%esp), %eax | ||
| 604 | movl %esi, %edx | ||
| 605 | shrl $16, %edx | ||
| 606 | movl 36(%esp), %ecx | ||
| 607 | xorl %esi, %edx | ||
| 608 | andl %edx, %eax | ||
| 609 | andl %ecx, %edx | ||
| 610 | movl %eax, %ebx | ||
| 611 | sall $16, %ebx | ||
| 612 | movl %edx, %ecx | ||
| 613 | sall $16, %ecx | ||
| 614 | xorl %ebx, %eax | ||
| 615 | xorl %ecx, %edx | ||
| 616 | movl 80(%ebp), %ebx | ||
| 617 | xorl %ebx, %eax | ||
| 618 | movl 84(%ebp), %ecx | ||
| 619 | xorl %esi, %eax | ||
| 620 | xorl %esi, %edx | ||
| 621 | xorl %ecx, %edx | ||
| 622 | andl $0xfcfcfcfc, %eax | ||
| 623 | xorl %ebx, %ebx | ||
| 624 | andl $0xcfcfcfcf, %edx | ||
| 625 | xorl %ecx, %ecx | ||
| 626 | movb %al, %bl | ||
| 627 | movb %ah, %cl | ||
| 628 | rorl $4, %edx | ||
| 629 | movl des_SPtrans(%ebx),%ebp | ||
| 630 | movb %dl, %bl | ||
| 631 | xorl %ebp, %edi | ||
| 632 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 633 | xorl %ebp, %edi | ||
| 634 | movb %dh, %cl | ||
| 635 | shrl $16, %eax | ||
| 636 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 637 | xorl %ebp, %edi | ||
| 638 | movb %ah, %bl | ||
| 639 | shrl $16, %edx | ||
| 640 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 641 | xorl %ebp, %edi | ||
| 642 | movl 28(%esp), %ebp | ||
| 643 | movb %dh, %cl | ||
| 644 | andl $0xff, %eax | ||
| 645 | andl $0xff, %edx | ||
| 646 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 647 | xorl %ebx, %edi | ||
| 648 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 649 | xorl %ebx, %edi | ||
| 650 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 651 | xorl %ebx, %edi | ||
| 652 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 653 | xorl %ebx, %edi | ||
| 654 | |||
| 655 | /* Round 11 */ | ||
| 656 | movl 32(%esp), %eax | ||
| 657 | movl %edi, %edx | ||
| 658 | shrl $16, %edx | ||
| 659 | movl 36(%esp), %ecx | ||
| 660 | xorl %edi, %edx | ||
| 661 | andl %edx, %eax | ||
| 662 | andl %ecx, %edx | ||
| 663 | movl %eax, %ebx | ||
| 664 | sall $16, %ebx | ||
| 665 | movl %edx, %ecx | ||
| 666 | sall $16, %ecx | ||
| 667 | xorl %ebx, %eax | ||
| 668 | xorl %ecx, %edx | ||
| 669 | movl 88(%ebp), %ebx | ||
| 670 | xorl %ebx, %eax | ||
| 671 | movl 92(%ebp), %ecx | ||
| 672 | xorl %edi, %eax | ||
| 673 | xorl %edi, %edx | ||
| 674 | xorl %ecx, %edx | ||
| 675 | andl $0xfcfcfcfc, %eax | ||
| 676 | xorl %ebx, %ebx | ||
| 677 | andl $0xcfcfcfcf, %edx | ||
| 678 | xorl %ecx, %ecx | ||
| 679 | movb %al, %bl | ||
| 680 | movb %ah, %cl | ||
| 681 | rorl $4, %edx | ||
| 682 | movl des_SPtrans(%ebx),%ebp | ||
| 683 | movb %dl, %bl | ||
| 684 | xorl %ebp, %esi | ||
| 685 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 686 | xorl %ebp, %esi | ||
| 687 | movb %dh, %cl | ||
| 688 | shrl $16, %eax | ||
| 689 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 690 | xorl %ebp, %esi | ||
| 691 | movb %ah, %bl | ||
| 692 | shrl $16, %edx | ||
| 693 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 694 | xorl %ebp, %esi | ||
| 695 | movl 28(%esp), %ebp | ||
| 696 | movb %dh, %cl | ||
| 697 | andl $0xff, %eax | ||
| 698 | andl $0xff, %edx | ||
| 699 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 700 | xorl %ebx, %esi | ||
| 701 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 702 | xorl %ebx, %esi | ||
| 703 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 704 | xorl %ebx, %esi | ||
| 705 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 706 | xorl %ebx, %esi | ||
| 707 | |||
| 708 | /* Round 12 */ | ||
| 709 | movl 32(%esp), %eax | ||
| 710 | movl %esi, %edx | ||
| 711 | shrl $16, %edx | ||
| 712 | movl 36(%esp), %ecx | ||
| 713 | xorl %esi, %edx | ||
| 714 | andl %edx, %eax | ||
| 715 | andl %ecx, %edx | ||
| 716 | movl %eax, %ebx | ||
| 717 | sall $16, %ebx | ||
| 718 | movl %edx, %ecx | ||
| 719 | sall $16, %ecx | ||
| 720 | xorl %ebx, %eax | ||
| 721 | xorl %ecx, %edx | ||
| 722 | movl 96(%ebp), %ebx | ||
| 723 | xorl %ebx, %eax | ||
| 724 | movl 100(%ebp), %ecx | ||
| 725 | xorl %esi, %eax | ||
| 726 | xorl %esi, %edx | ||
| 727 | xorl %ecx, %edx | ||
| 728 | andl $0xfcfcfcfc, %eax | ||
| 729 | xorl %ebx, %ebx | ||
| 730 | andl $0xcfcfcfcf, %edx | ||
| 731 | xorl %ecx, %ecx | ||
| 732 | movb %al, %bl | ||
| 733 | movb %ah, %cl | ||
| 734 | rorl $4, %edx | ||
| 735 | movl des_SPtrans(%ebx),%ebp | ||
| 736 | movb %dl, %bl | ||
| 737 | xorl %ebp, %edi | ||
| 738 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 739 | xorl %ebp, %edi | ||
| 740 | movb %dh, %cl | ||
| 741 | shrl $16, %eax | ||
| 742 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 743 | xorl %ebp, %edi | ||
| 744 | movb %ah, %bl | ||
| 745 | shrl $16, %edx | ||
| 746 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 747 | xorl %ebp, %edi | ||
| 748 | movl 28(%esp), %ebp | ||
| 749 | movb %dh, %cl | ||
| 750 | andl $0xff, %eax | ||
| 751 | andl $0xff, %edx | ||
| 752 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 753 | xorl %ebx, %edi | ||
| 754 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 755 | xorl %ebx, %edi | ||
| 756 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 757 | xorl %ebx, %edi | ||
| 758 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 759 | xorl %ebx, %edi | ||
| 760 | |||
| 761 | /* Round 13 */ | ||
| 762 | movl 32(%esp), %eax | ||
| 763 | movl %edi, %edx | ||
| 764 | shrl $16, %edx | ||
| 765 | movl 36(%esp), %ecx | ||
| 766 | xorl %edi, %edx | ||
| 767 | andl %edx, %eax | ||
| 768 | andl %ecx, %edx | ||
| 769 | movl %eax, %ebx | ||
| 770 | sall $16, %ebx | ||
| 771 | movl %edx, %ecx | ||
| 772 | sall $16, %ecx | ||
| 773 | xorl %ebx, %eax | ||
| 774 | xorl %ecx, %edx | ||
| 775 | movl 104(%ebp), %ebx | ||
| 776 | xorl %ebx, %eax | ||
| 777 | movl 108(%ebp), %ecx | ||
| 778 | xorl %edi, %eax | ||
| 779 | xorl %edi, %edx | ||
| 780 | xorl %ecx, %edx | ||
| 781 | andl $0xfcfcfcfc, %eax | ||
| 782 | xorl %ebx, %ebx | ||
| 783 | andl $0xcfcfcfcf, %edx | ||
| 784 | xorl %ecx, %ecx | ||
| 785 | movb %al, %bl | ||
| 786 | movb %ah, %cl | ||
| 787 | rorl $4, %edx | ||
| 788 | movl des_SPtrans(%ebx),%ebp | ||
| 789 | movb %dl, %bl | ||
| 790 | xorl %ebp, %esi | ||
| 791 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 792 | xorl %ebp, %esi | ||
| 793 | movb %dh, %cl | ||
| 794 | shrl $16, %eax | ||
| 795 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 796 | xorl %ebp, %esi | ||
| 797 | movb %ah, %bl | ||
| 798 | shrl $16, %edx | ||
| 799 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 800 | xorl %ebp, %esi | ||
| 801 | movl 28(%esp), %ebp | ||
| 802 | movb %dh, %cl | ||
| 803 | andl $0xff, %eax | ||
| 804 | andl $0xff, %edx | ||
| 805 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 806 | xorl %ebx, %esi | ||
| 807 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 808 | xorl %ebx, %esi | ||
| 809 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 810 | xorl %ebx, %esi | ||
| 811 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 812 | xorl %ebx, %esi | ||
| 813 | |||
| 814 | /* Round 14 */ | ||
| 815 | movl 32(%esp), %eax | ||
| 816 | movl %esi, %edx | ||
| 817 | shrl $16, %edx | ||
| 818 | movl 36(%esp), %ecx | ||
| 819 | xorl %esi, %edx | ||
| 820 | andl %edx, %eax | ||
| 821 | andl %ecx, %edx | ||
| 822 | movl %eax, %ebx | ||
| 823 | sall $16, %ebx | ||
| 824 | movl %edx, %ecx | ||
| 825 | sall $16, %ecx | ||
| 826 | xorl %ebx, %eax | ||
| 827 | xorl %ecx, %edx | ||
| 828 | movl 112(%ebp), %ebx | ||
| 829 | xorl %ebx, %eax | ||
| 830 | movl 116(%ebp), %ecx | ||
| 831 | xorl %esi, %eax | ||
| 832 | xorl %esi, %edx | ||
| 833 | xorl %ecx, %edx | ||
| 834 | andl $0xfcfcfcfc, %eax | ||
| 835 | xorl %ebx, %ebx | ||
| 836 | andl $0xcfcfcfcf, %edx | ||
| 837 | xorl %ecx, %ecx | ||
| 838 | movb %al, %bl | ||
| 839 | movb %ah, %cl | ||
| 840 | rorl $4, %edx | ||
| 841 | movl des_SPtrans(%ebx),%ebp | ||
| 842 | movb %dl, %bl | ||
| 843 | xorl %ebp, %edi | ||
| 844 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 845 | xorl %ebp, %edi | ||
| 846 | movb %dh, %cl | ||
| 847 | shrl $16, %eax | ||
| 848 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 849 | xorl %ebp, %edi | ||
| 850 | movb %ah, %bl | ||
| 851 | shrl $16, %edx | ||
| 852 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 853 | xorl %ebp, %edi | ||
| 854 | movl 28(%esp), %ebp | ||
| 855 | movb %dh, %cl | ||
| 856 | andl $0xff, %eax | ||
| 857 | andl $0xff, %edx | ||
| 858 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 859 | xorl %ebx, %edi | ||
| 860 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 861 | xorl %ebx, %edi | ||
| 862 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 863 | xorl %ebx, %edi | ||
| 864 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 865 | xorl %ebx, %edi | ||
| 866 | |||
| 867 | /* Round 15 */ | ||
| 868 | movl 32(%esp), %eax | ||
| 869 | movl %edi, %edx | ||
| 870 | shrl $16, %edx | ||
| 871 | movl 36(%esp), %ecx | ||
| 872 | xorl %edi, %edx | ||
| 873 | andl %edx, %eax | ||
| 874 | andl %ecx, %edx | ||
| 875 | movl %eax, %ebx | ||
| 876 | sall $16, %ebx | ||
| 877 | movl %edx, %ecx | ||
| 878 | sall $16, %ecx | ||
| 879 | xorl %ebx, %eax | ||
| 880 | xorl %ecx, %edx | ||
| 881 | movl 120(%ebp), %ebx | ||
| 882 | xorl %ebx, %eax | ||
| 883 | movl 124(%ebp), %ecx | ||
| 884 | xorl %edi, %eax | ||
| 885 | xorl %edi, %edx | ||
| 886 | xorl %ecx, %edx | ||
| 887 | andl $0xfcfcfcfc, %eax | ||
| 888 | xorl %ebx, %ebx | ||
| 889 | andl $0xcfcfcfcf, %edx | ||
| 890 | xorl %ecx, %ecx | ||
| 891 | movb %al, %bl | ||
| 892 | movb %ah, %cl | ||
| 893 | rorl $4, %edx | ||
| 894 | movl des_SPtrans(%ebx),%ebp | ||
| 895 | movb %dl, %bl | ||
| 896 | xorl %ebp, %esi | ||
| 897 | movl 0x200+des_SPtrans(%ecx),%ebp | ||
| 898 | xorl %ebp, %esi | ||
| 899 | movb %dh, %cl | ||
| 900 | shrl $16, %eax | ||
| 901 | movl 0x100+des_SPtrans(%ebx),%ebp | ||
| 902 | xorl %ebp, %esi | ||
| 903 | movb %ah, %bl | ||
| 904 | shrl $16, %edx | ||
| 905 | movl 0x300+des_SPtrans(%ecx),%ebp | ||
| 906 | xorl %ebp, %esi | ||
| 907 | movl 28(%esp), %ebp | ||
| 908 | movb %dh, %cl | ||
| 909 | andl $0xff, %eax | ||
| 910 | andl $0xff, %edx | ||
| 911 | movl 0x600+des_SPtrans(%ebx),%ebx | ||
| 912 | xorl %ebx, %esi | ||
| 913 | movl 0x700+des_SPtrans(%ecx),%ebx | ||
| 914 | xorl %ebx, %esi | ||
| 915 | movl 0x400+des_SPtrans(%eax),%ebx | ||
| 916 | xorl %ebx, %esi | ||
| 917 | movl 0x500+des_SPtrans(%edx),%ebx | ||
| 918 | xorl %ebx, %esi | ||
| 919 | movl (%esp), %ebx | ||
| 920 | movl %edi, %eax | ||
| 921 | decl %ebx | ||
| 922 | movl %esi, %edi | ||
| 923 | movl %eax, %esi | ||
| 924 | movl %ebx, (%esp) | ||
| 925 | jnz .L000start | ||
| 926 | |||
| 927 | /* FP */ | ||
| 928 | movl 24(%esp), %edx | ||
| 929 | .byte 209 | ||
| 930 | .byte 207 /* rorl $1 %edi */ | ||
| 931 | movl %esi, %eax | ||
| 932 | xorl %edi, %esi | ||
| 933 | andl $0xaaaaaaaa, %esi | ||
| 934 | xorl %esi, %eax | ||
| 935 | xorl %esi, %edi | ||
| 936 | |||
| 937 | roll $23, %eax | ||
| 938 | movl %eax, %esi | ||
| 939 | xorl %edi, %eax | ||
| 940 | andl $0x03fc03fc, %eax | ||
| 941 | xorl %eax, %esi | ||
| 942 | xorl %eax, %edi | ||
| 943 | |||
| 944 | roll $10, %esi | ||
| 945 | movl %esi, %eax | ||
| 946 | xorl %edi, %esi | ||
| 947 | andl $0x33333333, %esi | ||
| 948 | xorl %esi, %eax | ||
| 949 | xorl %esi, %edi | ||
| 950 | |||
| 951 | roll $18, %edi | ||
| 952 | movl %edi, %esi | ||
| 953 | xorl %eax, %edi | ||
| 954 | andl $0xfff0000f, %edi | ||
| 955 | xorl %edi, %esi | ||
| 956 | xorl %edi, %eax | ||
| 957 | |||
| 958 | roll $12, %esi | ||
| 959 | movl %esi, %edi | ||
| 960 | xorl %eax, %esi | ||
| 961 | andl $0xf0f0f0f0, %esi | ||
| 962 | xorl %esi, %edi | ||
| 963 | xorl %esi, %eax | ||
| 964 | |||
| 965 | rorl $4, %eax | ||
| 966 | movl %eax, (%edx) | ||
| 967 | movl %edi, 4(%edx) | ||
| 968 | popl %ecx | ||
| 969 | popl %edi | ||
| 970 | popl %esi | ||
| 971 | popl %ebx | ||
| 972 | popl %ebp | ||
| 973 | ret | ||
| 974 | .fcrypt_body_end: | ||
| 975 | SIZE(fcrypt_body,.fcrypt_body_end-fcrypt_body) | ||
| 976 | .ident "fcrypt_body" | ||
diff --git a/src/lib/libssl/src/crypto/des/des.man b/src/lib/libssl/src/crypto/des/des.man new file mode 100644 index 0000000000..7e06a1851a --- /dev/null +++ b/src/lib/libssl/src/crypto/des/des.man | |||
| @@ -0,0 +1,186 @@ | |||
| 1 | .TH DES 1 | ||
| 2 | .SH NAME | ||
| 3 | des - encrypt or decrypt data using Data Encryption Standard | ||
| 4 | .SH SYNOPSIS | ||
| 5 | .B des | ||
| 6 | ( | ||
| 7 | .B \-e | ||
| 8 | | | ||
| 9 | .B \-E | ||
| 10 | ) | ( | ||
| 11 | .B \-d | ||
| 12 | | | ||
| 13 | .B \-D | ||
| 14 | ) | ( | ||
| 15 | .B \-\fR[\fPcC\fR][\fPckname\fR]\fP | ||
| 16 | ) | | ||
| 17 | [ | ||
| 18 | .B \-b3hfs | ||
| 19 | ] [ | ||
| 20 | .B \-k | ||
| 21 | .I key | ||
| 22 | ] | ||
| 23 | ] [ | ||
| 24 | .B \-u\fR[\fIuuname\fR] | ||
| 25 | [ | ||
| 26 | .I input-file | ||
| 27 | [ | ||
| 28 | .I output-file | ||
| 29 | ] ] | ||
| 30 | .SH DESCRIPTION | ||
| 31 | .B des | ||
| 32 | encrypts and decrypts data using the | ||
| 33 | Data Encryption Standard algorithm. | ||
| 34 | One of | ||
| 35 | .B \-e, \-E | ||
| 36 | (for encrypt) or | ||
| 37 | .B \-d, \-D | ||
| 38 | (for decrypt) must be specified. | ||
| 39 | It is also possible to use | ||
| 40 | .B \-c | ||
| 41 | or | ||
| 42 | .B \-C | ||
| 43 | in conjunction or instead of the a encrypt/decrypt option to generate | ||
| 44 | a 16 character hexadecimal checksum, generated via the | ||
| 45 | .I des_cbc_cksum. | ||
| 46 | .LP | ||
| 47 | Two standard encryption modes are supported by the | ||
| 48 | .B des | ||
| 49 | program, Cipher Block Chaining (the default) and Electronic Code Book | ||
| 50 | (specified with | ||
| 51 | .B \-b | ||
| 52 | ). | ||
| 53 | .LP | ||
| 54 | The key used for the DES | ||
| 55 | algorithm is obtained by prompting the user unless the | ||
| 56 | .B `\-k | ||
| 57 | .I key' | ||
| 58 | option is given. | ||
| 59 | If the key is an argument to the | ||
| 60 | .B des | ||
| 61 | command, it is potentially visible to users executing | ||
| 62 | .BR ps (1) | ||
| 63 | or a derivative. To minimise this possibility, | ||
| 64 | .B des | ||
| 65 | takes care to destroy the key argument immediately upon entry. | ||
| 66 | If your shell keeps a history file be careful to make sure it is not | ||
| 67 | world readable. | ||
| 68 | .LP | ||
| 69 | Since this program attempts to maintain compatability with sunOS's | ||
| 70 | des(1) command, there are 2 different methods used to convert the user | ||
| 71 | supplied key to a des key. | ||
| 72 | Whenever and one or more of | ||
| 73 | .B \-E, \-D, \-C | ||
| 74 | or | ||
| 75 | .B \-3 | ||
| 76 | options are used, the key conversion procedure will not be compatible | ||
| 77 | with the sunOS des(1) version but will use all the user supplied | ||
| 78 | character to generate the des key. | ||
| 79 | .B des | ||
| 80 | command reads from standard input unless | ||
| 81 | .I input-file | ||
| 82 | is specified and writes to standard output unless | ||
| 83 | .I output-file | ||
| 84 | is given. | ||
| 85 | .SH OPTIONS | ||
| 86 | .TP | ||
| 87 | .B \-b | ||
| 88 | Select ECB | ||
| 89 | (eight bytes at a time) encryption mode. | ||
| 90 | .TP | ||
| 91 | .B \-3 | ||
| 92 | Encrypt using triple encryption. | ||
| 93 | By default triple cbc encryption is used but if the | ||
| 94 | .B \-b | ||
| 95 | option is used then triple ecb encryption is performed. | ||
| 96 | If the key is less than 8 characters long, the flag has no effect. | ||
| 97 | .TP | ||
| 98 | .B \-e | ||
| 99 | Encrypt data using an 8 byte key in a manner compatible with sunOS | ||
| 100 | des(1). | ||
| 101 | .TP | ||
| 102 | .B \-E | ||
| 103 | Encrypt data using a key of nearly unlimited length (1024 bytes). | ||
| 104 | This will product a more secure encryption. | ||
| 105 | .TP | ||
| 106 | .B \-d | ||
| 107 | Decrypt data that was encrypted with the \-e option. | ||
| 108 | .TP | ||
| 109 | .B \-D | ||
| 110 | Decrypt data that was encrypted with the \-E option. | ||
| 111 | .TP | ||
| 112 | .B \-c | ||
| 113 | Generate a 16 character hexadecimal cbc checksum and output this to | ||
| 114 | stderr. | ||
| 115 | If a filename was specified after the | ||
| 116 | .B \-c | ||
| 117 | option, the checksum is output to that file. | ||
| 118 | The checksum is generated using a key generated in a sunOS compatible | ||
| 119 | manner. | ||
| 120 | .TP | ||
| 121 | .B \-C | ||
| 122 | A cbc checksum is generated in the same manner as described for the | ||
| 123 | .B \-c | ||
| 124 | option but the DES key is generated in the same manner as used for the | ||
| 125 | .B \-E | ||
| 126 | and | ||
| 127 | .B \-D | ||
| 128 | options | ||
| 129 | .TP | ||
| 130 | .B \-f | ||
| 131 | Does nothing - allowed for compatibility with sunOS des(1) command. | ||
| 132 | .TP | ||
| 133 | .B \-s | ||
| 134 | Does nothing - allowed for compatibility with sunOS des(1) command. | ||
| 135 | .TP | ||
| 136 | .B "\-k \fIkey\fP" | ||
| 137 | Use the encryption | ||
| 138 | .I key | ||
| 139 | specified. | ||
| 140 | .TP | ||
| 141 | .B "\-h" | ||
| 142 | The | ||
| 143 | .I key | ||
| 144 | is assumed to be a 16 character hexadecimal number. | ||
| 145 | If the | ||
| 146 | .B "\-3" | ||
| 147 | option is used the key is assumed to be a 32 character hexadecimal | ||
| 148 | number. | ||
| 149 | .TP | ||
| 150 | .B \-u | ||
| 151 | This flag is used to read and write uuencoded files. If decrypting, | ||
| 152 | the input file is assumed to contain uuencoded, DES encrypted data. | ||
| 153 | If encrypting, the characters following the -u are used as the name of | ||
| 154 | the uuencoded file to embed in the begin line of the uuencoded | ||
| 155 | output. If there is no name specified after the -u, the name text.des | ||
| 156 | will be embedded in the header. | ||
| 157 | .SH SEE ALSO | ||
| 158 | .B ps (1) | ||
| 159 | .B des_crypt(3) | ||
| 160 | .SH BUGS | ||
| 161 | .LP | ||
| 162 | The problem with using the | ||
| 163 | .B -e | ||
| 164 | option is the short key length. | ||
| 165 | It would be better to use a real 56-bit key rather than an | ||
| 166 | ASCII-based 56-bit pattern. Knowing that the key was derived from ASCII | ||
| 167 | radically reduces the time necessary for a brute-force cryptographic attack. | ||
| 168 | My attempt to remove this problem is to add an alternative text-key to | ||
| 169 | DES-key function. This alternative function (accessed via | ||
| 170 | .B -E, -D, -S | ||
| 171 | and | ||
| 172 | .B -3 | ||
| 173 | ) | ||
| 174 | uses DES to help generate the key. | ||
| 175 | .LP | ||
| 176 | Be carefully when using the -u option. Doing des -ud <filename> will | ||
| 177 | not decrypt filename (the -u option will gobble the d option). | ||
| 178 | .LP | ||
| 179 | The VMS operating system operates in a world where files are always a | ||
| 180 | multiple of 512 bytes. This causes problems when encrypted data is | ||
| 181 | send from unix to VMS since a 88 byte file will suddenly be padded | ||
| 182 | with 424 null bytes. To get around this problem, use the -u option | ||
| 183 | to uuencode the data before it is send to the VMS system. | ||
| 184 | .SH AUTHOR | ||
| 185 | .LP | ||
| 186 | Eric Young (eay@cryptsoft.com) | ||
diff --git a/src/lib/libssl/src/crypto/des/des.org b/src/lib/libssl/src/crypto/des/des.org new file mode 100644 index 0000000000..a4cf5c8770 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/des.org | |||
| @@ -0,0 +1,301 @@ | |||
| 1 | /* crypto/des/des.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify des.org since des.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef HEADER_DES_H | ||
| 68 | #define HEADER_DES_H | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | extern "C" { | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #include <stdio.h> | ||
| 75 | |||
| 76 | /* If this is set to 'unsigned int' on a DEC Alpha, this gives about a | ||
| 77 | * %20 speed up (longs are 8 bytes, int's are 4). */ | ||
| 78 | #ifndef DES_LONG | ||
| 79 | #define DES_LONG unsigned long | ||
| 80 | #endif | ||
| 81 | |||
| 82 | typedef unsigned char des_cblock[8]; | ||
| 83 | typedef struct des_ks_struct | ||
| 84 | { | ||
| 85 | union { | ||
| 86 | des_cblock _; | ||
| 87 | /* make sure things are correct size on machines with | ||
| 88 | * 8 byte longs */ | ||
| 89 | DES_LONG pad[2]; | ||
| 90 | } ks; | ||
| 91 | #undef _ | ||
| 92 | #define _ ks._ | ||
| 93 | } des_key_schedule[16]; | ||
| 94 | |||
| 95 | #define DES_KEY_SZ (sizeof(des_cblock)) | ||
| 96 | #define DES_SCHEDULE_SZ (sizeof(des_key_schedule)) | ||
| 97 | |||
| 98 | #define DES_ENCRYPT 1 | ||
| 99 | #define DES_DECRYPT 0 | ||
| 100 | |||
| 101 | #define DES_CBC_MODE 0 | ||
| 102 | #define DES_PCBC_MODE 1 | ||
| 103 | |||
| 104 | #define des_ecb2_encrypt(i,o,k1,k2,e) \ | ||
| 105 | des_ecb3_encrypt((i),(o),(k1),(k2),(k1),(e)) | ||
| 106 | |||
| 107 | #define des_ede2_cbc_encrypt(i,o,l,k1,k2,iv,e) \ | ||
| 108 | des_ede3_cbc_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(e)) | ||
| 109 | |||
| 110 | #define des_ede2_cfb64_encrypt(i,o,l,k1,k2,iv,n,e) \ | ||
| 111 | des_ede3_cfb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n),(e)) | ||
| 112 | |||
| 113 | #define des_ede2_ofb64_encrypt(i,o,l,k1,k2,iv,n) \ | ||
| 114 | des_ede3_ofb64_encrypt((i),(o),(l),(k1),(k2),(k1),(iv),(n)) | ||
| 115 | |||
| 116 | #define C_Block des_cblock | ||
| 117 | #define Key_schedule des_key_schedule | ||
| 118 | #ifdef KERBEROS | ||
| 119 | #define ENCRYPT DES_ENCRYPT | ||
| 120 | #define DECRYPT DES_DECRYPT | ||
| 121 | #endif | ||
| 122 | #define KEY_SZ DES_KEY_SZ | ||
| 123 | #define string_to_key des_string_to_key | ||
| 124 | #define read_pw_string des_read_pw_string | ||
| 125 | #define random_key des_random_key | ||
| 126 | #define pcbc_encrypt des_pcbc_encrypt | ||
| 127 | #define set_key des_set_key | ||
| 128 | #define key_sched des_key_sched | ||
| 129 | #define ecb_encrypt des_ecb_encrypt | ||
| 130 | #define cbc_encrypt des_cbc_encrypt | ||
| 131 | #define ncbc_encrypt des_ncbc_encrypt | ||
| 132 | #define xcbc_encrypt des_xcbc_encrypt | ||
| 133 | #define cbc_cksum des_cbc_cksum | ||
| 134 | #define quad_cksum des_quad_cksum | ||
| 135 | |||
| 136 | /* For compatibility with the MIT lib - eay 20/05/92 */ | ||
| 137 | typedef des_key_schedule bit_64; | ||
| 138 | #define des_fixup_key_parity des_set_odd_parity | ||
| 139 | #define des_check_key_parity check_parity | ||
| 140 | |||
| 141 | extern int des_check_key; /* defaults to false */ | ||
| 142 | extern int des_rw_mode; /* defaults to DES_PCBC_MODE */ | ||
| 143 | |||
| 144 | /* The next line is used to disable full ANSI prototypes, if your | ||
| 145 | * compiler has problems with the prototypes, make sure this line always | ||
| 146 | * evaluates to true :-) */ | ||
| 147 | #if defined(MSDOS) || defined(__STDC__) | ||
| 148 | #undef NOPROTO | ||
| 149 | #endif | ||
| 150 | #ifndef NOPROTO | ||
| 151 | char *des_options(void); | ||
| 152 | void des_ecb3_encrypt(des_cblock *input,des_cblock *output, | ||
| 153 | des_key_schedule ks1,des_key_schedule ks2, | ||
| 154 | des_key_schedule ks3, int enc); | ||
| 155 | DES_LONG des_cbc_cksum(des_cblock *input,des_cblock *output, | ||
| 156 | long length,des_key_schedule schedule,des_cblock *ivec); | ||
| 157 | void des_cbc_encrypt(des_cblock *input,des_cblock *output,long length, | ||
| 158 | des_key_schedule schedule,des_cblock *ivec,int enc); | ||
| 159 | void des_ncbc_encrypt(des_cblock *input,des_cblock *output,long length, | ||
| 160 | des_key_schedule schedule,des_cblock *ivec,int enc); | ||
| 161 | void des_xcbc_encrypt(des_cblock *input,des_cblock *output,long length, | ||
| 162 | des_key_schedule schedule,des_cblock *ivec, | ||
| 163 | des_cblock *inw,des_cblock *outw,int enc); | ||
| 164 | void des_cfb_encrypt(unsigned char *in,unsigned char *out,int numbits, | ||
| 165 | long length,des_key_schedule schedule,des_cblock *ivec,int enc); | ||
| 166 | void des_ecb_encrypt(des_cblock *input,des_cblock *output, | ||
| 167 | des_key_schedule ks,int enc); | ||
| 168 | void des_encrypt(DES_LONG *data,des_key_schedule ks, int enc); | ||
| 169 | void des_encrypt2(DES_LONG *data,des_key_schedule ks, int enc); | ||
| 170 | void des_encrypt3(DES_LONG *data, des_key_schedule ks1, | ||
| 171 | des_key_schedule ks2, des_key_schedule ks3); | ||
| 172 | void des_decrypt3(DES_LONG *data, des_key_schedule ks1, | ||
| 173 | des_key_schedule ks2, des_key_schedule ks3); | ||
| 174 | void des_ede3_cbc_encrypt(des_cblock *input, des_cblock *output, | ||
| 175 | long length, des_key_schedule ks1, des_key_schedule ks2, | ||
| 176 | des_key_schedule ks3, des_cblock *ivec, int enc); | ||
| 177 | void des_ede3_cfb64_encrypt(unsigned char *in, unsigned char *out, | ||
| 178 | long length, des_key_schedule ks1, des_key_schedule ks2, | ||
| 179 | des_key_schedule ks3, des_cblock *ivec, int *num, int enc); | ||
| 180 | void des_ede3_ofb64_encrypt(unsigned char *in, unsigned char *out, | ||
| 181 | long length, des_key_schedule ks1, des_key_schedule ks2, | ||
| 182 | des_key_schedule ks3, des_cblock *ivec, int *num); | ||
| 183 | |||
| 184 | void des_xwhite_in2out(des_cblock (*des_key), des_cblock (*in_white), | ||
| 185 | des_cblock (*out_white)); | ||
| 186 | |||
| 187 | int des_enc_read(int fd,char *buf,int len,des_key_schedule sched, | ||
| 188 | des_cblock *iv); | ||
| 189 | int des_enc_write(int fd,char *buf,int len,des_key_schedule sched, | ||
| 190 | des_cblock *iv); | ||
| 191 | char *des_fcrypt(const char *buf,const char *salt, char *ret); | ||
| 192 | #ifdef PERL5 | ||
| 193 | char *des_crypt(const char *buf,const char *salt); | ||
| 194 | #else | ||
| 195 | /* some stupid compilers complain because I have declared char instead | ||
| 196 | * of const char */ | ||
| 197 | #ifdef HEADER_DES_LOCL_H | ||
| 198 | char *crypt(const char *buf,const char *salt); | ||
| 199 | #else | ||
| 200 | char *crypt(); | ||
| 201 | #endif | ||
| 202 | #endif | ||
| 203 | void des_ofb_encrypt(unsigned char *in,unsigned char *out, | ||
| 204 | int numbits,long length,des_key_schedule schedule,des_cblock *ivec); | ||
| 205 | void des_pcbc_encrypt(des_cblock *input,des_cblock *output,long length, | ||
| 206 | des_key_schedule schedule,des_cblock *ivec,int enc); | ||
| 207 | DES_LONG des_quad_cksum(des_cblock *input,des_cblock *output, | ||
| 208 | long length,int out_count,des_cblock *seed); | ||
| 209 | void des_random_seed(des_cblock key); | ||
| 210 | void des_random_key(des_cblock ret); | ||
| 211 | int des_read_password(des_cblock *key,char *prompt,int verify); | ||
| 212 | int des_read_2passwords(des_cblock *key1,des_cblock *key2, | ||
| 213 | char *prompt,int verify); | ||
| 214 | int des_read_pw_string(char *buf,int length,char *prompt,int verify); | ||
| 215 | void des_set_odd_parity(des_cblock *key); | ||
| 216 | int des_is_weak_key(des_cblock *key); | ||
| 217 | int des_set_key(des_cblock *key,des_key_schedule schedule); | ||
| 218 | int des_key_sched(des_cblock *key,des_key_schedule schedule); | ||
| 219 | void des_string_to_key(char *str,des_cblock *key); | ||
| 220 | void des_string_to_2keys(char *str,des_cblock *key1,des_cblock *key2); | ||
| 221 | void des_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, | ||
| 222 | des_key_schedule schedule, des_cblock *ivec, int *num, int enc); | ||
| 223 | void des_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, | ||
| 224 | des_key_schedule schedule, des_cblock *ivec, int *num); | ||
| 225 | int des_read_pw(char *buf, char *buff, int size, char *prompt, int verify); | ||
| 226 | |||
| 227 | /* Extra functions from Mark Murray <mark@grondar.za> */ | ||
| 228 | void des_cblock_print_file(des_cblock *cb, FILE *fp); | ||
| 229 | /* The following functions are not in the normal unix build or the | ||
| 230 | * SSLeay build. When using the SSLeay build, use RAND_seed() | ||
| 231 | * and RAND_bytes() instead. */ | ||
| 232 | int des_new_random_key(des_cblock *key); | ||
| 233 | void des_init_random_number_generator(des_cblock *key); | ||
| 234 | void des_set_random_generator_seed(des_cblock *key); | ||
| 235 | void des_set_sequence_number(des_cblock new_sequence_number); | ||
| 236 | void des_generate_random_block(des_cblock *block); | ||
| 237 | |||
| 238 | #else | ||
| 239 | |||
| 240 | char *des_options(); | ||
| 241 | void des_ecb3_encrypt(); | ||
| 242 | DES_LONG des_cbc_cksum(); | ||
| 243 | void des_cbc_encrypt(); | ||
| 244 | void des_ncbc_encrypt(); | ||
| 245 | void des_xcbc_encrypt(); | ||
| 246 | void des_cfb_encrypt(); | ||
| 247 | void des_ede3_cfb64_encrypt(); | ||
| 248 | void des_ede3_ofb64_encrypt(); | ||
| 249 | void des_ecb_encrypt(); | ||
| 250 | void des_encrypt(); | ||
| 251 | void des_encrypt2(); | ||
| 252 | void des_encrypt3(); | ||
| 253 | void des_decrypt3(); | ||
| 254 | void des_ede3_cbc_encrypt(); | ||
| 255 | int des_enc_read(); | ||
| 256 | int des_enc_write(); | ||
| 257 | char *des_fcrypt(); | ||
| 258 | #ifdef PERL5 | ||
| 259 | char *des_crypt(); | ||
| 260 | #else | ||
| 261 | char *crypt(); | ||
| 262 | #endif | ||
| 263 | void des_ofb_encrypt(); | ||
| 264 | void des_pcbc_encrypt(); | ||
| 265 | DES_LONG des_quad_cksum(); | ||
| 266 | void des_random_seed(); | ||
| 267 | void des_random_key(); | ||
| 268 | int des_read_password(); | ||
| 269 | int des_read_2passwords(); | ||
| 270 | int des_read_pw_string(); | ||
| 271 | void des_set_odd_parity(); | ||
| 272 | int des_is_weak_key(); | ||
| 273 | int des_set_key(); | ||
| 274 | int des_key_sched(); | ||
| 275 | void des_string_to_key(); | ||
| 276 | void des_string_to_2keys(); | ||
| 277 | void des_cfb64_encrypt(); | ||
| 278 | void des_ofb64_encrypt(); | ||
| 279 | int des_read_pw(); | ||
| 280 | void des_xwhite_in2out(); | ||
| 281 | |||
| 282 | /* Extra functions from Mark Murray <mark@grondar.za> */ | ||
| 283 | void des_cblock_print_file(); | ||
| 284 | /* The following functions are not in the normal unix build or the | ||
| 285 | * SSLeay build. When using the SSLeay build, use RAND_seed() | ||
| 286 | * and RAND_bytes() instead. */ | ||
| 287 | #ifdef FreeBSD | ||
| 288 | int des_new_random_key(); | ||
| 289 | void des_init_random_number_generator(); | ||
| 290 | void des_set_random_generator_seed(); | ||
| 291 | void des_set_sequence_number(); | ||
| 292 | void des_generate_random_block(); | ||
| 293 | #endif | ||
| 294 | |||
| 295 | #endif | ||
| 296 | |||
| 297 | #ifdef __cplusplus | ||
| 298 | } | ||
| 299 | #endif | ||
| 300 | |||
| 301 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/des/des.pl b/src/lib/libssl/src/crypto/des/des.pl new file mode 100644 index 0000000000..935eacb504 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/des.pl | |||
| @@ -0,0 +1,552 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | # des.pl - eric young 22/11/1991 eay@cryptsoft.com | ||
| 3 | # | ||
| 4 | # Copyright (C) 1993 Eric Young | ||
| 5 | # | ||
| 6 | # 11 April 1996 - patched to circumvent Perl 5 (through 5.002) problem | ||
| 7 | # with sign-extension on right shift operations. | ||
| 8 | # Ed Kubaitis - ejk@uiuc.edu | ||
| 9 | # | ||
| 10 | # eay - 92/08/31 - I think I have fixed all problems for 64bit | ||
| 11 | # versions of perl but I could be wrong since I have not tested it yet :-). | ||
| 12 | # | ||
| 13 | # This is an implementation of DES in perl. | ||
| 14 | # The two routines (des_set_key and des_ecb_encrypt) | ||
| 15 | # take 8 byte objects as arguments. | ||
| 16 | # | ||
| 17 | # des_set_key takes an 8 byte string as a key and returns a key schedule | ||
| 18 | # for use in calls to des_ecb_encrypt. | ||
| 19 | # des_ecb_encrypt takes three arguments, the first is a key schedule | ||
| 20 | # (make sure to pass it by reference with the *), the second is 1 | ||
| 21 | # to encrypt, 0 to decrypt. The third argument is an 8 byte object | ||
| 22 | # to encrypt. The function returns an 8 byte object that has been | ||
| 23 | # DES encrypted. | ||
| 24 | # | ||
| 25 | # example: | ||
| 26 | # require 'des.pl' | ||
| 27 | # | ||
| 28 | # $key =pack("C8",0x12,0x23,0x45,0x67,0x89,0xab,0xcd,0xef); | ||
| 29 | # @ks= &des_set_key($key); | ||
| 30 | # | ||
| 31 | # $outbytes= &des_ecb_encrypt(*ks,1,$data); | ||
| 32 | # @enc =unpack("C8",$outbytes); | ||
| 33 | # | ||
| 34 | |||
| 35 | package des; | ||
| 36 | |||
| 37 | eval("use integer;") if (int($]) > 4); | ||
| 38 | |||
| 39 | # The following 8 arrays are used in des_set_key | ||
| 40 | @skb0=( | ||
| 41 | # for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 | ||
| 42 | 0x00000000,0x00000010,0x20000000,0x20000010, | ||
| 43 | 0x00010000,0x00010010,0x20010000,0x20010010, | ||
| 44 | 0x00000800,0x00000810,0x20000800,0x20000810, | ||
| 45 | 0x00010800,0x00010810,0x20010800,0x20010810, | ||
| 46 | 0x00000020,0x00000030,0x20000020,0x20000030, | ||
| 47 | 0x00010020,0x00010030,0x20010020,0x20010030, | ||
| 48 | 0x00000820,0x00000830,0x20000820,0x20000830, | ||
| 49 | 0x00010820,0x00010830,0x20010820,0x20010830, | ||
| 50 | 0x00080000,0x00080010,0x20080000,0x20080010, | ||
| 51 | 0x00090000,0x00090010,0x20090000,0x20090010, | ||
| 52 | 0x00080800,0x00080810,0x20080800,0x20080810, | ||
| 53 | 0x00090800,0x00090810,0x20090800,0x20090810, | ||
| 54 | 0x00080020,0x00080030,0x20080020,0x20080030, | ||
| 55 | 0x00090020,0x00090030,0x20090020,0x20090030, | ||
| 56 | 0x00080820,0x00080830,0x20080820,0x20080830, | ||
| 57 | 0x00090820,0x00090830,0x20090820,0x20090830, | ||
| 58 | ); | ||
| 59 | @skb1=( | ||
| 60 | # for C bits (numbered as per FIPS 46) 7 8 10 11 12 13 | ||
| 61 | 0x00000000,0x02000000,0x00002000,0x02002000, | ||
| 62 | 0x00200000,0x02200000,0x00202000,0x02202000, | ||
| 63 | 0x00000004,0x02000004,0x00002004,0x02002004, | ||
| 64 | 0x00200004,0x02200004,0x00202004,0x02202004, | ||
| 65 | 0x00000400,0x02000400,0x00002400,0x02002400, | ||
| 66 | 0x00200400,0x02200400,0x00202400,0x02202400, | ||
| 67 | 0x00000404,0x02000404,0x00002404,0x02002404, | ||
| 68 | 0x00200404,0x02200404,0x00202404,0x02202404, | ||
| 69 | 0x10000000,0x12000000,0x10002000,0x12002000, | ||
| 70 | 0x10200000,0x12200000,0x10202000,0x12202000, | ||
| 71 | 0x10000004,0x12000004,0x10002004,0x12002004, | ||
| 72 | 0x10200004,0x12200004,0x10202004,0x12202004, | ||
| 73 | 0x10000400,0x12000400,0x10002400,0x12002400, | ||
| 74 | 0x10200400,0x12200400,0x10202400,0x12202400, | ||
| 75 | 0x10000404,0x12000404,0x10002404,0x12002404, | ||
| 76 | 0x10200404,0x12200404,0x10202404,0x12202404, | ||
| 77 | ); | ||
| 78 | @skb2=( | ||
| 79 | # for C bits (numbered as per FIPS 46) 14 15 16 17 19 20 | ||
| 80 | 0x00000000,0x00000001,0x00040000,0x00040001, | ||
| 81 | 0x01000000,0x01000001,0x01040000,0x01040001, | ||
| 82 | 0x00000002,0x00000003,0x00040002,0x00040003, | ||
| 83 | 0x01000002,0x01000003,0x01040002,0x01040003, | ||
| 84 | 0x00000200,0x00000201,0x00040200,0x00040201, | ||
| 85 | 0x01000200,0x01000201,0x01040200,0x01040201, | ||
| 86 | 0x00000202,0x00000203,0x00040202,0x00040203, | ||
| 87 | 0x01000202,0x01000203,0x01040202,0x01040203, | ||
| 88 | 0x08000000,0x08000001,0x08040000,0x08040001, | ||
| 89 | 0x09000000,0x09000001,0x09040000,0x09040001, | ||
| 90 | 0x08000002,0x08000003,0x08040002,0x08040003, | ||
| 91 | 0x09000002,0x09000003,0x09040002,0x09040003, | ||
| 92 | 0x08000200,0x08000201,0x08040200,0x08040201, | ||
| 93 | 0x09000200,0x09000201,0x09040200,0x09040201, | ||
| 94 | 0x08000202,0x08000203,0x08040202,0x08040203, | ||
| 95 | 0x09000202,0x09000203,0x09040202,0x09040203, | ||
| 96 | ); | ||
| 97 | @skb3=( | ||
| 98 | # for C bits (numbered as per FIPS 46) 21 23 24 26 27 28 | ||
| 99 | 0x00000000,0x00100000,0x00000100,0x00100100, | ||
| 100 | 0x00000008,0x00100008,0x00000108,0x00100108, | ||
| 101 | 0x00001000,0x00101000,0x00001100,0x00101100, | ||
| 102 | 0x00001008,0x00101008,0x00001108,0x00101108, | ||
| 103 | 0x04000000,0x04100000,0x04000100,0x04100100, | ||
| 104 | 0x04000008,0x04100008,0x04000108,0x04100108, | ||
| 105 | 0x04001000,0x04101000,0x04001100,0x04101100, | ||
| 106 | 0x04001008,0x04101008,0x04001108,0x04101108, | ||
| 107 | 0x00020000,0x00120000,0x00020100,0x00120100, | ||
| 108 | 0x00020008,0x00120008,0x00020108,0x00120108, | ||
| 109 | 0x00021000,0x00121000,0x00021100,0x00121100, | ||
| 110 | 0x00021008,0x00121008,0x00021108,0x00121108, | ||
| 111 | 0x04020000,0x04120000,0x04020100,0x04120100, | ||
| 112 | 0x04020008,0x04120008,0x04020108,0x04120108, | ||
| 113 | 0x04021000,0x04121000,0x04021100,0x04121100, | ||
| 114 | 0x04021008,0x04121008,0x04021108,0x04121108, | ||
| 115 | ); | ||
| 116 | @skb4=( | ||
| 117 | # for D bits (numbered as per FIPS 46) 1 2 3 4 5 6 | ||
| 118 | 0x00000000,0x10000000,0x00010000,0x10010000, | ||
| 119 | 0x00000004,0x10000004,0x00010004,0x10010004, | ||
| 120 | 0x20000000,0x30000000,0x20010000,0x30010000, | ||
| 121 | 0x20000004,0x30000004,0x20010004,0x30010004, | ||
| 122 | 0x00100000,0x10100000,0x00110000,0x10110000, | ||
| 123 | 0x00100004,0x10100004,0x00110004,0x10110004, | ||
| 124 | 0x20100000,0x30100000,0x20110000,0x30110000, | ||
| 125 | 0x20100004,0x30100004,0x20110004,0x30110004, | ||
| 126 | 0x00001000,0x10001000,0x00011000,0x10011000, | ||
| 127 | 0x00001004,0x10001004,0x00011004,0x10011004, | ||
| 128 | 0x20001000,0x30001000,0x20011000,0x30011000, | ||
| 129 | 0x20001004,0x30001004,0x20011004,0x30011004, | ||
| 130 | 0x00101000,0x10101000,0x00111000,0x10111000, | ||
| 131 | 0x00101004,0x10101004,0x00111004,0x10111004, | ||
| 132 | 0x20101000,0x30101000,0x20111000,0x30111000, | ||
| 133 | 0x20101004,0x30101004,0x20111004,0x30111004, | ||
| 134 | ); | ||
| 135 | @skb5=( | ||
| 136 | # for D bits (numbered as per FIPS 46) 8 9 11 12 13 14 | ||
| 137 | 0x00000000,0x08000000,0x00000008,0x08000008, | ||
| 138 | 0x00000400,0x08000400,0x00000408,0x08000408, | ||
| 139 | 0x00020000,0x08020000,0x00020008,0x08020008, | ||
| 140 | 0x00020400,0x08020400,0x00020408,0x08020408, | ||
| 141 | 0x00000001,0x08000001,0x00000009,0x08000009, | ||
| 142 | 0x00000401,0x08000401,0x00000409,0x08000409, | ||
| 143 | 0x00020001,0x08020001,0x00020009,0x08020009, | ||
| 144 | 0x00020401,0x08020401,0x00020409,0x08020409, | ||
| 145 | 0x02000000,0x0A000000,0x02000008,0x0A000008, | ||
| 146 | 0x02000400,0x0A000400,0x02000408,0x0A000408, | ||
| 147 | 0x02020000,0x0A020000,0x02020008,0x0A020008, | ||
| 148 | 0x02020400,0x0A020400,0x02020408,0x0A020408, | ||
| 149 | 0x02000001,0x0A000001,0x02000009,0x0A000009, | ||
| 150 | 0x02000401,0x0A000401,0x02000409,0x0A000409, | ||
| 151 | 0x02020001,0x0A020001,0x02020009,0x0A020009, | ||
| 152 | 0x02020401,0x0A020401,0x02020409,0x0A020409, | ||
| 153 | ); | ||
| 154 | @skb6=( | ||
| 155 | # for D bits (numbered as per FIPS 46) 16 17 18 19 20 21 | ||
| 156 | 0x00000000,0x00000100,0x00080000,0x00080100, | ||
| 157 | 0x01000000,0x01000100,0x01080000,0x01080100, | ||
| 158 | 0x00000010,0x00000110,0x00080010,0x00080110, | ||
| 159 | 0x01000010,0x01000110,0x01080010,0x01080110, | ||
| 160 | 0x00200000,0x00200100,0x00280000,0x00280100, | ||
| 161 | 0x01200000,0x01200100,0x01280000,0x01280100, | ||
| 162 | 0x00200010,0x00200110,0x00280010,0x00280110, | ||
| 163 | 0x01200010,0x01200110,0x01280010,0x01280110, | ||
| 164 | 0x00000200,0x00000300,0x00080200,0x00080300, | ||
| 165 | 0x01000200,0x01000300,0x01080200,0x01080300, | ||
| 166 | 0x00000210,0x00000310,0x00080210,0x00080310, | ||
| 167 | 0x01000210,0x01000310,0x01080210,0x01080310, | ||
| 168 | 0x00200200,0x00200300,0x00280200,0x00280300, | ||
| 169 | 0x01200200,0x01200300,0x01280200,0x01280300, | ||
| 170 | 0x00200210,0x00200310,0x00280210,0x00280310, | ||
| 171 | 0x01200210,0x01200310,0x01280210,0x01280310, | ||
| 172 | ); | ||
| 173 | @skb7=( | ||
| 174 | # for D bits (numbered as per FIPS 46) 22 23 24 25 27 28 | ||
| 175 | 0x00000000,0x04000000,0x00040000,0x04040000, | ||
| 176 | 0x00000002,0x04000002,0x00040002,0x04040002, | ||
| 177 | 0x00002000,0x04002000,0x00042000,0x04042000, | ||
| 178 | 0x00002002,0x04002002,0x00042002,0x04042002, | ||
| 179 | 0x00000020,0x04000020,0x00040020,0x04040020, | ||
| 180 | 0x00000022,0x04000022,0x00040022,0x04040022, | ||
| 181 | 0x00002020,0x04002020,0x00042020,0x04042020, | ||
| 182 | 0x00002022,0x04002022,0x00042022,0x04042022, | ||
| 183 | 0x00000800,0x04000800,0x00040800,0x04040800, | ||
| 184 | 0x00000802,0x04000802,0x00040802,0x04040802, | ||
| 185 | 0x00002800,0x04002800,0x00042800,0x04042800, | ||
| 186 | 0x00002802,0x04002802,0x00042802,0x04042802, | ||
| 187 | 0x00000820,0x04000820,0x00040820,0x04040820, | ||
| 188 | 0x00000822,0x04000822,0x00040822,0x04040822, | ||
| 189 | 0x00002820,0x04002820,0x00042820,0x04042820, | ||
| 190 | 0x00002822,0x04002822,0x00042822,0x04042822, | ||
| 191 | ); | ||
| 192 | |||
| 193 | @shifts2=(0,0,1,1,1,1,1,1,0,1,1,1,1,1,1,0); | ||
| 194 | |||
| 195 | # used in ecb_encrypt | ||
| 196 | @SP0=( | ||
| 197 | 0x00410100, 0x00010000, 0x40400000, 0x40410100, | ||
| 198 | 0x00400000, 0x40010100, 0x40010000, 0x40400000, | ||
| 199 | 0x40010100, 0x00410100, 0x00410000, 0x40000100, | ||
| 200 | 0x40400100, 0x00400000, 0x00000000, 0x40010000, | ||
| 201 | 0x00010000, 0x40000000, 0x00400100, 0x00010100, | ||
| 202 | 0x40410100, 0x00410000, 0x40000100, 0x00400100, | ||
| 203 | 0x40000000, 0x00000100, 0x00010100, 0x40410000, | ||
| 204 | 0x00000100, 0x40400100, 0x40410000, 0x00000000, | ||
| 205 | 0x00000000, 0x40410100, 0x00400100, 0x40010000, | ||
| 206 | 0x00410100, 0x00010000, 0x40000100, 0x00400100, | ||
| 207 | 0x40410000, 0x00000100, 0x00010100, 0x40400000, | ||
| 208 | 0x40010100, 0x40000000, 0x40400000, 0x00410000, | ||
| 209 | 0x40410100, 0x00010100, 0x00410000, 0x40400100, | ||
| 210 | 0x00400000, 0x40000100, 0x40010000, 0x00000000, | ||
| 211 | 0x00010000, 0x00400000, 0x40400100, 0x00410100, | ||
| 212 | 0x40000000, 0x40410000, 0x00000100, 0x40010100, | ||
| 213 | ); | ||
| 214 | @SP1=( | ||
| 215 | 0x08021002, 0x00000000, 0x00021000, 0x08020000, | ||
| 216 | 0x08000002, 0x00001002, 0x08001000, 0x00021000, | ||
| 217 | 0x00001000, 0x08020002, 0x00000002, 0x08001000, | ||
| 218 | 0x00020002, 0x08021000, 0x08020000, 0x00000002, | ||
| 219 | 0x00020000, 0x08001002, 0x08020002, 0x00001000, | ||
| 220 | 0x00021002, 0x08000000, 0x00000000, 0x00020002, | ||
| 221 | 0x08001002, 0x00021002, 0x08021000, 0x08000002, | ||
| 222 | 0x08000000, 0x00020000, 0x00001002, 0x08021002, | ||
| 223 | 0x00020002, 0x08021000, 0x08001000, 0x00021002, | ||
| 224 | 0x08021002, 0x00020002, 0x08000002, 0x00000000, | ||
| 225 | 0x08000000, 0x00001002, 0x00020000, 0x08020002, | ||
| 226 | 0x00001000, 0x08000000, 0x00021002, 0x08001002, | ||
| 227 | 0x08021000, 0x00001000, 0x00000000, 0x08000002, | ||
| 228 | 0x00000002, 0x08021002, 0x00021000, 0x08020000, | ||
| 229 | 0x08020002, 0x00020000, 0x00001002, 0x08001000, | ||
| 230 | 0x08001002, 0x00000002, 0x08020000, 0x00021000, | ||
| 231 | ); | ||
| 232 | @SP2=( | ||
| 233 | 0x20800000, 0x00808020, 0x00000020, 0x20800020, | ||
| 234 | 0x20008000, 0x00800000, 0x20800020, 0x00008020, | ||
| 235 | 0x00800020, 0x00008000, 0x00808000, 0x20000000, | ||
| 236 | 0x20808020, 0x20000020, 0x20000000, 0x20808000, | ||
| 237 | 0x00000000, 0x20008000, 0x00808020, 0x00000020, | ||
| 238 | 0x20000020, 0x20808020, 0x00008000, 0x20800000, | ||
| 239 | 0x20808000, 0x00800020, 0x20008020, 0x00808000, | ||
| 240 | 0x00008020, 0x00000000, 0x00800000, 0x20008020, | ||
| 241 | 0x00808020, 0x00000020, 0x20000000, 0x00008000, | ||
| 242 | 0x20000020, 0x20008000, 0x00808000, 0x20800020, | ||
| 243 | 0x00000000, 0x00808020, 0x00008020, 0x20808000, | ||
| 244 | 0x20008000, 0x00800000, 0x20808020, 0x20000000, | ||
| 245 | 0x20008020, 0x20800000, 0x00800000, 0x20808020, | ||
| 246 | 0x00008000, 0x00800020, 0x20800020, 0x00008020, | ||
| 247 | 0x00800020, 0x00000000, 0x20808000, 0x20000020, | ||
| 248 | 0x20800000, 0x20008020, 0x00000020, 0x00808000, | ||
| 249 | ); | ||
| 250 | @SP3=( | ||
| 251 | 0x00080201, 0x02000200, 0x00000001, 0x02080201, | ||
| 252 | 0x00000000, 0x02080000, 0x02000201, 0x00080001, | ||
| 253 | 0x02080200, 0x02000001, 0x02000000, 0x00000201, | ||
| 254 | 0x02000001, 0x00080201, 0x00080000, 0x02000000, | ||
| 255 | 0x02080001, 0x00080200, 0x00000200, 0x00000001, | ||
| 256 | 0x00080200, 0x02000201, 0x02080000, 0x00000200, | ||
| 257 | 0x00000201, 0x00000000, 0x00080001, 0x02080200, | ||
| 258 | 0x02000200, 0x02080001, 0x02080201, 0x00080000, | ||
| 259 | 0x02080001, 0x00000201, 0x00080000, 0x02000001, | ||
| 260 | 0x00080200, 0x02000200, 0x00000001, 0x02080000, | ||
| 261 | 0x02000201, 0x00000000, 0x00000200, 0x00080001, | ||
| 262 | 0x00000000, 0x02080001, 0x02080200, 0x00000200, | ||
| 263 | 0x02000000, 0x02080201, 0x00080201, 0x00080000, | ||
| 264 | 0x02080201, 0x00000001, 0x02000200, 0x00080201, | ||
| 265 | 0x00080001, 0x00080200, 0x02080000, 0x02000201, | ||
| 266 | 0x00000201, 0x02000000, 0x02000001, 0x02080200, | ||
| 267 | ); | ||
| 268 | @SP4=( | ||
| 269 | 0x01000000, 0x00002000, 0x00000080, 0x01002084, | ||
| 270 | 0x01002004, 0x01000080, 0x00002084, 0x01002000, | ||
| 271 | 0x00002000, 0x00000004, 0x01000004, 0x00002080, | ||
| 272 | 0x01000084, 0x01002004, 0x01002080, 0x00000000, | ||
| 273 | 0x00002080, 0x01000000, 0x00002004, 0x00000084, | ||
| 274 | 0x01000080, 0x00002084, 0x00000000, 0x01000004, | ||
| 275 | 0x00000004, 0x01000084, 0x01002084, 0x00002004, | ||
| 276 | 0x01002000, 0x00000080, 0x00000084, 0x01002080, | ||
| 277 | 0x01002080, 0x01000084, 0x00002004, 0x01002000, | ||
| 278 | 0x00002000, 0x00000004, 0x01000004, 0x01000080, | ||
| 279 | 0x01000000, 0x00002080, 0x01002084, 0x00000000, | ||
| 280 | 0x00002084, 0x01000000, 0x00000080, 0x00002004, | ||
| 281 | 0x01000084, 0x00000080, 0x00000000, 0x01002084, | ||
| 282 | 0x01002004, 0x01002080, 0x00000084, 0x00002000, | ||
| 283 | 0x00002080, 0x01002004, 0x01000080, 0x00000084, | ||
| 284 | 0x00000004, 0x00002084, 0x01002000, 0x01000004, | ||
| 285 | ); | ||
| 286 | @SP5=( | ||
| 287 | 0x10000008, 0x00040008, 0x00000000, 0x10040400, | ||
| 288 | 0x00040008, 0x00000400, 0x10000408, 0x00040000, | ||
| 289 | 0x00000408, 0x10040408, 0x00040400, 0x10000000, | ||
| 290 | 0x10000400, 0x10000008, 0x10040000, 0x00040408, | ||
| 291 | 0x00040000, 0x10000408, 0x10040008, 0x00000000, | ||
| 292 | 0x00000400, 0x00000008, 0x10040400, 0x10040008, | ||
| 293 | 0x10040408, 0x10040000, 0x10000000, 0x00000408, | ||
| 294 | 0x00000008, 0x00040400, 0x00040408, 0x10000400, | ||
| 295 | 0x00000408, 0x10000000, 0x10000400, 0x00040408, | ||
| 296 | 0x10040400, 0x00040008, 0x00000000, 0x10000400, | ||
| 297 | 0x10000000, 0x00000400, 0x10040008, 0x00040000, | ||
| 298 | 0x00040008, 0x10040408, 0x00040400, 0x00000008, | ||
| 299 | 0x10040408, 0x00040400, 0x00040000, 0x10000408, | ||
| 300 | 0x10000008, 0x10040000, 0x00040408, 0x00000000, | ||
| 301 | 0x00000400, 0x10000008, 0x10000408, 0x10040400, | ||
| 302 | 0x10040000, 0x00000408, 0x00000008, 0x10040008, | ||
| 303 | ); | ||
| 304 | @SP6=( | ||
| 305 | 0x00000800, 0x00000040, 0x00200040, 0x80200000, | ||
| 306 | 0x80200840, 0x80000800, 0x00000840, 0x00000000, | ||
| 307 | 0x00200000, 0x80200040, 0x80000040, 0x00200800, | ||
| 308 | 0x80000000, 0x00200840, 0x00200800, 0x80000040, | ||
| 309 | 0x80200040, 0x00000800, 0x80000800, 0x80200840, | ||
| 310 | 0x00000000, 0x00200040, 0x80200000, 0x00000840, | ||
| 311 | 0x80200800, 0x80000840, 0x00200840, 0x80000000, | ||
| 312 | 0x80000840, 0x80200800, 0x00000040, 0x00200000, | ||
| 313 | 0x80000840, 0x00200800, 0x80200800, 0x80000040, | ||
| 314 | 0x00000800, 0x00000040, 0x00200000, 0x80200800, | ||
| 315 | 0x80200040, 0x80000840, 0x00000840, 0x00000000, | ||
| 316 | 0x00000040, 0x80200000, 0x80000000, 0x00200040, | ||
| 317 | 0x00000000, 0x80200040, 0x00200040, 0x00000840, | ||
| 318 | 0x80000040, 0x00000800, 0x80200840, 0x00200000, | ||
| 319 | 0x00200840, 0x80000000, 0x80000800, 0x80200840, | ||
| 320 | 0x80200000, 0x00200840, 0x00200800, 0x80000800, | ||
| 321 | ); | ||
| 322 | @SP7=( | ||
| 323 | 0x04100010, 0x04104000, 0x00004010, 0x00000000, | ||
| 324 | 0x04004000, 0x00100010, 0x04100000, 0x04104010, | ||
| 325 | 0x00000010, 0x04000000, 0x00104000, 0x00004010, | ||
| 326 | 0x00104010, 0x04004010, 0x04000010, 0x04100000, | ||
| 327 | 0x00004000, 0x00104010, 0x00100010, 0x04004000, | ||
| 328 | 0x04104010, 0x04000010, 0x00000000, 0x00104000, | ||
| 329 | 0x04000000, 0x00100000, 0x04004010, 0x04100010, | ||
| 330 | 0x00100000, 0x00004000, 0x04104000, 0x00000010, | ||
| 331 | 0x00100000, 0x00004000, 0x04000010, 0x04104010, | ||
| 332 | 0x00004010, 0x04000000, 0x00000000, 0x00104000, | ||
| 333 | 0x04100010, 0x04004010, 0x04004000, 0x00100010, | ||
| 334 | 0x04104000, 0x00000010, 0x00100010, 0x04004000, | ||
| 335 | 0x04104010, 0x00100000, 0x04100000, 0x04000010, | ||
| 336 | 0x00104000, 0x00004010, 0x04004010, 0x04100000, | ||
| 337 | 0x00000010, 0x04104000, 0x00104010, 0x00000000, | ||
| 338 | 0x04000000, 0x04100010, 0x00004000, 0x00104010, | ||
| 339 | ); | ||
| 340 | |||
| 341 | sub main'des_set_key | ||
| 342 | { | ||
| 343 | local($param)=@_; | ||
| 344 | local(@key); | ||
| 345 | local($c,$d,$i,$s,$t); | ||
| 346 | local(@ks)=(); | ||
| 347 | |||
| 348 | # Get the bytes in the order we want. | ||
| 349 | @key=unpack("C8",$param); | ||
| 350 | |||
| 351 | $c= ($key[0] )| | ||
| 352 | ($key[1]<< 8)| | ||
| 353 | ($key[2]<<16)| | ||
| 354 | ($key[3]<<24); | ||
| 355 | $d= ($key[4] )| | ||
| 356 | ($key[5]<< 8)| | ||
| 357 | ($key[6]<<16)| | ||
| 358 | ($key[7]<<24); | ||
| 359 | |||
| 360 | &doPC1(*c,*d); | ||
| 361 | |||
| 362 | for $i (@shifts2) | ||
| 363 | { | ||
| 364 | if ($i) | ||
| 365 | { | ||
| 366 | $c=($c>>2)|($c<<26); | ||
| 367 | $d=($d>>2)|($d<<26); | ||
| 368 | } | ||
| 369 | else | ||
| 370 | { | ||
| 371 | $c=($c>>1)|($c<<27); | ||
| 372 | $d=($d>>1)|($d<<27); | ||
| 373 | } | ||
| 374 | $c&=0x0fffffff; | ||
| 375 | $d&=0x0fffffff; | ||
| 376 | $s= $skb0[ ($c )&0x3f ]| | ||
| 377 | $skb1[(($c>> 6)&0x03)|(($c>> 7)&0x3c)]| | ||
| 378 | $skb2[(($c>>13)&0x0f)|(($c>>14)&0x30)]| | ||
| 379 | $skb3[(($c>>20)&0x01)|(($c>>21)&0x06) | | ||
| 380 | (($c>>22)&0x38)]; | ||
| 381 | $t= $skb4[ ($d )&0x3f ]| | ||
| 382 | $skb5[(($d>> 7)&0x03)|(($d>> 8)&0x3c)]| | ||
| 383 | $skb6[ ($d>>15)&0x3f ]| | ||
| 384 | $skb7[(($d>>21)&0x0f)|(($d>>22)&0x30)]; | ||
| 385 | push(@ks,(($t<<16)|($s&0x0000ffff))&0xffffffff); | ||
| 386 | $s= (($s>>16)&0x0000ffff)|($t&0xffff0000) ; | ||
| 387 | push(@ks,(($s<<4)|(($s>>28)&0xf))&0xffffffff); | ||
| 388 | } | ||
| 389 | @ks; | ||
| 390 | } | ||
| 391 | |||
| 392 | sub doPC1 | ||
| 393 | { | ||
| 394 | local(*a,*b)=@_; | ||
| 395 | local($t); | ||
| 396 | |||
| 397 | $t=(($b>>4)^$a)&0x0f0f0f0f; | ||
| 398 | $b^=($t<<4); $a^=$t; | ||
| 399 | # do $a first | ||
| 400 | $t=(($a<<18)^$a)&0xcccc0000; | ||
| 401 | $a=$a^$t^(($t>>18)&0x00003fff); | ||
| 402 | $t=(($a<<17)^$a)&0xaaaa0000; | ||
| 403 | $a=$a^$t^(($t>>17)&0x00007fff); | ||
| 404 | $t=(($a<< 8)^$a)&0x00ff0000; | ||
| 405 | $a=$a^$t^(($t>> 8)&0x00ffffff); | ||
| 406 | $t=(($a<<17)^$a)&0xaaaa0000; | ||
| 407 | $a=$a^$t^(($t>>17)&0x00007fff); | ||
| 408 | |||
| 409 | # now do $b | ||
| 410 | $t=(($b<<24)^$b)&0xff000000; | ||
| 411 | $b=$b^$t^(($t>>24)&0x000000ff); | ||
| 412 | $t=(($b<< 8)^$b)&0x00ff0000; | ||
| 413 | $b=$b^$t^(($t>> 8)&0x00ffffff); | ||
| 414 | $t=(($b<<14)^$b)&0x33330000; | ||
| 415 | $b=$b^$t^(($t>>14)&0x0003ffff); | ||
| 416 | $b=(($b&0x00aa00aa)<<7)|(($b&0x55005500)>>7)|($b&0xaa55aa55); | ||
| 417 | $b=(($b>>8)&0x00ffffff)|((($a&0xf0000000)>>4)&0x0fffffff); | ||
| 418 | $a&=0x0fffffff; | ||
| 419 | } | ||
| 420 | |||
| 421 | sub doIP | ||
| 422 | { | ||
| 423 | local(*a,*b)=@_; | ||
| 424 | local($t); | ||
| 425 | |||
| 426 | $t=(($b>> 4)^$a)&0x0f0f0f0f; | ||
| 427 | $b^=($t<< 4); $a^=$t; | ||
| 428 | $t=(($a>>16)^$b)&0x0000ffff; | ||
| 429 | $a^=($t<<16); $b^=$t; | ||
| 430 | $t=(($b>> 2)^$a)&0x33333333; | ||
| 431 | $b^=($t<< 2); $a^=$t; | ||
| 432 | $t=(($a>> 8)^$b)&0x00ff00ff; | ||
| 433 | $a^=($t<< 8); $b^=$t; | ||
| 434 | $t=(($b>> 1)^$a)&0x55555555; | ||
| 435 | $b^=($t<< 1); $a^=$t; | ||
| 436 | $t=$a; | ||
| 437 | $a=$b&0xffffffff; | ||
| 438 | $b=$t&0xffffffff; | ||
| 439 | } | ||
| 440 | |||
| 441 | sub doFP | ||
| 442 | { | ||
| 443 | local(*a,*b)=@_; | ||
| 444 | local($t); | ||
| 445 | |||
| 446 | $t=(($b>> 1)^$a)&0x55555555; | ||
| 447 | $b^=($t<< 1); $a^=$t; | ||
| 448 | $t=(($a>> 8)^$b)&0x00ff00ff; | ||
| 449 | $a^=($t<< 8); $b^=$t; | ||
| 450 | $t=(($b>> 2)^$a)&0x33333333; | ||
| 451 | $b^=($t<< 2); $a^=$t; | ||
| 452 | $t=(($a>>16)^$b)&0x0000ffff; | ||
| 453 | $a^=($t<<16); $b^=$t; | ||
| 454 | $t=(($b>> 4)^$a)&0x0f0f0f0f; | ||
| 455 | $b^=($t<< 4); $a^=$t; | ||
| 456 | $a&=0xffffffff; | ||
| 457 | $b&=0xffffffff; | ||
| 458 | } | ||
| 459 | |||
| 460 | sub main'des_ecb_encrypt | ||
| 461 | { | ||
| 462 | local(*ks,$encrypt,$in)=@_; | ||
| 463 | local($l,$r,$i,$t,$u,@input); | ||
| 464 | |||
| 465 | @input=unpack("C8",$in); | ||
| 466 | # Get the bytes in the order we want. | ||
| 467 | $l= ($input[0] )| | ||
| 468 | ($input[1]<< 8)| | ||
| 469 | ($input[2]<<16)| | ||
| 470 | ($input[3]<<24); | ||
| 471 | $r= ($input[4] )| | ||
| 472 | ($input[5]<< 8)| | ||
| 473 | ($input[6]<<16)| | ||
| 474 | ($input[7]<<24); | ||
| 475 | |||
| 476 | $l&=0xffffffff; | ||
| 477 | $r&=0xffffffff; | ||
| 478 | &doIP(*l,*r); | ||
| 479 | if ($encrypt) | ||
| 480 | { | ||
| 481 | for ($i=0; $i<32; $i+=4) | ||
| 482 | { | ||
| 483 | $t=((($r&0x7fffffff)<<1)|(($r>>31)&0x00000001)); | ||
| 484 | $u=$t^$ks[$i ]; | ||
| 485 | $t=$t^$ks[$i+1]; | ||
| 486 | $t2=(($t&0x0000000f)<<28); | ||
| 487 | |||
| 488 | $t=((($t>>4)&0x0fffffff)|(($t&0x0000000f)<<28)); | ||
| 489 | $l^= $SP1[ $t &0x3f]| | ||
| 490 | $SP3[($t>> 8)&0x3f]| | ||
| 491 | $SP5[($t>>16)&0x3f]| | ||
| 492 | $SP7[($t>>24)&0x3f]| | ||
| 493 | $SP0[ $u &0x3f]| | ||
| 494 | $SP2[($u>> 8)&0x3f]| | ||
| 495 | $SP4[($u>>16)&0x3f]| | ||
| 496 | $SP6[($u>>24)&0x3f]; | ||
| 497 | |||
| 498 | $t=(($l<<1)|(($l>>31)&0x1))&0xffffffff; | ||
| 499 | $u=$t^$ks[$i+2]; | ||
| 500 | $t=$t^$ks[$i+3]; | ||
| 501 | $t=((($t>>4)&0x0fffffff)|($t<<28))&0xffffffff; | ||
| 502 | $r^= $SP1[ $t &0x3f]| | ||
| 503 | $SP3[($t>> 8)&0x3f]| | ||
| 504 | $SP5[($t>>16)&0x3f]| | ||
| 505 | $SP7[($t>>24)&0x3f]| | ||
| 506 | $SP0[ $u &0x3f]| | ||
| 507 | $SP2[($u>> 8)&0x3f]| | ||
| 508 | $SP4[($u>>16)&0x3f]| | ||
| 509 | $SP6[($u>>24)&0x3f]; | ||
| 510 | } | ||
| 511 | } | ||
| 512 | else | ||
| 513 | { | ||
| 514 | for ($i=30; $i>0; $i-=4) | ||
| 515 | { | ||
| 516 | $t=(($r<<1)|(($r>>31)&0x1))&0xffffffff; | ||
| 517 | $u=$t^$ks[$i ]; | ||
| 518 | $t=$t^$ks[$i+1]; | ||
| 519 | $t=((($t>>4)&0x0fffffff)|($t<<28))&0xffffffff; | ||
| 520 | $l^= $SP1[ $t &0x3f]| | ||
| 521 | $SP3[($t>> 8)&0x3f]| | ||
| 522 | $SP5[($t>>16)&0x3f]| | ||
| 523 | $SP7[($t>>24)&0x3f]| | ||
| 524 | $SP0[ $u &0x3f]| | ||
| 525 | $SP2[($u>> 8)&0x3f]| | ||
| 526 | $SP4[($u>>16)&0x3f]| | ||
| 527 | $SP6[($u>>24)&0x3f]; | ||
| 528 | |||
| 529 | $t=(($l<<1)|(($l>>31)&0x1))&0xffffffff; | ||
| 530 | $u=$t^$ks[$i-2]; | ||
| 531 | $t=$t^$ks[$i-1]; | ||
| 532 | $t=((($t>>4)&0x0fffffff)|($t<<28))&0xffffffff; | ||
| 533 | $r^= $SP1[ $t &0x3f]| | ||
| 534 | $SP3[($t>> 8)&0x3f]| | ||
| 535 | $SP5[($t>>16)&0x3f]| | ||
| 536 | $SP7[($t>>24)&0x3f]| | ||
| 537 | $SP0[ $u &0x3f]| | ||
| 538 | $SP2[($u>> 8)&0x3f]| | ||
| 539 | $SP4[($u>>16)&0x3f]| | ||
| 540 | $SP6[($u>>24)&0x3f]; | ||
| 541 | } | ||
| 542 | } | ||
| 543 | &doFP(*l,*r); | ||
| 544 | pack("C8",$l&0xff, | ||
| 545 | ($l>> 8)&0x00ffffff, | ||
| 546 | ($l>>16)&0x0000ffff, | ||
| 547 | ($l>>24)&0x000000ff, | ||
| 548 | $r&0xff, | ||
| 549 | ($r>> 8)&0x00ffffff, | ||
| 550 | ($r>>16)&0x0000ffff, | ||
| 551 | ($r>>24)&0x000000ff); | ||
| 552 | } | ||
diff --git a/src/lib/libssl/src/crypto/des/des_crypt.man b/src/lib/libssl/src/crypto/des/des_crypt.man new file mode 100644 index 0000000000..0ecc416877 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/des_crypt.man | |||
| @@ -0,0 +1,508 @@ | |||
| 1 | .TH DES_CRYPT 3 | ||
| 2 | .SH NAME | ||
| 3 | des_read_password, des_read_2password, | ||
| 4 | des_string_to_key, des_string_to_2key, des_read_pw_string, | ||
| 5 | des_random_key, des_set_key, | ||
| 6 | des_key_sched, des_ecb_encrypt, des_ecb3_encrypt, des_cbc_encrypt, | ||
| 7 | des_3cbc_encrypt, | ||
| 8 | des_pcbc_encrypt, des_cfb_encrypt, des_ofb_encrypt, | ||
| 9 | des_cbc_cksum, des_quad_cksum, | ||
| 10 | des_enc_read, des_enc_write, des_set_odd_parity, | ||
| 11 | des_is_weak_key, crypt \- (non USA) DES encryption | ||
| 12 | .SH SYNOPSIS | ||
| 13 | .nf | ||
| 14 | .nj | ||
| 15 | .ft B | ||
| 16 | #include <des.h> | ||
| 17 | .PP | ||
| 18 | .B int des_read_password(key,prompt,verify) | ||
| 19 | des_cblock *key; | ||
| 20 | char *prompt; | ||
| 21 | int verify; | ||
| 22 | .PP | ||
| 23 | .B int des_read_2password(key1,key2,prompt,verify) | ||
| 24 | des_cblock *key1,*key2; | ||
| 25 | char *prompt; | ||
| 26 | int verify; | ||
| 27 | .PP | ||
| 28 | .B int des_string_to_key(str,key) | ||
| 29 | char *str; | ||
| 30 | des_cblock *key; | ||
| 31 | .PP | ||
| 32 | .B int des_string_to_2keys(str,key1,key2) | ||
| 33 | char *str; | ||
| 34 | des_cblock *key1,*key2; | ||
| 35 | .PP | ||
| 36 | .B int des_read_pw_string(buf,length,prompt,verify) | ||
| 37 | char *buf; | ||
| 38 | int length; | ||
| 39 | char *prompt; | ||
| 40 | int verify; | ||
| 41 | .PP | ||
| 42 | .B int des_random_key(key) | ||
| 43 | des_cblock *key; | ||
| 44 | .PP | ||
| 45 | .B int des_set_key(key,schedule) | ||
| 46 | des_cblock *key; | ||
| 47 | des_key_schedule schedule; | ||
| 48 | .PP | ||
| 49 | .B int des_key_sched(key,schedule) | ||
| 50 | des_cblock *key; | ||
| 51 | des_key_schedule schedule; | ||
| 52 | .PP | ||
| 53 | .B int des_ecb_encrypt(input,output,schedule,encrypt) | ||
| 54 | des_cblock *input; | ||
| 55 | des_cblock *output; | ||
| 56 | des_key_schedule schedule; | ||
| 57 | int encrypt; | ||
| 58 | .PP | ||
| 59 | .B int des_ecb3_encrypt(input,output,ks1,ks2,encrypt) | ||
| 60 | des_cblock *input; | ||
| 61 | des_cblock *output; | ||
| 62 | des_key_schedule ks1,ks2; | ||
| 63 | int encrypt; | ||
| 64 | .PP | ||
| 65 | .B int des_cbc_encrypt(input,output,length,schedule,ivec,encrypt) | ||
| 66 | des_cblock *input; | ||
| 67 | des_cblock *output; | ||
| 68 | long length; | ||
| 69 | des_key_schedule schedule; | ||
| 70 | des_cblock *ivec; | ||
| 71 | int encrypt; | ||
| 72 | .PP | ||
| 73 | .B int des_3cbc_encrypt(input,output,length,sk1,sk2,ivec1,ivec2,encrypt) | ||
| 74 | des_cblock *input; | ||
| 75 | des_cblock *output; | ||
| 76 | long length; | ||
| 77 | des_key_schedule sk1; | ||
| 78 | des_key_schedule sk2; | ||
| 79 | des_cblock *ivec1; | ||
| 80 | des_cblock *ivec2; | ||
| 81 | int encrypt; | ||
| 82 | .PP | ||
| 83 | .B int des_pcbc_encrypt(input,output,length,schedule,ivec,encrypt) | ||
| 84 | des_cblock *input; | ||
| 85 | des_cblock *output; | ||
| 86 | long length; | ||
| 87 | des_key_schedule schedule; | ||
| 88 | des_cblock *ivec; | ||
| 89 | int encrypt; | ||
| 90 | .PP | ||
| 91 | .B int des_cfb_encrypt(input,output,numbits,length,schedule,ivec,encrypt) | ||
| 92 | unsigned char *input; | ||
| 93 | unsigned char *output; | ||
| 94 | int numbits; | ||
| 95 | long length; | ||
| 96 | des_key_schedule schedule; | ||
| 97 | des_cblock *ivec; | ||
| 98 | int encrypt; | ||
| 99 | .PP | ||
| 100 | .B int des_ofb_encrypt(input,output,numbits,length,schedule,ivec) | ||
| 101 | unsigned char *input,*output; | ||
| 102 | int numbits; | ||
| 103 | long length; | ||
| 104 | des_key_schedule schedule; | ||
| 105 | des_cblock *ivec; | ||
| 106 | .PP | ||
| 107 | .B unsigned long des_cbc_cksum(input,output,length,schedule,ivec) | ||
| 108 | des_cblock *input; | ||
| 109 | des_cblock *output; | ||
| 110 | long length; | ||
| 111 | des_key_schedule schedule; | ||
| 112 | des_cblock *ivec; | ||
| 113 | .PP | ||
| 114 | .B unsigned long des_quad_cksum(input,output,length,out_count,seed) | ||
| 115 | des_cblock *input; | ||
| 116 | des_cblock *output; | ||
| 117 | long length; | ||
| 118 | int out_count; | ||
| 119 | des_cblock *seed; | ||
| 120 | .PP | ||
| 121 | .B int des_check_key; | ||
| 122 | .PP | ||
| 123 | .B int des_enc_read(fd,buf,len,sched,iv) | ||
| 124 | int fd; | ||
| 125 | char *buf; | ||
| 126 | int len; | ||
| 127 | des_key_schedule sched; | ||
| 128 | des_cblock *iv; | ||
| 129 | .PP | ||
| 130 | .B int des_enc_write(fd,buf,len,sched,iv) | ||
| 131 | int fd; | ||
| 132 | char *buf; | ||
| 133 | int len; | ||
| 134 | des_key_schedule sched; | ||
| 135 | des_cblock *iv; | ||
| 136 | .PP | ||
| 137 | .B extern int des_rw_mode; | ||
| 138 | .PP | ||
| 139 | .B void des_set_odd_parity(key) | ||
| 140 | des_cblock *key; | ||
| 141 | .PP | ||
| 142 | .B int des_is_weak_key(key) | ||
| 143 | des_cblock *key; | ||
| 144 | .PP | ||
| 145 | .B char *crypt(passwd,salt) | ||
| 146 | char *passwd; | ||
| 147 | char *salt; | ||
| 148 | .PP | ||
| 149 | .fi | ||
| 150 | .SH DESCRIPTION | ||
| 151 | This library contains a fast implementation of the DES encryption | ||
| 152 | algorithm. | ||
| 153 | .PP | ||
| 154 | There are two phases to the use of DES encryption. | ||
| 155 | The first is the generation of a | ||
| 156 | .I des_key_schedule | ||
| 157 | from a key, | ||
| 158 | the second is the actual encryption. | ||
| 159 | A des key is of type | ||
| 160 | .I des_cblock. | ||
| 161 | This type is made from 8 characters with odd parity. | ||
| 162 | The least significant bit in the character is the parity bit. | ||
| 163 | The key schedule is an expanded form of the key; it is used to speed the | ||
| 164 | encryption process. | ||
| 165 | .PP | ||
| 166 | .I des_read_password | ||
| 167 | writes the string specified by prompt to the standard output, | ||
| 168 | turns off echo and reads an input string from standard input | ||
| 169 | until terminated with a newline. | ||
| 170 | If verify is non-zero, it prompts and reads the input again and verifies | ||
| 171 | that both entered passwords are the same. | ||
| 172 | The entered string is converted into a des key by using the | ||
| 173 | .I des_string_to_key | ||
| 174 | routine. | ||
| 175 | The new key is placed in the | ||
| 176 | .I des_cblock | ||
| 177 | that was passed (by reference) to the routine. | ||
| 178 | If there were no errors, | ||
| 179 | .I des_read_password | ||
| 180 | returns 0, | ||
| 181 | -1 is returned if there was a terminal error and 1 is returned for | ||
| 182 | any other error. | ||
| 183 | .PP | ||
| 184 | .I des_read_2password | ||
| 185 | operates in the same way as | ||
| 186 | .I des_read_password | ||
| 187 | except that it generates 2 keys by using the | ||
| 188 | .I des_string_to_2key | ||
| 189 | function. | ||
| 190 | .PP | ||
| 191 | .I des_read_pw_string | ||
| 192 | is called by | ||
| 193 | .I des_read_password | ||
| 194 | to read and verify a string from a terminal device. | ||
| 195 | The string is returned in | ||
| 196 | .I buf. | ||
| 197 | The size of | ||
| 198 | .I buf | ||
| 199 | is passed to the routine via the | ||
| 200 | .I length | ||
| 201 | parameter. | ||
| 202 | .PP | ||
| 203 | .I des_string_to_key | ||
| 204 | converts a string into a valid des key. | ||
| 205 | .PP | ||
| 206 | .I des_string_to_2key | ||
| 207 | converts a string into 2 valid des keys. | ||
| 208 | This routine is best suited for used to generate keys for use with | ||
| 209 | .I des_ecb3_encrypt. | ||
| 210 | .PP | ||
| 211 | .I des_random_key | ||
| 212 | returns a random key that is made of a combination of process id, | ||
| 213 | time and an increasing counter. | ||
| 214 | .PP | ||
| 215 | Before a des key can be used it is converted into a | ||
| 216 | .I des_key_schedule | ||
| 217 | via the | ||
| 218 | .I des_set_key | ||
| 219 | routine. | ||
| 220 | If the | ||
| 221 | .I des_check_key | ||
| 222 | flag is non-zero, | ||
| 223 | .I des_set_key | ||
| 224 | will check that the key passed is of odd parity and is not a week or | ||
| 225 | semi-weak key. | ||
| 226 | If the parity is wrong, | ||
| 227 | then -1 is returned. | ||
| 228 | If the key is a weak key, | ||
| 229 | then -2 is returned. | ||
| 230 | If an error is returned, | ||
| 231 | the key schedule is not generated. | ||
| 232 | .PP | ||
| 233 | .I des_key_sched | ||
| 234 | is another name for the | ||
| 235 | .I des_set_key | ||
| 236 | function. | ||
| 237 | .PP | ||
| 238 | The following routines mostly operate on an input and output stream of | ||
| 239 | .I des_cblock's. | ||
| 240 | .PP | ||
| 241 | .I des_ecb_encrypt | ||
| 242 | is the basic DES encryption routine that encrypts or decrypts a single 8-byte | ||
| 243 | .I des_cblock | ||
| 244 | in | ||
| 245 | .I electronic code book | ||
| 246 | mode. | ||
| 247 | It always transforms the input data, pointed to by | ||
| 248 | .I input, | ||
| 249 | into the output data, | ||
| 250 | pointed to by the | ||
| 251 | .I output | ||
| 252 | argument. | ||
| 253 | If the | ||
| 254 | .I encrypt | ||
| 255 | argument is non-zero (DES_ENCRYPT), | ||
| 256 | the | ||
| 257 | .I input | ||
| 258 | (cleartext) is encrypted in to the | ||
| 259 | .I output | ||
| 260 | (ciphertext) using the key_schedule specified by the | ||
| 261 | .I schedule | ||
| 262 | argument, | ||
| 263 | previously set via | ||
| 264 | .I des_set_key. | ||
| 265 | If | ||
| 266 | .I encrypt | ||
| 267 | is zero (DES_DECRYPT), | ||
| 268 | the | ||
| 269 | .I input | ||
| 270 | (now ciphertext) | ||
| 271 | is decrypted into the | ||
| 272 | .I output | ||
| 273 | (now cleartext). | ||
| 274 | Input and output may overlap. | ||
| 275 | No meaningful value is returned. | ||
| 276 | .PP | ||
| 277 | .I des_ecb3_encrypt | ||
| 278 | encrypts/decrypts the | ||
| 279 | .I input | ||
| 280 | block by using triple ecb DES encryption. | ||
| 281 | This involves encrypting the input with | ||
| 282 | .I ks1, | ||
| 283 | decryption with the key schedule | ||
| 284 | .I ks2, | ||
| 285 | and then encryption with the first again. | ||
| 286 | This routine greatly reduces the chances of brute force breaking of | ||
| 287 | DES and has the advantage of if | ||
| 288 | .I ks1 | ||
| 289 | and | ||
| 290 | .I ks2 | ||
| 291 | are the same, it is equivalent to just encryption using ecb mode and | ||
| 292 | .I ks1 | ||
| 293 | as the key. | ||
| 294 | .PP | ||
| 295 | .I des_cbc_encrypt | ||
| 296 | encrypts/decrypts using the | ||
| 297 | .I cipher-block-chaining | ||
| 298 | mode of DES. | ||
| 299 | If the | ||
| 300 | .I encrypt | ||
| 301 | argument is non-zero, | ||
| 302 | the routine cipher-block-chain encrypts the cleartext data pointed to by the | ||
| 303 | .I input | ||
| 304 | argument into the ciphertext pointed to by the | ||
| 305 | .I output | ||
| 306 | argument, | ||
| 307 | using the key schedule provided by the | ||
| 308 | .I schedule | ||
| 309 | argument, | ||
| 310 | and initialisation vector provided by the | ||
| 311 | .I ivec | ||
| 312 | argument. | ||
| 313 | If the | ||
| 314 | .I length | ||
| 315 | argument is not an integral multiple of eight bytes, | ||
| 316 | the last block is copied to a temporary area and zero filled. | ||
| 317 | The output is always | ||
| 318 | an integral multiple of eight bytes. | ||
| 319 | To make multiple cbc encrypt calls on a large amount of data appear to | ||
| 320 | be one | ||
| 321 | .I des_cbc_encrypt | ||
| 322 | call, the | ||
| 323 | .I ivec | ||
| 324 | of subsequent calls should be the last 8 bytes of the output. | ||
| 325 | .PP | ||
| 326 | .I des_3cbc_encrypt | ||
| 327 | encrypts/decrypts the | ||
| 328 | .I input | ||
| 329 | block by using triple cbc DES encryption. | ||
| 330 | This involves encrypting the input with key schedule | ||
| 331 | .I ks1, | ||
| 332 | decryption with the key schedule | ||
| 333 | .I ks2, | ||
| 334 | and then encryption with the first again. | ||
| 335 | 2 initialisation vectors are required, | ||
| 336 | .I ivec1 | ||
| 337 | and | ||
| 338 | .I ivec2. | ||
| 339 | Unlike | ||
| 340 | .I des_cbc_encrypt, | ||
| 341 | these initialisation vectors are modified by the subroutine. | ||
| 342 | This routine greatly reduces the chances of brute force breaking of | ||
| 343 | DES and has the advantage of if | ||
| 344 | .I ks1 | ||
| 345 | and | ||
| 346 | .I ks2 | ||
| 347 | are the same, it is equivalent to just encryption using cbc mode and | ||
| 348 | .I ks1 | ||
| 349 | as the key. | ||
| 350 | .PP | ||
| 351 | .I des_pcbc_encrypt | ||
| 352 | encrypt/decrypts using a modified block chaining mode. | ||
| 353 | It provides better error propagation characteristics than cbc | ||
| 354 | encryption. | ||
| 355 | .PP | ||
| 356 | .I des_cfb_encrypt | ||
| 357 | encrypt/decrypts using cipher feedback mode. This method takes an | ||
| 358 | array of characters as input and outputs and array of characters. It | ||
| 359 | does not require any padding to 8 character groups. Note: the ivec | ||
| 360 | variable is changed and the new changed value needs to be passed to | ||
| 361 | the next call to this function. Since this function runs a complete | ||
| 362 | DES ecb encryption per numbits, this function is only suggested for | ||
| 363 | use when sending small numbers of characters. | ||
| 364 | .PP | ||
| 365 | .I des_ofb_encrypt | ||
| 366 | encrypt using output feedback mode. This method takes an | ||
| 367 | array of characters as input and outputs and array of characters. It | ||
| 368 | does not require any padding to 8 character groups. Note: the ivec | ||
| 369 | variable is changed and the new changed value needs to be passed to | ||
| 370 | the next call to this function. Since this function runs a complete | ||
| 371 | DES ecb encryption per numbits, this function is only suggested for | ||
| 372 | use when sending small numbers of characters. | ||
| 373 | .PP | ||
| 374 | .I des_cbc_cksum | ||
| 375 | produces an 8 byte checksum based on the input stream (via cbc encryption). | ||
| 376 | The last 4 bytes of the checksum is returned and the complete 8 bytes is | ||
| 377 | placed in | ||
| 378 | .I output. | ||
| 379 | .PP | ||
| 380 | .I des_quad_cksum | ||
| 381 | returns a 4 byte checksum from the input bytes. | ||
| 382 | The algorithm can be iterated over the input, | ||
| 383 | depending on | ||
| 384 | .I out_count, | ||
| 385 | 1, 2, 3 or 4 times. | ||
| 386 | If | ||
| 387 | .I output | ||
| 388 | is non-NULL, | ||
| 389 | the 8 bytes generated by each pass are written into | ||
| 390 | .I output. | ||
| 391 | .PP | ||
| 392 | .I des_enc_write | ||
| 393 | is used to write | ||
| 394 | .I len | ||
| 395 | bytes | ||
| 396 | to file descriptor | ||
| 397 | .I fd | ||
| 398 | from buffer | ||
| 399 | .I buf. | ||
| 400 | The data is encrypted via | ||
| 401 | .I pcbc_encrypt | ||
| 402 | (default) using | ||
| 403 | .I sched | ||
| 404 | for the key and | ||
| 405 | .I iv | ||
| 406 | as a starting vector. | ||
| 407 | The actual data send down | ||
| 408 | .I fd | ||
| 409 | consists of 4 bytes (in network byte order) containing the length of the | ||
| 410 | following encrypted data. The encrypted data then follows, padded with random | ||
| 411 | data out to a multiple of 8 bytes. | ||
| 412 | .PP | ||
| 413 | .I des_enc_read | ||
| 414 | is used to read | ||
| 415 | .I len | ||
| 416 | bytes | ||
| 417 | from file descriptor | ||
| 418 | .I fd | ||
| 419 | into buffer | ||
| 420 | .I buf. | ||
| 421 | The data being read from | ||
| 422 | .I fd | ||
| 423 | is assumed to have come from | ||
| 424 | .I des_enc_write | ||
| 425 | and is decrypted using | ||
| 426 | .I sched | ||
| 427 | for the key schedule and | ||
| 428 | .I iv | ||
| 429 | for the initial vector. | ||
| 430 | The | ||
| 431 | .I des_enc_read/des_enc_write | ||
| 432 | pair can be used to read/write to files, pipes and sockets. | ||
| 433 | I have used them in implementing a version of rlogin in which all | ||
| 434 | data is encrypted. | ||
| 435 | .PP | ||
| 436 | .I des_rw_mode | ||
| 437 | is used to specify the encryption mode to use with | ||
| 438 | .I des_enc_read | ||
| 439 | and | ||
| 440 | .I des_end_write. | ||
| 441 | If set to | ||
| 442 | .I DES_PCBC_MODE | ||
| 443 | (the default), des_pcbc_encrypt is used. | ||
| 444 | If set to | ||
| 445 | .I DES_CBC_MODE | ||
| 446 | des_cbc_encrypt is used. | ||
| 447 | These two routines and the variable are not part of the normal MIT library. | ||
| 448 | .PP | ||
| 449 | .I des_set_odd_parity | ||
| 450 | sets the parity of the passed | ||
| 451 | .I key | ||
| 452 | to odd. This routine is not part of the standard MIT library. | ||
| 453 | .PP | ||
| 454 | .I des_is_weak_key | ||
| 455 | returns 1 is the passed key is a weak key (pick again :-), | ||
| 456 | 0 if it is ok. | ||
| 457 | This routine is not part of the standard MIT library. | ||
| 458 | .PP | ||
| 459 | .I crypt | ||
| 460 | is a replacement for the normal system crypt. | ||
| 461 | It is much faster than the system crypt. | ||
| 462 | .PP | ||
| 463 | .SH FILES | ||
| 464 | /usr/include/des.h | ||
| 465 | .br | ||
| 466 | /usr/lib/libdes.a | ||
| 467 | .PP | ||
| 468 | The encryption routines have been tested on 16bit, 32bit and 64bit | ||
| 469 | machines of various endian and even works under VMS. | ||
| 470 | .PP | ||
| 471 | .SH BUGS | ||
| 472 | .PP | ||
| 473 | If you think this manual is sparse, | ||
| 474 | read the des_crypt(3) manual from the MIT kerberos (or bones outside | ||
| 475 | of the USA) distribution. | ||
| 476 | .PP | ||
| 477 | .I des_cfb_encrypt | ||
| 478 | and | ||
| 479 | .I des_ofb_encrypt | ||
| 480 | operates on input of 8 bits. What this means is that if you set | ||
| 481 | numbits to 12, and length to 2, the first 12 bits will come from the 1st | ||
| 482 | input byte and the low half of the second input byte. The second 12 | ||
| 483 | bits will have the low 8 bits taken from the 3rd input byte and the | ||
| 484 | top 4 bits taken from the 4th input byte. The same holds for output. | ||
| 485 | This function has been implemented this way because most people will | ||
| 486 | be using a multiple of 8 and because once you get into pulling bytes input | ||
| 487 | bytes apart things get ugly! | ||
| 488 | .PP | ||
| 489 | .I des_read_pw_string | ||
| 490 | is the most machine/OS dependent function and normally generates the | ||
| 491 | most problems when porting this code. | ||
| 492 | .PP | ||
| 493 | .I des_string_to_key | ||
| 494 | is probably different from the MIT version since there are lots | ||
| 495 | of fun ways to implement one-way encryption of a text string. | ||
| 496 | .PP | ||
| 497 | The routines are optimised for 32 bit machines and so are not efficient | ||
| 498 | on IBM PCs. | ||
| 499 | .PP | ||
| 500 | NOTE: extensive work has been done on this library since this document | ||
| 501 | was origionally written. Please try to read des.doc from the libdes | ||
| 502 | distribution since it is far more upto date and documents more of the | ||
| 503 | functions. Libdes is now also being shipped as part of SSLeay, a | ||
| 504 | general cryptographic library that amonst other things implements | ||
| 505 | netscapes SSL protocoll. The most recent version can be found in | ||
| 506 | SSLeay distributions. | ||
| 507 | .SH AUTHOR | ||
| 508 | Eric Young (eay@cryptsoft.com) | ||
diff --git a/src/lib/libssl/src/crypto/des/des_locl.org b/src/lib/libssl/src/crypto/des/des_locl.org new file mode 100644 index 0000000000..e2e503cbed --- /dev/null +++ b/src/lib/libssl/src/crypto/des/des_locl.org | |||
| @@ -0,0 +1,516 @@ | |||
| 1 | /* crypto/des/des_locl.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify des_locl.org since des_locl.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef HEADER_DES_LOCL_H | ||
| 68 | #define HEADER_DES_LOCL_H | ||
| 69 | |||
| 70 | #if defined(WIN32) || defined(WIN16) | ||
| 71 | #ifndef MSDOS | ||
| 72 | #define MSDOS | ||
| 73 | #endif | ||
| 74 | #endif | ||
| 75 | |||
| 76 | #include <stdio.h> | ||
| 77 | #include <stdlib.h> | ||
| 78 | #ifndef MSDOS | ||
| 79 | #include <unistd.h> | ||
| 80 | #endif | ||
| 81 | #include "des.h" | ||
| 82 | |||
| 83 | #ifndef DES_DEFAULT_OPTIONS | ||
| 84 | /* the following is tweaked from a config script, that is why it is a | ||
| 85 | * protected undef/define */ | ||
| 86 | #ifndef DES_PTR | ||
| 87 | #undef DES_PTR | ||
| 88 | #endif | ||
| 89 | |||
| 90 | /* This helps C compiler generate the correct code for multiple functional | ||
| 91 | * units. It reduces register dependancies at the expense of 2 more | ||
| 92 | * registers */ | ||
| 93 | #ifndef DES_RISC1 | ||
| 94 | #undef DES_RISC1 | ||
| 95 | #endif | ||
| 96 | |||
| 97 | #ifndef DES_RISC2 | ||
| 98 | #undef DES_RISC2 | ||
| 99 | #endif | ||
| 100 | |||
| 101 | #if defined(DES_RISC1) && defined(DES_RISC2) | ||
| 102 | YOU SHOULD NOT HAVE BOTH DES_RISC1 AND DES_RISC2 DEFINED!!!!! | ||
| 103 | #endif | ||
| 104 | |||
| 105 | /* Unroll the inner loop, this sometimes helps, sometimes hinders. | ||
| 106 | * Very mucy CPU dependant */ | ||
| 107 | #ifndef DES_UNROLL | ||
| 108 | #undef DES_UNROLL | ||
| 109 | #endif | ||
| 110 | |||
| 111 | /* These default values were supplied by | ||
| 112 | * Peter Gutman <pgut001@cs.auckland.ac.nz> | ||
| 113 | * They are only used if nothing else has been defined */ | ||
| 114 | #if !defined(DES_PTR) && !defined(DES_RISC1) && !defined(DES_RISC2) && !defined(DES_UNROLL) | ||
| 115 | /* Special defines which change the way the code is built depending on the | ||
| 116 | CPU and OS. For SGI machines you can use _MIPS_SZLONG (32 or 64) to find | ||
| 117 | even newer MIPS CPU's, but at the moment one size fits all for | ||
| 118 | optimization options. Older Sparc's work better with only UNROLL, but | ||
| 119 | there's no way to tell at compile time what it is you're running on */ | ||
| 120 | |||
| 121 | #if defined( sun ) /* Newer Sparc's */ | ||
| 122 | #define DES_PTR | ||
| 123 | #define DES_RISC1 | ||
| 124 | #define DES_UNROLL | ||
| 125 | #elif defined( __ultrix ) /* Older MIPS */ | ||
| 126 | #define DES_PTR | ||
| 127 | #define DES_RISC2 | ||
| 128 | #define DES_UNROLL | ||
| 129 | #elif defined( __osf1__ ) /* Alpha */ | ||
| 130 | #define DES_PTR | ||
| 131 | #define DES_RISC2 | ||
| 132 | #elif defined ( _AIX ) /* RS6000 */ | ||
| 133 | /* Unknown */ | ||
| 134 | #elif defined( __hpux ) /* HP-PA */ | ||
| 135 | /* Unknown */ | ||
| 136 | #elif defined( __aux ) /* 68K */ | ||
| 137 | /* Unknown */ | ||
| 138 | #elif defined( __dgux ) /* 88K (but P6 in latest boxes) */ | ||
| 139 | #define DES_UNROLL | ||
| 140 | #elif defined( __sgi ) /* Newer MIPS */ | ||
| 141 | #define DES_PTR | ||
| 142 | #define DES_RISC2 | ||
| 143 | #define DES_UNROLL | ||
| 144 | #elif defined( i386 ) /* x86 boxes, should be gcc */ | ||
| 145 | #define DES_PTR | ||
| 146 | #define DES_RISC1 | ||
| 147 | #define DES_UNROLL | ||
| 148 | #endif /* Systems-specific speed defines */ | ||
| 149 | #endif | ||
| 150 | |||
| 151 | #endif /* DES_DEFAULT_OPTIONS */ | ||
| 152 | |||
| 153 | #ifdef MSDOS /* Visual C++ 2.1 (Windows NT/95) */ | ||
| 154 | #include <stdlib.h> | ||
| 155 | #include <errno.h> | ||
| 156 | #include <time.h> | ||
| 157 | #include <io.h> | ||
| 158 | #ifndef RAND | ||
| 159 | #define RAND | ||
| 160 | #endif | ||
| 161 | #undef NOPROTO | ||
| 162 | #endif | ||
| 163 | |||
| 164 | #if defined(__STDC__) || defined(VMS) || defined(M_XENIX) || defined(MSDOS) | ||
| 165 | #include <string.h> | ||
| 166 | #endif | ||
| 167 | |||
| 168 | #ifndef RAND | ||
| 169 | #define RAND | ||
| 170 | #endif | ||
| 171 | |||
| 172 | #ifdef linux | ||
| 173 | #undef RAND | ||
| 174 | #endif | ||
| 175 | |||
| 176 | #ifdef MSDOS | ||
| 177 | #define getpid() 2 | ||
| 178 | #define RAND | ||
| 179 | #undef NOPROTO | ||
| 180 | #endif | ||
| 181 | |||
| 182 | #if defined(NOCONST) | ||
| 183 | #define const | ||
| 184 | #endif | ||
| 185 | |||
| 186 | #ifdef __STDC__ | ||
| 187 | #undef NOPROTO | ||
| 188 | #endif | ||
| 189 | |||
| 190 | #ifdef RAND | ||
| 191 | #define srandom(s) srand(s) | ||
| 192 | #define random rand | ||
| 193 | #endif | ||
| 194 | |||
| 195 | #define ITERATIONS 16 | ||
| 196 | #define HALF_ITERATIONS 8 | ||
| 197 | |||
| 198 | /* used in des_read and des_write */ | ||
| 199 | #define MAXWRITE (1024*16) | ||
| 200 | #define BSIZE (MAXWRITE+4) | ||
| 201 | |||
| 202 | #define c2l(c,l) (l =((DES_LONG)(*((c)++))) , \ | ||
| 203 | l|=((DES_LONG)(*((c)++)))<< 8L, \ | ||
| 204 | l|=((DES_LONG)(*((c)++)))<<16L, \ | ||
| 205 | l|=((DES_LONG)(*((c)++)))<<24L) | ||
| 206 | |||
| 207 | /* NOTE - c is not incremented as per c2l */ | ||
| 208 | #define c2ln(c,l1,l2,n) { \ | ||
| 209 | c+=n; \ | ||
| 210 | l1=l2=0; \ | ||
| 211 | switch (n) { \ | ||
| 212 | case 8: l2 =((DES_LONG)(*(--(c))))<<24L; \ | ||
| 213 | case 7: l2|=((DES_LONG)(*(--(c))))<<16L; \ | ||
| 214 | case 6: l2|=((DES_LONG)(*(--(c))))<< 8L; \ | ||
| 215 | case 5: l2|=((DES_LONG)(*(--(c)))); \ | ||
| 216 | case 4: l1 =((DES_LONG)(*(--(c))))<<24L; \ | ||
| 217 | case 3: l1|=((DES_LONG)(*(--(c))))<<16L; \ | ||
| 218 | case 2: l1|=((DES_LONG)(*(--(c))))<< 8L; \ | ||
| 219 | case 1: l1|=((DES_LONG)(*(--(c)))); \ | ||
| 220 | } \ | ||
| 221 | } | ||
| 222 | |||
| 223 | #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ | ||
| 224 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | ||
| 225 | *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ | ||
| 226 | *((c)++)=(unsigned char)(((l)>>24L)&0xff)) | ||
| 227 | |||
| 228 | /* replacements for htonl and ntohl since I have no idea what to do | ||
| 229 | * when faced with machines with 8 byte longs. */ | ||
| 230 | #define HDRSIZE 4 | ||
| 231 | |||
| 232 | #define n2l(c,l) (l =((DES_LONG)(*((c)++)))<<24L, \ | ||
| 233 | l|=((DES_LONG)(*((c)++)))<<16L, \ | ||
| 234 | l|=((DES_LONG)(*((c)++)))<< 8L, \ | ||
| 235 | l|=((DES_LONG)(*((c)++)))) | ||
| 236 | |||
| 237 | #define l2n(l,c) (*((c)++)=(unsigned char)(((l)>>24L)&0xff), \ | ||
| 238 | *((c)++)=(unsigned char)(((l)>>16L)&0xff), \ | ||
| 239 | *((c)++)=(unsigned char)(((l)>> 8L)&0xff), \ | ||
| 240 | *((c)++)=(unsigned char)(((l) )&0xff)) | ||
| 241 | |||
| 242 | /* NOTE - c is not incremented as per l2c */ | ||
| 243 | #define l2cn(l1,l2,c,n) { \ | ||
| 244 | c+=n; \ | ||
| 245 | switch (n) { \ | ||
| 246 | case 8: *(--(c))=(unsigned char)(((l2)>>24L)&0xff); \ | ||
| 247 | case 7: *(--(c))=(unsigned char)(((l2)>>16L)&0xff); \ | ||
| 248 | case 6: *(--(c))=(unsigned char)(((l2)>> 8L)&0xff); \ | ||
| 249 | case 5: *(--(c))=(unsigned char)(((l2) )&0xff); \ | ||
| 250 | case 4: *(--(c))=(unsigned char)(((l1)>>24L)&0xff); \ | ||
| 251 | case 3: *(--(c))=(unsigned char)(((l1)>>16L)&0xff); \ | ||
| 252 | case 2: *(--(c))=(unsigned char)(((l1)>> 8L)&0xff); \ | ||
| 253 | case 1: *(--(c))=(unsigned char)(((l1) )&0xff); \ | ||
| 254 | } \ | ||
| 255 | } | ||
| 256 | |||
| 257 | #if defined(WIN32) | ||
| 258 | #define ROTATE(a,n) (_lrotr(a,n)) | ||
| 259 | #else | ||
| 260 | #define ROTATE(a,n) (((a)>>(n))+((a)<<(32-(n)))) | ||
| 261 | #endif | ||
| 262 | |||
| 263 | /* Don't worry about the LOAD_DATA() stuff, that is used by | ||
| 264 | * fcrypt() to add it's little bit to the front */ | ||
| 265 | |||
| 266 | #ifdef DES_FCRYPT | ||
| 267 | |||
| 268 | #define LOAD_DATA_tmp(R,S,u,t,E0,E1) \ | ||
| 269 | { DES_LONG tmp; LOAD_DATA(R,S,u,t,E0,E1,tmp); } | ||
| 270 | |||
| 271 | #define LOAD_DATA(R,S,u,t,E0,E1,tmp) \ | ||
| 272 | t=R^(R>>16L); \ | ||
| 273 | u=t&E0; t&=E1; \ | ||
| 274 | tmp=(u<<16); u^=R^s[S ]; u^=tmp; \ | ||
| 275 | tmp=(t<<16); t^=R^s[S+1]; t^=tmp | ||
| 276 | #else | ||
| 277 | #define LOAD_DATA_tmp(a,b,c,d,e,f) LOAD_DATA(a,b,c,d,e,f,g) | ||
| 278 | #define LOAD_DATA(R,S,u,t,E0,E1,tmp) \ | ||
| 279 | u=R^s[S ]; \ | ||
| 280 | t=R^s[S+1] | ||
| 281 | #endif | ||
| 282 | |||
| 283 | /* The changes to this macro may help or hinder, depending on the | ||
| 284 | * compiler and the achitecture. gcc2 always seems to do well :-). | ||
| 285 | * Inspired by Dana How <how@isl.stanford.edu> | ||
| 286 | * DO NOT use the alternative version on machines with 8 byte longs. | ||
| 287 | * It does not seem to work on the Alpha, even when DES_LONG is 4 | ||
| 288 | * bytes, probably an issue of accessing non-word aligned objects :-( */ | ||
| 289 | #ifdef DES_PTR | ||
| 290 | |||
| 291 | /* It recently occured to me that 0^0^0^0^0^0^0 == 0, so there | ||
| 292 | * is no reason to not xor all the sub items together. This potentially | ||
| 293 | * saves a register since things can be xored directly into L */ | ||
| 294 | |||
| 295 | #if defined(DES_RISC1) || defined(DES_RISC2) | ||
| 296 | #ifdef DES_RISC1 | ||
| 297 | #define D_ENCRYPT(LL,R,S) { \ | ||
| 298 | unsigned int u1,u2,u3; \ | ||
| 299 | LOAD_DATA(R,S,u,t,E0,E1,u1); \ | ||
| 300 | u2=(int)u>>8L; \ | ||
| 301 | u1=(int)u&0xfc; \ | ||
| 302 | u2&=0xfc; \ | ||
| 303 | t=ROTATE(t,4); \ | ||
| 304 | u>>=16L; \ | ||
| 305 | LL^= *(DES_LONG *)((unsigned char *)des_SP +u1); \ | ||
| 306 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x200+u2); \ | ||
| 307 | u3=(int)(u>>8L); \ | ||
| 308 | u1=(int)u&0xfc; \ | ||
| 309 | u3&=0xfc; \ | ||
| 310 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x400+u1); \ | ||
| 311 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x600+u3); \ | ||
| 312 | u2=(int)t>>8L; \ | ||
| 313 | u1=(int)t&0xfc; \ | ||
| 314 | u2&=0xfc; \ | ||
| 315 | t>>=16L; \ | ||
| 316 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x100+u1); \ | ||
| 317 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x300+u2); \ | ||
| 318 | u3=(int)t>>8L; \ | ||
| 319 | u1=(int)t&0xfc; \ | ||
| 320 | u3&=0xfc; \ | ||
| 321 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x500+u1); \ | ||
| 322 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x700+u3); } | ||
| 323 | #endif | ||
| 324 | #ifdef DES_RISC2 | ||
| 325 | #define D_ENCRYPT(LL,R,S) { \ | ||
| 326 | unsigned int u1,u2,s1,s2; \ | ||
| 327 | LOAD_DATA(R,S,u,t,E0,E1,u1); \ | ||
| 328 | u2=(int)u>>8L; \ | ||
| 329 | u1=(int)u&0xfc; \ | ||
| 330 | u2&=0xfc; \ | ||
| 331 | t=ROTATE(t,4); \ | ||
| 332 | LL^= *(DES_LONG *)((unsigned char *)des_SP +u1); \ | ||
| 333 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x200+u2); \ | ||
| 334 | s1=(int)(u>>16L); \ | ||
| 335 | s2=(int)(u>>24L); \ | ||
| 336 | s1&=0xfc; \ | ||
| 337 | s2&=0xfc; \ | ||
| 338 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x400+s1); \ | ||
| 339 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x600+s2); \ | ||
| 340 | u2=(int)t>>8L; \ | ||
| 341 | u1=(int)t&0xfc; \ | ||
| 342 | u2&=0xfc; \ | ||
| 343 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x100+u1); \ | ||
| 344 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x300+u2); \ | ||
| 345 | s1=(int)(t>>16L); \ | ||
| 346 | s2=(int)(t>>24L); \ | ||
| 347 | s1&=0xfc; \ | ||
| 348 | s2&=0xfc; \ | ||
| 349 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x500+s1); \ | ||
| 350 | LL^= *(DES_LONG *)((unsigned char *)des_SP+0x700+s2); } | ||
| 351 | #endif | ||
| 352 | #else | ||
| 353 | #define D_ENCRYPT(LL,R,S) { \ | ||
| 354 | LOAD_DATA_tmp(R,S,u,t,E0,E1); \ | ||
| 355 | t=ROTATE(t,4); \ | ||
| 356 | LL^= \ | ||
| 357 | *(DES_LONG *)((unsigned char *)des_SP +((u )&0xfc))^ \ | ||
| 358 | *(DES_LONG *)((unsigned char *)des_SP+0x200+((u>> 8L)&0xfc))^ \ | ||
| 359 | *(DES_LONG *)((unsigned char *)des_SP+0x400+((u>>16L)&0xfc))^ \ | ||
| 360 | *(DES_LONG *)((unsigned char *)des_SP+0x600+((u>>24L)&0xfc))^ \ | ||
| 361 | *(DES_LONG *)((unsigned char *)des_SP+0x100+((t )&0xfc))^ \ | ||
| 362 | *(DES_LONG *)((unsigned char *)des_SP+0x300+((t>> 8L)&0xfc))^ \ | ||
| 363 | *(DES_LONG *)((unsigned char *)des_SP+0x500+((t>>16L)&0xfc))^ \ | ||
| 364 | *(DES_LONG *)((unsigned char *)des_SP+0x700+((t>>24L)&0xfc)); } | ||
| 365 | #endif | ||
| 366 | |||
| 367 | #else /* original version */ | ||
| 368 | |||
| 369 | #if defined(DES_RISC1) || defined(DES_RISC2) | ||
| 370 | #ifdef DES_RISC1 | ||
| 371 | #define D_ENCRYPT(LL,R,S) {\ | ||
| 372 | unsigned int u1,u2,u3; \ | ||
| 373 | LOAD_DATA(R,S,u,t,E0,E1,u1); \ | ||
| 374 | u>>=2L; \ | ||
| 375 | t=ROTATE(t,6); \ | ||
| 376 | u2=(int)u>>8L; \ | ||
| 377 | u1=(int)u&0x3f; \ | ||
| 378 | u2&=0x3f; \ | ||
| 379 | u>>=16L; \ | ||
| 380 | LL^=des_SPtrans[0][u1]; \ | ||
| 381 | LL^=des_SPtrans[2][u2]; \ | ||
| 382 | u3=(int)u>>8L; \ | ||
| 383 | u1=(int)u&0x3f; \ | ||
| 384 | u3&=0x3f; \ | ||
| 385 | LL^=des_SPtrans[4][u1]; \ | ||
| 386 | LL^=des_SPtrans[6][u3]; \ | ||
| 387 | u2=(int)t>>8L; \ | ||
| 388 | u1=(int)t&0x3f; \ | ||
| 389 | u2&=0x3f; \ | ||
| 390 | t>>=16L; \ | ||
| 391 | LL^=des_SPtrans[1][u1]; \ | ||
| 392 | LL^=des_SPtrans[3][u2]; \ | ||
| 393 | u3=(int)t>>8L; \ | ||
| 394 | u1=(int)t&0x3f; \ | ||
| 395 | u3&=0x3f; \ | ||
| 396 | LL^=des_SPtrans[5][u1]; \ | ||
| 397 | LL^=des_SPtrans[7][u3]; } | ||
| 398 | #endif | ||
| 399 | #ifdef DES_RISC2 | ||
| 400 | #define D_ENCRYPT(LL,R,S) {\ | ||
| 401 | unsigned int u1,u2,s1,s2; \ | ||
| 402 | LOAD_DATA(R,S,u,t,E0,E1,u1); \ | ||
| 403 | u>>=2L; \ | ||
| 404 | t=ROTATE(t,6); \ | ||
| 405 | u2=(int)u>>8L; \ | ||
| 406 | u1=(int)u&0x3f; \ | ||
| 407 | u2&=0x3f; \ | ||
| 408 | LL^=des_SPtrans[0][u1]; \ | ||
| 409 | LL^=des_SPtrans[2][u2]; \ | ||
| 410 | s1=(int)u>>16L; \ | ||
| 411 | s2=(int)u>>24L; \ | ||
| 412 | s1&=0x3f; \ | ||
| 413 | s2&=0x3f; \ | ||
| 414 | LL^=des_SPtrans[4][s1]; \ | ||
| 415 | LL^=des_SPtrans[6][s2]; \ | ||
| 416 | u2=(int)t>>8L; \ | ||
| 417 | u1=(int)t&0x3f; \ | ||
| 418 | u2&=0x3f; \ | ||
| 419 | LL^=des_SPtrans[1][u1]; \ | ||
| 420 | LL^=des_SPtrans[3][u2]; \ | ||
| 421 | s1=(int)t>>16; \ | ||
| 422 | s2=(int)t>>24L; \ | ||
| 423 | s1&=0x3f; \ | ||
| 424 | s2&=0x3f; \ | ||
| 425 | LL^=des_SPtrans[5][s1]; \ | ||
| 426 | LL^=des_SPtrans[7][s2]; } | ||
| 427 | #endif | ||
| 428 | |||
| 429 | #else | ||
| 430 | |||
| 431 | #define D_ENCRYPT(LL,R,S) {\ | ||
| 432 | LOAD_DATA_tmp(R,S,u,t,E0,E1); \ | ||
| 433 | t=ROTATE(t,4); \ | ||
| 434 | LL^=\ | ||
| 435 | des_SPtrans[0][(u>> 2L)&0x3f]^ \ | ||
| 436 | des_SPtrans[2][(u>>10L)&0x3f]^ \ | ||
| 437 | des_SPtrans[4][(u>>18L)&0x3f]^ \ | ||
| 438 | des_SPtrans[6][(u>>26L)&0x3f]^ \ | ||
| 439 | des_SPtrans[1][(t>> 2L)&0x3f]^ \ | ||
| 440 | des_SPtrans[3][(t>>10L)&0x3f]^ \ | ||
| 441 | des_SPtrans[5][(t>>18L)&0x3f]^ \ | ||
| 442 | des_SPtrans[7][(t>>26L)&0x3f]; } | ||
| 443 | #endif | ||
| 444 | #endif | ||
| 445 | |||
| 446 | /* IP and FP | ||
| 447 | * The problem is more of a geometric problem that random bit fiddling. | ||
| 448 | 0 1 2 3 4 5 6 7 62 54 46 38 30 22 14 6 | ||
| 449 | 8 9 10 11 12 13 14 15 60 52 44 36 28 20 12 4 | ||
| 450 | 16 17 18 19 20 21 22 23 58 50 42 34 26 18 10 2 | ||
| 451 | 24 25 26 27 28 29 30 31 to 56 48 40 32 24 16 8 0 | ||
| 452 | |||
| 453 | 32 33 34 35 36 37 38 39 63 55 47 39 31 23 15 7 | ||
| 454 | 40 41 42 43 44 45 46 47 61 53 45 37 29 21 13 5 | ||
| 455 | 48 49 50 51 52 53 54 55 59 51 43 35 27 19 11 3 | ||
| 456 | 56 57 58 59 60 61 62 63 57 49 41 33 25 17 9 1 | ||
| 457 | |||
| 458 | The output has been subject to swaps of the form | ||
| 459 | 0 1 -> 3 1 but the odd and even bits have been put into | ||
| 460 | 2 3 2 0 | ||
| 461 | different words. The main trick is to remember that | ||
| 462 | t=((l>>size)^r)&(mask); | ||
| 463 | r^=t; | ||
| 464 | l^=(t<<size); | ||
| 465 | can be used to swap and move bits between words. | ||
| 466 | |||
| 467 | So l = 0 1 2 3 r = 16 17 18 19 | ||
| 468 | 4 5 6 7 20 21 22 23 | ||
| 469 | 8 9 10 11 24 25 26 27 | ||
| 470 | 12 13 14 15 28 29 30 31 | ||
| 471 | becomes (for size == 2 and mask == 0x3333) | ||
| 472 | t = 2^16 3^17 -- -- l = 0 1 16 17 r = 2 3 18 19 | ||
| 473 | 6^20 7^21 -- -- 4 5 20 21 6 7 22 23 | ||
| 474 | 10^24 11^25 -- -- 8 9 24 25 10 11 24 25 | ||
| 475 | 14^28 15^29 -- -- 12 13 28 29 14 15 28 29 | ||
| 476 | |||
| 477 | Thanks for hints from Richard Outerbridge - he told me IP&FP | ||
| 478 | could be done in 15 xor, 10 shifts and 5 ands. | ||
| 479 | When I finally started to think of the problem in 2D | ||
| 480 | I first got ~42 operations without xors. When I remembered | ||
| 481 | how to use xors :-) I got it to its final state. | ||
| 482 | */ | ||
| 483 | #define PERM_OP(a,b,t,n,m) ((t)=((((a)>>(n))^(b))&(m)),\ | ||
| 484 | (b)^=(t),\ | ||
| 485 | (a)^=((t)<<(n))) | ||
| 486 | |||
| 487 | #define IP(l,r) \ | ||
| 488 | { \ | ||
| 489 | register DES_LONG tt; \ | ||
| 490 | PERM_OP(r,l,tt, 4,0x0f0f0f0fL); \ | ||
| 491 | PERM_OP(l,r,tt,16,0x0000ffffL); \ | ||
| 492 | PERM_OP(r,l,tt, 2,0x33333333L); \ | ||
| 493 | PERM_OP(l,r,tt, 8,0x00ff00ffL); \ | ||
| 494 | PERM_OP(r,l,tt, 1,0x55555555L); \ | ||
| 495 | } | ||
| 496 | |||
| 497 | #define FP(l,r) \ | ||
| 498 | { \ | ||
| 499 | register DES_LONG tt; \ | ||
| 500 | PERM_OP(l,r,tt, 1,0x55555555L); \ | ||
| 501 | PERM_OP(r,l,tt, 8,0x00ff00ffL); \ | ||
| 502 | PERM_OP(l,r,tt, 2,0x33333333L); \ | ||
| 503 | PERM_OP(r,l,tt,16,0x0000ffffL); \ | ||
| 504 | PERM_OP(l,r,tt, 4,0x0f0f0f0fL); \ | ||
| 505 | } | ||
| 506 | |||
| 507 | extern const DES_LONG des_SPtrans[8][64]; | ||
| 508 | |||
| 509 | #ifndef NOPROTO | ||
| 510 | void fcrypt_body(DES_LONG *out,des_key_schedule ks, | ||
| 511 | DES_LONG Eswap0, DES_LONG Eswap1); | ||
| 512 | #else | ||
| 513 | void fcrypt_body(); | ||
| 514 | #endif | ||
| 515 | |||
| 516 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/des/doIP b/src/lib/libssl/src/crypto/des/doIP new file mode 100644 index 0000000000..18cf231303 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/doIP | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | @l=( | ||
| 4 | 0, 1, 2, 3, 4, 5, 6, 7, | ||
| 5 | 8, 9,10,11,12,13,14,15, | ||
| 6 | 16,17,18,19,20,21,22,23, | ||
| 7 | 24,25,26,27,28,29,30,31 | ||
| 8 | ); | ||
| 9 | @r=( | ||
| 10 | 32,33,34,35,36,37,38,39, | ||
| 11 | 40,41,42,43,44,45,46,47, | ||
| 12 | 48,49,50,51,52,53,54,55, | ||
| 13 | 56,57,58,59,60,61,62,63 | ||
| 14 | ); | ||
| 15 | |||
| 16 | require 'shifts.pl'; | ||
| 17 | |||
| 18 | sub PERM_OP | ||
| 19 | { | ||
| 20 | local(*a,*b,*t,$n,$m)=@_; | ||
| 21 | |||
| 22 | @z=&shift(*a,-$n); | ||
| 23 | @z=&xor(*b,*z); | ||
| 24 | @z=&and(*z,$m); | ||
| 25 | @b=&xor(*b,*z); | ||
| 26 | @z=&shift(*z,$n); | ||
| 27 | @a=&xor(*a,*z); | ||
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | @L=@l; | ||
| 32 | @R=@r; | ||
| 33 | &PERM_OP(*R,*L,*T,4,0x0f0f0f0f); | ||
| 34 | &PERM_OP(*L,*R,*T,16,0x0000ffff); | ||
| 35 | &PERM_OP(*R,*L,*T,2,0x33333333); | ||
| 36 | &PERM_OP(*L,*R,*T,8,0x00ff00ff); | ||
| 37 | &PERM_OP(*R,*L,*T,1,0x55555555); | ||
| 38 | &printit(@L); | ||
| 39 | &printit(@R); | ||
| 40 | &PERM_OP(*R,*L,*T,1,0x55555555); | ||
| 41 | &PERM_OP(*L,*R,*T,8,0x00ff00ff); | ||
| 42 | &PERM_OP(*R,*L,*T,2,0x33333333); | ||
| 43 | &PERM_OP(*L,*R,*T,16,0x0000ffff); | ||
| 44 | &PERM_OP(*R,*L,*T,4,0x0f0f0f0f); | ||
| 45 | &printit(@L); | ||
| 46 | &printit(@R); | ||
diff --git a/src/lib/libssl/src/crypto/des/doPC1 b/src/lib/libssl/src/crypto/des/doPC1 new file mode 100644 index 0000000000..096afd8c46 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/doPC1 | |||
| @@ -0,0 +1,110 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | @l=( | ||
| 4 | 0, 1, 2, 3, 4, 5, 6, 7, | ||
| 5 | 8, 9,10,11,12,13,14,15, | ||
| 6 | 16,17,18,19,20,21,22,23, | ||
| 7 | 24,25,26,27,28,29,30,31 | ||
| 8 | ); | ||
| 9 | @r=( | ||
| 10 | 32,33,34,35,36,37,38,39, | ||
| 11 | 40,41,42,43,44,45,46,47, | ||
| 12 | 48,49,50,51,52,53,54,55, | ||
| 13 | 56,57,58,59,60,61,62,63 | ||
| 14 | ); | ||
| 15 | |||
| 16 | require 'shifts.pl'; | ||
| 17 | |||
| 18 | sub PERM_OP | ||
| 19 | { | ||
| 20 | local(*a,*b,*t,$n,$m)=@_; | ||
| 21 | |||
| 22 | @z=&shift(*a,-$n); | ||
| 23 | @z=&xor(*b,*z); | ||
| 24 | @z=&and(*z,$m); | ||
| 25 | @b=&xor(*b,*z); | ||
| 26 | @z=&shift(*z,$n); | ||
| 27 | @a=&xor(*a,*z); | ||
| 28 | } | ||
| 29 | |||
| 30 | sub HPERM_OP2 | ||
| 31 | { | ||
| 32 | local(*a,*t,$n,$m)=@_; | ||
| 33 | local(@x,@y,$i); | ||
| 34 | |||
| 35 | @z=&shift(*a,16-$n); | ||
| 36 | @z=&xor(*a,*z); | ||
| 37 | @z=&and(*z,$m); | ||
| 38 | @a=&xor(*a,*z); | ||
| 39 | @z=&shift(*z,$n-16); | ||
| 40 | @a=&xor(*a,*z); | ||
| 41 | } | ||
| 42 | |||
| 43 | sub HPERM_OP | ||
| 44 | { | ||
| 45 | local(*a,*t,$n,$m)=@_; | ||
| 46 | local(@x,@y,$i); | ||
| 47 | |||
| 48 | for ($i=0; $i<16; $i++) | ||
| 49 | { | ||
| 50 | $x[$i]=$a[$i]; | ||
| 51 | $y[$i]=$a[16+$i]; | ||
| 52 | } | ||
| 53 | @z=&shift(*x,-$n); | ||
| 54 | @z=&xor(*y,*z); | ||
| 55 | @z=&and(*z,$m); | ||
| 56 | @y=&xor(*y,*z); | ||
| 57 | @z=&shift(*z,$n); | ||
| 58 | @x=&xor(*x,*z); | ||
| 59 | for ($i=0; $i<16; $i++) | ||
| 60 | { | ||
| 61 | $a[$i]=$x[$i]; | ||
| 62 | $a[16+$i]=$y[$i]; | ||
| 63 | } | ||
| 64 | } | ||
| 65 | |||
| 66 | @L=@l; | ||
| 67 | @R=@r; | ||
| 68 | |||
| 69 | print "---\n"; &printit(@R); | ||
| 70 | &PERM_OP(*R,*L,*T,4,0x0f0f0f0f); | ||
| 71 | print "---\n"; &printit(@R); | ||
| 72 | &HPERM_OP2(*L,*T,-2,0xcccc0000); | ||
| 73 | &HPERM_OP2(*R,*T,-2,0xcccc0000); | ||
| 74 | print "---\n"; &printit(@R); | ||
| 75 | &PERM_OP(*R,*L,*T,1,0x55555555); | ||
| 76 | print "---\n"; &printit(@R); | ||
| 77 | &PERM_OP(*L,*R,*T,8,0x00ff00ff); | ||
| 78 | print "---\n"; &printit(@R); | ||
| 79 | &PERM_OP(*R,*L,*T,1,0x55555555); | ||
| 80 | print "---\n"; &printit(@R); | ||
| 81 | # &printit(@L); | ||
| 82 | &printit(@R); | ||
| 83 | print <<"EOF"; | ||
| 84 | ============================== | ||
| 85 | 63 55 47 39 31 23 15 7 | ||
| 86 | 62 54 46 38 30 22 14 6 | ||
| 87 | 61 53 45 37 29 21 13 5 | ||
| 88 | 60 52 44 36 -- -- -- -- | ||
| 89 | |||
| 90 | 57 49 41 33 25 17 9 1 | ||
| 91 | 58 50 42 34 26 18 10 2 | ||
| 92 | 59 51 43 35 27 19 11 3 | ||
| 93 | 28 20 12 4 -- -- -- -- | ||
| 94 | EOF | ||
| 95 | exit(1); | ||
| 96 | @A=&and(*R,0x000000ff); | ||
| 97 | @A=&shift(*A,16); | ||
| 98 | @B=&and(*R,0x0000ff00); | ||
| 99 | @C=&and(*R,0x00ff0000); | ||
| 100 | @C=&shift(*C,-16); | ||
| 101 | @D=&and(*L,0xf0000000); | ||
| 102 | @D=&shift(*D,-4); | ||
| 103 | @A=&or(*A,*B); | ||
| 104 | @B=&or(*D,*C); | ||
| 105 | @R=&or(*A,*B); | ||
| 106 | @L=&and(*L,0x0fffffff); | ||
| 107 | |||
| 108 | &printit(@L); | ||
| 109 | &printit(@R); | ||
| 110 | |||
diff --git a/src/lib/libssl/src/crypto/des/doPC2 b/src/lib/libssl/src/crypto/des/doPC2 new file mode 100644 index 0000000000..fa5cf74cf7 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/doPC2 | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | #!/usr/local/bin/perl | ||
| 2 | |||
| 3 | @PC2_C=(14,17,11,24, 1, 5, | ||
| 4 | 3,28,15, 6,21,10, | ||
| 5 | 23,19,12, 4,26, 8, | ||
| 6 | 16, 7,27,20,13, 2, | ||
| 7 | ); | ||
| 8 | |||
| 9 | @PC2_D=(41,52,31,37,47,55, | ||
| 10 | 30,40,51,45,33,48, | ||
| 11 | 44,49,39,56,34,53, | ||
| 12 | 46,42,50,36,29,32, | ||
| 13 | ); | ||
| 14 | |||
| 15 | $i=0; | ||
| 16 | foreach (@PC2_C) { | ||
| 17 | $_--; | ||
| 18 | # printf "%2d,",$_; | ||
| 19 | $C{$_}=$i; | ||
| 20 | ++$i; | ||
| 21 | # print "\n" if ((($i) % 8) == 0); | ||
| 22 | } | ||
| 23 | $i=0; | ||
| 24 | #print "\n"; | ||
| 25 | foreach (@PC2_D) { | ||
| 26 | $_-=28; | ||
| 27 | $_--; | ||
| 28 | # printf "%2d,",$_; | ||
| 29 | $D{$_}=$i; | ||
| 30 | $i++; | ||
| 31 | # print "\n" if ((($i) % 8) == 0); | ||
| 32 | } | ||
| 33 | |||
| 34 | #print "\n"; | ||
| 35 | foreach $i (0 .. 27) | ||
| 36 | { | ||
| 37 | $_=$C{$i}; | ||
| 38 | # printf "%2d,",$_; | ||
| 39 | $i++; | ||
| 40 | # print "\n" if ((($i) % 8) == 0); | ||
| 41 | } | ||
| 42 | #print "\n"; | ||
| 43 | |||
| 44 | #print "\n"; | ||
| 45 | foreach $i (0 .. 27) | ||
| 46 | { | ||
| 47 | $_=$D{$i}; | ||
| 48 | # printf "%2d,",$_; | ||
| 49 | $i++; | ||
| 50 | # print "\n" if ((($i) % 8) == 0); | ||
| 51 | } | ||
| 52 | #print "\n"; | ||
| 53 | |||
| 54 | print "static ulong skb[8][64]={\n"; | ||
| 55 | &doit("C",*C, 0, 1, 2, 3, 4, 5); | ||
| 56 | &doit("C",*C, 6, 7, 9,10,11,12); | ||
| 57 | &doit("C",*C,13,14,15,16,18,19); | ||
| 58 | &doit("C",*C,20,22,23,25,26,27); | ||
| 59 | |||
| 60 | &doit("D",*D, 0, 1, 2, 3, 4, 5); | ||
| 61 | &doit("D",*D, 7, 8,10,11,12,13); | ||
| 62 | &doit("D",*D,15,16,17,18,19,20); | ||
| 63 | &doit("D",*D,21,22,23,24,26,27); | ||
| 64 | print "};\n"; | ||
| 65 | |||
| 66 | sub doit | ||
| 67 | { | ||
| 68 | local($l,*A,@b)=@_; | ||
| 69 | local(@out); | ||
| 70 | |||
| 71 | printf("/* for $l bits (numbered as per FIPS 46) %d %d %d %d %d %d */\n", | ||
| 72 | $b[0]+1, $b[1]+1, $b[2]+1, $b[3]+1, $b[4]+1, $b[5]+1); | ||
| 73 | for ($i=0; $i<64; $i++) | ||
| 74 | { | ||
| 75 | $out[$i]=0; | ||
| 76 | $j=1; | ||
| 77 | #print "\n"; | ||
| 78 | for ($k=0; $k<6; $k++) | ||
| 79 | { | ||
| 80 | $l=$A{$b[$k]}; | ||
| 81 | #print"$l - "; | ||
| 82 | if ((1<<$k) & $i) | ||
| 83 | { | ||
| 84 | $ll=int($l/6)*8+($l%6); | ||
| 85 | $out[$i]|=1<<($ll); | ||
| 86 | } | ||
| 87 | } | ||
| 88 | $pp=$out[$i]; | ||
| 89 | $pp=($pp&0xff0000ff)| (($pp&0x00ff0000)>>8)| | ||
| 90 | (($pp&0x0000ff00)<<8); | ||
| 91 | printf("0x%08X,",$pp); | ||
| 92 | print "\n" if (($i+1) % 4 == 0); | ||
| 93 | } | ||
| 94 | } | ||
diff --git a/src/lib/libssl/src/crypto/des/ede_enc.c b/src/lib/libssl/src/crypto/des/ede_enc.c new file mode 100644 index 0000000000..9f75dd1037 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/ede_enc.c | |||
| @@ -0,0 +1,190 @@ | |||
| 1 | /* crypto/des/ede_enc.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 "des_locl.h" | ||
| 60 | |||
| 61 | void des_ede3_cbc_encrypt(input, output, length, ks1, ks2, ks3, ivec, enc) | ||
| 62 | des_cblock (*input); | ||
| 63 | des_cblock (*output); | ||
| 64 | long length; | ||
| 65 | des_key_schedule ks1; | ||
| 66 | des_key_schedule ks2; | ||
| 67 | des_key_schedule ks3; | ||
| 68 | des_cblock (*ivec); | ||
| 69 | int enc; | ||
| 70 | { | ||
| 71 | register DES_LONG tin0,tin1; | ||
| 72 | register DES_LONG tout0,tout1,xor0,xor1; | ||
| 73 | register unsigned char *in,*out; | ||
| 74 | register long l=length; | ||
| 75 | DES_LONG tin[2]; | ||
| 76 | unsigned char *iv; | ||
| 77 | |||
| 78 | in=(unsigned char *)input; | ||
| 79 | out=(unsigned char *)output; | ||
| 80 | iv=(unsigned char *)ivec; | ||
| 81 | |||
| 82 | if (enc) | ||
| 83 | { | ||
| 84 | c2l(iv,tout0); | ||
| 85 | c2l(iv,tout1); | ||
| 86 | for (l-=8; l>=0; l-=8) | ||
| 87 | { | ||
| 88 | c2l(in,tin0); | ||
| 89 | c2l(in,tin1); | ||
| 90 | tin0^=tout0; | ||
| 91 | tin1^=tout1; | ||
| 92 | |||
| 93 | tin[0]=tin0; | ||
| 94 | tin[1]=tin1; | ||
| 95 | des_encrypt3((DES_LONG *)tin,ks1,ks2,ks3); | ||
| 96 | tout0=tin[0]; | ||
| 97 | tout1=tin[1]; | ||
| 98 | |||
| 99 | l2c(tout0,out); | ||
| 100 | l2c(tout1,out); | ||
| 101 | } | ||
| 102 | if (l != -8) | ||
| 103 | { | ||
| 104 | c2ln(in,tin0,tin1,l+8); | ||
| 105 | tin0^=tout0; | ||
| 106 | tin1^=tout1; | ||
| 107 | |||
| 108 | tin[0]=tin0; | ||
| 109 | tin[1]=tin1; | ||
| 110 | des_encrypt3((DES_LONG *)tin,ks1,ks2,ks3); | ||
| 111 | tout0=tin[0]; | ||
| 112 | tout1=tin[1]; | ||
| 113 | |||
| 114 | l2c(tout0,out); | ||
| 115 | l2c(tout1,out); | ||
| 116 | } | ||
| 117 | iv=(unsigned char *)ivec; | ||
| 118 | l2c(tout0,iv); | ||
| 119 | l2c(tout1,iv); | ||
| 120 | } | ||
| 121 | else | ||
| 122 | { | ||
| 123 | register DES_LONG t0,t1; | ||
| 124 | |||
| 125 | c2l(iv,xor0); | ||
| 126 | c2l(iv,xor1); | ||
| 127 | for (l-=8; l>=0; l-=8) | ||
| 128 | { | ||
| 129 | c2l(in,tin0); | ||
| 130 | c2l(in,tin1); | ||
| 131 | |||
| 132 | t0=tin0; | ||
| 133 | t1=tin1; | ||
| 134 | |||
| 135 | tin[0]=tin0; | ||
| 136 | tin[1]=tin1; | ||
| 137 | des_decrypt3((DES_LONG *)tin,ks1,ks2,ks3); | ||
| 138 | tout0=tin[0]; | ||
| 139 | tout1=tin[1]; | ||
| 140 | |||
| 141 | tout0^=xor0; | ||
| 142 | tout1^=xor1; | ||
| 143 | l2c(tout0,out); | ||
| 144 | l2c(tout1,out); | ||
| 145 | xor0=t0; | ||
| 146 | xor1=t1; | ||
| 147 | } | ||
| 148 | if (l != -8) | ||
| 149 | { | ||
| 150 | c2l(in,tin0); | ||
| 151 | c2l(in,tin1); | ||
| 152 | |||
| 153 | t0=tin0; | ||
| 154 | t1=tin1; | ||
| 155 | |||
| 156 | tin[0]=tin0; | ||
| 157 | tin[1]=tin1; | ||
| 158 | des_decrypt3((DES_LONG *)tin,ks1,ks2,ks3); | ||
| 159 | tout0=tin[0]; | ||
| 160 | tout1=tin[1]; | ||
| 161 | |||
| 162 | tout0^=xor0; | ||
| 163 | tout1^=xor1; | ||
| 164 | l2cn(tout0,tout1,out,l+8); | ||
| 165 | xor0=t0; | ||
| 166 | xor1=t1; | ||
| 167 | } | ||
| 168 | |||
| 169 | iv=(unsigned char *)ivec; | ||
| 170 | l2c(xor0,iv); | ||
| 171 | l2c(xor1,iv); | ||
| 172 | } | ||
| 173 | tin0=tin1=tout0=tout1=xor0=xor1=0; | ||
| 174 | tin[0]=tin[1]=0; | ||
| 175 | } | ||
| 176 | |||
| 177 | #ifdef undef /* MACRO */ | ||
| 178 | void des_ede2_cbc_encrypt(input, output, length, ks1, ks2, ivec, enc) | ||
| 179 | des_cblock (*input); | ||
| 180 | des_cblock (*output); | ||
| 181 | long length; | ||
| 182 | des_key_schedule ks1; | ||
| 183 | des_key_schedule ks2; | ||
| 184 | des_cblock (*ivec); | ||
| 185 | int enc; | ||
| 186 | { | ||
| 187 | des_ede3_cbc_encrypt(input,output,length,ks1,ks2,ks1,ivec,enc); | ||
| 188 | } | ||
| 189 | #endif | ||
| 190 | |||
diff --git a/src/lib/libssl/src/crypto/des/podd.h b/src/lib/libssl/src/crypto/des/podd.h new file mode 100644 index 0000000000..1b2bfe0843 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/podd.h | |||
| @@ -0,0 +1,75 @@ | |||
| 1 | /* crypto/des/podd.h */ | ||
| 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 | static const unsigned char odd_parity[256]={ | ||
| 60 | 1, 1, 2, 2, 4, 4, 7, 7, 8, 8, 11, 11, 13, 13, 14, 14, | ||
| 61 | 16, 16, 19, 19, 21, 21, 22, 22, 25, 25, 26, 26, 28, 28, 31, 31, | ||
| 62 | 32, 32, 35, 35, 37, 37, 38, 38, 41, 41, 42, 42, 44, 44, 47, 47, | ||
| 63 | 49, 49, 50, 50, 52, 52, 55, 55, 56, 56, 59, 59, 61, 61, 62, 62, | ||
| 64 | 64, 64, 67, 67, 69, 69, 70, 70, 73, 73, 74, 74, 76, 76, 79, 79, | ||
| 65 | 81, 81, 82, 82, 84, 84, 87, 87, 88, 88, 91, 91, 93, 93, 94, 94, | ||
| 66 | 97, 97, 98, 98,100,100,103,103,104,104,107,107,109,109,110,110, | ||
| 67 | 112,112,115,115,117,117,118,118,121,121,122,122,124,124,127,127, | ||
| 68 | 128,128,131,131,133,133,134,134,137,137,138,138,140,140,143,143, | ||
| 69 | 145,145,146,146,148,148,151,151,152,152,155,155,157,157,158,158, | ||
| 70 | 161,161,162,162,164,164,167,167,168,168,171,171,173,173,174,174, | ||
| 71 | 176,176,179,179,181,181,182,182,185,185,186,186,188,188,191,191, | ||
| 72 | 193,193,194,194,196,196,199,199,200,200,203,203,205,205,206,206, | ||
| 73 | 208,208,211,211,213,213,214,214,217,217,218,218,220,220,223,223, | ||
| 74 | 224,224,227,227,229,229,230,230,233,233,234,234,236,236,239,239, | ||
| 75 | 241,241,242,242,244,244,247,247,248,248,251,251,253,253,254,254}; | ||
diff --git a/src/lib/libssl/src/crypto/des/ranlib.sh b/src/lib/libssl/src/crypto/des/ranlib.sh new file mode 100644 index 0000000000..543f712c6b --- /dev/null +++ b/src/lib/libssl/src/crypto/des/ranlib.sh | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | cwd=`pwd` | ||
| 4 | cd /tmp | ||
| 5 | |||
| 6 | if [ -s /bin/ranlib ] ; then | ||
| 7 | RL=/bin/ranlib | ||
| 8 | else if [ -s /usr/bin/ranlib ] ; then | ||
| 9 | RL=/usr/bin/ranlib | ||
| 10 | fi | ||
| 11 | fi | ||
| 12 | |||
| 13 | if [ "x$RL" != "x" ] | ||
| 14 | then | ||
| 15 | case "$1" in | ||
| 16 | /*) | ||
| 17 | $RL "$1" | ||
| 18 | ;; | ||
| 19 | *) | ||
| 20 | $RL "$cwd/$1" | ||
| 21 | ;; | ||
| 22 | esac | ||
| 23 | fi | ||
diff --git a/src/lib/libssl/src/crypto/des/shifts.pl b/src/lib/libssl/src/crypto/des/shifts.pl new file mode 100644 index 0000000000..d8a240c1ba --- /dev/null +++ b/src/lib/libssl/src/crypto/des/shifts.pl | |||
| @@ -0,0 +1,198 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | sub lab_shift | ||
| 4 | { | ||
| 5 | local(*a,$n)=@_; | ||
| 6 | local(@r,$i,$j,$k,$d,@z); | ||
| 7 | |||
| 8 | @r=&shift(*a,$n); | ||
| 9 | foreach $i (0 .. 31) | ||
| 10 | { | ||
| 11 | @z=split(/\^/,$r[$i]); | ||
| 12 | for ($j=0; $j <= $#z; $j++) | ||
| 13 | { | ||
| 14 | ($d)=($z[$j] =~ /^(..)/); | ||
| 15 | ($k)=($z[$j] =~ /\[(.*)\]$/); | ||
| 16 | $k.=",$n" if ($k ne ""); | ||
| 17 | $k="$n" if ($k eq ""); | ||
| 18 | $d="$d[$k]"; | ||
| 19 | $z[$j]=$d; | ||
| 20 | } | ||
| 21 | $r[$i]=join('^',@z); | ||
| 22 | } | ||
| 23 | return(@r); | ||
| 24 | } | ||
| 25 | |||
| 26 | sub shift | ||
| 27 | { | ||
| 28 | local(*a,$n)=@_; | ||
| 29 | local(@f); | ||
| 30 | |||
| 31 | if ($n > 0) | ||
| 32 | { | ||
| 33 | @f=&shiftl(*a,$n); | ||
| 34 | } | ||
| 35 | else | ||
| 36 | { | ||
| 37 | @f=&shiftr(*a,-$n); | ||
| 38 | } | ||
| 39 | return(@f); | ||
| 40 | } | ||
| 41 | |||
| 42 | sub rotate | ||
| 43 | { | ||
| 44 | local(*a,$n)=@_; | ||
| 45 | local(@f); | ||
| 46 | |||
| 47 | if ($n > 0) | ||
| 48 | { @f=&rotatel(*a,$n); } | ||
| 49 | else | ||
| 50 | { @f=&rotater(*a,-$n); } | ||
| 51 | return(@f); | ||
| 52 | } | ||
| 53 | |||
| 54 | sub rotater | ||
| 55 | { | ||
| 56 | local(*a,$n)=@_; | ||
| 57 | local(@f,@g); | ||
| 58 | |||
| 59 | @f=&shiftr(*a,$n); | ||
| 60 | @g=&shiftl(*a,32-$n); | ||
| 61 | $#f=31; | ||
| 62 | $#g=31; | ||
| 63 | return(&or(*f,*g)); | ||
| 64 | } | ||
| 65 | |||
| 66 | sub rotatel | ||
| 67 | { | ||
| 68 | local(*a,$n)=@_; | ||
| 69 | local(@f,@g); | ||
| 70 | |||
| 71 | @f=&shiftl(*a,$n); | ||
| 72 | @g=&shiftr(*a,32-$n); | ||
| 73 | $#f=31; | ||
| 74 | $#g=31; | ||
| 75 | return(&or(*f,*g)); | ||
| 76 | } | ||
| 77 | |||
| 78 | sub shiftr | ||
| 79 | { | ||
| 80 | local(*a,$n)=@_; | ||
| 81 | local(@r,$i); | ||
| 82 | |||
| 83 | $#r=31; | ||
| 84 | foreach $i (0 .. 31) | ||
| 85 | { | ||
| 86 | if (($i+$n) > 31) | ||
| 87 | { | ||
| 88 | $r[$i]="--"; | ||
| 89 | } | ||
| 90 | else | ||
| 91 | { | ||
| 92 | $r[$i]=$a[$i+$n]; | ||
| 93 | } | ||
| 94 | } | ||
| 95 | return(@r); | ||
| 96 | } | ||
| 97 | |||
| 98 | sub shiftl | ||
| 99 | { | ||
| 100 | local(*a,$n)=@_; | ||
| 101 | local(@r,$i); | ||
| 102 | |||
| 103 | $#r=31; | ||
| 104 | foreach $i (0 .. 31) | ||
| 105 | { | ||
| 106 | if ($i < $n) | ||
| 107 | { | ||
| 108 | $r[$i]="--"; | ||
| 109 | } | ||
| 110 | else | ||
| 111 | { | ||
| 112 | $r[$i]=$a[$i-$n]; | ||
| 113 | } | ||
| 114 | } | ||
| 115 | return(@r); | ||
| 116 | } | ||
| 117 | |||
| 118 | sub printit | ||
| 119 | { | ||
| 120 | local(@a)=@_; | ||
| 121 | local($i); | ||
| 122 | |||
| 123 | foreach $i (0 .. 31) | ||
| 124 | { | ||
| 125 | printf "%2s ",$a[$i]; | ||
| 126 | print "\n" if (($i%8) == 7); | ||
| 127 | } | ||
| 128 | print "\n"; | ||
| 129 | } | ||
| 130 | |||
| 131 | sub xor | ||
| 132 | { | ||
| 133 | local(*a,*b)=@_; | ||
| 134 | local(@r,$i); | ||
| 135 | |||
| 136 | $#r=31; | ||
| 137 | foreach $i (0 .. 31) | ||
| 138 | { | ||
| 139 | $r[$i]=&compress($a[$i].'^'.$b[$i]); | ||
| 140 | # $r[$i]=$a[$i]."^".$b[$i]; | ||
| 141 | } | ||
| 142 | return(@r); | ||
| 143 | } | ||
| 144 | |||
| 145 | sub and | ||
| 146 | { | ||
| 147 | local(*a,$m)=@_; | ||
| 148 | local(@r,$i); | ||
| 149 | |||
| 150 | $#r=31; | ||
| 151 | foreach $i (0 .. 31) | ||
| 152 | { | ||
| 153 | $r[$i]=(($m & (1<<$i))?($a[$i]):('--')); | ||
| 154 | } | ||
| 155 | return(@r); | ||
| 156 | } | ||
| 157 | |||
| 158 | sub or | ||
| 159 | { | ||
| 160 | local(*a,*b)=@_; | ||
| 161 | local(@r,$i); | ||
| 162 | |||
| 163 | $#r=31; | ||
| 164 | foreach $i (0 .. 31) | ||
| 165 | { | ||
| 166 | $r[$i]='--' if (($a[$i] eq '--') && ($b[$i] eq '--')); | ||
| 167 | $r[$i]=$a[$i] if (($a[$i] ne '--') && ($b[$i] eq '--')); | ||
| 168 | $r[$i]=$b[$i] if (($a[$i] eq '--') && ($b[$i] ne '--')); | ||
| 169 | $r[$i]='++' if (($a[$i] ne '--') && ($b[$i] ne '--')); | ||
| 170 | } | ||
| 171 | return(@r); | ||
| 172 | } | ||
| 173 | |||
| 174 | sub compress | ||
| 175 | { | ||
| 176 | local($s)=@_; | ||
| 177 | local($_,$i,@a,%a,$r); | ||
| 178 | |||
| 179 | $s =~ s/\^\^/\^/g; | ||
| 180 | $s =~ s/^\^//; | ||
| 181 | $s =~ s/\^$//; | ||
| 182 | @a=split(/\^/,$s); | ||
| 183 | |||
| 184 | while ($#a >= 0) | ||
| 185 | { | ||
| 186 | $_=shift(@a); | ||
| 187 | next unless /\d/; | ||
| 188 | $a{$_}++; | ||
| 189 | } | ||
| 190 | foreach $i (sort keys %a) | ||
| 191 | { | ||
| 192 | next if ($a{$i}%2 == 0); | ||
| 193 | $r.="$i^"; | ||
| 194 | } | ||
| 195 | chop($r); | ||
| 196 | return($r); | ||
| 197 | } | ||
| 198 | 1; | ||
diff --git a/src/lib/libssl/src/crypto/des/sk.h b/src/lib/libssl/src/crypto/des/sk.h new file mode 100644 index 0000000000..f2ade88c7c --- /dev/null +++ b/src/lib/libssl/src/crypto/des/sk.h | |||
| @@ -0,0 +1,204 @@ | |||
| 1 | /* crypto/des/sk.h */ | ||
| 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 | static const DES_LONG des_skb[8][64]={ | ||
| 60 | { | ||
| 61 | /* for C bits (numbered as per FIPS 46) 1 2 3 4 5 6 */ | ||
| 62 | 0x00000000L,0x00000010L,0x20000000L,0x20000010L, | ||
| 63 | 0x00010000L,0x00010010L,0x20010000L,0x20010010L, | ||
| 64 | 0x00000800L,0x00000810L,0x20000800L,0x20000810L, | ||
| 65 | 0x00010800L,0x00010810L,0x20010800L,0x20010810L, | ||
| 66 | 0x00000020L,0x00000030L,0x20000020L,0x20000030L, | ||
| 67 | 0x00010020L,0x00010030L,0x20010020L,0x20010030L, | ||
| 68 | 0x00000820L,0x00000830L,0x20000820L,0x20000830L, | ||
| 69 | 0x00010820L,0x00010830L,0x20010820L,0x20010830L, | ||
| 70 | 0x00080000L,0x00080010L,0x20080000L,0x20080010L, | ||
| 71 | 0x00090000L,0x00090010L,0x20090000L,0x20090010L, | ||
| 72 | 0x00080800L,0x00080810L,0x20080800L,0x20080810L, | ||
| 73 | 0x00090800L,0x00090810L,0x20090800L,0x20090810L, | ||
| 74 | 0x00080020L,0x00080030L,0x20080020L,0x20080030L, | ||
| 75 | 0x00090020L,0x00090030L,0x20090020L,0x20090030L, | ||
| 76 | 0x00080820L,0x00080830L,0x20080820L,0x20080830L, | ||
| 77 | 0x00090820L,0x00090830L,0x20090820L,0x20090830L, | ||
| 78 | },{ | ||
| 79 | /* for C bits (numbered as per FIPS 46) 7 8 10 11 12 13 */ | ||
| 80 | 0x00000000L,0x02000000L,0x00002000L,0x02002000L, | ||
| 81 | 0x00200000L,0x02200000L,0x00202000L,0x02202000L, | ||
| 82 | 0x00000004L,0x02000004L,0x00002004L,0x02002004L, | ||
| 83 | 0x00200004L,0x02200004L,0x00202004L,0x02202004L, | ||
| 84 | 0x00000400L,0x02000400L,0x00002400L,0x02002400L, | ||
| 85 | 0x00200400L,0x02200400L,0x00202400L,0x02202400L, | ||
| 86 | 0x00000404L,0x02000404L,0x00002404L,0x02002404L, | ||
| 87 | 0x00200404L,0x02200404L,0x00202404L,0x02202404L, | ||
| 88 | 0x10000000L,0x12000000L,0x10002000L,0x12002000L, | ||
| 89 | 0x10200000L,0x12200000L,0x10202000L,0x12202000L, | ||
| 90 | 0x10000004L,0x12000004L,0x10002004L,0x12002004L, | ||
| 91 | 0x10200004L,0x12200004L,0x10202004L,0x12202004L, | ||
| 92 | 0x10000400L,0x12000400L,0x10002400L,0x12002400L, | ||
| 93 | 0x10200400L,0x12200400L,0x10202400L,0x12202400L, | ||
| 94 | 0x10000404L,0x12000404L,0x10002404L,0x12002404L, | ||
| 95 | 0x10200404L,0x12200404L,0x10202404L,0x12202404L, | ||
| 96 | },{ | ||
| 97 | /* for C bits (numbered as per FIPS 46) 14 15 16 17 19 20 */ | ||
| 98 | 0x00000000L,0x00000001L,0x00040000L,0x00040001L, | ||
| 99 | 0x01000000L,0x01000001L,0x01040000L,0x01040001L, | ||
| 100 | 0x00000002L,0x00000003L,0x00040002L,0x00040003L, | ||
| 101 | 0x01000002L,0x01000003L,0x01040002L,0x01040003L, | ||
| 102 | 0x00000200L,0x00000201L,0x00040200L,0x00040201L, | ||
| 103 | 0x01000200L,0x01000201L,0x01040200L,0x01040201L, | ||
| 104 | 0x00000202L,0x00000203L,0x00040202L,0x00040203L, | ||
| 105 | 0x01000202L,0x01000203L,0x01040202L,0x01040203L, | ||
| 106 | 0x08000000L,0x08000001L,0x08040000L,0x08040001L, | ||
| 107 | 0x09000000L,0x09000001L,0x09040000L,0x09040001L, | ||
| 108 | 0x08000002L,0x08000003L,0x08040002L,0x08040003L, | ||
| 109 | 0x09000002L,0x09000003L,0x09040002L,0x09040003L, | ||
| 110 | 0x08000200L,0x08000201L,0x08040200L,0x08040201L, | ||
| 111 | 0x09000200L,0x09000201L,0x09040200L,0x09040201L, | ||
| 112 | 0x08000202L,0x08000203L,0x08040202L,0x08040203L, | ||
| 113 | 0x09000202L,0x09000203L,0x09040202L,0x09040203L, | ||
| 114 | },{ | ||
| 115 | /* for C bits (numbered as per FIPS 46) 21 23 24 26 27 28 */ | ||
| 116 | 0x00000000L,0x00100000L,0x00000100L,0x00100100L, | ||
| 117 | 0x00000008L,0x00100008L,0x00000108L,0x00100108L, | ||
| 118 | 0x00001000L,0x00101000L,0x00001100L,0x00101100L, | ||
| 119 | 0x00001008L,0x00101008L,0x00001108L,0x00101108L, | ||
| 120 | 0x04000000L,0x04100000L,0x04000100L,0x04100100L, | ||
| 121 | 0x04000008L,0x04100008L,0x04000108L,0x04100108L, | ||
| 122 | 0x04001000L,0x04101000L,0x04001100L,0x04101100L, | ||
| 123 | 0x04001008L,0x04101008L,0x04001108L,0x04101108L, | ||
| 124 | 0x00020000L,0x00120000L,0x00020100L,0x00120100L, | ||
| 125 | 0x00020008L,0x00120008L,0x00020108L,0x00120108L, | ||
| 126 | 0x00021000L,0x00121000L,0x00021100L,0x00121100L, | ||
| 127 | 0x00021008L,0x00121008L,0x00021108L,0x00121108L, | ||
| 128 | 0x04020000L,0x04120000L,0x04020100L,0x04120100L, | ||
| 129 | 0x04020008L,0x04120008L,0x04020108L,0x04120108L, | ||
| 130 | 0x04021000L,0x04121000L,0x04021100L,0x04121100L, | ||
| 131 | 0x04021008L,0x04121008L,0x04021108L,0x04121108L, | ||
| 132 | },{ | ||
| 133 | /* for D bits (numbered as per FIPS 46) 1 2 3 4 5 6 */ | ||
| 134 | 0x00000000L,0x10000000L,0x00010000L,0x10010000L, | ||
| 135 | 0x00000004L,0x10000004L,0x00010004L,0x10010004L, | ||
| 136 | 0x20000000L,0x30000000L,0x20010000L,0x30010000L, | ||
| 137 | 0x20000004L,0x30000004L,0x20010004L,0x30010004L, | ||
| 138 | 0x00100000L,0x10100000L,0x00110000L,0x10110000L, | ||
| 139 | 0x00100004L,0x10100004L,0x00110004L,0x10110004L, | ||
| 140 | 0x20100000L,0x30100000L,0x20110000L,0x30110000L, | ||
| 141 | 0x20100004L,0x30100004L,0x20110004L,0x30110004L, | ||
| 142 | 0x00001000L,0x10001000L,0x00011000L,0x10011000L, | ||
| 143 | 0x00001004L,0x10001004L,0x00011004L,0x10011004L, | ||
| 144 | 0x20001000L,0x30001000L,0x20011000L,0x30011000L, | ||
| 145 | 0x20001004L,0x30001004L,0x20011004L,0x30011004L, | ||
| 146 | 0x00101000L,0x10101000L,0x00111000L,0x10111000L, | ||
| 147 | 0x00101004L,0x10101004L,0x00111004L,0x10111004L, | ||
| 148 | 0x20101000L,0x30101000L,0x20111000L,0x30111000L, | ||
| 149 | 0x20101004L,0x30101004L,0x20111004L,0x30111004L, | ||
| 150 | },{ | ||
| 151 | /* for D bits (numbered as per FIPS 46) 8 9 11 12 13 14 */ | ||
| 152 | 0x00000000L,0x08000000L,0x00000008L,0x08000008L, | ||
| 153 | 0x00000400L,0x08000400L,0x00000408L,0x08000408L, | ||
| 154 | 0x00020000L,0x08020000L,0x00020008L,0x08020008L, | ||
| 155 | 0x00020400L,0x08020400L,0x00020408L,0x08020408L, | ||
| 156 | 0x00000001L,0x08000001L,0x00000009L,0x08000009L, | ||
| 157 | 0x00000401L,0x08000401L,0x00000409L,0x08000409L, | ||
| 158 | 0x00020001L,0x08020001L,0x00020009L,0x08020009L, | ||
| 159 | 0x00020401L,0x08020401L,0x00020409L,0x08020409L, | ||
| 160 | 0x02000000L,0x0A000000L,0x02000008L,0x0A000008L, | ||
| 161 | 0x02000400L,0x0A000400L,0x02000408L,0x0A000408L, | ||
| 162 | 0x02020000L,0x0A020000L,0x02020008L,0x0A020008L, | ||
| 163 | 0x02020400L,0x0A020400L,0x02020408L,0x0A020408L, | ||
| 164 | 0x02000001L,0x0A000001L,0x02000009L,0x0A000009L, | ||
| 165 | 0x02000401L,0x0A000401L,0x02000409L,0x0A000409L, | ||
| 166 | 0x02020001L,0x0A020001L,0x02020009L,0x0A020009L, | ||
| 167 | 0x02020401L,0x0A020401L,0x02020409L,0x0A020409L, | ||
| 168 | },{ | ||
| 169 | /* for D bits (numbered as per FIPS 46) 16 17 18 19 20 21 */ | ||
| 170 | 0x00000000L,0x00000100L,0x00080000L,0x00080100L, | ||
| 171 | 0x01000000L,0x01000100L,0x01080000L,0x01080100L, | ||
| 172 | 0x00000010L,0x00000110L,0x00080010L,0x00080110L, | ||
| 173 | 0x01000010L,0x01000110L,0x01080010L,0x01080110L, | ||
| 174 | 0x00200000L,0x00200100L,0x00280000L,0x00280100L, | ||
| 175 | 0x01200000L,0x01200100L,0x01280000L,0x01280100L, | ||
| 176 | 0x00200010L,0x00200110L,0x00280010L,0x00280110L, | ||
| 177 | 0x01200010L,0x01200110L,0x01280010L,0x01280110L, | ||
| 178 | 0x00000200L,0x00000300L,0x00080200L,0x00080300L, | ||
| 179 | 0x01000200L,0x01000300L,0x01080200L,0x01080300L, | ||
| 180 | 0x00000210L,0x00000310L,0x00080210L,0x00080310L, | ||
| 181 | 0x01000210L,0x01000310L,0x01080210L,0x01080310L, | ||
| 182 | 0x00200200L,0x00200300L,0x00280200L,0x00280300L, | ||
| 183 | 0x01200200L,0x01200300L,0x01280200L,0x01280300L, | ||
| 184 | 0x00200210L,0x00200310L,0x00280210L,0x00280310L, | ||
| 185 | 0x01200210L,0x01200310L,0x01280210L,0x01280310L, | ||
| 186 | },{ | ||
| 187 | /* for D bits (numbered as per FIPS 46) 22 23 24 25 27 28 */ | ||
| 188 | 0x00000000L,0x04000000L,0x00040000L,0x04040000L, | ||
| 189 | 0x00000002L,0x04000002L,0x00040002L,0x04040002L, | ||
| 190 | 0x00002000L,0x04002000L,0x00042000L,0x04042000L, | ||
| 191 | 0x00002002L,0x04002002L,0x00042002L,0x04042002L, | ||
| 192 | 0x00000020L,0x04000020L,0x00040020L,0x04040020L, | ||
| 193 | 0x00000022L,0x04000022L,0x00040022L,0x04040022L, | ||
| 194 | 0x00002020L,0x04002020L,0x00042020L,0x04042020L, | ||
| 195 | 0x00002022L,0x04002022L,0x00042022L,0x04042022L, | ||
| 196 | 0x00000800L,0x04000800L,0x00040800L,0x04040800L, | ||
| 197 | 0x00000802L,0x04000802L,0x00040802L,0x04040802L, | ||
| 198 | 0x00002800L,0x04002800L,0x00042800L,0x04042800L, | ||
| 199 | 0x00002802L,0x04002802L,0x00042802L,0x04042802L, | ||
| 200 | 0x00000820L,0x04000820L,0x00040820L,0x04040820L, | ||
| 201 | 0x00000822L,0x04000822L,0x00040822L,0x04040822L, | ||
| 202 | 0x00002820L,0x04002820L,0x00042820L,0x04042820L, | ||
| 203 | 0x00002822L,0x04002822L,0x00042822L,0x04042822L, | ||
| 204 | }}; | ||
diff --git a/src/lib/libssl/src/crypto/des/supp.c b/src/lib/libssl/src/crypto/des/supp.c new file mode 100644 index 0000000000..f8e5833f69 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/supp.c | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | /* crypto/des/supp.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 | * Copyright (c) 1995 | ||
| 61 | * Mark Murray. All rights reserved. | ||
| 62 | * | ||
| 63 | * Redistribution and use in source and binary forms, with or without | ||
| 64 | * modification, are permitted provided that the following conditions | ||
| 65 | * are met: | ||
| 66 | * 1. Redistributions of source code must retain the above copyright | ||
| 67 | * notice, this list of conditions and the following disclaimer. | ||
| 68 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 69 | * notice, this list of conditions and the following disclaimer in the | ||
| 70 | * documentation and/or other materials provided with the distribution. | ||
| 71 | * 3. All advertising materials mentioning features or use of this software | ||
| 72 | * must display the following acknowledgement: | ||
| 73 | * This product includes software developed by Mark Murray | ||
| 74 | * 4. Neither the name of the author nor the names of any co-contributors | ||
| 75 | * may be used to endorse or promote products derived from this software | ||
| 76 | * without specific prior written permission. | ||
| 77 | * | ||
| 78 | * THIS SOFTWARE IS PROVIDED BY MARK MURRAY AND CONTRIBUTORS ``AS IS'' AND | ||
| 79 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 80 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 81 | * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE | ||
| 82 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 83 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 84 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 85 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 86 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 87 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 88 | * SUCH DAMAGE. | ||
| 89 | * | ||
| 90 | * $Id: supp.c,v 1.1.1.1 1998/10/05 20:12:45 ryker Exp $ | ||
| 91 | */ | ||
| 92 | |||
| 93 | #include <stdio.h> | ||
| 94 | #include "des_locl.h" | ||
| 95 | |||
| 96 | void des_cblock_print_file(cb, fp) | ||
| 97 | des_cblock *cb; | ||
| 98 | FILE *fp; | ||
| 99 | { | ||
| 100 | int i; | ||
| 101 | unsigned int *p = (unsigned int *)cb; | ||
| 102 | |||
| 103 | fprintf(fp, " 0x { "); | ||
| 104 | for (i = 0; i < 8; i++) { | ||
| 105 | fprintf(fp, "%x", p[i]); | ||
| 106 | if (i != 7) fprintf(fp, ", "); | ||
| 107 | } | ||
| 108 | fprintf(fp, " }"); | ||
| 109 | } | ||
diff --git a/src/lib/libssl/src/crypto/des/testdes.pl b/src/lib/libssl/src/crypto/des/testdes.pl new file mode 100644 index 0000000000..67fbd47f36 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/testdes.pl | |||
| @@ -0,0 +1,167 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | # des.pl tesing code | ||
| 4 | |||
| 5 | require 'des.pl'; | ||
| 6 | |||
| 7 | $num_tests=34; | ||
| 8 | @key_data=( | ||
| 9 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 10 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | ||
| 11 | 0x30,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 12 | 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, | ||
| 13 | 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF, | ||
| 14 | 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, | ||
| 15 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 16 | 0xFE,0xDC,0xBA,0x98,0x76,0x54,0x32,0x10, | ||
| 17 | 0x7C,0xA1,0x10,0x45,0x4A,0x1A,0x6E,0x57, | ||
| 18 | 0x01,0x31,0xD9,0x61,0x9D,0xC1,0x37,0x6E, | ||
| 19 | 0x07,0xA1,0x13,0x3E,0x4A,0x0B,0x26,0x86, | ||
| 20 | 0x38,0x49,0x67,0x4C,0x26,0x02,0x31,0x9E, | ||
| 21 | 0x04,0xB9,0x15,0xBA,0x43,0xFE,0xB5,0xB6, | ||
| 22 | 0x01,0x13,0xB9,0x70,0xFD,0x34,0xF2,0xCE, | ||
| 23 | 0x01,0x70,0xF1,0x75,0x46,0x8F,0xB5,0xE6, | ||
| 24 | 0x43,0x29,0x7F,0xAD,0x38,0xE3,0x73,0xFE, | ||
| 25 | 0x07,0xA7,0x13,0x70,0x45,0xDA,0x2A,0x16, | ||
| 26 | 0x04,0x68,0x91,0x04,0xC2,0xFD,0x3B,0x2F, | ||
| 27 | 0x37,0xD0,0x6B,0xB5,0x16,0xCB,0x75,0x46, | ||
| 28 | 0x1F,0x08,0x26,0x0D,0x1A,0xC2,0x46,0x5E, | ||
| 29 | 0x58,0x40,0x23,0x64,0x1A,0xBA,0x61,0x76, | ||
| 30 | 0x02,0x58,0x16,0x16,0x46,0x29,0xB0,0x07, | ||
| 31 | 0x49,0x79,0x3E,0xBC,0x79,0xB3,0x25,0x8F, | ||
| 32 | 0x4F,0xB0,0x5E,0x15,0x15,0xAB,0x73,0xA7, | ||
| 33 | 0x49,0xE9,0x5D,0x6D,0x4C,0xA2,0x29,0xBF, | ||
| 34 | 0x01,0x83,0x10,0xDC,0x40,0x9B,0x26,0xD6, | ||
| 35 | 0x1C,0x58,0x7F,0x1C,0x13,0x92,0x4F,0xEF, | ||
| 36 | 0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, | ||
| 37 | 0x1F,0x1F,0x1F,0x1F,0x0E,0x0E,0x0E,0x0E, | ||
| 38 | 0xE0,0xFE,0xE0,0xFE,0xF1,0xFE,0xF1,0xFE, | ||
| 39 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 40 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | ||
| 41 | 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF, | ||
| 42 | 0xFE,0xDC,0xBA,0x98,0x76,0x54,0x32,0x10, | ||
| 43 | ); | ||
| 44 | |||
| 45 | @plain_data=( | ||
| 46 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 47 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | ||
| 48 | 0x10,0x00,0x00,0x00,0x00,0x00,0x00,0x01, | ||
| 49 | 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, | ||
| 50 | 0x11,0x11,0x11,0x11,0x11,0x11,0x11,0x11, | ||
| 51 | 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF, | ||
| 52 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 53 | 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF, | ||
| 54 | 0x01,0xA1,0xD6,0xD0,0x39,0x77,0x67,0x42, | ||
| 55 | 0x5C,0xD5,0x4C,0xA8,0x3D,0xEF,0x57,0xDA, | ||
| 56 | 0x02,0x48,0xD4,0x38,0x06,0xF6,0x71,0x72, | ||
| 57 | 0x51,0x45,0x4B,0x58,0x2D,0xDF,0x44,0x0A, | ||
| 58 | 0x42,0xFD,0x44,0x30,0x59,0x57,0x7F,0xA2, | ||
| 59 | 0x05,0x9B,0x5E,0x08,0x51,0xCF,0x14,0x3A, | ||
| 60 | 0x07,0x56,0xD8,0xE0,0x77,0x47,0x61,0xD2, | ||
| 61 | 0x76,0x25,0x14,0xB8,0x29,0xBF,0x48,0x6A, | ||
| 62 | 0x3B,0xDD,0x11,0x90,0x49,0x37,0x28,0x02, | ||
| 63 | 0x26,0x95,0x5F,0x68,0x35,0xAF,0x60,0x9A, | ||
| 64 | 0x16,0x4D,0x5E,0x40,0x4F,0x27,0x52,0x32, | ||
| 65 | 0x6B,0x05,0x6E,0x18,0x75,0x9F,0x5C,0xCA, | ||
| 66 | 0x00,0x4B,0xD6,0xEF,0x09,0x17,0x60,0x62, | ||
| 67 | 0x48,0x0D,0x39,0x00,0x6E,0xE7,0x62,0xF2, | ||
| 68 | 0x43,0x75,0x40,0xC8,0x69,0x8F,0x3C,0xFA, | ||
| 69 | 0x07,0x2D,0x43,0xA0,0x77,0x07,0x52,0x92, | ||
| 70 | 0x02,0xFE,0x55,0x77,0x81,0x17,0xF1,0x2A, | ||
| 71 | 0x1D,0x9D,0x5C,0x50,0x18,0xF7,0x28,0xC2, | ||
| 72 | 0x30,0x55,0x32,0x28,0x6D,0x6F,0x29,0x5A, | ||
| 73 | 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF, | ||
| 74 | 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF, | ||
| 75 | 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF, | ||
| 76 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF, | ||
| 77 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 78 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, | ||
| 79 | 0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF,0xFF); | ||
| 80 | |||
| 81 | @cipher_data=( | ||
| 82 | 0x8C,0xA6,0x4D,0xE9,0xC1,0xB1,0x23,0xA7, | ||
| 83 | 0x73,0x59,0xB2,0x16,0x3E,0x4E,0xDC,0x58, | ||
| 84 | 0x95,0x8E,0x6E,0x62,0x7A,0x05,0x55,0x7B, | ||
| 85 | 0xF4,0x03,0x79,0xAB,0x9E,0x0E,0xC5,0x33, | ||
| 86 | 0x17,0x66,0x8D,0xFC,0x72,0x92,0x53,0x2D, | ||
| 87 | 0x8A,0x5A,0xE1,0xF8,0x1A,0xB8,0xF2,0xDD, | ||
| 88 | 0x8C,0xA6,0x4D,0xE9,0xC1,0xB1,0x23,0xA7, | ||
| 89 | 0xED,0x39,0xD9,0x50,0xFA,0x74,0xBC,0xC4, | ||
| 90 | 0x69,0x0F,0x5B,0x0D,0x9A,0x26,0x93,0x9B, | ||
| 91 | 0x7A,0x38,0x9D,0x10,0x35,0x4B,0xD2,0x71, | ||
| 92 | 0x86,0x8E,0xBB,0x51,0xCA,0xB4,0x59,0x9A, | ||
| 93 | 0x71,0x78,0x87,0x6E,0x01,0xF1,0x9B,0x2A, | ||
| 94 | 0xAF,0x37,0xFB,0x42,0x1F,0x8C,0x40,0x95, | ||
| 95 | 0x86,0xA5,0x60,0xF1,0x0E,0xC6,0xD8,0x5B, | ||
| 96 | 0x0C,0xD3,0xDA,0x02,0x00,0x21,0xDC,0x09, | ||
| 97 | 0xEA,0x67,0x6B,0x2C,0xB7,0xDB,0x2B,0x7A, | ||
| 98 | 0xDF,0xD6,0x4A,0x81,0x5C,0xAF,0x1A,0x0F, | ||
| 99 | 0x5C,0x51,0x3C,0x9C,0x48,0x86,0xC0,0x88, | ||
| 100 | 0x0A,0x2A,0xEE,0xAE,0x3F,0xF4,0xAB,0x77, | ||
| 101 | 0xEF,0x1B,0xF0,0x3E,0x5D,0xFA,0x57,0x5A, | ||
| 102 | 0x88,0xBF,0x0D,0xB6,0xD7,0x0D,0xEE,0x56, | ||
| 103 | 0xA1,0xF9,0x91,0x55,0x41,0x02,0x0B,0x56, | ||
| 104 | 0x6F,0xBF,0x1C,0xAF,0xCF,0xFD,0x05,0x56, | ||
| 105 | 0x2F,0x22,0xE4,0x9B,0xAB,0x7C,0xA1,0xAC, | ||
| 106 | 0x5A,0x6B,0x61,0x2C,0xC2,0x6C,0xCE,0x4A, | ||
| 107 | 0x5F,0x4C,0x03,0x8E,0xD1,0x2B,0x2E,0x41, | ||
| 108 | 0x63,0xFA,0xC0,0xD0,0x34,0xD9,0xF7,0x93, | ||
| 109 | 0x61,0x7B,0x3A,0x0C,0xE8,0xF0,0x71,0x00, | ||
| 110 | 0xDB,0x95,0x86,0x05,0xF8,0xC8,0xC6,0x06, | ||
| 111 | 0xED,0xBF,0xD1,0xC6,0x6C,0x29,0xCC,0xC7, | ||
| 112 | 0x35,0x55,0x50,0xB2,0x15,0x0E,0x24,0x51, | ||
| 113 | 0xCA,0xAA,0xAF,0x4D,0xEA,0xF1,0xDB,0xAE, | ||
| 114 | 0xD5,0xD4,0x4F,0xF7,0x20,0x68,0x3D,0x0D, | ||
| 115 | 0x2A,0x2B,0xB0,0x08,0xDF,0x97,0xC2,0xF2); | ||
| 116 | |||
| 117 | print "Doing ecb tests\n"; | ||
| 118 | for ($i=0; $i<$num_tests; $i++) | ||
| 119 | { | ||
| 120 | printf "Doing test $i\n"; | ||
| 121 | $key =pack("C8",splice(@key_data ,0,8)); | ||
| 122 | $data=pack("C8",splice(@plain_data ,0,8)); | ||
| 123 | $res =pack("C8",splice(@cipher_data,0,8)); | ||
| 124 | |||
| 125 | @ks= &des_set_key($key); | ||
| 126 | $out1= &des_ecb_encrypt(*ks,1,$data); | ||
| 127 | $out2= &des_ecb_encrypt(*ks,0,$out1); | ||
| 128 | $out3= &des_ecb_encrypt(*ks,0,$res); | ||
| 129 | &eprint("encryption failure",$res,$out1) | ||
| 130 | if ($out1 ne $res); | ||
| 131 | &eprint("encryption/decryption failure",$data,$out2) | ||
| 132 | if ($out2 ne $data); | ||
| 133 | &eprint("decryption failure",$data,$out3) | ||
| 134 | if ($data ne $out3); | ||
| 135 | } | ||
| 136 | print "Done\n"; | ||
| 137 | |||
| 138 | print "doing speed test over 30 seconds\n"; | ||
| 139 | $SIG{'ALRM'}='done'; | ||
| 140 | sub done {$done=1;} | ||
| 141 | $done=0; | ||
| 142 | |||
| 143 | $count=0; | ||
| 144 | $d=pack("C8",0x01,0x23,0x45,0x67,0x89,0xab,0xcd,0xef); | ||
| 145 | @ks= &des_set_key($d); | ||
| 146 | alarm(30); | ||
| 147 | $start=(times)[0]; | ||
| 148 | while (!$done) | ||
| 149 | { | ||
| 150 | $count++; | ||
| 151 | $d=&des_ecb_encrypt(*ks,1,$d); | ||
| 152 | } | ||
| 153 | $end=(times)[0]; | ||
| 154 | $t=$end-$start; | ||
| 155 | printf "$count DESs in %.2f seconds is %.2f DESs/sec or %.2f bytes/sec\n", | ||
| 156 | 1.0*$t,1.0*$count/$t,$count*8.0/$t; | ||
| 157 | |||
| 158 | sub eprint | ||
| 159 | { | ||
| 160 | local($s,$c,$e)=@_; | ||
| 161 | local(@k); | ||
| 162 | |||
| 163 | @k=unpack("C8",$c); | ||
| 164 | printf "%02x%02x%02x%02x %02x%02x%02x%02x - ",unpack("C8",$c); | ||
| 165 | printf "%02x%02x%02x%02x %02x%02x%02x%02x :",unpack("C8",$e); | ||
| 166 | print " $s\n"; | ||
| 167 | } | ||
diff --git a/src/lib/libssl/src/crypto/des/vms.com b/src/lib/libssl/src/crypto/des/vms.com new file mode 100644 index 0000000000..62ca1fbda4 --- /dev/null +++ b/src/lib/libssl/src/crypto/des/vms.com | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | $! --- VMS.com --- | ||
| 2 | $! | ||
| 3 | $ GoSub defines | ||
| 4 | $ GoSub linker_options | ||
| 5 | $ If (P1 .nes. "") | ||
| 6 | $ Then | ||
| 7 | $ GoSub 'P1' | ||
| 8 | $ Else | ||
| 9 | $ GoSub lib | ||
| 10 | $ GoSub destest | ||
| 11 | $ GoSub rpw | ||
| 12 | $ GoSub speed | ||
| 13 | $ GoSub des | ||
| 14 | $ EndIF | ||
| 15 | $! | ||
| 16 | $ Exit | ||
| 17 | $! | ||
| 18 | $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 19 | $! | ||
| 20 | $DEFINES: | ||
| 21 | $ OPT_FILE := "VAX_LINKER_OPTIONS.OPT" | ||
| 22 | $! | ||
| 23 | $ CC_OPTS := "/NODebug/OPTimize/NOWarn" | ||
| 24 | $! | ||
| 25 | $ LINK_OPTS := "/NODebug/NOTraceback/Contiguous" | ||
| 26 | $! | ||
| 27 | $ OBJS = "cbc_cksm.obj,cbc_enc.obj,ecb_enc.obj,pcbc_enc.obj," + - | ||
| 28 | "qud_cksm.obj,rand_key.obj,read_pwd.obj,set_key.obj," + - | ||
| 29 | "str2key.obj,enc_read.obj,enc_writ.obj,fcrypt.obj," + - | ||
| 30 | "cfb_enc.obj,ecb3_enc.obj,ofb_enc.obj" | ||
| 31 | |||
| 32 | |||
| 33 | $! | ||
| 34 | $ LIBDES = "cbc_cksm.c,cbc_enc.c,ecb_enc.c,enc_read.c," + - | ||
| 35 | "enc_writ.c,pcbc_enc.c,qud_cksm.c,rand_key.c," + - | ||
| 36 | "read_pwd.c,set_key.c,str2key.c,fcrypt.c," + - | ||
| 37 | "cfb_enc.c,ecb3_enc.c,ofb_enc.c" | ||
| 38 | $ Return | ||
| 39 | $! | ||
| 40 | $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 41 | $! | ||
| 42 | $LINKER_OPTIONS: | ||
| 43 | $ If (f$search(OPT_FILE) .eqs. "") | ||
| 44 | $ Then | ||
| 45 | $ Create 'OPT_FILE' | ||
| 46 | $DECK | ||
| 47 | ! Default system options file to link against the sharable C runtime library | ||
| 48 | ! | ||
| 49 | Sys$Share:VAXcRTL.exe/Share | ||
| 50 | $EOD | ||
| 51 | $ EndIF | ||
| 52 | $ Return | ||
| 53 | $! | ||
| 54 | $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 55 | $! | ||
| 56 | $LIB: | ||
| 57 | $ CC 'CC_OPTS' 'LIBDES' | ||
| 58 | $ If (f$search("LIBDES.OLB") .nes. "") | ||
| 59 | $ Then Library /Object /Replace libdes 'OBJS' | ||
| 60 | $ Else Library /Create /Object libdes 'OBJS' | ||
| 61 | $ EndIF | ||
| 62 | $ Return | ||
| 63 | $! | ||
| 64 | $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 65 | $! | ||
| 66 | $DESTEST: | ||
| 67 | $ CC 'CC_OPTS' destest | ||
| 68 | $ Link 'link_opts' /Exec=destest destest.obj,libdes/LIBRARY,'opt_file'/Option | ||
| 69 | $ Return | ||
| 70 | $! | ||
| 71 | $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 72 | $! | ||
| 73 | $RPW: | ||
| 74 | $ CC 'CC_OPTS' rpw | ||
| 75 | $ Link 'link_opts' /Exec=rpw rpw.obj,libdes/LIBRARY,'opt_file'/Option | ||
| 76 | $ Return | ||
| 77 | $! | ||
| 78 | $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 79 | $! | ||
| 80 | $SPEED: | ||
| 81 | $ CC 'CC_OPTS' speed | ||
| 82 | $ Link 'link_opts' /Exec=speed speed.obj,libdes/LIBRARY,'opt_file'/Option | ||
| 83 | $ Return | ||
| 84 | $! | ||
| 85 | $!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | ||
| 86 | $! | ||
| 87 | $DES: | ||
| 88 | $ CC 'CC_OPTS' des | ||
| 89 | $ Link 'link_opts' /Exec=des des.obj,libdes/LIBRARY,'opt_file'/Option | ||
| 90 | $ Return | ||
diff --git a/src/lib/libssl/src/crypto/dh/Makefile.ssl b/src/lib/libssl/src/crypto/dh/Makefile.ssl new file mode 100644 index 0000000000..dfa7e4525d --- /dev/null +++ b/src/lib/libssl/src/crypto/dh/Makefile.ssl | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/dh/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= dh | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=dh | ||
| 19 | ERRC=dh_err | ||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= dhtest.c | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= dh_gen.c dh_key.c dh_lib.c dh_check.c $(ERRC).c | ||
| 26 | LIBOBJ= dh_gen.o dh_key.o dh_lib.o dh_check.o $(ERRC).o | ||
| 27 | |||
| 28 | SRC= $(LIBSRC) | ||
| 29 | |||
| 30 | EXHEADER= dh.h | ||
| 31 | HEADER= $(EXHEADER) | ||
| 32 | |||
| 33 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 34 | |||
| 35 | top: | ||
| 36 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 37 | |||
| 38 | all: lib | ||
| 39 | |||
| 40 | lib: $(LIBOBJ) | ||
| 41 | $(AR) $(LIB) $(LIBOBJ) | ||
| 42 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 43 | @touch lib | ||
| 44 | |||
| 45 | files: | ||
| 46 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 47 | |||
| 48 | links: | ||
| 49 | /bin/rm -f Makefile | ||
| 50 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 51 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 52 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 53 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 54 | |||
| 55 | install: | ||
| 56 | @for i in $(EXHEADER) ; \ | ||
| 57 | do \ | ||
| 58 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 59 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 60 | done; | ||
| 61 | |||
| 62 | tags: | ||
| 63 | ctags $(SRC) | ||
| 64 | |||
| 65 | tests: | ||
| 66 | |||
| 67 | lint: | ||
| 68 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 69 | |||
| 70 | depend: | ||
| 71 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 72 | |||
| 73 | dclean: | ||
| 74 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 75 | mv -f Makefile.new $(MAKEFILE) | ||
| 76 | |||
| 77 | clean: | ||
| 78 | /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 79 | |||
| 80 | errors: | ||
| 81 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 82 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 83 | |||
| 84 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/dh/dh.err b/src/lib/libssl/src/crypto/dh/dh.err new file mode 100644 index 0000000000..a4fe746985 --- /dev/null +++ b/src/lib/libssl/src/crypto/dh/dh.err | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | /* Error codes for the DH functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define DH_F_DHPARAMS_PRINT 100 | ||
| 5 | #define DH_F_DHPARAMS_PRINT_FP 101 | ||
| 6 | #define DH_F_DH_COMPUTE_KEY 102 | ||
| 7 | #define DH_F_DH_GENERATE_KEY 103 | ||
| 8 | #define DH_F_DH_GENERATE_PARAMETERS 104 | ||
| 9 | #define DH_F_DH_NEW 105 | ||
| 10 | |||
| 11 | /* Reason codes. */ | ||
| 12 | #define DH_R_NO_PRIVATE_VALUE 100 | ||
diff --git a/src/lib/libssl/src/crypto/dsa/Makefile.ssl b/src/lib/libssl/src/crypto/dsa/Makefile.ssl new file mode 100644 index 0000000000..2cc4ddb39e --- /dev/null +++ b/src/lib/libssl/src/crypto/dsa/Makefile.ssl | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/dsa/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= dsa | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=dsa | ||
| 19 | ERRC=dsa_err | ||
| 20 | GENERAL=Makefile | ||
| 21 | TEST=dsatest.c | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= dsa_gen.c dsa_key.c dsa_lib.c dsa_vrf.c dsa_sign.c $(ERRC).c | ||
| 26 | LIBOBJ= dsa_gen.o dsa_key.o dsa_lib.o dsa_vrf.o dsa_sign.o $(ERRC).o | ||
| 27 | |||
| 28 | SRC= $(LIBSRC) | ||
| 29 | |||
| 30 | EXHEADER= dsa.h | ||
| 31 | HEADER= $(EXHEADER) | ||
| 32 | |||
| 33 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 34 | |||
| 35 | top: | ||
| 36 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 37 | |||
| 38 | all: lib | ||
| 39 | |||
| 40 | lib: $(LIBOBJ) | ||
| 41 | $(AR) $(LIB) $(LIBOBJ) | ||
| 42 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 43 | @touch lib | ||
| 44 | |||
| 45 | files: | ||
| 46 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 47 | |||
| 48 | links: | ||
| 49 | /bin/rm -f Makefile | ||
| 50 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 51 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 52 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 53 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 54 | |||
| 55 | install: | ||
| 56 | @for i in $(EXHEADER) ; \ | ||
| 57 | do \ | ||
| 58 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 59 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 60 | done; | ||
| 61 | |||
| 62 | tags: | ||
| 63 | ctags $(SRC) | ||
| 64 | |||
| 65 | tests: | ||
| 66 | |||
| 67 | lint: | ||
| 68 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 69 | |||
| 70 | depend: | ||
| 71 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 72 | |||
| 73 | dclean: | ||
| 74 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 75 | mv -f Makefile.new $(MAKEFILE) | ||
| 76 | |||
| 77 | clean: | ||
| 78 | /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 79 | |||
| 80 | errors: | ||
| 81 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 82 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 83 | |||
| 84 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/dsa/dsa.err b/src/lib/libssl/src/crypto/dsa/dsa.err new file mode 100644 index 0000000000..1131e9fa74 --- /dev/null +++ b/src/lib/libssl/src/crypto/dsa/dsa.err | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | /* Error codes for the DSA functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define DSA_F_DSAPARAMS_PRINT 100 | ||
| 5 | #define DSA_F_DSAPARAMS_PRINT_FP 101 | ||
| 6 | #define DSA_F_DSA_IS_PRIME 102 | ||
| 7 | #define DSA_F_DSA_NEW 103 | ||
| 8 | #define DSA_F_DSA_PRINT 104 | ||
| 9 | #define DSA_F_DSA_PRINT_FP 105 | ||
| 10 | #define DSA_F_DSA_SIGN 106 | ||
| 11 | #define DSA_F_DSA_SIGN_SETUP 107 | ||
| 12 | #define DSA_F_DSA_VERIFY 108 | ||
| 13 | |||
| 14 | /* Reason codes. */ | ||
| 15 | #define DSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 100 | ||
diff --git a/src/lib/libssl/src/crypto/err/Makefile.ssl b/src/lib/libssl/src/crypto/err/Makefile.ssl new file mode 100644 index 0000000000..57c87eb041 --- /dev/null +++ b/src/lib/libssl/src/crypto/err/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/err/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= err | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST= | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=err.c err_all.c err_prn.c | ||
| 24 | LIBOBJ=err.o err_all.o err_prn.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= err.h | ||
| 29 | HEADER= $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/err/err_code.pl b/src/lib/libssl/src/crypto/err/err_code.pl new file mode 100644 index 0000000000..ebc8eef913 --- /dev/null +++ b/src/lib/libssl/src/crypto/err/err_code.pl | |||
| @@ -0,0 +1,105 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | while (@ARGV) | ||
| 4 | { | ||
| 5 | $in=shift(@ARGV); | ||
| 6 | if ($in =~ /^-conf$/) | ||
| 7 | { | ||
| 8 | $in=shift(@ARGV); | ||
| 9 | open(IN,"<$in") || die "unable to open '$in'\n"; | ||
| 10 | while (<IN>) | ||
| 11 | { | ||
| 12 | s/#.*$//; | ||
| 13 | s/\s+$//; | ||
| 14 | next if (/^$/); | ||
| 15 | if (/^L\s+(\S+)\s+(\S+)$/) | ||
| 16 | { $errfile{$1}=$2; } | ||
| 17 | elsif (/^F\s+(\S+)$/) | ||
| 18 | { $function{$1}=1; } | ||
| 19 | elsif (/^R\s+(\S+)\s+(\S+)$/) | ||
| 20 | { $r_value{$1}=$2; } | ||
| 21 | else { die "bad input line: $in:$.\n"; } | ||
| 22 | } | ||
| 23 | close(IN); | ||
| 24 | next; | ||
| 25 | } | ||
| 26 | |||
| 27 | open(IN,"<$in") || die "unable to open '$in'\n"; | ||
| 28 | $last=""; | ||
| 29 | while (<IN>) | ||
| 30 | { | ||
| 31 | if (/err\(([A-Z0-9]+_F_[0-9A-Z_]+)\s*,\s*([0-9A-Z]+_R_[0-9A-Z_]+)\s*\)/) | ||
| 32 | { | ||
| 33 | if ($1 != $last) | ||
| 34 | { | ||
| 35 | if ($function{$1} == 0) | ||
| 36 | { | ||
| 37 | printf STDERR "$. $1 is bad\n"; | ||
| 38 | } | ||
| 39 | } | ||
| 40 | $function{$1}++; | ||
| 41 | $last=$1; | ||
| 42 | $reason{$2}++; | ||
| 43 | } | ||
| 44 | } | ||
| 45 | close(IN); | ||
| 46 | } | ||
| 47 | |||
| 48 | foreach (keys %function,keys %reason) | ||
| 49 | { | ||
| 50 | /^([A-Z0-9]+)_/; | ||
| 51 | $prefix{$1}++; | ||
| 52 | } | ||
| 53 | |||
| 54 | @F=sort keys %function; | ||
| 55 | @R=sort keys %reason; | ||
| 56 | foreach $j (sort keys %prefix) | ||
| 57 | { | ||
| 58 | next if $errfile{$j} eq "NONE"; | ||
| 59 | printf STDERR "doing %-6s - ",$j; | ||
| 60 | if (defined($errfile{$j})) | ||
| 61 | { | ||
| 62 | open(OUT,">$errfile{$j}") || | ||
| 63 | die "unable to open '$errfile{$j}':$!\n"; | ||
| 64 | $close_file=1; | ||
| 65 | } | ||
| 66 | else | ||
| 67 | { | ||
| 68 | *OUT=*STDOUT; | ||
| 69 | $close=0; | ||
| 70 | } | ||
| 71 | @f=grep(/^${j}_/,@F); | ||
| 72 | @r=grep(/^${j}_/,@R); | ||
| 73 | $num=100; | ||
| 74 | print OUT "/* Error codes for the $j functions. */\n\n"; | ||
| 75 | print OUT "/* Function codes. */\n"; | ||
| 76 | $f_count=0; | ||
| 77 | foreach $i (@f) | ||
| 78 | { | ||
| 79 | $z=6-int(length($i)/8); | ||
| 80 | printf OUT "#define $i%s $num\n","\t" x $z; | ||
| 81 | $num++; | ||
| 82 | $f_count++; | ||
| 83 | } | ||
| 84 | $num=100; | ||
| 85 | print OUT "\n/* Reason codes. */\n"; | ||
| 86 | $r_count=0; | ||
| 87 | foreach $i (@r) | ||
| 88 | { | ||
| 89 | $z=6-int(length($i)/8); | ||
| 90 | if (defined($r_value{$i})) | ||
| 91 | { | ||
| 92 | printf OUT "#define $i%s $r_value{$i}\n","\t" x $z; | ||
| 93 | } | ||
| 94 | else | ||
| 95 | { | ||
| 96 | printf OUT "#define $i%s $num\n","\t" x $z; | ||
| 97 | $num++; | ||
| 98 | } | ||
| 99 | $r_count++; | ||
| 100 | } | ||
| 101 | close(OUT) if $close_file; | ||
| 102 | |||
| 103 | printf STDERR "%3d functions, %3d reasons\n",$f_count,$r_count; | ||
| 104 | } | ||
| 105 | |||
diff --git a/src/lib/libssl/src/crypto/err/err_genc.pl b/src/lib/libssl/src/crypto/err/err_genc.pl new file mode 100644 index 0000000000..a8e36c2f0c --- /dev/null +++ b/src/lib/libssl/src/crypto/err/err_genc.pl | |||
| @@ -0,0 +1,198 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | if ($ARGV[0] eq "-s") { $static=1; shift @ARGV; } | ||
| 4 | |||
| 5 | ($#ARGV == 1) || die "usage: $0 [-s] <header file> <output C file>\n"; | ||
| 6 | open(IN,"<$ARGV[0]") || die "unable to open $ARGV[0]:$!\n"; | ||
| 7 | open(STDOUT,">$ARGV[1]") || die "unable to open $ARGV[1]:$!\n"; | ||
| 8 | |||
| 9 | $Func=0; | ||
| 10 | $Reas=0; | ||
| 11 | $fuction{'FOPEN'}='fopen'; | ||
| 12 | while (<IN>) | ||
| 13 | { | ||
| 14 | if (/(\S+)\s*\(\);/) | ||
| 15 | { | ||
| 16 | $t=$1; | ||
| 17 | $t =~ s/\*//; | ||
| 18 | ($upper=$t) =~ tr/a-z/A-Z/; | ||
| 19 | $fuction{$upper}=$t; | ||
| 20 | } | ||
| 21 | next unless (/^#define\s+(\S+)\s/); | ||
| 22 | |||
| 23 | $o=$1; | ||
| 24 | if ($o =~ /^([^_]+)_F_(.*)/) | ||
| 25 | { | ||
| 26 | $type=$1; | ||
| 27 | $Func++; | ||
| 28 | $n=$2; | ||
| 29 | $n=$fuction{$n} if (defined($fuction{$n})); | ||
| 30 | $out{$1."_str_functs"}.= | ||
| 31 | sprintf("{ERR_PACK(0,%s,0),\t\"$n\"},\n",$o); | ||
| 32 | } | ||
| 33 | elsif ($o =~ /^([^_]+)_R_(.*)/) | ||
| 34 | { | ||
| 35 | $type=$1; | ||
| 36 | $Reas++; | ||
| 37 | $r=$2; | ||
| 38 | $r =~ tr/A-Z_/a-z /; | ||
| 39 | $pkg{$type."_str_reasons"}=$type; | ||
| 40 | $out{$type."_str_reasons"}.=sprintf("{%-40s,\"$r\"},\n",$o); | ||
| 41 | } | ||
| 42 | elsif ($ARGV[0] =~ /rsaref/ && $o =~ /^RE_(.*)/) | ||
| 43 | { | ||
| 44 | $type="RSAREF"; | ||
| 45 | $Reas++; | ||
| 46 | $r=$1; | ||
| 47 | $r =~ tr/A-Z_/a-z /; | ||
| 48 | $pkg{$type."_str_reasons"}=$type; | ||
| 49 | $out{$type."_str_reasons"}.=sprintf("{%-40s,\"$r\"},\n",$o); | ||
| 50 | } | ||
| 51 | } | ||
| 52 | close(IN); | ||
| 53 | |||
| 54 | &header($type,$ARGV[0]); | ||
| 55 | |||
| 56 | foreach (sort keys %out) | ||
| 57 | { | ||
| 58 | print "static ERR_STRING_DATA ${_}[]=\n\t{\n"; | ||
| 59 | print $out{$_}; | ||
| 60 | print "{0,NULL},\n"; | ||
| 61 | print "\t};\n\n"; | ||
| 62 | } | ||
| 63 | print "#endif\n"; | ||
| 64 | |||
| 65 | if ($static) | ||
| 66 | { $lib="ERR_LIB_$type"; } | ||
| 67 | else | ||
| 68 | { $lib="${type}_lib_error_code"; } | ||
| 69 | |||
| 70 | $str=""; | ||
| 71 | $str.="#ifndef NO_ERR\n"; | ||
| 72 | $str.="\t\tERR_load_strings($lib,${type}_str_functs);\n" if $Func; | ||
| 73 | $str.="\t\tERR_load_strings($lib,${type}_str_reasons);\n" if $Reas; | ||
| 74 | $str.="#endif\n"; | ||
| 75 | |||
| 76 | if (!$static) | ||
| 77 | { | ||
| 78 | print <<"EOF"; | ||
| 79 | |||
| 80 | static int ${type}_lib_error_code=0; | ||
| 81 | |||
| 82 | void ERR_load_${type}_strings() | ||
| 83 | { | ||
| 84 | static int init=1; | ||
| 85 | |||
| 86 | if (${type}_lib_error_code == 0) | ||
| 87 | ${type}_lib_error_code=ERR_get_next_error_library(); | ||
| 88 | |||
| 89 | if (init); | ||
| 90 | {; | ||
| 91 | init=0; | ||
| 92 | $str | ||
| 93 | } | ||
| 94 | } | ||
| 95 | |||
| 96 | void ERR_${type}_error(function,reason,file,line) | ||
| 97 | int function; | ||
| 98 | int reason; | ||
| 99 | char *file; | ||
| 100 | int line; | ||
| 101 | { | ||
| 102 | if (${type}_lib_error_code == 0) | ||
| 103 | ${type}_lib_error_code=ERR_get_next_error_library(); | ||
| 104 | ERR_PUT_error(${type}_lib_error_code,function,reason,file,line); | ||
| 105 | } | ||
| 106 | EOF | ||
| 107 | } | ||
| 108 | else # $static | ||
| 109 | { | ||
| 110 | print <<"EOF"; | ||
| 111 | |||
| 112 | void ERR_load_${type}_strings() | ||
| 113 | { | ||
| 114 | static int init=1; | ||
| 115 | |||
| 116 | if (init); | ||
| 117 | {; | ||
| 118 | init=0; | ||
| 119 | $str | ||
| 120 | } | ||
| 121 | } | ||
| 122 | EOF | ||
| 123 | } | ||
| 124 | |||
| 125 | sub header | ||
| 126 | { | ||
| 127 | ($type,$header)=@_; | ||
| 128 | |||
| 129 | ($lc=$type) =~ tr/A-Z/a-z/; | ||
| 130 | $header =~ s/^.*\///; | ||
| 131 | |||
| 132 | print "/* lib/$lc/${lc}\_err.c */\n"; | ||
| 133 | print <<'EOF'; | ||
| 134 | /* Copyright (C) 1995-1997 Eric Young (eay@cryptsoft.com) | ||
| 135 | * All rights reserved. | ||
| 136 | * | ||
| 137 | * This package is an SSL implementation written | ||
| 138 | * by Eric Young (eay@cryptsoft.com). | ||
| 139 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 140 | * | ||
| 141 | * This library is free for commercial and non-commercial use as long as | ||
| 142 | * the following conditions are aheared to. The following conditions | ||
| 143 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 144 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 145 | * included with this distribution is covered by the same copyright terms | ||
| 146 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 147 | * | ||
| 148 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 149 | * the code are not to be removed. | ||
| 150 | * If this package is used in a product, Eric Young should be given attribution | ||
| 151 | * as the author of the parts of the library used. | ||
| 152 | * This can be in the form of a textual message at program startup or | ||
| 153 | * in documentation (online or textual) provided with the package. | ||
| 154 | * | ||
| 155 | * Redistribution and use in source and binary forms, with or without | ||
| 156 | * modification, are permitted provided that the following conditions | ||
| 157 | * are met: | ||
| 158 | * 1. Redistributions of source code must retain the copyright | ||
| 159 | * notice, this list of conditions and the following disclaimer. | ||
| 160 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 161 | * notice, this list of conditions and the following disclaimer in the | ||
| 162 | * documentation and/or other materials provided with the distribution. | ||
| 163 | * 3. All advertising materials mentioning features or use of this software | ||
| 164 | * must display the following acknowledgement: | ||
| 165 | * "This product includes cryptographic software written by | ||
| 166 | * Eric Young (eay@cryptsoft.com)" | ||
| 167 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 168 | * being used are not cryptographic related :-). | ||
| 169 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 170 | * the apps directory (application code) you must include an acknowledgement: | ||
| 171 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 172 | * | ||
| 173 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 174 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 175 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 176 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 177 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 178 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 179 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 180 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 181 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 182 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 183 | * SUCH DAMAGE. | ||
| 184 | * | ||
| 185 | * The licence and distribution terms for any publically available version or | ||
| 186 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 187 | * copied and put under another distribution licence | ||
| 188 | * [including the GNU Public Licence.] | ||
| 189 | */ | ||
| 190 | EOF | ||
| 191 | |||
| 192 | print "#include <stdio.h>\n"; | ||
| 193 | print "#include \"err.h\"\n"; | ||
| 194 | print "#include \"$header\"\n"; | ||
| 195 | print "\n/* BEGIN ERROR CODES */\n"; | ||
| 196 | print "#ifndef NO_ERR\n"; | ||
| 197 | } | ||
| 198 | |||
diff --git a/src/lib/libssl/src/crypto/err/error.err b/src/lib/libssl/src/crypto/err/error.err new file mode 100644 index 0000000000..f09557d8d9 --- /dev/null +++ b/src/lib/libssl/src/crypto/err/error.err | |||
| @@ -0,0 +1,13 @@ | |||
| 1 | /* Error codes for the ERR functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | |||
| 5 | /* Reason codes. */ | ||
| 6 | #define ERR_R_BN_LIB 100 | ||
| 7 | #define ERR_R_DER_LIB 101 | ||
| 8 | #define ERR_R_MALLOC_FAILURE 102 | ||
| 9 | #define ERR_R_PEM_LIB 103 | ||
| 10 | #define ERR_R_RSA_LIB 104 | ||
| 11 | #define ERR_R_SHOULD_NOT_HAVE_BEEN_CALLED 105 | ||
| 12 | #define ERR_R_SYS_LIB 106 | ||
| 13 | #define ERR_R_X509_LIB 107 | ||
diff --git a/src/lib/libssl/src/crypto/err/ssleay.ec b/src/lib/libssl/src/crypto/err/ssleay.ec new file mode 100644 index 0000000000..10b5dbb59d --- /dev/null +++ b/src/lib/libssl/src/crypto/err/ssleay.ec | |||
| @@ -0,0 +1,57 @@ | |||
| 1 | L ERR NONE | ||
| 2 | L CRYPTO crypto.err | ||
| 3 | L BN bn/bn.err | ||
| 4 | L RSA rsa/rsa.err | ||
| 5 | L DSA dsa/dsa.err | ||
| 6 | L DH dh/dh.err | ||
| 7 | L EVP evp/evp.err | ||
| 8 | L BUF buffer/buffer.err | ||
| 9 | L BIO bio/bio.err | ||
| 10 | L OBJ objects/objects.err | ||
| 11 | L PEM pem/pem.err | ||
| 12 | L X509 x509/x509.err | ||
| 13 | L METH meth/meth.err | ||
| 14 | L ASN1 asn1/asn1.err | ||
| 15 | L CONF conf/conf.err | ||
| 16 | L PROXY proxy/proxy.err | ||
| 17 | L PKCS7 pkcs7/pkcs7.err | ||
| 18 | L RSAREF ../rsaref/rsaref.err | ||
| 19 | L SSL ../ssl/ssl.err | ||
| 20 | L SSL2 ../ssl/ssl2.err | ||
| 21 | L SSL3 ../ssl/ssl3.err | ||
| 22 | L SSL23 ../ssl/ssl23.err | ||
| 23 | |||
| 24 | F RSAREF_F_RSA_BN2BIN | ||
| 25 | F RSAREF_F_RSA_PRIVATE_DECRYPT | ||
| 26 | F RSAREF_F_RSA_PRIVATE_ENCRYPT | ||
| 27 | F RSAREF_F_RSA_PUBLIC_DECRYPT | ||
| 28 | F RSAREF_F_RSA_PUBLIC_ENCRYPT | ||
| 29 | #F SSL_F_CLIENT_CERTIFICATE | ||
| 30 | |||
| 31 | R SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 | ||
| 32 | R SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 | ||
| 33 | R SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 | ||
| 34 | R SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 | ||
| 35 | R SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 | ||
| 36 | R SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 | ||
| 37 | R SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 | ||
| 38 | R SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 | ||
| 39 | R SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 | ||
| 40 | R SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 | ||
| 41 | R SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 | ||
| 42 | |||
| 43 | R RSAREF_R_CONTENT_ENCODING 0x0400 | ||
| 44 | R RSAREF_R_DATA 0x0401 | ||
| 45 | R RSAREF_R_DIGEST_ALGORITHM 0x0402 | ||
| 46 | R RSAREF_R_ENCODING 0x0403 | ||
| 47 | R RSAREF_R_KEY 0x0404 | ||
| 48 | R RSAREF_R_KEY_ENCODING 0x0405 | ||
| 49 | R RSAREF_R_LEN 0x0406 | ||
| 50 | R RSAREF_R_MODULUS_LEN 0x0407 | ||
| 51 | R RSAREF_R_NEED_RANDOM 0x0408 | ||
| 52 | R RSAREF_R_PRIVATE_KEY 0x0409 | ||
| 53 | R RSAREF_R_PUBLIC_KEY 0x040a | ||
| 54 | R RSAREF_R_SIGNATURE 0x040b | ||
| 55 | R RSAREF_R_SIGNATURE_ENCODING 0x040c | ||
| 56 | R RSAREF_R_ENCRYPTION_ALGORITHM 0x040d | ||
| 57 | |||
diff --git a/src/lib/libssl/src/crypto/evp/Makefile.ssl b/src/lib/libssl/src/crypto/evp/Makefile.ssl new file mode 100644 index 0000000000..8bf2516458 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/Makefile.ssl | |||
| @@ -0,0 +1,111 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/evp/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= evp | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=evp | ||
| 19 | ERRC=evp_err | ||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= encode.c digest.c evp_enc.c evp_key.c \ | ||
| 26 | e_ecb_d.c e_cbc_d.c e_cfb_d.c e_ofb_d.c \ | ||
| 27 | e_ecb_i.c e_cbc_i.c e_cfb_i.c e_ofb_i.c \ | ||
| 28 | e_ecb_3d.c e_cbc_3d.c e_rc4.c names.c \ | ||
| 29 | e_cfb_3d.c e_ofb_3d.c e_xcbc_d.c \ | ||
| 30 | e_ecb_r2.c e_cbc_r2.c e_cfb_r2.c e_ofb_r2.c \ | ||
| 31 | e_ecb_bf.c e_cbc_bf.c e_cfb_bf.c e_ofb_bf.c \ | ||
| 32 | e_ecb_c.c e_cbc_c.c e_cfb_c.c e_ofb_c.c \ | ||
| 33 | e_ecb_r5.c e_cbc_r5.c e_cfb_r5.c e_ofb_r5.c \ | ||
| 34 | m_null.c m_md2.c m_md5.c m_sha.c m_sha1.c m_dss.c m_dss1.c m_mdc2.c \ | ||
| 35 | m_ripemd.c \ | ||
| 36 | p_open.c p_seal.c p_sign.c p_verify.c p_lib.c p_enc.c p_dec.c \ | ||
| 37 | bio_md.c bio_b64.c bio_enc.c $(ERRC).c e_null.c \ | ||
| 38 | c_all.c evp_lib.c | ||
| 39 | |||
| 40 | LIBOBJ= encode.o digest.o evp_enc.o evp_key.o \ | ||
| 41 | e_ecb_d.o e_cbc_d.o e_cfb_d.o e_ofb_d.o \ | ||
| 42 | e_ecb_i.o e_cbc_i.o e_cfb_i.o e_ofb_i.o \ | ||
| 43 | e_ecb_3d.o e_cbc_3d.o e_rc4.o names.o \ | ||
| 44 | e_cfb_3d.o e_ofb_3d.o e_xcbc_d.o \ | ||
| 45 | e_ecb_r2.o e_cbc_r2.o e_cfb_r2.o e_ofb_r2.o \ | ||
| 46 | e_ecb_bf.o e_cbc_bf.o e_cfb_bf.o e_ofb_bf.o \ | ||
| 47 | e_ecb_c.o e_cbc_c.o e_cfb_c.o e_ofb_c.o \ | ||
| 48 | e_ecb_r5.o e_cbc_r5.o e_cfb_r5.o e_ofb_r5.o \ | ||
| 49 | m_null.o m_md2.o m_md5.o m_sha.o m_sha1.o m_dss.o m_dss1.o m_mdc2.o \ | ||
| 50 | m_ripemd.o \ | ||
| 51 | p_open.o p_seal.o p_sign.o p_verify.o p_lib.o p_enc.o p_dec.o \ | ||
| 52 | bio_md.o bio_b64.o bio_enc.o $(ERRC).o e_null.o \ | ||
| 53 | c_all.o evp_lib.o | ||
| 54 | |||
| 55 | SRC= $(LIBSRC) | ||
| 56 | |||
| 57 | EXHEADER= evp.h | ||
| 58 | HEADER= $(EXHEADER) | ||
| 59 | |||
| 60 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 61 | |||
| 62 | top: | ||
| 63 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 64 | |||
| 65 | all: lib | ||
| 66 | |||
| 67 | lib: $(LIBOBJ) | ||
| 68 | $(AR) $(LIB) $(LIBOBJ) | ||
| 69 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 70 | @touch lib | ||
| 71 | |||
| 72 | files: | ||
| 73 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 74 | |||
| 75 | links: | ||
| 76 | /bin/rm -f Makefile | ||
| 77 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 78 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 79 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 80 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 81 | |||
| 82 | install: | ||
| 83 | @for i in $(EXHEADER) ; \ | ||
| 84 | do \ | ||
| 85 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 86 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 87 | done; | ||
| 88 | |||
| 89 | tags: | ||
| 90 | ctags $(SRC) | ||
| 91 | |||
| 92 | tests: | ||
| 93 | |||
| 94 | lint: | ||
| 95 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 96 | |||
| 97 | depend: | ||
| 98 | $(MAKEDEPEND) $(INCLUDES) $(LIBSRC) | ||
| 99 | |||
| 100 | dclean: | ||
| 101 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 102 | mv -f Makefile.new $(MAKEFILE) | ||
| 103 | |||
| 104 | clean: | ||
| 105 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 106 | |||
| 107 | errors: | ||
| 108 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 109 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 110 | |||
| 111 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_3d.c b/src/lib/libssl/src/crypto/evp/e_cbc_3d.c new file mode 100644 index 0000000000..5761bf186a --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cbc_3d.c | |||
| @@ -0,0 +1,163 @@ | |||
| 1 | /* crypto/evp/e_cbc_3d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | #ifndef NOPROTO | ||
| 65 | static void des_cbc_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_cbc_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void des_cbc_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void des_cbc_ede_init_key(); | ||
| 73 | static void des_cbc_ede3_init_key(); | ||
| 74 | static void des_cbc_ede_cipher(); | ||
| 75 | #endif | ||
| 76 | |||
| 77 | static EVP_CIPHER d_cbc_ede_cipher2= | ||
| 78 | { | ||
| 79 | NID_des_ede_cbc, | ||
| 80 | 8,16,8, | ||
| 81 | des_cbc_ede_init_key, | ||
| 82 | des_cbc_ede_cipher, | ||
| 83 | NULL, | ||
| 84 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 85 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | EVP_CIPHER_set_asn1_iv, | ||
| 88 | }; | ||
| 89 | |||
| 90 | static EVP_CIPHER d_cbc_ede_cipher3= | ||
| 91 | { | ||
| 92 | NID_des_ede3_cbc, | ||
| 93 | 8,24,8, | ||
| 94 | des_cbc_ede3_init_key, | ||
| 95 | des_cbc_ede_cipher, | ||
| 96 | NULL, | ||
| 97 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 98 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 99 | EVP_CIPHER_set_asn1_iv, | ||
| 100 | EVP_CIPHER_get_asn1_iv, | ||
| 101 | }; | ||
| 102 | |||
| 103 | EVP_CIPHER *EVP_des_ede_cbc() | ||
| 104 | { | ||
| 105 | return(&d_cbc_ede_cipher2); | ||
| 106 | } | ||
| 107 | |||
| 108 | EVP_CIPHER *EVP_des_ede3_cbc() | ||
| 109 | { | ||
| 110 | return(&d_cbc_ede_cipher3); | ||
| 111 | } | ||
| 112 | |||
| 113 | static void des_cbc_ede_init_key(ctx,key,iv,enc) | ||
| 114 | EVP_CIPHER_CTX *ctx; | ||
| 115 | unsigned char *key; | ||
| 116 | unsigned char *iv; | ||
| 117 | int enc; | ||
| 118 | { | ||
| 119 | if (iv != NULL) | ||
| 120 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 121 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 122 | |||
| 123 | if (key != NULL) | ||
| 124 | { | ||
| 125 | des_set_key((des_cblock *)key,ctx->c.des_ede.ks1); | ||
| 126 | des_set_key((des_cblock *)&(key[8]),ctx->c.des_ede.ks2); | ||
| 127 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 128 | (char *)ctx->c.des_ede.ks1, | ||
| 129 | sizeof(ctx->c.des_ede.ks1)); | ||
| 130 | } | ||
| 131 | } | ||
| 132 | |||
| 133 | static void des_cbc_ede3_init_key(ctx,key,iv,enc) | ||
| 134 | EVP_CIPHER_CTX *ctx; | ||
| 135 | unsigned char *key; | ||
| 136 | unsigned char *iv; | ||
| 137 | int enc; | ||
| 138 | { | ||
| 139 | if (iv != NULL) | ||
| 140 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 141 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 142 | |||
| 143 | if (key != NULL) | ||
| 144 | { | ||
| 145 | des_set_key((des_cblock *)key,ctx->c.des_ede.ks1); | ||
| 146 | des_set_key((des_cblock *)&(key[8]),ctx->c.des_ede.ks2); | ||
| 147 | des_set_key((des_cblock *)&(key[16]),ctx->c.des_ede.ks3); | ||
| 148 | } | ||
| 149 | } | ||
| 150 | |||
| 151 | static void des_cbc_ede_cipher(ctx,out,in,inl) | ||
| 152 | EVP_CIPHER_CTX *ctx; | ||
| 153 | unsigned char *out; | ||
| 154 | unsigned char *in; | ||
| 155 | unsigned int inl; | ||
| 156 | { | ||
| 157 | des_ede3_cbc_encrypt( | ||
| 158 | (des_cblock *)in,(des_cblock *)out, | ||
| 159 | (long)inl, ctx->c.des_ede.ks1, | ||
| 160 | ctx->c.des_ede.ks2,ctx->c.des_ede.ks3, | ||
| 161 | (des_cblock *)&(ctx->iv[0]), | ||
| 162 | ctx->encrypt); | ||
| 163 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_bf.c b/src/lib/libssl/src/crypto/evp/e_cbc_bf.c new file mode 100644 index 0000000000..be605f4a13 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cbc_bf.c | |||
| @@ -0,0 +1,119 @@ | |||
| 1 | /* crypto/evp/e_cbc_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BLOWFISH | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void bf_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void bf_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void bf_cbc_init_key(); | ||
| 73 | static void bf_cbc_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER bfish_cbc_cipher= | ||
| 77 | { | ||
| 78 | NID_bf_cbc, | ||
| 79 | 8,EVP_BLOWFISH_KEY_SIZE,8, | ||
| 80 | bf_cbc_init_key, | ||
| 81 | bf_cbc_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), | ||
| 85 | EVP_CIPHER_get_asn1_iv, | ||
| 86 | EVP_CIPHER_set_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_bf_cbc() | ||
| 90 | { | ||
| 91 | return(&bfish_cbc_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void bf_cbc_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (iv != NULL) | ||
| 101 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 102 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 103 | if (key != NULL) | ||
| 104 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void bf_cbc_cipher(ctx,out,in,inl) | ||
| 108 | EVP_CIPHER_CTX *ctx; | ||
| 109 | unsigned char *out; | ||
| 110 | unsigned char *in; | ||
| 111 | unsigned int inl; | ||
| 112 | { | ||
| 113 | BF_cbc_encrypt( | ||
| 114 | in,out,(long)inl, | ||
| 115 | &(ctx->c.bf_ks),&(ctx->iv[0]), | ||
| 116 | ctx->encrypt); | ||
| 117 | } | ||
| 118 | |||
| 119 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_c.c b/src/lib/libssl/src/crypto/evp/e_cbc_c.c new file mode 100644 index 0000000000..b50c7874b3 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cbc_c.c | |||
| @@ -0,0 +1,119 @@ | |||
| 1 | /* crypto/evp/e_cbc_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void cast_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void cast_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void cast_cbc_init_key(); | ||
| 73 | static void cast_cbc_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER cast5_cbc_cipher= | ||
| 77 | { | ||
| 78 | NID_cast5_cbc, | ||
| 79 | 8,EVP_CAST5_KEY_SIZE,8, | ||
| 80 | cast_cbc_init_key, | ||
| 81 | cast_cbc_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), | ||
| 85 | EVP_CIPHER_get_asn1_iv, | ||
| 86 | EVP_CIPHER_set_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_cast5_cbc() | ||
| 90 | { | ||
| 91 | return(&cast5_cbc_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void cast_cbc_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (iv != NULL) | ||
| 101 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 102 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 103 | if (key != NULL) | ||
| 104 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void cast_cbc_cipher(ctx,out,in,inl) | ||
| 108 | EVP_CIPHER_CTX *ctx; | ||
| 109 | unsigned char *out; | ||
| 110 | unsigned char *in; | ||
| 111 | unsigned int inl; | ||
| 112 | { | ||
| 113 | CAST_cbc_encrypt( | ||
| 114 | in,out,(long)inl, | ||
| 115 | &(ctx->c.cast_ks),&(ctx->iv[0]), | ||
| 116 | ctx->encrypt); | ||
| 117 | } | ||
| 118 | |||
| 119 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_d.c b/src/lib/libssl/src/crypto/evp/e_cbc_d.c new file mode 100644 index 0000000000..c67706e3a0 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cbc_d.c | |||
| @@ -0,0 +1,116 @@ | |||
| 1 | /* crypto/evp/e_cbc_d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | #ifndef NOPROTO | ||
| 65 | static void des_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | #else | ||
| 70 | static void des_cbc_init_key(); | ||
| 71 | static void des_cbc_cipher(); | ||
| 72 | #endif | ||
| 73 | |||
| 74 | static EVP_CIPHER d_cbc_cipher= | ||
| 75 | { | ||
| 76 | NID_des_cbc, | ||
| 77 | 8,8,8, | ||
| 78 | des_cbc_init_key, | ||
| 79 | des_cbc_cipher, | ||
| 80 | NULL, | ||
| 81 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 82 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)), | ||
| 83 | EVP_CIPHER_get_asn1_iv, | ||
| 84 | EVP_CIPHER_set_asn1_iv, | ||
| 85 | }; | ||
| 86 | |||
| 87 | EVP_CIPHER *EVP_des_cbc() | ||
| 88 | { | ||
| 89 | return(&d_cbc_cipher); | ||
| 90 | } | ||
| 91 | |||
| 92 | static void des_cbc_init_key(ctx,key,iv,enc) | ||
| 93 | EVP_CIPHER_CTX *ctx; | ||
| 94 | unsigned char *key; | ||
| 95 | unsigned char *iv; | ||
| 96 | int enc; | ||
| 97 | { | ||
| 98 | if (iv != NULL) | ||
| 99 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 100 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 101 | if (key != NULL) | ||
| 102 | des_set_key((des_cblock *)key,ctx->c.des_ks); | ||
| 103 | } | ||
| 104 | |||
| 105 | static void des_cbc_cipher(ctx,out,in,inl) | ||
| 106 | EVP_CIPHER_CTX *ctx; | ||
| 107 | unsigned char *out; | ||
| 108 | unsigned char *in; | ||
| 109 | unsigned int inl; | ||
| 110 | { | ||
| 111 | des_ncbc_encrypt( | ||
| 112 | (des_cblock *)in,(des_cblock *)out, | ||
| 113 | (long)inl, ctx->c.des_ks, | ||
| 114 | (des_cblock *)&(ctx->iv[0]), | ||
| 115 | ctx->encrypt); | ||
| 116 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_i.c b/src/lib/libssl/src/crypto/evp/e_cbc_i.c new file mode 100644 index 0000000000..312ffcb721 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cbc_i.c | |||
| @@ -0,0 +1,131 @@ | |||
| 1 | /* crypto/evp/e_cbc_i.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void idea_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void idea_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void idea_cbc_init_key(); | ||
| 73 | static void idea_cbc_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER i_cbc_cipher= | ||
| 77 | { | ||
| 78 | NID_idea_cbc, | ||
| 79 | 8,16,8, | ||
| 80 | idea_cbc_init_key, | ||
| 81 | idea_cbc_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)), | ||
| 85 | EVP_CIPHER_get_asn1_iv, | ||
| 86 | EVP_CIPHER_set_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_idea_cbc() | ||
| 90 | { | ||
| 91 | return(&i_cbc_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void idea_cbc_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (iv != NULL) | ||
| 101 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 102 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 103 | if (key != NULL) | ||
| 104 | { | ||
| 105 | if (enc) | ||
| 106 | idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 107 | else | ||
| 108 | { | ||
| 109 | IDEA_KEY_SCHEDULE tmp; | ||
| 110 | |||
| 111 | idea_set_encrypt_key(key,&tmp); | ||
| 112 | idea_set_decrypt_key(&tmp,&(ctx->c.idea_ks)); | ||
| 113 | memset((unsigned char *)&tmp,0, | ||
| 114 | sizeof(IDEA_KEY_SCHEDULE)); | ||
| 115 | } | ||
| 116 | } | ||
| 117 | } | ||
| 118 | |||
| 119 | static void idea_cbc_cipher(ctx,out,in,inl) | ||
| 120 | EVP_CIPHER_CTX *ctx; | ||
| 121 | unsigned char *out; | ||
| 122 | unsigned char *in; | ||
| 123 | unsigned int inl; | ||
| 124 | { | ||
| 125 | idea_cbc_encrypt( | ||
| 126 | in,out,(long)inl, | ||
| 127 | &(ctx->c.idea_ks),&(ctx->iv[0]), | ||
| 128 | ctx->encrypt); | ||
| 129 | } | ||
| 130 | |||
| 131 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_r2.c b/src/lib/libssl/src/crypto/evp/e_cbc_r2.c new file mode 100644 index 0000000000..4f8002f16d --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cbc_r2.c | |||
| @@ -0,0 +1,136 @@ | |||
| 1 | /* crypto/evp/e_cbc_r2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void rc2_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void rc2_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void rc2_cbc_init_key(); | ||
| 73 | static void rc2_cbc_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER r2_cbc_cipher= | ||
| 77 | { | ||
| 78 | NID_rc2_cbc, | ||
| 79 | 8,EVP_RC2_KEY_SIZE,8, | ||
| 80 | rc2_cbc_init_key, | ||
| 81 | rc2_cbc_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 85 | EVP_CIPHER_get_asn1_iv, | ||
| 86 | EVP_CIPHER_set_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | static EVP_CIPHER r2_40_cbc_cipher= | ||
| 90 | { | ||
| 91 | NID_rc2_40_cbc, | ||
| 92 | 8,5 /* 40 bit */,8, | ||
| 93 | rc2_cbc_init_key, | ||
| 94 | rc2_cbc_cipher, | ||
| 95 | NULL, | ||
| 96 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 97 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 98 | }; | ||
| 99 | |||
| 100 | EVP_CIPHER *EVP_rc2_cbc() | ||
| 101 | { | ||
| 102 | return(&r2_cbc_cipher); | ||
| 103 | } | ||
| 104 | |||
| 105 | EVP_CIPHER *EVP_rc2_40_cbc() | ||
| 106 | { | ||
| 107 | return(&r2_40_cbc_cipher); | ||
| 108 | } | ||
| 109 | |||
| 110 | static void rc2_cbc_init_key(ctx,key,iv,enc) | ||
| 111 | EVP_CIPHER_CTX *ctx; | ||
| 112 | unsigned char *key; | ||
| 113 | unsigned char *iv; | ||
| 114 | int enc; | ||
| 115 | { | ||
| 116 | if (iv != NULL) | ||
| 117 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 118 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 119 | if (key != NULL) | ||
| 120 | RC2_set_key(&(ctx->c.rc2_ks),EVP_CIPHER_CTX_key_length(ctx), | ||
| 121 | key,EVP_CIPHER_CTX_key_length(ctx)*8); | ||
| 122 | } | ||
| 123 | |||
| 124 | static void rc2_cbc_cipher(ctx,out,in,inl) | ||
| 125 | EVP_CIPHER_CTX *ctx; | ||
| 126 | unsigned char *out; | ||
| 127 | unsigned char *in; | ||
| 128 | unsigned int inl; | ||
| 129 | { | ||
| 130 | RC2_cbc_encrypt( | ||
| 131 | in,out,(long)inl, | ||
| 132 | &(ctx->c.rc2_ks),&(ctx->iv[0]), | ||
| 133 | ctx->encrypt); | ||
| 134 | } | ||
| 135 | |||
| 136 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cbc_r5.c b/src/lib/libssl/src/crypto/evp/e_cbc_r5.c new file mode 100644 index 0000000000..f7d46ca91f --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cbc_r5.c | |||
| @@ -0,0 +1,120 @@ | |||
| 1 | /* crypto/evp/e_cbc_r5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void r_32_12_16_cbc_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void r_32_12_16_cbc_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void r_32_12_16_cbc_init_key(); | ||
| 73 | static void r_32_12_16_cbc_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER rc5_32_12_16_cbc_cipher= | ||
| 77 | { | ||
| 78 | NID_rc5_cbc, | ||
| 79 | 8,EVP_RC5_32_12_16_KEY_SIZE,8, | ||
| 80 | r_32_12_16_cbc_init_key, | ||
| 81 | r_32_12_16_cbc_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)), | ||
| 85 | NULL, | ||
| 86 | NULL, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_rc5_32_12_16_cbc() | ||
| 90 | { | ||
| 91 | return(&rc5_32_12_16_cbc_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void r_32_12_16_cbc_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (iv != NULL) | ||
| 101 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 102 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 103 | if (key != NULL) | ||
| 104 | RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE, | ||
| 105 | key,RC5_12_ROUNDS); | ||
| 106 | } | ||
| 107 | |||
| 108 | static void r_32_12_16_cbc_cipher(ctx,out,in,inl) | ||
| 109 | EVP_CIPHER_CTX *ctx; | ||
| 110 | unsigned char *out; | ||
| 111 | unsigned char *in; | ||
| 112 | unsigned int inl; | ||
| 113 | { | ||
| 114 | RC5_32_cbc_encrypt( | ||
| 115 | in,out,(long)inl, | ||
| 116 | &(ctx->c.rc5_ks),&(ctx->iv[0]), | ||
| 117 | ctx->encrypt); | ||
| 118 | } | ||
| 119 | |||
| 120 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_3d.c b/src/lib/libssl/src/crypto/evp/e_cfb_3d.c new file mode 100644 index 0000000000..e7e3419411 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cfb_3d.c | |||
| @@ -0,0 +1,166 @@ | |||
| 1 | /* crypto/evp/e_cfb_3d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | #ifndef NOPROTO | ||
| 65 | static void des_ede_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ede3_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void des_ede_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void des_ede_cfb_init_key(); | ||
| 73 | static void des_ede3_cfb_init_key(); | ||
| 74 | static void des_ede_cfb_cipher(); | ||
| 75 | #endif | ||
| 76 | |||
| 77 | static EVP_CIPHER d_ede_cfb_cipher2= | ||
| 78 | { | ||
| 79 | NID_des_ede_cfb64, | ||
| 80 | 1,16,8, | ||
| 81 | des_ede_cfb_init_key, | ||
| 82 | des_ede_cfb_cipher, | ||
| 83 | NULL, | ||
| 84 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 85 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 86 | EVP_CIPHER_set_asn1_iv, | ||
| 87 | EVP_CIPHER_get_asn1_iv, | ||
| 88 | }; | ||
| 89 | |||
| 90 | static EVP_CIPHER d_ede3_cfb_cipher3= | ||
| 91 | { | ||
| 92 | NID_des_ede3_cfb64, | ||
| 93 | 1,24,8, | ||
| 94 | des_ede3_cfb_init_key, | ||
| 95 | des_ede_cfb_cipher, | ||
| 96 | NULL, | ||
| 97 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 98 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 99 | EVP_CIPHER_set_asn1_iv, | ||
| 100 | EVP_CIPHER_get_asn1_iv, | ||
| 101 | }; | ||
| 102 | |||
| 103 | EVP_CIPHER *EVP_des_ede_cfb() | ||
| 104 | { | ||
| 105 | return(&d_ede_cfb_cipher2); | ||
| 106 | } | ||
| 107 | |||
| 108 | EVP_CIPHER *EVP_des_ede3_cfb() | ||
| 109 | { | ||
| 110 | return(&d_ede3_cfb_cipher3); | ||
| 111 | } | ||
| 112 | |||
| 113 | static void des_ede_cfb_init_key(ctx,key,iv,enc) | ||
| 114 | EVP_CIPHER_CTX *ctx; | ||
| 115 | unsigned char *key; | ||
| 116 | unsigned char *iv; | ||
| 117 | int enc; | ||
| 118 | { | ||
| 119 | ctx->num=0; | ||
| 120 | |||
| 121 | if (iv != NULL) | ||
| 122 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 123 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 124 | if (key != NULL) | ||
| 125 | { | ||
| 126 | des_set_key((des_cblock *)key,ctx->c.des_ede.ks1); | ||
| 127 | des_set_key((des_cblock *)&(key[8]),ctx->c.des_ede.ks2); | ||
| 128 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 129 | (char *)ctx->c.des_ede.ks1, | ||
| 130 | sizeof(ctx->c.des_ede.ks1)); | ||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 134 | static void des_ede3_cfb_init_key(ctx,key,iv,enc) | ||
| 135 | EVP_CIPHER_CTX *ctx; | ||
| 136 | unsigned char *key; | ||
| 137 | unsigned char *iv; | ||
| 138 | int enc; | ||
| 139 | { | ||
| 140 | ctx->num=0; | ||
| 141 | |||
| 142 | if (iv != NULL) | ||
| 143 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 144 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 145 | if (key != NULL) | ||
| 146 | { | ||
| 147 | des_set_key((des_cblock *)key,ctx->c.des_ede.ks1); | ||
| 148 | des_set_key((des_cblock *)&(key[8]),ctx->c.des_ede.ks2); | ||
| 149 | des_set_key((des_cblock *)&(key[16]),ctx->c.des_ede.ks3); | ||
| 150 | } | ||
| 151 | } | ||
| 152 | |||
| 153 | static void des_ede_cfb_cipher(ctx,out,in,inl) | ||
| 154 | EVP_CIPHER_CTX *ctx; | ||
| 155 | unsigned char *out; | ||
| 156 | unsigned char *in; | ||
| 157 | unsigned int inl; | ||
| 158 | { | ||
| 159 | des_ede3_cfb64_encrypt( | ||
| 160 | in,out,(long)inl, | ||
| 161 | ctx->c.des_ede.ks1, | ||
| 162 | ctx->c.des_ede.ks2, | ||
| 163 | ctx->c.des_ede.ks3, | ||
| 164 | (des_cblock *)&(ctx->iv[0]), | ||
| 165 | &ctx->num,ctx->encrypt); | ||
| 166 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_bf.c b/src/lib/libssl/src/crypto/evp/e_cfb_bf.c new file mode 100644 index 0000000000..8aba2564b8 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cfb_bf.c | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | /* crypto/evp/e_cfb_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BLOWFISH | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void bf_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void bf_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void bf_cfb_init_key(); | ||
| 73 | static void bf_cfb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER bfish_cfb_cipher= | ||
| 77 | { | ||
| 78 | NID_bf_cfb64, | ||
| 79 | 1,EVP_BLOWFISH_KEY_SIZE,8, | ||
| 80 | bf_cfb_init_key, | ||
| 81 | bf_cfb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_bf_cfb() | ||
| 90 | { | ||
| 91 | return(&bfish_cfb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void bf_cfb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | ||
| 107 | } | ||
| 108 | |||
| 109 | static void bf_cfb_cipher(ctx,out,in,inl) | ||
| 110 | EVP_CIPHER_CTX *ctx; | ||
| 111 | unsigned char *out; | ||
| 112 | unsigned char *in; | ||
| 113 | unsigned int inl; | ||
| 114 | { | ||
| 115 | BF_cfb64_encrypt( | ||
| 116 | in,out, | ||
| 117 | (long)inl, &(ctx->c.bf_ks), | ||
| 118 | &(ctx->iv[0]), | ||
| 119 | &ctx->num,ctx->encrypt); | ||
| 120 | } | ||
| 121 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_c.c b/src/lib/libssl/src/crypto/evp/e_cfb_c.c new file mode 100644 index 0000000000..936df55fd8 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cfb_c.c | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | /* crypto/evp/e_cfb_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void cast_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void cast_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void cast_cfb_init_key(); | ||
| 73 | static void cast_cfb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER cast5_cfb_cipher= | ||
| 77 | { | ||
| 78 | NID_cast5_cfb64, | ||
| 79 | 1,EVP_CAST5_KEY_SIZE,8, | ||
| 80 | cast_cfb_init_key, | ||
| 81 | cast_cfb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_cast5_cfb() | ||
| 90 | { | ||
| 91 | return(&cast5_cfb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void cast_cfb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | ||
| 107 | } | ||
| 108 | |||
| 109 | static void cast_cfb_cipher(ctx,out,in,inl) | ||
| 110 | EVP_CIPHER_CTX *ctx; | ||
| 111 | unsigned char *out; | ||
| 112 | unsigned char *in; | ||
| 113 | unsigned int inl; | ||
| 114 | { | ||
| 115 | CAST_cfb64_encrypt( | ||
| 116 | in,out, | ||
| 117 | (long)inl, &(ctx->c.cast_ks), | ||
| 118 | &(ctx->iv[0]), | ||
| 119 | &ctx->num,ctx->encrypt); | ||
| 120 | } | ||
| 121 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_d.c b/src/lib/libssl/src/crypto/evp/e_cfb_d.c new file mode 100644 index 0000000000..9ae4558f51 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cfb_d.c | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | /* crypto/evp/e_cfb_d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | #ifndef NOPROTO | ||
| 65 | static void des_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | #else | ||
| 70 | static void des_cfb_init_key(); | ||
| 71 | static void des_cfb_cipher(); | ||
| 72 | #endif | ||
| 73 | |||
| 74 | static EVP_CIPHER d_cfb_cipher= | ||
| 75 | { | ||
| 76 | NID_des_cfb64, | ||
| 77 | 1,8,8, | ||
| 78 | des_cfb_init_key, | ||
| 79 | des_cfb_cipher, | ||
| 80 | NULL, | ||
| 81 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 82 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)), | ||
| 83 | EVP_CIPHER_set_asn1_iv, | ||
| 84 | EVP_CIPHER_get_asn1_iv, | ||
| 85 | }; | ||
| 86 | |||
| 87 | EVP_CIPHER *EVP_des_cfb() | ||
| 88 | { | ||
| 89 | return(&d_cfb_cipher); | ||
| 90 | } | ||
| 91 | |||
| 92 | static void des_cfb_init_key(ctx,key,iv,enc) | ||
| 93 | EVP_CIPHER_CTX *ctx; | ||
| 94 | unsigned char *key; | ||
| 95 | unsigned char *iv; | ||
| 96 | int enc; | ||
| 97 | { | ||
| 98 | ctx->num=0; | ||
| 99 | |||
| 100 | if (iv != NULL) | ||
| 101 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 102 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 103 | if (key != NULL) | ||
| 104 | des_set_key((des_cblock *)key,ctx->c.des_ks); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void des_cfb_cipher(ctx,out,in,inl) | ||
| 108 | EVP_CIPHER_CTX *ctx; | ||
| 109 | unsigned char *out; | ||
| 110 | unsigned char *in; | ||
| 111 | unsigned int inl; | ||
| 112 | { | ||
| 113 | des_cfb64_encrypt( | ||
| 114 | in,out, | ||
| 115 | (long)inl, ctx->c.des_ks, | ||
| 116 | (des_cblock *)&(ctx->iv[0]), | ||
| 117 | &ctx->num,ctx->encrypt); | ||
| 118 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_i.c b/src/lib/libssl/src/crypto/evp/e_cfb_i.c new file mode 100644 index 0000000000..9225efaa86 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cfb_i.c | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | /* crypto/evp/e_cfb_i.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void idea_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void idea_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void idea_cfb_init_key(); | ||
| 73 | static void idea_cfb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER i_cfb_cipher= | ||
| 77 | { | ||
| 78 | NID_idea_cfb64, | ||
| 79 | 1,IDEA_KEY_LENGTH,IDEA_BLOCK, | ||
| 80 | idea_cfb_init_key, | ||
| 81 | idea_cfb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_idea_cfb() | ||
| 90 | { | ||
| 91 | return(&i_cfb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void idea_cfb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 107 | } | ||
| 108 | |||
| 109 | static void idea_cfb_cipher(ctx,out,in,inl) | ||
| 110 | EVP_CIPHER_CTX *ctx; | ||
| 111 | unsigned char *out; | ||
| 112 | unsigned char *in; | ||
| 113 | unsigned int inl; | ||
| 114 | { | ||
| 115 | idea_cfb64_encrypt( | ||
| 116 | in,out,(long)inl, | ||
| 117 | &(ctx->c.idea_ks),&(ctx->iv[0]), | ||
| 118 | &ctx->num,ctx->encrypt); | ||
| 119 | } | ||
| 120 | |||
| 121 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_r2.c b/src/lib/libssl/src/crypto/evp/e_cfb_r2.c new file mode 100644 index 0000000000..af5a39d1f4 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cfb_r2.c | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* crypto/evp/e_cfb_r2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void rc2_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void rc2_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void rc2_cfb_init_key(); | ||
| 73 | static void rc2_cfb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER r2_cfb_cipher= | ||
| 77 | { | ||
| 78 | NID_rc2_cfb64, | ||
| 79 | 1,EVP_RC2_KEY_SIZE,8, | ||
| 80 | rc2_cfb_init_key, | ||
| 81 | rc2_cfb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_rc2_cfb() | ||
| 90 | { | ||
| 91 | return(&r2_cfb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void rc2_cfb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | RC2_set_key(&(ctx->c.rc2_ks),EVP_RC2_KEY_SIZE,key, | ||
| 107 | EVP_RC2_KEY_SIZE*8); | ||
| 108 | } | ||
| 109 | |||
| 110 | static void rc2_cfb_cipher(ctx,out,in,inl) | ||
| 111 | EVP_CIPHER_CTX *ctx; | ||
| 112 | unsigned char *out; | ||
| 113 | unsigned char *in; | ||
| 114 | unsigned int inl; | ||
| 115 | { | ||
| 116 | RC2_cfb64_encrypt( | ||
| 117 | in,out, | ||
| 118 | (long)inl, &(ctx->c.rc2_ks), | ||
| 119 | &(ctx->iv[0]), | ||
| 120 | &ctx->num,ctx->encrypt); | ||
| 121 | } | ||
| 122 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_cfb_r5.c b/src/lib/libssl/src/crypto/evp/e_cfb_r5.c new file mode 100644 index 0000000000..a2fddaedc0 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_cfb_r5.c | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* crypto/evp/e_cfb_r5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void rc5_32_12_16_cfb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void rc5_32_12_16_cfb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void rc5_32_12_16_cfb_init_key(); | ||
| 73 | static void rc5_32_12_16_cfb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER rc5_cfb_cipher= | ||
| 77 | { | ||
| 78 | NID_rc5_cfb64, | ||
| 79 | 1,EVP_RC5_32_12_16_KEY_SIZE,8, | ||
| 80 | rc5_32_12_16_cfb_init_key, | ||
| 81 | rc5_32_12_16_cfb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_rc5_32_12_16_cfb() | ||
| 90 | { | ||
| 91 | return(&rc5_cfb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void rc5_32_12_16_cfb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key, | ||
| 107 | RC5_12_ROUNDS); | ||
| 108 | } | ||
| 109 | |||
| 110 | static void rc5_32_12_16_cfb_cipher(ctx,out,in,inl) | ||
| 111 | EVP_CIPHER_CTX *ctx; | ||
| 112 | unsigned char *out; | ||
| 113 | unsigned char *in; | ||
| 114 | unsigned int inl; | ||
| 115 | { | ||
| 116 | RC5_32_cfb64_encrypt( | ||
| 117 | in,out, | ||
| 118 | (long)inl, &(ctx->c.rc5_ks), | ||
| 119 | &(ctx->iv[0]), | ||
| 120 | &ctx->num,ctx->encrypt); | ||
| 121 | } | ||
| 122 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_3d.c b/src/lib/libssl/src/crypto/evp/e_ecb_3d.c new file mode 100644 index 0000000000..908fc0760a --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ecb_3d.c | |||
| @@ -0,0 +1,161 @@ | |||
| 1 | /* crypto/evp/e_ecb_3d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | #ifndef NOPROTO | ||
| 65 | static void des_ede_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ede3_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void des_ede_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void des_ede_init_key(); | ||
| 73 | static void des_ede3_init_key(); | ||
| 74 | static void des_ede_cipher(); | ||
| 75 | #endif | ||
| 76 | |||
| 77 | static EVP_CIPHER d_ede_cipher2= | ||
| 78 | { | ||
| 79 | NID_des_ede, | ||
| 80 | 8,16,0, | ||
| 81 | des_ede_init_key, | ||
| 82 | des_ede_cipher, | ||
| 83 | NULL, | ||
| 84 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 85 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 86 | NULL, | ||
| 87 | NULL, | ||
| 88 | }; | ||
| 89 | |||
| 90 | static EVP_CIPHER d_ede3_cipher3= | ||
| 91 | { | ||
| 92 | NID_des_ede3, | ||
| 93 | 8,24,0, | ||
| 94 | des_ede3_init_key, | ||
| 95 | des_ede_cipher, | ||
| 96 | NULL, | ||
| 97 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 98 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 99 | NULL, | ||
| 100 | }; | ||
| 101 | |||
| 102 | EVP_CIPHER *EVP_des_ede() | ||
| 103 | { | ||
| 104 | return(&d_ede_cipher2); | ||
| 105 | } | ||
| 106 | |||
| 107 | EVP_CIPHER *EVP_des_ede3() | ||
| 108 | { | ||
| 109 | return(&d_ede3_cipher3); | ||
| 110 | } | ||
| 111 | |||
| 112 | static void des_ede_init_key(ctx,key,iv,enc) | ||
| 113 | EVP_CIPHER_CTX *ctx; | ||
| 114 | unsigned char *key; | ||
| 115 | unsigned char *iv; | ||
| 116 | int enc; | ||
| 117 | { | ||
| 118 | if (key != NULL) | ||
| 119 | { | ||
| 120 | des_set_key((des_cblock *)key,ctx->c.des_ede.ks1); | ||
| 121 | des_set_key((des_cblock *)&(key[8]),ctx->c.des_ede.ks2); | ||
| 122 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 123 | (char *)ctx->c.des_ede.ks1, | ||
| 124 | sizeof(ctx->c.des_ede.ks1)); | ||
| 125 | } | ||
| 126 | } | ||
| 127 | |||
| 128 | static void des_ede3_init_key(ctx,key,iv,enc) | ||
| 129 | EVP_CIPHER_CTX *ctx; | ||
| 130 | unsigned char *key; | ||
| 131 | unsigned char *iv; | ||
| 132 | int enc; | ||
| 133 | { | ||
| 134 | if (key != NULL) | ||
| 135 | { | ||
| 136 | des_set_key((des_cblock *)key,ctx->c.des_ede.ks1); | ||
| 137 | des_set_key((des_cblock *)&(key[8]),ctx->c.des_ede.ks2); | ||
| 138 | des_set_key((des_cblock *)&(key[16]),ctx->c.des_ede.ks3); | ||
| 139 | } | ||
| 140 | } | ||
| 141 | |||
| 142 | static void des_ede_cipher(ctx,out,in,inl) | ||
| 143 | EVP_CIPHER_CTX *ctx; | ||
| 144 | unsigned char *out; | ||
| 145 | unsigned char *in; | ||
| 146 | unsigned int inl; | ||
| 147 | { | ||
| 148 | unsigned int i; | ||
| 149 | |||
| 150 | if (inl < 8) return; | ||
| 151 | inl-=8; | ||
| 152 | for (i=0; i<=inl; i+=8) | ||
| 153 | { | ||
| 154 | des_ecb3_encrypt( | ||
| 155 | (des_cblock *)&(in[i]),(des_cblock *)&(out[i]), | ||
| 156 | ctx->c.des_ede.ks1, | ||
| 157 | ctx->c.des_ede.ks2, | ||
| 158 | ctx->c.des_ede.ks3, | ||
| 159 | ctx->encrypt); | ||
| 160 | } | ||
| 161 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_bf.c b/src/lib/libssl/src/crypto/evp/e_ecb_bf.c new file mode 100644 index 0000000000..142a9d3123 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ecb_bf.c | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* crypto/evp/e_ecb_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BLOWFISH | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void bf_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void bf_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void bf_ecb_init_key(); | ||
| 73 | static void bf_ecb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER bfish_ecb_cipher= | ||
| 77 | { | ||
| 78 | NID_bf_ecb, | ||
| 79 | 8,EVP_BLOWFISH_KEY_SIZE,0, | ||
| 80 | bf_ecb_init_key, | ||
| 81 | bf_ecb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), | ||
| 85 | NULL, | ||
| 86 | NULL, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_bf_ecb() | ||
| 90 | { | ||
| 91 | return(&bfish_ecb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void bf_ecb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (key != NULL) | ||
| 101 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | ||
| 102 | } | ||
| 103 | |||
| 104 | static void bf_ecb_cipher(ctx,out,in,inl) | ||
| 105 | EVP_CIPHER_CTX *ctx; | ||
| 106 | unsigned char *out; | ||
| 107 | unsigned char *in; | ||
| 108 | unsigned int inl; | ||
| 109 | { | ||
| 110 | unsigned int i; | ||
| 111 | |||
| 112 | if (inl < 8) return; | ||
| 113 | inl-=8; | ||
| 114 | for (i=0; i<=inl; i+=8) | ||
| 115 | { | ||
| 116 | BF_ecb_encrypt( | ||
| 117 | &(in[i]),&(out[i]), | ||
| 118 | &(ctx->c.bf_ks),ctx->encrypt); | ||
| 119 | } | ||
| 120 | } | ||
| 121 | |||
| 122 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_c.c b/src/lib/libssl/src/crypto/evp/e_ecb_c.c new file mode 100644 index 0000000000..34e0c18296 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ecb_c.c | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* crypto/evp/e_ecb_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void cast_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void cast_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void cast_ecb_init_key(); | ||
| 73 | static void cast_ecb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER cast5_ecb_cipher= | ||
| 77 | { | ||
| 78 | NID_cast5_ecb, | ||
| 79 | 8,EVP_CAST5_KEY_SIZE,0, | ||
| 80 | cast_ecb_init_key, | ||
| 81 | cast_ecb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), | ||
| 85 | NULL, | ||
| 86 | NULL, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_cast5_ecb() | ||
| 90 | { | ||
| 91 | return(&cast5_ecb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void cast_ecb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (key != NULL) | ||
| 101 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | ||
| 102 | } | ||
| 103 | |||
| 104 | static void cast_ecb_cipher(ctx,out,in,inl) | ||
| 105 | EVP_CIPHER_CTX *ctx; | ||
| 106 | unsigned char *out; | ||
| 107 | unsigned char *in; | ||
| 108 | unsigned int inl; | ||
| 109 | { | ||
| 110 | unsigned int i; | ||
| 111 | |||
| 112 | if (inl < 8) return; | ||
| 113 | inl-=8; | ||
| 114 | for (i=0; i<=inl; i+=8) | ||
| 115 | { | ||
| 116 | CAST_ecb_encrypt( | ||
| 117 | &(in[i]),&(out[i]), | ||
| 118 | &(ctx->c.cast_ks),ctx->encrypt); | ||
| 119 | } | ||
| 120 | } | ||
| 121 | |||
| 122 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_d.c b/src/lib/libssl/src/crypto/evp/e_ecb_d.c new file mode 100644 index 0000000000..7a409d6459 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ecb_d.c | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | /* crypto/evp/e_ecb_d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | #ifndef NOPROTO | ||
| 65 | static void des_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | #else | ||
| 70 | static void des_ecb_init_key(); | ||
| 71 | static void des_ecb_cipher(); | ||
| 72 | #endif | ||
| 73 | |||
| 74 | static EVP_CIPHER d_ecb_cipher= | ||
| 75 | { | ||
| 76 | NID_des_ecb, | ||
| 77 | 8,8,0, | ||
| 78 | des_ecb_init_key, | ||
| 79 | des_ecb_cipher, | ||
| 80 | NULL, | ||
| 81 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 82 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)), | ||
| 83 | NULL, | ||
| 84 | NULL, | ||
| 85 | }; | ||
| 86 | |||
| 87 | EVP_CIPHER *EVP_des_ecb() | ||
| 88 | { | ||
| 89 | return(&d_ecb_cipher); | ||
| 90 | } | ||
| 91 | |||
| 92 | static void des_ecb_init_key(ctx,key,iv,enc) | ||
| 93 | EVP_CIPHER_CTX *ctx; | ||
| 94 | unsigned char *key; | ||
| 95 | unsigned char *iv; | ||
| 96 | int enc; | ||
| 97 | { | ||
| 98 | if (key != NULL) | ||
| 99 | des_set_key((des_cblock *)key,ctx->c.des_ks); | ||
| 100 | } | ||
| 101 | |||
| 102 | static void des_ecb_cipher(ctx,out,in,inl) | ||
| 103 | EVP_CIPHER_CTX *ctx; | ||
| 104 | unsigned char *out; | ||
| 105 | unsigned char *in; | ||
| 106 | unsigned int inl; | ||
| 107 | { | ||
| 108 | unsigned int i; | ||
| 109 | |||
| 110 | if (inl < 8) return; | ||
| 111 | inl-=8; | ||
| 112 | for (i=0; i<=inl; i+=8) | ||
| 113 | { | ||
| 114 | des_ecb_encrypt( | ||
| 115 | (des_cblock *)&(in[i]),(des_cblock *)&(out[i]), | ||
| 116 | ctx->c.des_ks,ctx->encrypt); | ||
| 117 | } | ||
| 118 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_i.c b/src/lib/libssl/src/crypto/evp/e_ecb_i.c new file mode 100644 index 0000000000..e24022a12c --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ecb_i.c | |||
| @@ -0,0 +1,133 @@ | |||
| 1 | /* crypto/evp/e_ecb_i.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void idea_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void idea_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void idea_ecb_init_key(); | ||
| 73 | static void idea_ecb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER i_ecb_cipher= | ||
| 77 | { | ||
| 78 | NID_idea_ecb, | ||
| 79 | 8,16,0, | ||
| 80 | idea_ecb_init_key, | ||
| 81 | idea_ecb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)), | ||
| 85 | NULL, | ||
| 86 | NULL, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_idea_ecb() | ||
| 90 | { | ||
| 91 | return(&i_ecb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void idea_ecb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (key != NULL) | ||
| 101 | { | ||
| 102 | if (enc) | ||
| 103 | idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 104 | else | ||
| 105 | { | ||
| 106 | IDEA_KEY_SCHEDULE tmp; | ||
| 107 | |||
| 108 | idea_set_encrypt_key(key,&tmp); | ||
| 109 | idea_set_decrypt_key(&tmp, &(ctx->c.idea_ks)); | ||
| 110 | memset((unsigned char *)&tmp,0, | ||
| 111 | sizeof(IDEA_KEY_SCHEDULE)); | ||
| 112 | } | ||
| 113 | } | ||
| 114 | } | ||
| 115 | |||
| 116 | static void idea_ecb_cipher(ctx,out,in,inl) | ||
| 117 | EVP_CIPHER_CTX *ctx; | ||
| 118 | unsigned char *out; | ||
| 119 | unsigned char *in; | ||
| 120 | unsigned int inl; | ||
| 121 | { | ||
| 122 | unsigned int i; | ||
| 123 | |||
| 124 | if (inl < 8) return; | ||
| 125 | inl-=8; | ||
| 126 | for (i=0; i<=inl; i+=8) | ||
| 127 | { | ||
| 128 | idea_ecb_encrypt( | ||
| 129 | &(in[i]),&(out[i]),&(ctx->c.idea_ks)); | ||
| 130 | } | ||
| 131 | } | ||
| 132 | |||
| 133 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_r2.c b/src/lib/libssl/src/crypto/evp/e_ecb_r2.c new file mode 100644 index 0000000000..e35b06dc6d --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ecb_r2.c | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* crypto/evp/e_ecb_r2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void rc2_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void rc2_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void rc2_ecb_init_key(); | ||
| 73 | static void rc2_ecb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER r2_ecb_cipher= | ||
| 77 | { | ||
| 78 | NID_rc2_ecb, | ||
| 79 | 8,EVP_RC2_KEY_SIZE,0, | ||
| 80 | rc2_ecb_init_key, | ||
| 81 | rc2_ecb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 85 | NULL, | ||
| 86 | NULL, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_rc2_ecb() | ||
| 90 | { | ||
| 91 | return(&r2_ecb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void rc2_ecb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (key != NULL) | ||
| 101 | RC2_set_key(&(ctx->c.rc2_ks),EVP_RC2_KEY_SIZE,key, | ||
| 102 | EVP_RC2_KEY_SIZE*8); | ||
| 103 | } | ||
| 104 | |||
| 105 | static void rc2_ecb_cipher(ctx,out,in,inl) | ||
| 106 | EVP_CIPHER_CTX *ctx; | ||
| 107 | unsigned char *out; | ||
| 108 | unsigned char *in; | ||
| 109 | unsigned int inl; | ||
| 110 | { | ||
| 111 | unsigned int i; | ||
| 112 | |||
| 113 | if (inl < 8) return; | ||
| 114 | inl-=8; | ||
| 115 | for (i=0; i<=inl; i+=8) | ||
| 116 | { | ||
| 117 | RC2_ecb_encrypt( | ||
| 118 | &(in[i]),&(out[i]), | ||
| 119 | &(ctx->c.rc2_ks),ctx->encrypt); | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ecb_r5.c b/src/lib/libssl/src/crypto/evp/e_ecb_r5.c new file mode 100644 index 0000000000..08f4a82651 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ecb_r5.c | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* crypto/evp/e_ecb_r5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void rc5_32_12_16_ecb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void rc5_32_12_16_ecb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void rc5_32_12_16_ecb_init_key(); | ||
| 73 | static void rc5_32_12_16_ecb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER rc5_ecb_cipher= | ||
| 77 | { | ||
| 78 | NID_rc5_ecb, | ||
| 79 | 8,EVP_RC5_32_12_16_KEY_SIZE,0, | ||
| 80 | rc5_32_12_16_ecb_init_key, | ||
| 81 | rc5_32_12_16_ecb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)), | ||
| 85 | NULL, | ||
| 86 | NULL, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_rc5_32_12_16_ecb() | ||
| 90 | { | ||
| 91 | return(&rc5_ecb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void rc5_32_12_16_ecb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | if (key != NULL) | ||
| 101 | RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key, | ||
| 102 | RC5_12_ROUNDS); | ||
| 103 | } | ||
| 104 | |||
| 105 | static void rc5_32_12_16_ecb_cipher(ctx,out,in,inl) | ||
| 106 | EVP_CIPHER_CTX *ctx; | ||
| 107 | unsigned char *out; | ||
| 108 | unsigned char *in; | ||
| 109 | unsigned int inl; | ||
| 110 | { | ||
| 111 | unsigned int i; | ||
| 112 | |||
| 113 | if (inl < 8) return; | ||
| 114 | inl-=8; | ||
| 115 | for (i=0; i<=inl; i+=8) | ||
| 116 | { | ||
| 117 | RC5_32_ecb_encrypt( | ||
| 118 | &(in[i]),&(out[i]), | ||
| 119 | &(ctx->c.rc5_ks),ctx->encrypt); | ||
| 120 | } | ||
| 121 | } | ||
| 122 | |||
| 123 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_3d.c b/src/lib/libssl/src/crypto/evp/e_ofb_3d.c new file mode 100644 index 0000000000..c3add18e93 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ofb_3d.c | |||
| @@ -0,0 +1,165 @@ | |||
| 1 | /* crypto/evp/e_ofb_3d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | #ifndef NOPROTO | ||
| 65 | static void des_ede_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ede3_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void des_ede_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void des_ede_ofb_init_key(); | ||
| 73 | static void des_ede3_ofb_init_key(); | ||
| 74 | static void des_ede_ofb_cipher(); | ||
| 75 | #endif | ||
| 76 | |||
| 77 | static EVP_CIPHER d_ede_ofb_cipher2= | ||
| 78 | { | ||
| 79 | NID_des_ede_ofb64, | ||
| 80 | 1,16,8, | ||
| 81 | des_ede_ofb_init_key, | ||
| 82 | des_ede_ofb_cipher, | ||
| 83 | NULL, | ||
| 84 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 85 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 86 | EVP_CIPHER_set_asn1_iv, | ||
| 87 | EVP_CIPHER_get_asn1_iv, | ||
| 88 | }; | ||
| 89 | |||
| 90 | static EVP_CIPHER d_ede3_ofb_cipher3= | ||
| 91 | { | ||
| 92 | NID_des_ede3_ofb64, | ||
| 93 | 1,24,8, | ||
| 94 | des_ede3_ofb_init_key, | ||
| 95 | des_ede_ofb_cipher, | ||
| 96 | NULL, | ||
| 97 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 98 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ede)), | ||
| 99 | EVP_CIPHER_set_asn1_iv, | ||
| 100 | EVP_CIPHER_get_asn1_iv, | ||
| 101 | }; | ||
| 102 | |||
| 103 | EVP_CIPHER *EVP_des_ede_ofb() | ||
| 104 | { | ||
| 105 | return(&d_ede_ofb_cipher2); | ||
| 106 | } | ||
| 107 | |||
| 108 | EVP_CIPHER *EVP_des_ede3_ofb() | ||
| 109 | { | ||
| 110 | return(&d_ede3_ofb_cipher3); | ||
| 111 | } | ||
| 112 | |||
| 113 | static void des_ede_ofb_init_key(ctx,key,iv,enc) | ||
| 114 | EVP_CIPHER_CTX *ctx; | ||
| 115 | unsigned char *key; | ||
| 116 | unsigned char *iv; | ||
| 117 | int enc; | ||
| 118 | { | ||
| 119 | ctx->num=0; | ||
| 120 | |||
| 121 | if (iv != NULL) | ||
| 122 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 123 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 124 | if (key != NULL) | ||
| 125 | { | ||
| 126 | des_set_key((des_cblock *)key,ctx->c.des_ede.ks1); | ||
| 127 | des_set_key((des_cblock *)&(key[8]),ctx->c.des_ede.ks2); | ||
| 128 | memcpy( (char *)ctx->c.des_ede.ks3, | ||
| 129 | (char *)ctx->c.des_ede.ks1, | ||
| 130 | sizeof(ctx->c.des_ede.ks1)); | ||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 134 | static void des_ede3_ofb_init_key(ctx,key,iv,enc) | ||
| 135 | EVP_CIPHER_CTX *ctx; | ||
| 136 | unsigned char *key; | ||
| 137 | unsigned char *iv; | ||
| 138 | int enc; | ||
| 139 | { | ||
| 140 | ctx->num=0; | ||
| 141 | |||
| 142 | if (iv != NULL) | ||
| 143 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 144 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 145 | if (key != NULL) | ||
| 146 | { | ||
| 147 | des_set_key((des_cblock *)key,ctx->c.des_ede.ks1); | ||
| 148 | des_set_key((des_cblock *)&(key[8]),ctx->c.des_ede.ks2); | ||
| 149 | des_set_key((des_cblock *)&(key[16]),ctx->c.des_ede.ks3); | ||
| 150 | } | ||
| 151 | } | ||
| 152 | |||
| 153 | static void des_ede_ofb_cipher(ctx,out,in,inl) | ||
| 154 | EVP_CIPHER_CTX *ctx; | ||
| 155 | unsigned char *out; | ||
| 156 | unsigned char *in; | ||
| 157 | unsigned int inl; | ||
| 158 | { | ||
| 159 | des_ede3_ofb64_encrypt( | ||
| 160 | in,out, | ||
| 161 | (long)inl, | ||
| 162 | ctx->c.des_ede.ks1, ctx->c.des_ede.ks2, ctx->c.des_ede.ks3, | ||
| 163 | (des_cblock *)&(ctx->iv[0]), | ||
| 164 | &ctx->num); | ||
| 165 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_bf.c b/src/lib/libssl/src/crypto/evp/e_ofb_bf.c new file mode 100644 index 0000000000..492f9b9082 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ofb_bf.c | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* crypto/evp/e_ofb_bf.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_BLOWFISH | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void bf_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void bf_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void bf_ofb_init_key(); | ||
| 73 | static void bf_ofb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER bfish_ofb_cipher= | ||
| 77 | { | ||
| 78 | NID_bf_ofb64, | ||
| 79 | 1,EVP_BLOWFISH_KEY_SIZE,8, | ||
| 80 | bf_ofb_init_key, | ||
| 81 | bf_ofb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.bf_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_bf_ofb() | ||
| 90 | { | ||
| 91 | return(&bfish_ofb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void bf_ofb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | BF_set_key(&(ctx->c.bf_ks),EVP_BLOWFISH_KEY_SIZE,key); | ||
| 107 | } | ||
| 108 | |||
| 109 | static void bf_ofb_cipher(ctx,out,in,inl) | ||
| 110 | EVP_CIPHER_CTX *ctx; | ||
| 111 | unsigned char *out; | ||
| 112 | unsigned char *in; | ||
| 113 | unsigned int inl; | ||
| 114 | { | ||
| 115 | BF_ofb64_encrypt( | ||
| 116 | in,out, | ||
| 117 | (long)inl, &(ctx->c.bf_ks), | ||
| 118 | &(ctx->iv[0]), | ||
| 119 | &ctx->num); | ||
| 120 | } | ||
| 121 | |||
| 122 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_c.c b/src/lib/libssl/src/crypto/evp/e_ofb_c.c new file mode 100644 index 0000000000..f1eef4469c --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ofb_c.c | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* crypto/evp/e_ofb_c.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_CAST | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void cast_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void cast_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void cast_ofb_init_key(); | ||
| 73 | static void cast_ofb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER cast5_ofb_cipher= | ||
| 77 | { | ||
| 78 | NID_cast5_ofb64, | ||
| 79 | 1,EVP_CAST5_KEY_SIZE,8, | ||
| 80 | cast_ofb_init_key, | ||
| 81 | cast_ofb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.cast_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_cast5_ofb() | ||
| 90 | { | ||
| 91 | return(&cast5_ofb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void cast_ofb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | CAST_set_key(&(ctx->c.cast_ks),EVP_CAST5_KEY_SIZE,key); | ||
| 107 | } | ||
| 108 | |||
| 109 | static void cast_ofb_cipher(ctx,out,in,inl) | ||
| 110 | EVP_CIPHER_CTX *ctx; | ||
| 111 | unsigned char *out; | ||
| 112 | unsigned char *in; | ||
| 113 | unsigned int inl; | ||
| 114 | { | ||
| 115 | CAST_ofb64_encrypt( | ||
| 116 | in,out, | ||
| 117 | (long)inl, &(ctx->c.cast_ks), | ||
| 118 | &(ctx->iv[0]), | ||
| 119 | &ctx->num); | ||
| 120 | } | ||
| 121 | |||
| 122 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_d.c b/src/lib/libssl/src/crypto/evp/e_ofb_d.c new file mode 100644 index 0000000000..09d4b4139d --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ofb_d.c | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | /* crypto/evp/e_ofb_d.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #include <stdio.h> | ||
| 60 | #include "cryptlib.h" | ||
| 61 | #include "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | #ifndef NOPROTO | ||
| 65 | static void des_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 66 | unsigned char *iv,int enc); | ||
| 67 | static void des_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 68 | unsigned char *in, unsigned int inl); | ||
| 69 | #else | ||
| 70 | static void des_ofb_init_key(); | ||
| 71 | static void des_ofb_cipher(); | ||
| 72 | #endif | ||
| 73 | |||
| 74 | static EVP_CIPHER d_ofb_cipher= | ||
| 75 | { | ||
| 76 | NID_des_ofb64, | ||
| 77 | 1,8,8, | ||
| 78 | des_ofb_init_key, | ||
| 79 | des_ofb_cipher, | ||
| 80 | NULL, | ||
| 81 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 82 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.des_ks)), | ||
| 83 | EVP_CIPHER_set_asn1_iv, | ||
| 84 | EVP_CIPHER_get_asn1_iv, | ||
| 85 | }; | ||
| 86 | |||
| 87 | EVP_CIPHER *EVP_des_ofb() | ||
| 88 | { | ||
| 89 | return(&d_ofb_cipher); | ||
| 90 | } | ||
| 91 | |||
| 92 | static void des_ofb_init_key(ctx,key,iv,enc) | ||
| 93 | EVP_CIPHER_CTX *ctx; | ||
| 94 | unsigned char *key; | ||
| 95 | unsigned char *iv; | ||
| 96 | int enc; | ||
| 97 | { | ||
| 98 | ctx->num=0; | ||
| 99 | |||
| 100 | if (iv != NULL) | ||
| 101 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 102 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 103 | if (key != NULL) | ||
| 104 | des_set_key((des_cblock *)key,ctx->c.des_ks); | ||
| 105 | } | ||
| 106 | |||
| 107 | static void des_ofb_cipher(ctx,out,in,inl) | ||
| 108 | EVP_CIPHER_CTX *ctx; | ||
| 109 | unsigned char *out; | ||
| 110 | unsigned char *in; | ||
| 111 | unsigned int inl; | ||
| 112 | { | ||
| 113 | des_ofb64_encrypt( | ||
| 114 | in,out, | ||
| 115 | (long)inl, ctx->c.des_ks, | ||
| 116 | (des_cblock *)&(ctx->iv[0]), | ||
| 117 | &ctx->num); | ||
| 118 | } | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_i.c b/src/lib/libssl/src/crypto/evp/e_ofb_i.c new file mode 100644 index 0000000000..96c8afd9c8 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ofb_i.c | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | /* crypto/evp/e_ofb_i.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_IDEA | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void idea_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void idea_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void idea_ofb_init_key(); | ||
| 73 | static void idea_ofb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER i_ofb_cipher= | ||
| 77 | { | ||
| 78 | NID_idea_ofb64, | ||
| 79 | 1,IDEA_KEY_LENGTH,IDEA_BLOCK, | ||
| 80 | idea_ofb_init_key, | ||
| 81 | idea_ofb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.idea_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_idea_ofb() | ||
| 90 | { | ||
| 91 | return(&i_ofb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void idea_ofb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | idea_set_encrypt_key(key,&(ctx->c.idea_ks)); | ||
| 107 | } | ||
| 108 | |||
| 109 | static void idea_ofb_cipher(ctx,out,in,inl) | ||
| 110 | EVP_CIPHER_CTX *ctx; | ||
| 111 | unsigned char *out; | ||
| 112 | unsigned char *in; | ||
| 113 | unsigned int inl; | ||
| 114 | { | ||
| 115 | idea_ofb64_encrypt( | ||
| 116 | in,out,(long)inl, | ||
| 117 | &(ctx->c.idea_ks),&(ctx->iv[0]), | ||
| 118 | &ctx->num); | ||
| 119 | } | ||
| 120 | |||
| 121 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_r2.c b/src/lib/libssl/src/crypto/evp/e_ofb_r2.c new file mode 100644 index 0000000000..0f6d729988 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ofb_r2.c | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* crypto/evp/e_ofb_r2.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC2 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void rc2_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void rc2_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void rc2_ofb_init_key(); | ||
| 73 | static void rc2_ofb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER r2_ofb_cipher= | ||
| 77 | { | ||
| 78 | NID_rc2_ofb64, | ||
| 79 | 1,EVP_RC2_KEY_SIZE,8, | ||
| 80 | rc2_ofb_init_key, | ||
| 81 | rc2_ofb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc2_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_rc2_ofb() | ||
| 90 | { | ||
| 91 | return(&r2_ofb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void rc2_ofb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | RC2_set_key(&(ctx->c.rc2_ks),EVP_RC2_KEY_SIZE,key, | ||
| 107 | EVP_RC2_KEY_SIZE*8); | ||
| 108 | } | ||
| 109 | |||
| 110 | static void rc2_ofb_cipher(ctx,out,in,inl) | ||
| 111 | EVP_CIPHER_CTX *ctx; | ||
| 112 | unsigned char *out; | ||
| 113 | unsigned char *in; | ||
| 114 | unsigned int inl; | ||
| 115 | { | ||
| 116 | RC2_ofb64_encrypt( | ||
| 117 | in,out, | ||
| 118 | (long)inl, &(ctx->c.rc2_ks), | ||
| 119 | &(ctx->iv[0]), | ||
| 120 | &ctx->num); | ||
| 121 | } | ||
| 122 | |||
| 123 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/e_ofb_r5.c b/src/lib/libssl/src/crypto/evp/e_ofb_r5.c new file mode 100644 index 0000000000..db28d6c317 --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/e_ofb_r5.c | |||
| @@ -0,0 +1,123 @@ | |||
| 1 | /* crypto/evp/e_ofb_r5.c */ | ||
| 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | ||
| 3 | * All rights reserved. | ||
| 4 | * | ||
| 5 | * This package is an SSL implementation written | ||
| 6 | * by Eric Young (eay@cryptsoft.com). | ||
| 7 | * The implementation was written so as to conform with Netscapes SSL. | ||
| 8 | * | ||
| 9 | * This library is free for commercial and non-commercial use as long as | ||
| 10 | * the following conditions are aheared to. The following conditions | ||
| 11 | * apply to all code found in this distribution, be it the RC4, RSA, | ||
| 12 | * lhash, DES, etc., code; not just the SSL code. The SSL documentation | ||
| 13 | * included with this distribution is covered by the same copyright terms | ||
| 14 | * except that the holder is Tim Hudson (tjh@cryptsoft.com). | ||
| 15 | * | ||
| 16 | * Copyright remains Eric Young's, and as such any Copyright notices in | ||
| 17 | * the code are not to be removed. | ||
| 18 | * If this package is used in a product, Eric Young should be given attribution | ||
| 19 | * as the author of the parts of the library used. | ||
| 20 | * This can be in the form of a textual message at program startup or | ||
| 21 | * in documentation (online or textual) provided with the package. | ||
| 22 | * | ||
| 23 | * Redistribution and use in source and binary forms, with or without | ||
| 24 | * modification, are permitted provided that the following conditions | ||
| 25 | * are met: | ||
| 26 | * 1. Redistributions of source code must retain the copyright | ||
| 27 | * notice, this list of conditions and the following disclaimer. | ||
| 28 | * 2. Redistributions in binary form must reproduce the above copyright | ||
| 29 | * notice, this list of conditions and the following disclaimer in the | ||
| 30 | * documentation and/or other materials provided with the distribution. | ||
| 31 | * 3. All advertising materials mentioning features or use of this software | ||
| 32 | * must display the following acknowledgement: | ||
| 33 | * "This product includes cryptographic software written by | ||
| 34 | * Eric Young (eay@cryptsoft.com)" | ||
| 35 | * The word 'cryptographic' can be left out if the rouines from the library | ||
| 36 | * being used are not cryptographic related :-). | ||
| 37 | * 4. If you include any Windows specific code (or a derivative thereof) from | ||
| 38 | * the apps directory (application code) you must include an acknowledgement: | ||
| 39 | * "This product includes software written by Tim Hudson (tjh@cryptsoft.com)" | ||
| 40 | * | ||
| 41 | * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND | ||
| 42 | * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| 43 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE | ||
| 44 | * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE | ||
| 45 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| 46 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS | ||
| 47 | * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) | ||
| 48 | * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 49 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY | ||
| 50 | * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF | ||
| 51 | * SUCH DAMAGE. | ||
| 52 | * | ||
| 53 | * The licence and distribution terms for any publically available version or | ||
| 54 | * derivative of this code cannot be changed. i.e. this code cannot simply be | ||
| 55 | * copied and put under another distribution licence | ||
| 56 | * [including the GNU Public Licence.] | ||
| 57 | */ | ||
| 58 | |||
| 59 | #ifndef NO_RC5 | ||
| 60 | |||
| 61 | #include <stdio.h> | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "evp.h" | ||
| 64 | #include "objects.h" | ||
| 65 | |||
| 66 | #ifndef NOPROTO | ||
| 67 | static void rc5_32_12_16_ofb_init_key(EVP_CIPHER_CTX *ctx, unsigned char *key, | ||
| 68 | unsigned char *iv,int enc); | ||
| 69 | static void rc5_32_12_16_ofb_cipher(EVP_CIPHER_CTX *ctx, unsigned char *out, | ||
| 70 | unsigned char *in, unsigned int inl); | ||
| 71 | #else | ||
| 72 | static void rc5_32_12_16_ofb_init_key(); | ||
| 73 | static void rc5_32_12_16_ofb_cipher(); | ||
| 74 | #endif | ||
| 75 | |||
| 76 | static EVP_CIPHER rc5_ofb_cipher= | ||
| 77 | { | ||
| 78 | NID_rc5_ofb64, | ||
| 79 | 1,EVP_RC5_32_12_16_KEY_SIZE,8, | ||
| 80 | rc5_32_12_16_ofb_init_key, | ||
| 81 | rc5_32_12_16_ofb_cipher, | ||
| 82 | NULL, | ||
| 83 | sizeof(EVP_CIPHER_CTX)-sizeof((((EVP_CIPHER_CTX *)NULL)->c))+ | ||
| 84 | sizeof((((EVP_CIPHER_CTX *)NULL)->c.rc5_ks)), | ||
| 85 | EVP_CIPHER_set_asn1_iv, | ||
| 86 | EVP_CIPHER_get_asn1_iv, | ||
| 87 | }; | ||
| 88 | |||
| 89 | EVP_CIPHER *EVP_rc5_32_12_16_ofb() | ||
| 90 | { | ||
| 91 | return(&rc5_ofb_cipher); | ||
| 92 | } | ||
| 93 | |||
| 94 | static void rc5_32_12_16_ofb_init_key(ctx,key,iv,enc) | ||
| 95 | EVP_CIPHER_CTX *ctx; | ||
| 96 | unsigned char *key; | ||
| 97 | unsigned char *iv; | ||
| 98 | int enc; | ||
| 99 | { | ||
| 100 | ctx->num=0; | ||
| 101 | |||
| 102 | if (iv != NULL) | ||
| 103 | memcpy(&(ctx->oiv[0]),iv,8); | ||
| 104 | memcpy(&(ctx->iv[0]),&(ctx->oiv[0]),8); | ||
| 105 | if (key != NULL) | ||
| 106 | RC5_32_set_key(&(ctx->c.rc5_ks),EVP_RC5_32_12_16_KEY_SIZE,key, | ||
| 107 | RC5_12_ROUNDS); | ||
| 108 | } | ||
| 109 | |||
| 110 | static void rc5_32_12_16_ofb_cipher(ctx,out,in,inl) | ||
| 111 | EVP_CIPHER_CTX *ctx; | ||
| 112 | unsigned char *out; | ||
| 113 | unsigned char *in; | ||
| 114 | unsigned int inl; | ||
| 115 | { | ||
| 116 | RC5_32_ofb64_encrypt( | ||
| 117 | in,out, | ||
| 118 | (long)inl, &(ctx->c.rc5_ks), | ||
| 119 | &(ctx->iv[0]), | ||
| 120 | &ctx->num); | ||
| 121 | } | ||
| 122 | |||
| 123 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/evp/evp.err b/src/lib/libssl/src/crypto/evp/evp.err new file mode 100644 index 0000000000..cfc17437bc --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/evp.err | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | /* Error codes for the EVP functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define EVP_F_D2I_PKEY 100 | ||
| 5 | #define EVP_F_EVP_DECRYPTFINAL 101 | ||
| 6 | #define EVP_F_EVP_OPENINIT 102 | ||
| 7 | #define EVP_F_EVP_PKEY_COPY_PARAMETERS 103 | ||
| 8 | #define EVP_F_EVP_PKEY_DECRYPT 104 | ||
| 9 | #define EVP_F_EVP_PKEY_ENCRYPT 105 | ||
| 10 | #define EVP_F_EVP_PKEY_NEW 106 | ||
| 11 | #define EVP_F_EVP_SIGNFINAL 107 | ||
| 12 | #define EVP_F_EVP_VERIFYFINAL 108 | ||
| 13 | |||
| 14 | /* Reason codes. */ | ||
| 15 | #define EVP_R_BAD_DECRYPT 100 | ||
| 16 | #define EVP_R_DIFFERENT_KEY_TYPES 101 | ||
| 17 | #define EVP_R_IV_TOO_LARGE 102 | ||
| 18 | #define EVP_R_MISSING_PARMATERS 103 | ||
| 19 | #define EVP_R_NO_SIGN_FUNCTION_CONFIGURED 104 | ||
| 20 | #define EVP_R_NO_VERIFY_FUNCTION_CONFIGURED 105 | ||
| 21 | #define EVP_R_PUBLIC_KEY_NOT_RSA 106 | ||
| 22 | #define EVP_R_UNSUPPORTED_CIPHER 107 | ||
| 23 | #define EVP_R_WRONG_FINAL_BLOCK_LENGTH 108 | ||
| 24 | #define EVP_R_WRONG_PUBLIC_KEY_TYPE 109 | ||
diff --git a/src/lib/libssl/src/crypto/evp/pk_lib.c b/src/lib/libssl/src/crypto/evp/pk_lib.c new file mode 100644 index 0000000000..08f9fabbae --- /dev/null +++ b/src/lib/libssl/src/crypto/evp/pk_lib.c | |||
| @@ -0,0 +1,82 @@ | |||
| 1 | /* crypto/evp/pk_lib.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 "evp.h" | ||
| 62 | #include "objects.h" | ||
| 63 | |||
| 64 | static LHASH *pk_md=NULL; | ||
| 65 | |||
| 66 | static LHASH *pk_md=NULL; | ||
| 67 | |||
| 68 | int EVP_add_pkey_md(oid,pkm,md) | ||
| 69 | int oid; | ||
| 70 | EVP_PKEY_METHOD *pkm; | ||
| 71 | EVP_MD *md; | ||
| 72 | { | ||
| 73 | } | ||
| 74 | |||
| 75 | EVP_add_pkey(pkm) | ||
| 76 | EVP_PKEY_METHOD *pkm; | ||
| 77 | { | ||
| 78 | } | ||
| 79 | |||
| 80 | EVP_PKEY_METHOD:q | ||
| 81 | |||
| 82 | |||
diff --git a/src/lib/libssl/src/crypto/hmac/Makefile.ssl b/src/lib/libssl/src/crypto/hmac/Makefile.ssl new file mode 100644 index 0000000000..7a042b7261 --- /dev/null +++ b/src/lib/libssl/src/crypto/hmac/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/md/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= hmac | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST=hmactest.c | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=hmac.c | ||
| 24 | LIBOBJ=hmac.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= hmac.h | ||
| 29 | HEADER= $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/idea/Makefile.ssl b/src/lib/libssl/src/crypto/idea/Makefile.ssl new file mode 100644 index 0000000000..41b42ce03b --- /dev/null +++ b/src/lib/libssl/src/crypto/idea/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/idea/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= idea | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST=ideatest.c | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=i_cbc.c i_cfb64.c i_ofb64.c i_ecb.c i_skey.c | ||
| 24 | LIBOBJ=i_cbc.o i_cfb64.o i_ofb64.o i_ecb.o i_skey.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= idea.h | ||
| 29 | HEADER= idea_lcl.h $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/lhash/Makefile.ssl b/src/lib/libssl/src/crypto/lhash/Makefile.ssl new file mode 100644 index 0000000000..cb08547b4f --- /dev/null +++ b/src/lib/libssl/src/crypto/lhash/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/lhash/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= lhash | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST= | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=lhash.c lh_stats.c | ||
| 24 | LIBOBJ=lhash.o lh_stats.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= lhash.h | ||
| 29 | HEADER= $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/libvms.com b/src/lib/libssl/src/crypto/libvms.com new file mode 100644 index 0000000000..44f90c65b0 --- /dev/null +++ b/src/lib/libssl/src/crypto/libvms.com | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | $! | ||
| 2 | $! Compile crypto.c as several subset modules and insert in crypto-xxx.olb. | ||
| 3 | $! If P1 is specifed, it specifies alternate list of subsets to compile. | ||
| 4 | $! | ||
| 5 | $ libname = "CRYPTO-AXP.OLB" | ||
| 6 | $ subset_list = "LIB,ASN1,BN,BUFFER,CONF,DES,DH,DSA,ERROR,EVP,IDEA,LHASH,MD," + - | ||
| 7 | "METH,OBJECTS,PEM,RAND,RC,RSA,SHA,STACK,TXT_DB,X509" | ||
| 8 | $ if p1 .nes. "" then subset_list = p1 | ||
| 9 | $! | ||
| 10 | $ if f$getsyi("CPU") .lt. 128 then libname = "CRYPTO-VAX.OLB" | ||
| 11 | $ if f$search(libname) .eqs. "" then library/create/object/log 'libname' | ||
| 12 | $! | ||
| 13 | $ cc = "cc/include=[-.include]/prefix=all" + P2 | ||
| 14 | $! | ||
| 15 | $ i = 0 | ||
| 16 | $ next_subset: | ||
| 17 | $ subset = f$element(i,",",subset_list) | ||
| 18 | $ if subset .eqs. "," then goto done | ||
| 19 | $ i = i + 1 | ||
| 20 | $ create crypto_'subset'.subset | ||
| 21 | #include "crypto.c" | ||
| 22 | $ ofile = "sys$disk:[]crypto_" + subset + ".obj" | ||
| 23 | $ on warning then goto next_subset | ||
| 24 | $ write sys$output "Compiling ", ofile | ||
| 25 | $ cc /object='ofile' crypto_'subset'.subset - | ||
| 26 | /define=(CRYPTO_SUBSET,CRYPTO_'subset'_SUBSET) | ||
| 27 | $ library/replace/log 'libname'/module=CRYPTO_'subset' 'ofile' | ||
| 28 | $ goto next_subset | ||
| 29 | $! | ||
| 30 | $ done: | ||
| 31 | $ exit | ||
diff --git a/src/lib/libssl/src/crypto/md2/Makefile.ssl b/src/lib/libssl/src/crypto/md2/Makefile.ssl new file mode 100644 index 0000000000..d8e7200c83 --- /dev/null +++ b/src/lib/libssl/src/crypto/md2/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/md/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= md | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST=md2test.c | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=md2_dgst.c md5_one.c | ||
| 24 | LIBOBJ=md2_dgst.o md2_one.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= md2.h | ||
| 29 | HEADER= $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/md2/md2.org b/src/lib/libssl/src/crypto/md2/md2.org new file mode 100644 index 0000000000..9f39933790 --- /dev/null +++ b/src/lib/libssl/src/crypto/md2/md2.org | |||
| @@ -0,0 +1,106 @@ | |||
| 1 | /* crypto/md/md2.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify md2.org since md2.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | |||
| 68 | #ifndef HEADER_MD2_H | ||
| 69 | #define HEADER_MD2_H | ||
| 70 | |||
| 71 | #ifdef __cplusplus | ||
| 72 | extern "C" { | ||
| 73 | #endif | ||
| 74 | |||
| 75 | #define MD2_DIGEST_LENGTH 16 | ||
| 76 | #define MD2_BLOCK 16 | ||
| 77 | |||
| 78 | #define MD2_INT unsigned int | ||
| 79 | |||
| 80 | typedef struct MD2state_st | ||
| 81 | { | ||
| 82 | int num; | ||
| 83 | unsigned char data[MD2_BLOCK]; | ||
| 84 | MD2_INT cksm[MD2_BLOCK]; | ||
| 85 | MD2_INT state[MD2_BLOCK]; | ||
| 86 | } MD2_CTX; | ||
| 87 | |||
| 88 | #ifndef NOPROTO | ||
| 89 | char *MD2_options(void); | ||
| 90 | void MD2_Init(MD2_CTX *c); | ||
| 91 | void MD2_Update(MD2_CTX *c, register unsigned char *data, unsigned long len); | ||
| 92 | void MD2_Final(unsigned char *md, MD2_CTX *c); | ||
| 93 | unsigned char *MD2(unsigned char *d, unsigned long n,unsigned char *md); | ||
| 94 | #else | ||
| 95 | char *MD2_options(); | ||
| 96 | void MD2_Init(); | ||
| 97 | void MD2_Update(); | ||
| 98 | void MD2_Final(); | ||
| 99 | unsigned char *MD2(); | ||
| 100 | #endif | ||
| 101 | |||
| 102 | #ifdef __cplusplus | ||
| 103 | } | ||
| 104 | #endif | ||
| 105 | |||
| 106 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/md5/Makefile.ssl b/src/lib/libssl/src/crypto/md5/Makefile.ssl new file mode 100644 index 0000000000..47e1ce05ca --- /dev/null +++ b/src/lib/libssl/src/crypto/md5/Makefile.ssl | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/md5/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= md5 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | CPP= $(CC) -E | ||
| 9 | INCLUDES= | ||
| 10 | CFLAG=-g | ||
| 11 | INSTALLTOP=/usr/local/ssl | ||
| 12 | MAKE= make -f Makefile.ssl | ||
| 13 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 14 | MAKEFILE= Makefile.ssl | ||
| 15 | AR= ar r | ||
| 16 | |||
| 17 | MD5_ASM_OBJ= | ||
| 18 | |||
| 19 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 20 | |||
| 21 | GENERAL=Makefile | ||
| 22 | TEST=md5test.c | ||
| 23 | APPS=md5.c | ||
| 24 | |||
| 25 | LIB=$(TOP)/libcrypto.a | ||
| 26 | LIBSRC=md5_dgst.c md5_one.c | ||
| 27 | LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ) | ||
| 28 | |||
| 29 | SRC= $(LIBSRC) | ||
| 30 | |||
| 31 | EXHEADER= md5.h | ||
| 32 | HEADER= md5_locl.h $(EXHEADER) | ||
| 33 | |||
| 34 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 35 | |||
| 36 | top: | ||
| 37 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 38 | |||
| 39 | all: lib | ||
| 40 | |||
| 41 | lib: $(LIBOBJ) | ||
| 42 | $(AR) $(LIB) $(LIBOBJ) | ||
| 43 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 44 | @touch lib | ||
| 45 | |||
| 46 | # elf | ||
| 47 | asm/mx86-elf.o: asm/mx86unix.cpp | ||
| 48 | $(CPP) -DELF asm/mx86unix.cpp | as -o asm/mx86-elf.o | ||
| 49 | |||
| 50 | # solaris | ||
| 51 | asm/mx86-sol.o: asm/mx86unix.cpp | ||
| 52 | $(CC) -E -DSOL asm/mx86unix.cpp | sed 's/^#.*//' > asm/mx86-sol.s | ||
| 53 | as -o asm/mx86-sol.o asm/mx86-sol.s | ||
| 54 | rm -f asm/mx86-sol.s | ||
| 55 | |||
| 56 | # a.out | ||
| 57 | asm/mx86-out.o: asm/mx86unix.cpp | ||
| 58 | $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o | ||
| 59 | |||
| 60 | # bsdi | ||
| 61 | asm/mx86bsdi.o: asm/mx86unix.cpp | ||
| 62 | $(CPP) -DBSDI asm/mx86unix.cpp | as -o asm/mx86bsdi.o | ||
| 63 | |||
| 64 | asm/mx86unix.cpp: | ||
| 65 | (cd asm; perl md5-586.pl cpp >mx86unix.cpp) | ||
| 66 | |||
| 67 | files: | ||
| 68 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 69 | |||
| 70 | links: | ||
| 71 | /bin/rm -f Makefile | ||
| 72 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 73 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 74 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 75 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 76 | |||
| 77 | install: | ||
| 78 | @for i in $(EXHEADER) ; \ | ||
| 79 | do \ | ||
| 80 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 81 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 82 | done; | ||
| 83 | |||
| 84 | tags: | ||
| 85 | ctags $(SRC) | ||
| 86 | |||
| 87 | tests: | ||
| 88 | |||
| 89 | lint: | ||
| 90 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 91 | |||
| 92 | depend: | ||
| 93 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 94 | |||
| 95 | dclean: | ||
| 96 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 97 | mv -f Makefile.new $(MAKEFILE) | ||
| 98 | |||
| 99 | clean: | ||
| 100 | /bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 101 | |||
| 102 | errors: | ||
| 103 | |||
| 104 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/md5/Makefile.uni b/src/lib/libssl/src/crypto/md5/Makefile.uni new file mode 100644 index 0000000000..54685712db --- /dev/null +++ b/src/lib/libssl/src/crypto/md5/Makefile.uni | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | # Targets | ||
| 2 | # make - twidle the options yourself :-) | ||
| 3 | # make cc - standard cc options | ||
| 4 | # make gcc - standard gcc options | ||
| 5 | # make x86-elf - linux-elf etc | ||
| 6 | # make x86-out - linux-a.out, FreeBSD etc | ||
| 7 | # make x86-solaris | ||
| 8 | # make x86-bdsi | ||
| 9 | |||
| 10 | DIR= md5 | ||
| 11 | TOP= . | ||
| 12 | CC= gcc | ||
| 13 | CFLAG= -O3 -fomit-frame-pointer | ||
| 14 | |||
| 15 | CPP= $(CC) -E | ||
| 16 | INCLUDES= | ||
| 17 | INSTALLTOP=/usr/local/lib | ||
| 18 | MAKE= make | ||
| 19 | MAKEDEPEND= makedepend | ||
| 20 | MAKEFILE= Makefile.uni | ||
| 21 | AR= ar r | ||
| 22 | |||
| 23 | MD5_ASM_OBJ= | ||
| 24 | |||
| 25 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 26 | |||
| 27 | GENERAL=Makefile | ||
| 28 | TEST=md5test | ||
| 29 | APPS=md5 | ||
| 30 | |||
| 31 | LIB=libmd5.a | ||
| 32 | LIBSRC=md5_dgst.c md5_one.c | ||
| 33 | LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ) | ||
| 34 | |||
| 35 | SRC= $(LIBSRC) | ||
| 36 | |||
| 37 | EXHEADER= md5.h | ||
| 38 | HEADER= md5_locl.h $(EXHEADER) | ||
| 39 | |||
| 40 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 41 | |||
| 42 | all: $(LIB) $(TEST) $(APPS) | ||
| 43 | |||
| 44 | $(LIB): $(LIBOBJ) | ||
| 45 | $(AR) $(LIB) $(LIBOBJ) | ||
| 46 | sh $(TOP)/ranlib.sh $(LIB) | ||
| 47 | |||
| 48 | # elf | ||
| 49 | asm/mx86-elf.o: asm/mx86unix.cpp | ||
| 50 | $(CPP) -DELF asm/mx86unix.cpp | as -o asm/mx86-elf.o | ||
| 51 | |||
| 52 | # solaris | ||
| 53 | asm/mx86-sol.o: asm/mx86unix.cpp | ||
| 54 | $(CC) -E -DSOL asm/mx86unix.cpp | sed 's/^#.*//' > asm/mx86-sol.s | ||
| 55 | as -o asm/mx86-sol.o asm/mx86-sol.s | ||
| 56 | rm -f asm/mx86-sol.s | ||
| 57 | |||
| 58 | # a.out | ||
| 59 | asm/mx86-out.o: asm/mx86unix.cpp | ||
| 60 | $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o | ||
| 61 | |||
| 62 | # bsdi | ||
| 63 | asm/mx86bsdi.o: asm/mx86unix.cpp | ||
| 64 | $(CPP) -DBSDI asm/mx86unix.cpp | as -o asm/mx86bsdi.o | ||
| 65 | |||
| 66 | asm/mx86unix.cpp: | ||
| 67 | (cd asm; perl md5-586.pl cpp >mx86unix.cpp) | ||
| 68 | |||
| 69 | test: $(TEST) | ||
| 70 | ./$(TEST) | ||
| 71 | |||
| 72 | $(TEST): $(TEST).c $(LIB) | ||
| 73 | $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB) | ||
| 74 | |||
| 75 | $(APPS): $(APPS).c $(LIB) | ||
| 76 | $(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB) | ||
| 77 | |||
| 78 | lint: | ||
| 79 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 80 | |||
| 81 | depend: | ||
| 82 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 83 | |||
| 84 | dclean: | ||
| 85 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 86 | mv -f Makefile.new $(MAKEFILE) | ||
| 87 | |||
| 88 | clean: | ||
| 89 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 90 | |||
| 91 | cc: | ||
| 92 | $(MAKE) MD5_ASM_OBJ="" CC="cc" CFLAG="-O" all | ||
| 93 | |||
| 94 | gcc: | ||
| 95 | $(MAKE) MD5_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
| 96 | |||
| 97 | x86-elf: | ||
| 98 | $(MAKE) MD5_ASM_OBJ="asm/mx86-elf.o" CFLAG="-DELF -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 99 | |||
| 100 | x86-out: | ||
| 101 | $(MAKE) MD5_ASM_OBJ="asm/mx86-out.o" CFLAG="-DOUT -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 102 | |||
| 103 | x86-solaris: | ||
| 104 | $(MAKE) MD5_ASM_OBJ="asm/mx86-sol.o" CFLAG="-DSOL -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 105 | |||
| 106 | x86-bdsi: | ||
| 107 | $(MAKE) MD5_ASM_OBJ="asm/mx86-bdsi.o" CFLAG="-DBDSI -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 108 | |||
| 109 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/md5/asm/m5-win32.asm b/src/lib/libssl/src/crypto/md5/asm/m5-win32.asm new file mode 100644 index 0000000000..c2081da746 --- /dev/null +++ b/src/lib/libssl/src/crypto/md5/asm/m5-win32.asm | |||
| @@ -0,0 +1,686 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by md5-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE md5-586.asm | ||
| 8 | .386 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _md5_block_x86 | ||
| 12 | |||
| 13 | _md5_block_x86 PROC NEAR | ||
| 14 | push esi | ||
| 15 | push edi | ||
| 16 | mov edi, DWORD PTR 12[esp] | ||
| 17 | mov esi, DWORD PTR 16[esp] | ||
| 18 | mov ecx, DWORD PTR 20[esp] | ||
| 19 | push ebp | ||
| 20 | push ebx | ||
| 21 | add ecx, esi | ||
| 22 | sub ecx, 64 | ||
| 23 | mov eax, DWORD PTR [edi] | ||
| 24 | push ecx | ||
| 25 | mov ebx, DWORD PTR 4[edi] | ||
| 26 | mov ecx, DWORD PTR 8[edi] | ||
| 27 | mov edx, DWORD PTR 12[edi] | ||
| 28 | L000start: | ||
| 29 | ; | ||
| 30 | ; R0 section | ||
| 31 | mov edi, ecx | ||
| 32 | mov ebp, DWORD PTR [esi] | ||
| 33 | ; R0 0 | ||
| 34 | xor edi, edx | ||
| 35 | and edi, ebx | ||
| 36 | lea eax, DWORD PTR 3614090360[ebp*1+eax] | ||
| 37 | mov ebp, DWORD PTR 4[esi] | ||
| 38 | xor edi, edx | ||
| 39 | add eax, edi | ||
| 40 | mov edi, ebx | ||
| 41 | rol eax, 7 | ||
| 42 | add eax, ebx | ||
| 43 | ; R0 1 | ||
| 44 | xor edi, ecx | ||
| 45 | and edi, eax | ||
| 46 | lea edx, DWORD PTR 3905402710[ebp*1+edx] | ||
| 47 | mov ebp, DWORD PTR 8[esi] | ||
| 48 | xor edi, ecx | ||
| 49 | add edx, edi | ||
| 50 | mov edi, eax | ||
| 51 | rol edx, 12 | ||
| 52 | add edx, eax | ||
| 53 | ; R0 2 | ||
| 54 | xor edi, ebx | ||
| 55 | and edi, edx | ||
| 56 | lea ecx, DWORD PTR 606105819[ebp*1+ecx] | ||
| 57 | mov ebp, DWORD PTR 12[esi] | ||
| 58 | xor edi, ebx | ||
| 59 | add ecx, edi | ||
| 60 | mov edi, edx | ||
| 61 | rol ecx, 17 | ||
| 62 | add ecx, edx | ||
| 63 | ; R0 3 | ||
| 64 | xor edi, eax | ||
| 65 | and edi, ecx | ||
| 66 | lea ebx, DWORD PTR 3250441966[ebp*1+ebx] | ||
| 67 | mov ebp, DWORD PTR 16[esi] | ||
| 68 | xor edi, eax | ||
| 69 | add ebx, edi | ||
| 70 | mov edi, ecx | ||
| 71 | rol ebx, 22 | ||
| 72 | add ebx, ecx | ||
| 73 | ; R0 4 | ||
| 74 | xor edi, edx | ||
| 75 | and edi, ebx | ||
| 76 | lea eax, DWORD PTR 4118548399[ebp*1+eax] | ||
| 77 | mov ebp, DWORD PTR 20[esi] | ||
| 78 | xor edi, edx | ||
| 79 | add eax, edi | ||
| 80 | mov edi, ebx | ||
| 81 | rol eax, 7 | ||
| 82 | add eax, ebx | ||
| 83 | ; R0 5 | ||
| 84 | xor edi, ecx | ||
| 85 | and edi, eax | ||
| 86 | lea edx, DWORD PTR 1200080426[ebp*1+edx] | ||
| 87 | mov ebp, DWORD PTR 24[esi] | ||
| 88 | xor edi, ecx | ||
| 89 | add edx, edi | ||
| 90 | mov edi, eax | ||
| 91 | rol edx, 12 | ||
| 92 | add edx, eax | ||
| 93 | ; R0 6 | ||
| 94 | xor edi, ebx | ||
| 95 | and edi, edx | ||
| 96 | lea ecx, DWORD PTR 2821735955[ebp*1+ecx] | ||
| 97 | mov ebp, DWORD PTR 28[esi] | ||
| 98 | xor edi, ebx | ||
| 99 | add ecx, edi | ||
| 100 | mov edi, edx | ||
| 101 | rol ecx, 17 | ||
| 102 | add ecx, edx | ||
| 103 | ; R0 7 | ||
| 104 | xor edi, eax | ||
| 105 | and edi, ecx | ||
| 106 | lea ebx, DWORD PTR 4249261313[ebp*1+ebx] | ||
| 107 | mov ebp, DWORD PTR 32[esi] | ||
| 108 | xor edi, eax | ||
| 109 | add ebx, edi | ||
| 110 | mov edi, ecx | ||
| 111 | rol ebx, 22 | ||
| 112 | add ebx, ecx | ||
| 113 | ; R0 8 | ||
| 114 | xor edi, edx | ||
| 115 | and edi, ebx | ||
| 116 | lea eax, DWORD PTR 1770035416[ebp*1+eax] | ||
| 117 | mov ebp, DWORD PTR 36[esi] | ||
| 118 | xor edi, edx | ||
| 119 | add eax, edi | ||
| 120 | mov edi, ebx | ||
| 121 | rol eax, 7 | ||
| 122 | add eax, ebx | ||
| 123 | ; R0 9 | ||
| 124 | xor edi, ecx | ||
| 125 | and edi, eax | ||
| 126 | lea edx, DWORD PTR 2336552879[ebp*1+edx] | ||
| 127 | mov ebp, DWORD PTR 40[esi] | ||
| 128 | xor edi, ecx | ||
| 129 | add edx, edi | ||
| 130 | mov edi, eax | ||
| 131 | rol edx, 12 | ||
| 132 | add edx, eax | ||
| 133 | ; R0 10 | ||
| 134 | xor edi, ebx | ||
| 135 | and edi, edx | ||
| 136 | lea ecx, DWORD PTR 4294925233[ebp*1+ecx] | ||
| 137 | mov ebp, DWORD PTR 44[esi] | ||
| 138 | xor edi, ebx | ||
| 139 | add ecx, edi | ||
| 140 | mov edi, edx | ||
| 141 | rol ecx, 17 | ||
| 142 | add ecx, edx | ||
| 143 | ; R0 11 | ||
| 144 | xor edi, eax | ||
| 145 | and edi, ecx | ||
| 146 | lea ebx, DWORD PTR 2304563134[ebp*1+ebx] | ||
| 147 | mov ebp, DWORD PTR 48[esi] | ||
| 148 | xor edi, eax | ||
| 149 | add ebx, edi | ||
| 150 | mov edi, ecx | ||
| 151 | rol ebx, 22 | ||
| 152 | add ebx, ecx | ||
| 153 | ; R0 12 | ||
| 154 | xor edi, edx | ||
| 155 | and edi, ebx | ||
| 156 | lea eax, DWORD PTR 1804603682[ebp*1+eax] | ||
| 157 | mov ebp, DWORD PTR 52[esi] | ||
| 158 | xor edi, edx | ||
| 159 | add eax, edi | ||
| 160 | mov edi, ebx | ||
| 161 | rol eax, 7 | ||
| 162 | add eax, ebx | ||
| 163 | ; R0 13 | ||
| 164 | xor edi, ecx | ||
| 165 | and edi, eax | ||
| 166 | lea edx, DWORD PTR 4254626195[ebp*1+edx] | ||
| 167 | mov ebp, DWORD PTR 56[esi] | ||
| 168 | xor edi, ecx | ||
| 169 | add edx, edi | ||
| 170 | mov edi, eax | ||
| 171 | rol edx, 12 | ||
| 172 | add edx, eax | ||
| 173 | ; R0 14 | ||
| 174 | xor edi, ebx | ||
| 175 | and edi, edx | ||
| 176 | lea ecx, DWORD PTR 2792965006[ebp*1+ecx] | ||
| 177 | mov ebp, DWORD PTR 60[esi] | ||
| 178 | xor edi, ebx | ||
| 179 | add ecx, edi | ||
| 180 | mov edi, edx | ||
| 181 | rol ecx, 17 | ||
| 182 | add ecx, edx | ||
| 183 | ; R0 15 | ||
| 184 | xor edi, eax | ||
| 185 | and edi, ecx | ||
| 186 | lea ebx, DWORD PTR 1236535329[ebp*1+ebx] | ||
| 187 | mov ebp, DWORD PTR 4[esi] | ||
| 188 | xor edi, eax | ||
| 189 | add ebx, edi | ||
| 190 | mov edi, ecx | ||
| 191 | rol ebx, 22 | ||
| 192 | add ebx, ecx | ||
| 193 | ; | ||
| 194 | ; R1 section | ||
| 195 | ; R1 16 | ||
| 196 | lea eax, DWORD PTR 4129170786[ebp*1+eax] | ||
| 197 | xor edi, ebx | ||
| 198 | and edi, edx | ||
| 199 | mov ebp, DWORD PTR 24[esi] | ||
| 200 | xor edi, ecx | ||
| 201 | add eax, edi | ||
| 202 | mov edi, ebx | ||
| 203 | rol eax, 5 | ||
| 204 | add eax, ebx | ||
| 205 | ; R1 17 | ||
| 206 | lea edx, DWORD PTR 3225465664[ebp*1+edx] | ||
| 207 | xor edi, eax | ||
| 208 | and edi, ecx | ||
| 209 | mov ebp, DWORD PTR 44[esi] | ||
| 210 | xor edi, ebx | ||
| 211 | add edx, edi | ||
| 212 | mov edi, eax | ||
| 213 | rol edx, 9 | ||
| 214 | add edx, eax | ||
| 215 | ; R1 18 | ||
| 216 | lea ecx, DWORD PTR 643717713[ebp*1+ecx] | ||
| 217 | xor edi, edx | ||
| 218 | and edi, ebx | ||
| 219 | mov ebp, DWORD PTR [esi] | ||
| 220 | xor edi, eax | ||
| 221 | add ecx, edi | ||
| 222 | mov edi, edx | ||
| 223 | rol ecx, 14 | ||
| 224 | add ecx, edx | ||
| 225 | ; R1 19 | ||
| 226 | lea ebx, DWORD PTR 3921069994[ebp*1+ebx] | ||
| 227 | xor edi, ecx | ||
| 228 | and edi, eax | ||
| 229 | mov ebp, DWORD PTR 20[esi] | ||
| 230 | xor edi, edx | ||
| 231 | add ebx, edi | ||
| 232 | mov edi, ecx | ||
| 233 | rol ebx, 20 | ||
| 234 | add ebx, ecx | ||
| 235 | ; R1 20 | ||
| 236 | lea eax, DWORD PTR 3593408605[ebp*1+eax] | ||
| 237 | xor edi, ebx | ||
| 238 | and edi, edx | ||
| 239 | mov ebp, DWORD PTR 40[esi] | ||
| 240 | xor edi, ecx | ||
| 241 | add eax, edi | ||
| 242 | mov edi, ebx | ||
| 243 | rol eax, 5 | ||
| 244 | add eax, ebx | ||
| 245 | ; R1 21 | ||
| 246 | lea edx, DWORD PTR 38016083[ebp*1+edx] | ||
| 247 | xor edi, eax | ||
| 248 | and edi, ecx | ||
| 249 | mov ebp, DWORD PTR 60[esi] | ||
| 250 | xor edi, ebx | ||
| 251 | add edx, edi | ||
| 252 | mov edi, eax | ||
| 253 | rol edx, 9 | ||
| 254 | add edx, eax | ||
| 255 | ; R1 22 | ||
| 256 | lea ecx, DWORD PTR 3634488961[ebp*1+ecx] | ||
| 257 | xor edi, edx | ||
| 258 | and edi, ebx | ||
| 259 | mov ebp, DWORD PTR 16[esi] | ||
| 260 | xor edi, eax | ||
| 261 | add ecx, edi | ||
| 262 | mov edi, edx | ||
| 263 | rol ecx, 14 | ||
| 264 | add ecx, edx | ||
| 265 | ; R1 23 | ||
| 266 | lea ebx, DWORD PTR 3889429448[ebp*1+ebx] | ||
| 267 | xor edi, ecx | ||
| 268 | and edi, eax | ||
| 269 | mov ebp, DWORD PTR 36[esi] | ||
| 270 | xor edi, edx | ||
| 271 | add ebx, edi | ||
| 272 | mov edi, ecx | ||
| 273 | rol ebx, 20 | ||
| 274 | add ebx, ecx | ||
| 275 | ; R1 24 | ||
| 276 | lea eax, DWORD PTR 568446438[ebp*1+eax] | ||
| 277 | xor edi, ebx | ||
| 278 | and edi, edx | ||
| 279 | mov ebp, DWORD PTR 56[esi] | ||
| 280 | xor edi, ecx | ||
| 281 | add eax, edi | ||
| 282 | mov edi, ebx | ||
| 283 | rol eax, 5 | ||
| 284 | add eax, ebx | ||
| 285 | ; R1 25 | ||
| 286 | lea edx, DWORD PTR 3275163606[ebp*1+edx] | ||
| 287 | xor edi, eax | ||
| 288 | and edi, ecx | ||
| 289 | mov ebp, DWORD PTR 12[esi] | ||
| 290 | xor edi, ebx | ||
| 291 | add edx, edi | ||
| 292 | mov edi, eax | ||
| 293 | rol edx, 9 | ||
| 294 | add edx, eax | ||
| 295 | ; R1 26 | ||
| 296 | lea ecx, DWORD PTR 4107603335[ebp*1+ecx] | ||
| 297 | xor edi, edx | ||
| 298 | and edi, ebx | ||
| 299 | mov ebp, DWORD PTR 32[esi] | ||
| 300 | xor edi, eax | ||
| 301 | add ecx, edi | ||
| 302 | mov edi, edx | ||
| 303 | rol ecx, 14 | ||
| 304 | add ecx, edx | ||
| 305 | ; R1 27 | ||
| 306 | lea ebx, DWORD PTR 1163531501[ebp*1+ebx] | ||
| 307 | xor edi, ecx | ||
| 308 | and edi, eax | ||
| 309 | mov ebp, DWORD PTR 52[esi] | ||
| 310 | xor edi, edx | ||
| 311 | add ebx, edi | ||
| 312 | mov edi, ecx | ||
| 313 | rol ebx, 20 | ||
| 314 | add ebx, ecx | ||
| 315 | ; R1 28 | ||
| 316 | lea eax, DWORD PTR 2850285829[ebp*1+eax] | ||
| 317 | xor edi, ebx | ||
| 318 | and edi, edx | ||
| 319 | mov ebp, DWORD PTR 8[esi] | ||
| 320 | xor edi, ecx | ||
| 321 | add eax, edi | ||
| 322 | mov edi, ebx | ||
| 323 | rol eax, 5 | ||
| 324 | add eax, ebx | ||
| 325 | ; R1 29 | ||
| 326 | lea edx, DWORD PTR 4243563512[ebp*1+edx] | ||
| 327 | xor edi, eax | ||
| 328 | and edi, ecx | ||
| 329 | mov ebp, DWORD PTR 28[esi] | ||
| 330 | xor edi, ebx | ||
| 331 | add edx, edi | ||
| 332 | mov edi, eax | ||
| 333 | rol edx, 9 | ||
| 334 | add edx, eax | ||
| 335 | ; R1 30 | ||
| 336 | lea ecx, DWORD PTR 1735328473[ebp*1+ecx] | ||
| 337 | xor edi, edx | ||
| 338 | and edi, ebx | ||
| 339 | mov ebp, DWORD PTR 48[esi] | ||
| 340 | xor edi, eax | ||
| 341 | add ecx, edi | ||
| 342 | mov edi, edx | ||
| 343 | rol ecx, 14 | ||
| 344 | add ecx, edx | ||
| 345 | ; R1 31 | ||
| 346 | lea ebx, DWORD PTR 2368359562[ebp*1+ebx] | ||
| 347 | xor edi, ecx | ||
| 348 | and edi, eax | ||
| 349 | mov ebp, DWORD PTR 20[esi] | ||
| 350 | xor edi, edx | ||
| 351 | add ebx, edi | ||
| 352 | mov edi, ecx | ||
| 353 | rol ebx, 20 | ||
| 354 | add ebx, ecx | ||
| 355 | ; | ||
| 356 | ; R2 section | ||
| 357 | ; R2 32 | ||
| 358 | xor edi, edx | ||
| 359 | xor edi, ebx | ||
| 360 | lea eax, DWORD PTR 4294588738[ebp*1+eax] | ||
| 361 | add eax, edi | ||
| 362 | mov ebp, DWORD PTR 32[esi] | ||
| 363 | rol eax, 4 | ||
| 364 | mov edi, ebx | ||
| 365 | ; R2 33 | ||
| 366 | lea edx, DWORD PTR 2272392833[ebp*1+edx] | ||
| 367 | add eax, ebx | ||
| 368 | xor edi, ecx | ||
| 369 | xor edi, eax | ||
| 370 | mov ebp, DWORD PTR 44[esi] | ||
| 371 | add edx, edi | ||
| 372 | mov edi, eax | ||
| 373 | rol edx, 11 | ||
| 374 | add edx, eax | ||
| 375 | ; R2 34 | ||
| 376 | xor edi, ebx | ||
| 377 | xor edi, edx | ||
| 378 | lea ecx, DWORD PTR 1839030562[ebp*1+ecx] | ||
| 379 | add ecx, edi | ||
| 380 | mov ebp, DWORD PTR 56[esi] | ||
| 381 | rol ecx, 16 | ||
| 382 | mov edi, edx | ||
| 383 | ; R2 35 | ||
| 384 | lea ebx, DWORD PTR 4259657740[ebp*1+ebx] | ||
| 385 | add ecx, edx | ||
| 386 | xor edi, eax | ||
| 387 | xor edi, ecx | ||
| 388 | mov ebp, DWORD PTR 4[esi] | ||
| 389 | add ebx, edi | ||
| 390 | mov edi, ecx | ||
| 391 | rol ebx, 23 | ||
| 392 | add ebx, ecx | ||
| 393 | ; R2 36 | ||
| 394 | xor edi, edx | ||
| 395 | xor edi, ebx | ||
| 396 | lea eax, DWORD PTR 2763975236[ebp*1+eax] | ||
| 397 | add eax, edi | ||
| 398 | mov ebp, DWORD PTR 16[esi] | ||
| 399 | rol eax, 4 | ||
| 400 | mov edi, ebx | ||
| 401 | ; R2 37 | ||
| 402 | lea edx, DWORD PTR 1272893353[ebp*1+edx] | ||
| 403 | add eax, ebx | ||
| 404 | xor edi, ecx | ||
| 405 | xor edi, eax | ||
| 406 | mov ebp, DWORD PTR 28[esi] | ||
| 407 | add edx, edi | ||
| 408 | mov edi, eax | ||
| 409 | rol edx, 11 | ||
| 410 | add edx, eax | ||
| 411 | ; R2 38 | ||
| 412 | xor edi, ebx | ||
| 413 | xor edi, edx | ||
| 414 | lea ecx, DWORD PTR 4139469664[ebp*1+ecx] | ||
| 415 | add ecx, edi | ||
| 416 | mov ebp, DWORD PTR 40[esi] | ||
| 417 | rol ecx, 16 | ||
| 418 | mov edi, edx | ||
| 419 | ; R2 39 | ||
| 420 | lea ebx, DWORD PTR 3200236656[ebp*1+ebx] | ||
| 421 | add ecx, edx | ||
| 422 | xor edi, eax | ||
| 423 | xor edi, ecx | ||
| 424 | mov ebp, DWORD PTR 52[esi] | ||
| 425 | add ebx, edi | ||
| 426 | mov edi, ecx | ||
| 427 | rol ebx, 23 | ||
| 428 | add ebx, ecx | ||
| 429 | ; R2 40 | ||
| 430 | xor edi, edx | ||
| 431 | xor edi, ebx | ||
| 432 | lea eax, DWORD PTR 681279174[ebp*1+eax] | ||
| 433 | add eax, edi | ||
| 434 | mov ebp, DWORD PTR [esi] | ||
| 435 | rol eax, 4 | ||
| 436 | mov edi, ebx | ||
| 437 | ; R2 41 | ||
| 438 | lea edx, DWORD PTR 3936430074[ebp*1+edx] | ||
| 439 | add eax, ebx | ||
| 440 | xor edi, ecx | ||
| 441 | xor edi, eax | ||
| 442 | mov ebp, DWORD PTR 12[esi] | ||
| 443 | add edx, edi | ||
| 444 | mov edi, eax | ||
| 445 | rol edx, 11 | ||
| 446 | add edx, eax | ||
| 447 | ; R2 42 | ||
| 448 | xor edi, ebx | ||
| 449 | xor edi, edx | ||
| 450 | lea ecx, DWORD PTR 3572445317[ebp*1+ecx] | ||
| 451 | add ecx, edi | ||
| 452 | mov ebp, DWORD PTR 24[esi] | ||
| 453 | rol ecx, 16 | ||
| 454 | mov edi, edx | ||
| 455 | ; R2 43 | ||
| 456 | lea ebx, DWORD PTR 76029189[ebp*1+ebx] | ||
| 457 | add ecx, edx | ||
| 458 | xor edi, eax | ||
| 459 | xor edi, ecx | ||
| 460 | mov ebp, DWORD PTR 36[esi] | ||
| 461 | add ebx, edi | ||
| 462 | mov edi, ecx | ||
| 463 | rol ebx, 23 | ||
| 464 | add ebx, ecx | ||
| 465 | ; R2 44 | ||
| 466 | xor edi, edx | ||
| 467 | xor edi, ebx | ||
| 468 | lea eax, DWORD PTR 3654602809[ebp*1+eax] | ||
| 469 | add eax, edi | ||
| 470 | mov ebp, DWORD PTR 48[esi] | ||
| 471 | rol eax, 4 | ||
| 472 | mov edi, ebx | ||
| 473 | ; R2 45 | ||
| 474 | lea edx, DWORD PTR 3873151461[ebp*1+edx] | ||
| 475 | add eax, ebx | ||
| 476 | xor edi, ecx | ||
| 477 | xor edi, eax | ||
| 478 | mov ebp, DWORD PTR 60[esi] | ||
| 479 | add edx, edi | ||
| 480 | mov edi, eax | ||
| 481 | rol edx, 11 | ||
| 482 | add edx, eax | ||
| 483 | ; R2 46 | ||
| 484 | xor edi, ebx | ||
| 485 | xor edi, edx | ||
| 486 | lea ecx, DWORD PTR 530742520[ebp*1+ecx] | ||
| 487 | add ecx, edi | ||
| 488 | mov ebp, DWORD PTR 8[esi] | ||
| 489 | rol ecx, 16 | ||
| 490 | mov edi, edx | ||
| 491 | ; R2 47 | ||
| 492 | lea ebx, DWORD PTR 3299628645[ebp*1+ebx] | ||
| 493 | add ecx, edx | ||
| 494 | xor edi, eax | ||
| 495 | xor edi, ecx | ||
| 496 | mov ebp, DWORD PTR [esi] | ||
| 497 | add ebx, edi | ||
| 498 | mov edi, -1 | ||
| 499 | rol ebx, 23 | ||
| 500 | add ebx, ecx | ||
| 501 | ; | ||
| 502 | ; R3 section | ||
| 503 | ; R3 48 | ||
| 504 | xor edi, edx | ||
| 505 | or edi, ebx | ||
| 506 | lea eax, DWORD PTR 4096336452[ebp*1+eax] | ||
| 507 | xor edi, ecx | ||
| 508 | mov ebp, DWORD PTR 28[esi] | ||
| 509 | add eax, edi | ||
| 510 | mov edi, -1 | ||
| 511 | rol eax, 6 | ||
| 512 | xor edi, ecx | ||
| 513 | add eax, ebx | ||
| 514 | ; R3 49 | ||
| 515 | or edi, eax | ||
| 516 | lea edx, DWORD PTR 1126891415[ebp*1+edx] | ||
| 517 | xor edi, ebx | ||
| 518 | mov ebp, DWORD PTR 56[esi] | ||
| 519 | add edx, edi | ||
| 520 | mov edi, -1 | ||
| 521 | rol edx, 10 | ||
| 522 | xor edi, ebx | ||
| 523 | add edx, eax | ||
| 524 | ; R3 50 | ||
| 525 | or edi, edx | ||
| 526 | lea ecx, DWORD PTR 2878612391[ebp*1+ecx] | ||
| 527 | xor edi, eax | ||
| 528 | mov ebp, DWORD PTR 20[esi] | ||
| 529 | add ecx, edi | ||
| 530 | mov edi, -1 | ||
| 531 | rol ecx, 15 | ||
| 532 | xor edi, eax | ||
| 533 | add ecx, edx | ||
| 534 | ; R3 51 | ||
| 535 | or edi, ecx | ||
| 536 | lea ebx, DWORD PTR 4237533241[ebp*1+ebx] | ||
| 537 | xor edi, edx | ||
| 538 | mov ebp, DWORD PTR 48[esi] | ||
| 539 | add ebx, edi | ||
| 540 | mov edi, -1 | ||
| 541 | rol ebx, 21 | ||
| 542 | xor edi, edx | ||
| 543 | add ebx, ecx | ||
| 544 | ; R3 52 | ||
| 545 | or edi, ebx | ||
| 546 | lea eax, DWORD PTR 1700485571[ebp*1+eax] | ||
| 547 | xor edi, ecx | ||
| 548 | mov ebp, DWORD PTR 12[esi] | ||
| 549 | add eax, edi | ||
| 550 | mov edi, -1 | ||
| 551 | rol eax, 6 | ||
| 552 | xor edi, ecx | ||
| 553 | add eax, ebx | ||
| 554 | ; R3 53 | ||
| 555 | or edi, eax | ||
| 556 | lea edx, DWORD PTR 2399980690[ebp*1+edx] | ||
| 557 | xor edi, ebx | ||
| 558 | mov ebp, DWORD PTR 40[esi] | ||
| 559 | add edx, edi | ||
| 560 | mov edi, -1 | ||
| 561 | rol edx, 10 | ||
| 562 | xor edi, ebx | ||
| 563 | add edx, eax | ||
| 564 | ; R3 54 | ||
| 565 | or edi, edx | ||
| 566 | lea ecx, DWORD PTR 4293915773[ebp*1+ecx] | ||
| 567 | xor edi, eax | ||
| 568 | mov ebp, DWORD PTR 4[esi] | ||
| 569 | add ecx, edi | ||
| 570 | mov edi, -1 | ||
| 571 | rol ecx, 15 | ||
| 572 | xor edi, eax | ||
| 573 | add ecx, edx | ||
| 574 | ; R3 55 | ||
| 575 | or edi, ecx | ||
| 576 | lea ebx, DWORD PTR 2240044497[ebp*1+ebx] | ||
| 577 | xor edi, edx | ||
| 578 | mov ebp, DWORD PTR 32[esi] | ||
| 579 | add ebx, edi | ||
| 580 | mov edi, -1 | ||
| 581 | rol ebx, 21 | ||
| 582 | xor edi, edx | ||
| 583 | add ebx, ecx | ||
| 584 | ; R3 56 | ||
| 585 | or edi, ebx | ||
| 586 | lea eax, DWORD PTR 1873313359[ebp*1+eax] | ||
| 587 | xor edi, ecx | ||
| 588 | mov ebp, DWORD PTR 60[esi] | ||
| 589 | add eax, edi | ||
| 590 | mov edi, -1 | ||
| 591 | rol eax, 6 | ||
| 592 | xor edi, ecx | ||
| 593 | add eax, ebx | ||
| 594 | ; R3 57 | ||
| 595 | or edi, eax | ||
| 596 | lea edx, DWORD PTR 4264355552[ebp*1+edx] | ||
| 597 | xor edi, ebx | ||
| 598 | mov ebp, DWORD PTR 24[esi] | ||
| 599 | add edx, edi | ||
| 600 | mov edi, -1 | ||
| 601 | rol edx, 10 | ||
| 602 | xor edi, ebx | ||
| 603 | add edx, eax | ||
| 604 | ; R3 58 | ||
| 605 | or edi, edx | ||
| 606 | lea ecx, DWORD PTR 2734768916[ebp*1+ecx] | ||
| 607 | xor edi, eax | ||
| 608 | mov ebp, DWORD PTR 52[esi] | ||
| 609 | add ecx, edi | ||
| 610 | mov edi, -1 | ||
| 611 | rol ecx, 15 | ||
| 612 | xor edi, eax | ||
| 613 | add ecx, edx | ||
| 614 | ; R3 59 | ||
| 615 | or edi, ecx | ||
| 616 | lea ebx, DWORD PTR 1309151649[ebp*1+ebx] | ||
| 617 | xor edi, edx | ||
| 618 | mov ebp, DWORD PTR 16[esi] | ||
| 619 | add ebx, edi | ||
| 620 | mov edi, -1 | ||
| 621 | rol ebx, 21 | ||
| 622 | xor edi, edx | ||
| 623 | add ebx, ecx | ||
| 624 | ; R3 60 | ||
| 625 | or edi, ebx | ||
| 626 | lea eax, DWORD PTR 4149444226[ebp*1+eax] | ||
| 627 | xor edi, ecx | ||
| 628 | mov ebp, DWORD PTR 44[esi] | ||
| 629 | add eax, edi | ||
| 630 | mov edi, -1 | ||
| 631 | rol eax, 6 | ||
| 632 | xor edi, ecx | ||
| 633 | add eax, ebx | ||
| 634 | ; R3 61 | ||
| 635 | or edi, eax | ||
| 636 | lea edx, DWORD PTR 3174756917[ebp*1+edx] | ||
| 637 | xor edi, ebx | ||
| 638 | mov ebp, DWORD PTR 8[esi] | ||
| 639 | add edx, edi | ||
| 640 | mov edi, -1 | ||
| 641 | rol edx, 10 | ||
| 642 | xor edi, ebx | ||
| 643 | add edx, eax | ||
| 644 | ; R3 62 | ||
| 645 | or edi, edx | ||
| 646 | lea ecx, DWORD PTR 718787259[ebp*1+ecx] | ||
| 647 | xor edi, eax | ||
| 648 | mov ebp, DWORD PTR 36[esi] | ||
| 649 | add ecx, edi | ||
| 650 | mov edi, -1 | ||
| 651 | rol ecx, 15 | ||
| 652 | xor edi, eax | ||
| 653 | add ecx, edx | ||
| 654 | ; R3 63 | ||
| 655 | or edi, ecx | ||
| 656 | lea ebx, DWORD PTR 3951481745[ebp*1+ebx] | ||
| 657 | xor edi, edx | ||
| 658 | mov ebp, DWORD PTR 24[esp] | ||
| 659 | add ebx, edi | ||
| 660 | add esi, 64 | ||
| 661 | rol ebx, 21 | ||
| 662 | mov edi, DWORD PTR [ebp] | ||
| 663 | add ebx, ecx | ||
| 664 | add eax, edi | ||
| 665 | mov edi, DWORD PTR 4[ebp] | ||
| 666 | add ebx, edi | ||
| 667 | mov edi, DWORD PTR 8[ebp] | ||
| 668 | add ecx, edi | ||
| 669 | mov edi, DWORD PTR 12[ebp] | ||
| 670 | add edx, edi | ||
| 671 | mov DWORD PTR [ebp],eax | ||
| 672 | mov DWORD PTR 4[ebp],ebx | ||
| 673 | mov edi, DWORD PTR [esp] | ||
| 674 | mov DWORD PTR 8[ebp],ecx | ||
| 675 | mov DWORD PTR 12[ebp],edx | ||
| 676 | cmp edi, esi | ||
| 677 | jge L000start | ||
| 678 | pop eax | ||
| 679 | pop ebx | ||
| 680 | pop ebp | ||
| 681 | pop edi | ||
| 682 | pop esi | ||
| 683 | ret | ||
| 684 | _md5_block_x86 ENDP | ||
| 685 | _TEXT ENDS | ||
| 686 | END | ||
diff --git a/src/lib/libssl/src/crypto/md5/asm/mx86unix.cpp b/src/lib/libssl/src/crypto/md5/asm/mx86unix.cpp new file mode 100644 index 0000000000..5d399122b6 --- /dev/null +++ b/src/lib/libssl/src/crypto/md5/asm/mx86unix.cpp | |||
| @@ -0,0 +1,730 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define md5_block_x86 _md5_block_x86 | ||
| 13 | |||
| 14 | #endif | ||
| 15 | |||
| 16 | #ifdef OUT | ||
| 17 | #define OK 1 | ||
| 18 | #define ALIGN 4 | ||
| 19 | #endif | ||
| 20 | |||
| 21 | #ifdef BSDI | ||
| 22 | #define OK 1 | ||
| 23 | #define ALIGN 4 | ||
| 24 | #undef SIZE | ||
| 25 | #undef TYPE | ||
| 26 | #define SIZE(a,b) | ||
| 27 | #define TYPE(a,b) | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #if defined(ELF) || defined(SOL) | ||
| 31 | #define OK 1 | ||
| 32 | #define ALIGN 16 | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifndef OK | ||
| 36 | You need to define one of | ||
| 37 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 38 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 39 | SOL - solaris systems, which are elf with strange comment lines | ||
| 40 | BSDI - a.out with a very primative version of as. | ||
| 41 | #endif | ||
| 42 | |||
| 43 | /* Let the Assembler begin :-) */ | ||
| 44 | /* Don't even think of reading this code */ | ||
| 45 | /* It was automatically generated by md5-586.pl */ | ||
| 46 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 47 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 48 | /* eric <eay@cryptsoft.com> */ | ||
| 49 | |||
| 50 | .file "md5-586.s" | ||
| 51 | .version "01.01" | ||
| 52 | gcc2_compiled.: | ||
| 53 | .text | ||
| 54 | .align ALIGN | ||
| 55 | .globl md5_block_x86 | ||
| 56 | TYPE(md5_block_x86,@function) | ||
| 57 | md5_block_x86: | ||
| 58 | pushl %esi | ||
| 59 | pushl %edi | ||
| 60 | movl 12(%esp), %edi | ||
| 61 | movl 16(%esp), %esi | ||
| 62 | movl 20(%esp), %ecx | ||
| 63 | pushl %ebp | ||
| 64 | pushl %ebx | ||
| 65 | addl %esi, %ecx | ||
| 66 | subl $64, %ecx | ||
| 67 | movl (%edi), %eax | ||
| 68 | pushl %ecx | ||
| 69 | movl 4(%edi), %ebx | ||
| 70 | movl 8(%edi), %ecx | ||
| 71 | movl 12(%edi), %edx | ||
| 72 | .L000start: | ||
| 73 | |||
| 74 | /* R0 section */ | ||
| 75 | movl %ecx, %edi | ||
| 76 | movl (%esi), %ebp | ||
| 77 | /* R0 0 */ | ||
| 78 | xorl %edx, %edi | ||
| 79 | andl %ebx, %edi | ||
| 80 | leal 3614090360(%eax,%ebp,1),%eax | ||
| 81 | movl 4(%esi), %ebp | ||
| 82 | xorl %edx, %edi | ||
| 83 | addl %edi, %eax | ||
| 84 | movl %ebx, %edi | ||
| 85 | roll $7, %eax | ||
| 86 | addl %ebx, %eax | ||
| 87 | /* R0 1 */ | ||
| 88 | xorl %ecx, %edi | ||
| 89 | andl %eax, %edi | ||
| 90 | leal 3905402710(%edx,%ebp,1),%edx | ||
| 91 | movl 8(%esi), %ebp | ||
| 92 | xorl %ecx, %edi | ||
| 93 | addl %edi, %edx | ||
| 94 | movl %eax, %edi | ||
| 95 | roll $12, %edx | ||
| 96 | addl %eax, %edx | ||
| 97 | /* R0 2 */ | ||
| 98 | xorl %ebx, %edi | ||
| 99 | andl %edx, %edi | ||
| 100 | leal 606105819(%ecx,%ebp,1),%ecx | ||
| 101 | movl 12(%esi), %ebp | ||
| 102 | xorl %ebx, %edi | ||
| 103 | addl %edi, %ecx | ||
| 104 | movl %edx, %edi | ||
| 105 | roll $17, %ecx | ||
| 106 | addl %edx, %ecx | ||
| 107 | /* R0 3 */ | ||
| 108 | xorl %eax, %edi | ||
| 109 | andl %ecx, %edi | ||
| 110 | leal 3250441966(%ebx,%ebp,1),%ebx | ||
| 111 | movl 16(%esi), %ebp | ||
| 112 | xorl %eax, %edi | ||
| 113 | addl %edi, %ebx | ||
| 114 | movl %ecx, %edi | ||
| 115 | roll $22, %ebx | ||
| 116 | addl %ecx, %ebx | ||
| 117 | /* R0 4 */ | ||
| 118 | xorl %edx, %edi | ||
| 119 | andl %ebx, %edi | ||
| 120 | leal 4118548399(%eax,%ebp,1),%eax | ||
| 121 | movl 20(%esi), %ebp | ||
| 122 | xorl %edx, %edi | ||
| 123 | addl %edi, %eax | ||
| 124 | movl %ebx, %edi | ||
| 125 | roll $7, %eax | ||
| 126 | addl %ebx, %eax | ||
| 127 | /* R0 5 */ | ||
| 128 | xorl %ecx, %edi | ||
| 129 | andl %eax, %edi | ||
| 130 | leal 1200080426(%edx,%ebp,1),%edx | ||
| 131 | movl 24(%esi), %ebp | ||
| 132 | xorl %ecx, %edi | ||
| 133 | addl %edi, %edx | ||
| 134 | movl %eax, %edi | ||
| 135 | roll $12, %edx | ||
| 136 | addl %eax, %edx | ||
| 137 | /* R0 6 */ | ||
| 138 | xorl %ebx, %edi | ||
| 139 | andl %edx, %edi | ||
| 140 | leal 2821735955(%ecx,%ebp,1),%ecx | ||
| 141 | movl 28(%esi), %ebp | ||
| 142 | xorl %ebx, %edi | ||
| 143 | addl %edi, %ecx | ||
| 144 | movl %edx, %edi | ||
| 145 | roll $17, %ecx | ||
| 146 | addl %edx, %ecx | ||
| 147 | /* R0 7 */ | ||
| 148 | xorl %eax, %edi | ||
| 149 | andl %ecx, %edi | ||
| 150 | leal 4249261313(%ebx,%ebp,1),%ebx | ||
| 151 | movl 32(%esi), %ebp | ||
| 152 | xorl %eax, %edi | ||
| 153 | addl %edi, %ebx | ||
| 154 | movl %ecx, %edi | ||
| 155 | roll $22, %ebx | ||
| 156 | addl %ecx, %ebx | ||
| 157 | /* R0 8 */ | ||
| 158 | xorl %edx, %edi | ||
| 159 | andl %ebx, %edi | ||
| 160 | leal 1770035416(%eax,%ebp,1),%eax | ||
| 161 | movl 36(%esi), %ebp | ||
| 162 | xorl %edx, %edi | ||
| 163 | addl %edi, %eax | ||
| 164 | movl %ebx, %edi | ||
| 165 | roll $7, %eax | ||
| 166 | addl %ebx, %eax | ||
| 167 | /* R0 9 */ | ||
| 168 | xorl %ecx, %edi | ||
| 169 | andl %eax, %edi | ||
| 170 | leal 2336552879(%edx,%ebp,1),%edx | ||
| 171 | movl 40(%esi), %ebp | ||
| 172 | xorl %ecx, %edi | ||
| 173 | addl %edi, %edx | ||
| 174 | movl %eax, %edi | ||
| 175 | roll $12, %edx | ||
| 176 | addl %eax, %edx | ||
| 177 | /* R0 10 */ | ||
| 178 | xorl %ebx, %edi | ||
| 179 | andl %edx, %edi | ||
| 180 | leal 4294925233(%ecx,%ebp,1),%ecx | ||
| 181 | movl 44(%esi), %ebp | ||
| 182 | xorl %ebx, %edi | ||
| 183 | addl %edi, %ecx | ||
| 184 | movl %edx, %edi | ||
| 185 | roll $17, %ecx | ||
| 186 | addl %edx, %ecx | ||
| 187 | /* R0 11 */ | ||
| 188 | xorl %eax, %edi | ||
| 189 | andl %ecx, %edi | ||
| 190 | leal 2304563134(%ebx,%ebp,1),%ebx | ||
| 191 | movl 48(%esi), %ebp | ||
| 192 | xorl %eax, %edi | ||
| 193 | addl %edi, %ebx | ||
| 194 | movl %ecx, %edi | ||
| 195 | roll $22, %ebx | ||
| 196 | addl %ecx, %ebx | ||
| 197 | /* R0 12 */ | ||
| 198 | xorl %edx, %edi | ||
| 199 | andl %ebx, %edi | ||
| 200 | leal 1804603682(%eax,%ebp,1),%eax | ||
| 201 | movl 52(%esi), %ebp | ||
| 202 | xorl %edx, %edi | ||
| 203 | addl %edi, %eax | ||
| 204 | movl %ebx, %edi | ||
| 205 | roll $7, %eax | ||
| 206 | addl %ebx, %eax | ||
| 207 | /* R0 13 */ | ||
| 208 | xorl %ecx, %edi | ||
| 209 | andl %eax, %edi | ||
| 210 | leal 4254626195(%edx,%ebp,1),%edx | ||
| 211 | movl 56(%esi), %ebp | ||
| 212 | xorl %ecx, %edi | ||
| 213 | addl %edi, %edx | ||
| 214 | movl %eax, %edi | ||
| 215 | roll $12, %edx | ||
| 216 | addl %eax, %edx | ||
| 217 | /* R0 14 */ | ||
| 218 | xorl %ebx, %edi | ||
| 219 | andl %edx, %edi | ||
| 220 | leal 2792965006(%ecx,%ebp,1),%ecx | ||
| 221 | movl 60(%esi), %ebp | ||
| 222 | xorl %ebx, %edi | ||
| 223 | addl %edi, %ecx | ||
| 224 | movl %edx, %edi | ||
| 225 | roll $17, %ecx | ||
| 226 | addl %edx, %ecx | ||
| 227 | /* R0 15 */ | ||
| 228 | xorl %eax, %edi | ||
| 229 | andl %ecx, %edi | ||
| 230 | leal 1236535329(%ebx,%ebp,1),%ebx | ||
| 231 | movl 4(%esi), %ebp | ||
| 232 | xorl %eax, %edi | ||
| 233 | addl %edi, %ebx | ||
| 234 | movl %ecx, %edi | ||
| 235 | roll $22, %ebx | ||
| 236 | addl %ecx, %ebx | ||
| 237 | |||
| 238 | /* R1 section */ | ||
| 239 | /* R1 16 */ | ||
| 240 | leal 4129170786(%eax,%ebp,1),%eax | ||
| 241 | xorl %ebx, %edi | ||
| 242 | andl %edx, %edi | ||
| 243 | movl 24(%esi), %ebp | ||
| 244 | xorl %ecx, %edi | ||
| 245 | addl %edi, %eax | ||
| 246 | movl %ebx, %edi | ||
| 247 | roll $5, %eax | ||
| 248 | addl %ebx, %eax | ||
| 249 | /* R1 17 */ | ||
| 250 | leal 3225465664(%edx,%ebp,1),%edx | ||
| 251 | xorl %eax, %edi | ||
| 252 | andl %ecx, %edi | ||
| 253 | movl 44(%esi), %ebp | ||
| 254 | xorl %ebx, %edi | ||
| 255 | addl %edi, %edx | ||
| 256 | movl %eax, %edi | ||
| 257 | roll $9, %edx | ||
| 258 | addl %eax, %edx | ||
| 259 | /* R1 18 */ | ||
| 260 | leal 643717713(%ecx,%ebp,1),%ecx | ||
| 261 | xorl %edx, %edi | ||
| 262 | andl %ebx, %edi | ||
| 263 | movl (%esi), %ebp | ||
| 264 | xorl %eax, %edi | ||
| 265 | addl %edi, %ecx | ||
| 266 | movl %edx, %edi | ||
| 267 | roll $14, %ecx | ||
| 268 | addl %edx, %ecx | ||
| 269 | /* R1 19 */ | ||
| 270 | leal 3921069994(%ebx,%ebp,1),%ebx | ||
| 271 | xorl %ecx, %edi | ||
| 272 | andl %eax, %edi | ||
| 273 | movl 20(%esi), %ebp | ||
| 274 | xorl %edx, %edi | ||
| 275 | addl %edi, %ebx | ||
| 276 | movl %ecx, %edi | ||
| 277 | roll $20, %ebx | ||
| 278 | addl %ecx, %ebx | ||
| 279 | /* R1 20 */ | ||
| 280 | leal 3593408605(%eax,%ebp,1),%eax | ||
| 281 | xorl %ebx, %edi | ||
| 282 | andl %edx, %edi | ||
| 283 | movl 40(%esi), %ebp | ||
| 284 | xorl %ecx, %edi | ||
| 285 | addl %edi, %eax | ||
| 286 | movl %ebx, %edi | ||
| 287 | roll $5, %eax | ||
| 288 | addl %ebx, %eax | ||
| 289 | /* R1 21 */ | ||
| 290 | leal 38016083(%edx,%ebp,1),%edx | ||
| 291 | xorl %eax, %edi | ||
| 292 | andl %ecx, %edi | ||
| 293 | movl 60(%esi), %ebp | ||
| 294 | xorl %ebx, %edi | ||
| 295 | addl %edi, %edx | ||
| 296 | movl %eax, %edi | ||
| 297 | roll $9, %edx | ||
| 298 | addl %eax, %edx | ||
| 299 | /* R1 22 */ | ||
| 300 | leal 3634488961(%ecx,%ebp,1),%ecx | ||
| 301 | xorl %edx, %edi | ||
| 302 | andl %ebx, %edi | ||
| 303 | movl 16(%esi), %ebp | ||
| 304 | xorl %eax, %edi | ||
| 305 | addl %edi, %ecx | ||
| 306 | movl %edx, %edi | ||
| 307 | roll $14, %ecx | ||
| 308 | addl %edx, %ecx | ||
| 309 | /* R1 23 */ | ||
| 310 | leal 3889429448(%ebx,%ebp,1),%ebx | ||
| 311 | xorl %ecx, %edi | ||
| 312 | andl %eax, %edi | ||
| 313 | movl 36(%esi), %ebp | ||
| 314 | xorl %edx, %edi | ||
| 315 | addl %edi, %ebx | ||
| 316 | movl %ecx, %edi | ||
| 317 | roll $20, %ebx | ||
| 318 | addl %ecx, %ebx | ||
| 319 | /* R1 24 */ | ||
| 320 | leal 568446438(%eax,%ebp,1),%eax | ||
| 321 | xorl %ebx, %edi | ||
| 322 | andl %edx, %edi | ||
| 323 | movl 56(%esi), %ebp | ||
| 324 | xorl %ecx, %edi | ||
| 325 | addl %edi, %eax | ||
| 326 | movl %ebx, %edi | ||
| 327 | roll $5, %eax | ||
| 328 | addl %ebx, %eax | ||
| 329 | /* R1 25 */ | ||
| 330 | leal 3275163606(%edx,%ebp,1),%edx | ||
| 331 | xorl %eax, %edi | ||
| 332 | andl %ecx, %edi | ||
| 333 | movl 12(%esi), %ebp | ||
| 334 | xorl %ebx, %edi | ||
| 335 | addl %edi, %edx | ||
| 336 | movl %eax, %edi | ||
| 337 | roll $9, %edx | ||
| 338 | addl %eax, %edx | ||
| 339 | /* R1 26 */ | ||
| 340 | leal 4107603335(%ecx,%ebp,1),%ecx | ||
| 341 | xorl %edx, %edi | ||
| 342 | andl %ebx, %edi | ||
| 343 | movl 32(%esi), %ebp | ||
| 344 | xorl %eax, %edi | ||
| 345 | addl %edi, %ecx | ||
| 346 | movl %edx, %edi | ||
| 347 | roll $14, %ecx | ||
| 348 | addl %edx, %ecx | ||
| 349 | /* R1 27 */ | ||
| 350 | leal 1163531501(%ebx,%ebp,1),%ebx | ||
| 351 | xorl %ecx, %edi | ||
| 352 | andl %eax, %edi | ||
| 353 | movl 52(%esi), %ebp | ||
| 354 | xorl %edx, %edi | ||
| 355 | addl %edi, %ebx | ||
| 356 | movl %ecx, %edi | ||
| 357 | roll $20, %ebx | ||
| 358 | addl %ecx, %ebx | ||
| 359 | /* R1 28 */ | ||
| 360 | leal 2850285829(%eax,%ebp,1),%eax | ||
| 361 | xorl %ebx, %edi | ||
| 362 | andl %edx, %edi | ||
| 363 | movl 8(%esi), %ebp | ||
| 364 | xorl %ecx, %edi | ||
| 365 | addl %edi, %eax | ||
| 366 | movl %ebx, %edi | ||
| 367 | roll $5, %eax | ||
| 368 | addl %ebx, %eax | ||
| 369 | /* R1 29 */ | ||
| 370 | leal 4243563512(%edx,%ebp,1),%edx | ||
| 371 | xorl %eax, %edi | ||
| 372 | andl %ecx, %edi | ||
| 373 | movl 28(%esi), %ebp | ||
| 374 | xorl %ebx, %edi | ||
| 375 | addl %edi, %edx | ||
| 376 | movl %eax, %edi | ||
| 377 | roll $9, %edx | ||
| 378 | addl %eax, %edx | ||
| 379 | /* R1 30 */ | ||
| 380 | leal 1735328473(%ecx,%ebp,1),%ecx | ||
| 381 | xorl %edx, %edi | ||
| 382 | andl %ebx, %edi | ||
| 383 | movl 48(%esi), %ebp | ||
| 384 | xorl %eax, %edi | ||
| 385 | addl %edi, %ecx | ||
| 386 | movl %edx, %edi | ||
| 387 | roll $14, %ecx | ||
| 388 | addl %edx, %ecx | ||
| 389 | /* R1 31 */ | ||
| 390 | leal 2368359562(%ebx,%ebp,1),%ebx | ||
| 391 | xorl %ecx, %edi | ||
| 392 | andl %eax, %edi | ||
| 393 | movl 20(%esi), %ebp | ||
| 394 | xorl %edx, %edi | ||
| 395 | addl %edi, %ebx | ||
| 396 | movl %ecx, %edi | ||
| 397 | roll $20, %ebx | ||
| 398 | addl %ecx, %ebx | ||
| 399 | |||
| 400 | /* R2 section */ | ||
| 401 | /* R2 32 */ | ||
| 402 | xorl %edx, %edi | ||
| 403 | xorl %ebx, %edi | ||
| 404 | leal 4294588738(%eax,%ebp,1),%eax | ||
| 405 | addl %edi, %eax | ||
| 406 | movl 32(%esi), %ebp | ||
| 407 | roll $4, %eax | ||
| 408 | movl %ebx, %edi | ||
| 409 | /* R2 33 */ | ||
| 410 | leal 2272392833(%edx,%ebp,1),%edx | ||
| 411 | addl %ebx, %eax | ||
| 412 | xorl %ecx, %edi | ||
| 413 | xorl %eax, %edi | ||
| 414 | movl 44(%esi), %ebp | ||
| 415 | addl %edi, %edx | ||
| 416 | movl %eax, %edi | ||
| 417 | roll $11, %edx | ||
| 418 | addl %eax, %edx | ||
| 419 | /* R2 34 */ | ||
| 420 | xorl %ebx, %edi | ||
| 421 | xorl %edx, %edi | ||
| 422 | leal 1839030562(%ecx,%ebp,1),%ecx | ||
| 423 | addl %edi, %ecx | ||
| 424 | movl 56(%esi), %ebp | ||
| 425 | roll $16, %ecx | ||
| 426 | movl %edx, %edi | ||
| 427 | /* R2 35 */ | ||
| 428 | leal 4259657740(%ebx,%ebp,1),%ebx | ||
| 429 | addl %edx, %ecx | ||
| 430 | xorl %eax, %edi | ||
| 431 | xorl %ecx, %edi | ||
| 432 | movl 4(%esi), %ebp | ||
| 433 | addl %edi, %ebx | ||
| 434 | movl %ecx, %edi | ||
| 435 | roll $23, %ebx | ||
| 436 | addl %ecx, %ebx | ||
| 437 | /* R2 36 */ | ||
| 438 | xorl %edx, %edi | ||
| 439 | xorl %ebx, %edi | ||
| 440 | leal 2763975236(%eax,%ebp,1),%eax | ||
| 441 | addl %edi, %eax | ||
| 442 | movl 16(%esi), %ebp | ||
| 443 | roll $4, %eax | ||
| 444 | movl %ebx, %edi | ||
| 445 | /* R2 37 */ | ||
| 446 | leal 1272893353(%edx,%ebp,1),%edx | ||
| 447 | addl %ebx, %eax | ||
| 448 | xorl %ecx, %edi | ||
| 449 | xorl %eax, %edi | ||
| 450 | movl 28(%esi), %ebp | ||
| 451 | addl %edi, %edx | ||
| 452 | movl %eax, %edi | ||
| 453 | roll $11, %edx | ||
| 454 | addl %eax, %edx | ||
| 455 | /* R2 38 */ | ||
| 456 | xorl %ebx, %edi | ||
| 457 | xorl %edx, %edi | ||
| 458 | leal 4139469664(%ecx,%ebp,1),%ecx | ||
| 459 | addl %edi, %ecx | ||
| 460 | movl 40(%esi), %ebp | ||
| 461 | roll $16, %ecx | ||
| 462 | movl %edx, %edi | ||
| 463 | /* R2 39 */ | ||
| 464 | leal 3200236656(%ebx,%ebp,1),%ebx | ||
| 465 | addl %edx, %ecx | ||
| 466 | xorl %eax, %edi | ||
| 467 | xorl %ecx, %edi | ||
| 468 | movl 52(%esi), %ebp | ||
| 469 | addl %edi, %ebx | ||
| 470 | movl %ecx, %edi | ||
| 471 | roll $23, %ebx | ||
| 472 | addl %ecx, %ebx | ||
| 473 | /* R2 40 */ | ||
| 474 | xorl %edx, %edi | ||
| 475 | xorl %ebx, %edi | ||
| 476 | leal 681279174(%eax,%ebp,1),%eax | ||
| 477 | addl %edi, %eax | ||
| 478 | movl (%esi), %ebp | ||
| 479 | roll $4, %eax | ||
| 480 | movl %ebx, %edi | ||
| 481 | /* R2 41 */ | ||
| 482 | leal 3936430074(%edx,%ebp,1),%edx | ||
| 483 | addl %ebx, %eax | ||
| 484 | xorl %ecx, %edi | ||
| 485 | xorl %eax, %edi | ||
| 486 | movl 12(%esi), %ebp | ||
| 487 | addl %edi, %edx | ||
| 488 | movl %eax, %edi | ||
| 489 | roll $11, %edx | ||
| 490 | addl %eax, %edx | ||
| 491 | /* R2 42 */ | ||
| 492 | xorl %ebx, %edi | ||
| 493 | xorl %edx, %edi | ||
| 494 | leal 3572445317(%ecx,%ebp,1),%ecx | ||
| 495 | addl %edi, %ecx | ||
| 496 | movl 24(%esi), %ebp | ||
| 497 | roll $16, %ecx | ||
| 498 | movl %edx, %edi | ||
| 499 | /* R2 43 */ | ||
| 500 | leal 76029189(%ebx,%ebp,1),%ebx | ||
| 501 | addl %edx, %ecx | ||
| 502 | xorl %eax, %edi | ||
| 503 | xorl %ecx, %edi | ||
| 504 | movl 36(%esi), %ebp | ||
| 505 | addl %edi, %ebx | ||
| 506 | movl %ecx, %edi | ||
| 507 | roll $23, %ebx | ||
| 508 | addl %ecx, %ebx | ||
| 509 | /* R2 44 */ | ||
| 510 | xorl %edx, %edi | ||
| 511 | xorl %ebx, %edi | ||
| 512 | leal 3654602809(%eax,%ebp,1),%eax | ||
| 513 | addl %edi, %eax | ||
| 514 | movl 48(%esi), %ebp | ||
| 515 | roll $4, %eax | ||
| 516 | movl %ebx, %edi | ||
| 517 | /* R2 45 */ | ||
| 518 | leal 3873151461(%edx,%ebp,1),%edx | ||
| 519 | addl %ebx, %eax | ||
| 520 | xorl %ecx, %edi | ||
| 521 | xorl %eax, %edi | ||
| 522 | movl 60(%esi), %ebp | ||
| 523 | addl %edi, %edx | ||
| 524 | movl %eax, %edi | ||
| 525 | roll $11, %edx | ||
| 526 | addl %eax, %edx | ||
| 527 | /* R2 46 */ | ||
| 528 | xorl %ebx, %edi | ||
| 529 | xorl %edx, %edi | ||
| 530 | leal 530742520(%ecx,%ebp,1),%ecx | ||
| 531 | addl %edi, %ecx | ||
| 532 | movl 8(%esi), %ebp | ||
| 533 | roll $16, %ecx | ||
| 534 | movl %edx, %edi | ||
| 535 | /* R2 47 */ | ||
| 536 | leal 3299628645(%ebx,%ebp,1),%ebx | ||
| 537 | addl %edx, %ecx | ||
| 538 | xorl %eax, %edi | ||
| 539 | xorl %ecx, %edi | ||
| 540 | movl (%esi), %ebp | ||
| 541 | addl %edi, %ebx | ||
| 542 | movl $-1, %edi | ||
| 543 | roll $23, %ebx | ||
| 544 | addl %ecx, %ebx | ||
| 545 | |||
| 546 | /* R3 section */ | ||
| 547 | /* R3 48 */ | ||
| 548 | xorl %edx, %edi | ||
| 549 | orl %ebx, %edi | ||
| 550 | leal 4096336452(%eax,%ebp,1),%eax | ||
| 551 | xorl %ecx, %edi | ||
| 552 | movl 28(%esi), %ebp | ||
| 553 | addl %edi, %eax | ||
| 554 | movl $-1, %edi | ||
| 555 | roll $6, %eax | ||
| 556 | xorl %ecx, %edi | ||
| 557 | addl %ebx, %eax | ||
| 558 | /* R3 49 */ | ||
| 559 | orl %eax, %edi | ||
| 560 | leal 1126891415(%edx,%ebp,1),%edx | ||
| 561 | xorl %ebx, %edi | ||
| 562 | movl 56(%esi), %ebp | ||
| 563 | addl %edi, %edx | ||
| 564 | movl $-1, %edi | ||
| 565 | roll $10, %edx | ||
| 566 | xorl %ebx, %edi | ||
| 567 | addl %eax, %edx | ||
| 568 | /* R3 50 */ | ||
| 569 | orl %edx, %edi | ||
| 570 | leal 2878612391(%ecx,%ebp,1),%ecx | ||
| 571 | xorl %eax, %edi | ||
| 572 | movl 20(%esi), %ebp | ||
| 573 | addl %edi, %ecx | ||
| 574 | movl $-1, %edi | ||
| 575 | roll $15, %ecx | ||
| 576 | xorl %eax, %edi | ||
| 577 | addl %edx, %ecx | ||
| 578 | /* R3 51 */ | ||
| 579 | orl %ecx, %edi | ||
| 580 | leal 4237533241(%ebx,%ebp,1),%ebx | ||
| 581 | xorl %edx, %edi | ||
| 582 | movl 48(%esi), %ebp | ||
| 583 | addl %edi, %ebx | ||
| 584 | movl $-1, %edi | ||
| 585 | roll $21, %ebx | ||
| 586 | xorl %edx, %edi | ||
| 587 | addl %ecx, %ebx | ||
| 588 | /* R3 52 */ | ||
| 589 | orl %ebx, %edi | ||
| 590 | leal 1700485571(%eax,%ebp,1),%eax | ||
| 591 | xorl %ecx, %edi | ||
| 592 | movl 12(%esi), %ebp | ||
| 593 | addl %edi, %eax | ||
| 594 | movl $-1, %edi | ||
| 595 | roll $6, %eax | ||
| 596 | xorl %ecx, %edi | ||
| 597 | addl %ebx, %eax | ||
| 598 | /* R3 53 */ | ||
| 599 | orl %eax, %edi | ||
| 600 | leal 2399980690(%edx,%ebp,1),%edx | ||
| 601 | xorl %ebx, %edi | ||
| 602 | movl 40(%esi), %ebp | ||
| 603 | addl %edi, %edx | ||
| 604 | movl $-1, %edi | ||
| 605 | roll $10, %edx | ||
| 606 | xorl %ebx, %edi | ||
| 607 | addl %eax, %edx | ||
| 608 | /* R3 54 */ | ||
| 609 | orl %edx, %edi | ||
| 610 | leal 4293915773(%ecx,%ebp,1),%ecx | ||
| 611 | xorl %eax, %edi | ||
| 612 | movl 4(%esi), %ebp | ||
| 613 | addl %edi, %ecx | ||
| 614 | movl $-1, %edi | ||
| 615 | roll $15, %ecx | ||
| 616 | xorl %eax, %edi | ||
| 617 | addl %edx, %ecx | ||
| 618 | /* R3 55 */ | ||
| 619 | orl %ecx, %edi | ||
| 620 | leal 2240044497(%ebx,%ebp,1),%ebx | ||
| 621 | xorl %edx, %edi | ||
| 622 | movl 32(%esi), %ebp | ||
| 623 | addl %edi, %ebx | ||
| 624 | movl $-1, %edi | ||
| 625 | roll $21, %ebx | ||
| 626 | xorl %edx, %edi | ||
| 627 | addl %ecx, %ebx | ||
| 628 | /* R3 56 */ | ||
| 629 | orl %ebx, %edi | ||
| 630 | leal 1873313359(%eax,%ebp,1),%eax | ||
| 631 | xorl %ecx, %edi | ||
| 632 | movl 60(%esi), %ebp | ||
| 633 | addl %edi, %eax | ||
| 634 | movl $-1, %edi | ||
| 635 | roll $6, %eax | ||
| 636 | xorl %ecx, %edi | ||
| 637 | addl %ebx, %eax | ||
| 638 | /* R3 57 */ | ||
| 639 | orl %eax, %edi | ||
| 640 | leal 4264355552(%edx,%ebp,1),%edx | ||
| 641 | xorl %ebx, %edi | ||
| 642 | movl 24(%esi), %ebp | ||
| 643 | addl %edi, %edx | ||
| 644 | movl $-1, %edi | ||
| 645 | roll $10, %edx | ||
| 646 | xorl %ebx, %edi | ||
| 647 | addl %eax, %edx | ||
| 648 | /* R3 58 */ | ||
| 649 | orl %edx, %edi | ||
| 650 | leal 2734768916(%ecx,%ebp,1),%ecx | ||
| 651 | xorl %eax, %edi | ||
| 652 | movl 52(%esi), %ebp | ||
| 653 | addl %edi, %ecx | ||
| 654 | movl $-1, %edi | ||
| 655 | roll $15, %ecx | ||
| 656 | xorl %eax, %edi | ||
| 657 | addl %edx, %ecx | ||
| 658 | /* R3 59 */ | ||
| 659 | orl %ecx, %edi | ||
| 660 | leal 1309151649(%ebx,%ebp,1),%ebx | ||
| 661 | xorl %edx, %edi | ||
| 662 | movl 16(%esi), %ebp | ||
| 663 | addl %edi, %ebx | ||
| 664 | movl $-1, %edi | ||
| 665 | roll $21, %ebx | ||
| 666 | xorl %edx, %edi | ||
| 667 | addl %ecx, %ebx | ||
| 668 | /* R3 60 */ | ||
| 669 | orl %ebx, %edi | ||
| 670 | leal 4149444226(%eax,%ebp,1),%eax | ||
| 671 | xorl %ecx, %edi | ||
| 672 | movl 44(%esi), %ebp | ||
| 673 | addl %edi, %eax | ||
| 674 | movl $-1, %edi | ||
| 675 | roll $6, %eax | ||
| 676 | xorl %ecx, %edi | ||
| 677 | addl %ebx, %eax | ||
| 678 | /* R3 61 */ | ||
| 679 | orl %eax, %edi | ||
| 680 | leal 3174756917(%edx,%ebp,1),%edx | ||
| 681 | xorl %ebx, %edi | ||
| 682 | movl 8(%esi), %ebp | ||
| 683 | addl %edi, %edx | ||
| 684 | movl $-1, %edi | ||
| 685 | roll $10, %edx | ||
| 686 | xorl %ebx, %edi | ||
| 687 | addl %eax, %edx | ||
| 688 | /* R3 62 */ | ||
| 689 | orl %edx, %edi | ||
| 690 | leal 718787259(%ecx,%ebp,1),%ecx | ||
| 691 | xorl %eax, %edi | ||
| 692 | movl 36(%esi), %ebp | ||
| 693 | addl %edi, %ecx | ||
| 694 | movl $-1, %edi | ||
| 695 | roll $15, %ecx | ||
| 696 | xorl %eax, %edi | ||
| 697 | addl %edx, %ecx | ||
| 698 | /* R3 63 */ | ||
| 699 | orl %ecx, %edi | ||
| 700 | leal 3951481745(%ebx,%ebp,1),%ebx | ||
| 701 | xorl %edx, %edi | ||
| 702 | movl 24(%esp), %ebp | ||
| 703 | addl %edi, %ebx | ||
| 704 | addl $64, %esi | ||
| 705 | roll $21, %ebx | ||
| 706 | movl (%ebp), %edi | ||
| 707 | addl %ecx, %ebx | ||
| 708 | addl %edi, %eax | ||
| 709 | movl 4(%ebp), %edi | ||
| 710 | addl %edi, %ebx | ||
| 711 | movl 8(%ebp), %edi | ||
| 712 | addl %edi, %ecx | ||
| 713 | movl 12(%ebp), %edi | ||
| 714 | addl %edi, %edx | ||
| 715 | movl %eax, (%ebp) | ||
| 716 | movl %ebx, 4(%ebp) | ||
| 717 | movl (%esp), %edi | ||
| 718 | movl %ecx, 8(%ebp) | ||
| 719 | movl %edx, 12(%ebp) | ||
| 720 | cmpl %esi, %edi | ||
| 721 | jge .L000start | ||
| 722 | popl %eax | ||
| 723 | popl %ebx | ||
| 724 | popl %ebp | ||
| 725 | popl %edi | ||
| 726 | popl %esi | ||
| 727 | ret | ||
| 728 | .md5_block_x86_end: | ||
| 729 | SIZE(md5_block_x86,.md5_block_x86_end-md5_block_x86) | ||
| 730 | .ident "desasm.pl" | ||
diff --git a/src/lib/libssl/src/crypto/mdc2/Makefile.ssl b/src/lib/libssl/src/crypto/mdc2/Makefile.ssl new file mode 100644 index 0000000000..495a2789a0 --- /dev/null +++ b/src/lib/libssl/src/crypto/mdc2/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/mdc2/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= mdc2 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST= mdc2test.c | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=mdc2dgst.c mdc2_one.c | ||
| 24 | LIBOBJ=mdc2dgst.o mdc2_one.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= mdc2.h | ||
| 29 | HEADER= $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/objects/Makefile.ssl b/src/lib/libssl/src/crypto/objects/Makefile.ssl new file mode 100644 index 0000000000..320523cea1 --- /dev/null +++ b/src/lib/libssl/src/crypto/objects/Makefile.ssl | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/objects/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= objects | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=objects | ||
| 19 | ERRC=obj_err | ||
| 20 | GENERAL=Makefile README | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= obj_dat.c obj_lib.c $(ERRC).c | ||
| 26 | LIBOBJ= obj_dat.o obj_lib.o $(ERRC).o | ||
| 27 | |||
| 28 | SRC= $(LIBSRC) | ||
| 29 | |||
| 30 | EXHEADER= objects.h | ||
| 31 | HEADER= $(EXHEADER) obj_dat.h | ||
| 32 | |||
| 33 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 34 | |||
| 35 | top: | ||
| 36 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 37 | |||
| 38 | all: obj_dat.h lib | ||
| 39 | |||
| 40 | obj_dat.h: objects.h obj_dat.pl | ||
| 41 | perl ./obj_dat.pl < objects.h > obj_dat.h | ||
| 42 | |||
| 43 | lib: $(LIBOBJ) | ||
| 44 | $(AR) $(LIB) $(LIBOBJ) | ||
| 45 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 46 | @touch lib | ||
| 47 | |||
| 48 | files: | ||
| 49 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 50 | |||
| 51 | links: | ||
| 52 | /bin/rm -f Makefile | ||
| 53 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 54 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 55 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 56 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 57 | |||
| 58 | install: | ||
| 59 | @for i in $(EXHEADER) ; \ | ||
| 60 | do \ | ||
| 61 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 62 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 63 | done; | ||
| 64 | |||
| 65 | tags: | ||
| 66 | ctags $(SRC) | ||
| 67 | |||
| 68 | tests: | ||
| 69 | |||
| 70 | lint: | ||
| 71 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 72 | |||
| 73 | depend: | ||
| 74 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 75 | |||
| 76 | dclean: | ||
| 77 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 78 | mv -f Makefile.new $(MAKEFILE) | ||
| 79 | |||
| 80 | clean: | ||
| 81 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 82 | |||
| 83 | errors: | ||
| 84 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 85 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 86 | |||
| 87 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/objects/objects.err b/src/lib/libssl/src/crypto/objects/objects.err new file mode 100644 index 0000000000..8bec3eaea2 --- /dev/null +++ b/src/lib/libssl/src/crypto/objects/objects.err | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | /* Error codes for the OBJ functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define OBJ_F_OBJ_CREATE 100 | ||
| 5 | #define OBJ_F_OBJ_DUP 101 | ||
| 6 | #define OBJ_F_OBJ_NID2LN 102 | ||
| 7 | #define OBJ_F_OBJ_NID2OBJ 103 | ||
| 8 | #define OBJ_F_OBJ_NID2SN 104 | ||
| 9 | |||
| 10 | /* Reason codes. */ | ||
| 11 | #define OBJ_R_MALLOC_FAILURE 100 | ||
| 12 | #define OBJ_R_UNKNOWN_NID 101 | ||
diff --git a/src/lib/libssl/src/crypto/pem/Makefile.ssl b/src/lib/libssl/src/crypto/pem/Makefile.ssl new file mode 100644 index 0000000000..fc04a88fd9 --- /dev/null +++ b/src/lib/libssl/src/crypto/pem/Makefile.ssl | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/pem/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= pem | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=pem | ||
| 19 | ERRC=pem_err | ||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | CTX_SIZE= ctx_size | ||
| 25 | |||
| 26 | LIB=$(TOP)/libcrypto.a | ||
| 27 | LIBSRC= pem_sign.c pem_seal.c pem_info.c pem_lib.c pem_all.c $(ERRC).c | ||
| 28 | |||
| 29 | LIBOBJ= pem_sign.o pem_seal.o pem_info.o pem_lib.o pem_all.o $(ERRC).o | ||
| 30 | |||
| 31 | SRC= $(LIBSRC) | ||
| 32 | |||
| 33 | EXHEADER= pem.h | ||
| 34 | HEADER= $(EXHEADER) | ||
| 35 | |||
| 36 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 37 | |||
| 38 | top: | ||
| 39 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 40 | |||
| 41 | all: pem.h lib | ||
| 42 | |||
| 43 | pem.h: $(CTX_SIZE) | ||
| 44 | ./$(CTX_SIZE) <pem.org >pem.new | ||
| 45 | if [ -f pem.h ]; then mv -f pem.h pem.old; fi | ||
| 46 | mv -f pem.new pem.h | ||
| 47 | |||
| 48 | $(CTX_SIZE): $(CTX_SIZE).o | ||
| 49 | $(CC) $(CFLAGS) -o $(CTX_SIZE) $(CTX_SIZE).o | ||
| 50 | |||
| 51 | lib: $(LIBOBJ) | ||
| 52 | $(AR) $(LIB) $(LIBOBJ) | ||
| 53 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 54 | @touch lib | ||
| 55 | |||
| 56 | files: | ||
| 57 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 58 | |||
| 59 | links: | ||
| 60 | /bin/rm -f Makefile | ||
| 61 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 62 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 63 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 64 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 65 | |||
| 66 | install: | ||
| 67 | @for i in $(EXHEADER) ; \ | ||
| 68 | do \ | ||
| 69 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 70 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 71 | done; | ||
| 72 | |||
| 73 | tags: | ||
| 74 | ctags $(SRC) | ||
| 75 | |||
| 76 | tests: | ||
| 77 | |||
| 78 | lint: | ||
| 79 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 80 | |||
| 81 | depend: | ||
| 82 | $(MAKEDEPEND) $(INCLUDES) $(CTX_SIZE).c $(LIBSRC) | ||
| 83 | |||
| 84 | dclean: | ||
| 85 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 86 | mv -f Makefile.new $(MAKEFILE) | ||
| 87 | |||
| 88 | clean: | ||
| 89 | /bin/rm -f $(CTX_SIZE) *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 90 | |||
| 91 | errors: | ||
| 92 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).org # SPECIAL CASE .org | ||
| 93 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 94 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 95 | |||
| 96 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/pem/ctx_size.c b/src/lib/libssl/src/crypto/pem/ctx_size.c new file mode 100644 index 0000000000..87469bc4af --- /dev/null +++ b/src/lib/libssl/src/crypto/pem/ctx_size.c | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | /* crypto/pem/ctx_size.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 "evp.h" | ||
| 62 | |||
| 63 | int main(argc,argv) | ||
| 64 | int argc; | ||
| 65 | char *argv[]; | ||
| 66 | { | ||
| 67 | int i,j; | ||
| 68 | char buf[256]; | ||
| 69 | |||
| 70 | for (;;) | ||
| 71 | { | ||
| 72 | char *str; | ||
| 73 | buf[0]='\0'; | ||
| 74 | fgets(buf,256,stdin); | ||
| 75 | if (buf[0] == '\0') break; | ||
| 76 | |||
| 77 | str="#define EVP_ENCODE_CTX_SIZE "; | ||
| 78 | if (strncmp(buf,str,strlen(str)) == 0) | ||
| 79 | { | ||
| 80 | printf("%s %d\n",str,(int)sizeof(EVP_ENCODE_CTX)); | ||
| 81 | continue; | ||
| 82 | } | ||
| 83 | str="#define EVP_MD_SIZE "; | ||
| 84 | if (strncmp(buf,str,strlen(str)) == 0) | ||
| 85 | { | ||
| 86 | printf("%s %d\n",str,(int)sizeof(EVP_MD)); | ||
| 87 | continue; | ||
| 88 | } | ||
| 89 | str="#define EVP_MD_CTX_SIZE "; | ||
| 90 | if (strncmp(buf,str,strlen(str)) == 0) | ||
| 91 | { | ||
| 92 | printf("%s %d\n",str,(int)sizeof(EVP_MD_CTX)); | ||
| 93 | continue; | ||
| 94 | } | ||
| 95 | str="#define EVP_CIPHER_SIZE "; | ||
| 96 | if (strncmp(buf,str,strlen(str)) == 0) | ||
| 97 | { | ||
| 98 | printf("%s %d\n",str,(int)sizeof(EVP_CIPHER)); | ||
| 99 | continue; | ||
| 100 | } | ||
| 101 | str="#define EVP_CIPHER_CTX_SIZE "; | ||
| 102 | if (strncmp(buf,str,strlen(str)) == 0) | ||
| 103 | { | ||
| 104 | printf("%s %d\n",str,(int)sizeof(EVP_CIPHER_CTX)); | ||
| 105 | continue; | ||
| 106 | } | ||
| 107 | |||
| 108 | str="#define EVP_MAX_MD_SIZE "; | ||
| 109 | if (strncmp(buf,str,strlen(str)) == 0) | ||
| 110 | { | ||
| 111 | i=MD2_DIGEST_LENGTH; | ||
| 112 | j=MD5_DIGEST_LENGTH; | ||
| 113 | if (j > i) i=j; | ||
| 114 | j=SHA_DIGEST_LENGTH; | ||
| 115 | if (j > i) i=j; | ||
| 116 | printf("%s %d\n",str,i); | ||
| 117 | continue; | ||
| 118 | } | ||
| 119 | fputs(buf,stdout); | ||
| 120 | } | ||
| 121 | exit(0); | ||
| 122 | } | ||
diff --git a/src/lib/libssl/src/crypto/pem/pem.err b/src/lib/libssl/src/crypto/pem/pem.err new file mode 100644 index 0000000000..0e523abf82 --- /dev/null +++ b/src/lib/libssl/src/crypto/pem/pem.err | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | /* Error codes for the PEM functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define PEM_F_DEF_CALLBACK 100 | ||
| 5 | #define PEM_F_LOAD_IV 101 | ||
| 6 | #define PEM_F_PEM_ASN1_READ 102 | ||
| 7 | #define PEM_F_PEM_ASN1_READ_BIO 103 | ||
| 8 | #define PEM_F_PEM_ASN1_WRITE 104 | ||
| 9 | #define PEM_F_PEM_ASN1_WRITE_BIO 105 | ||
| 10 | #define PEM_F_PEM_DO_HEADER 106 | ||
| 11 | #define PEM_F_PEM_GET_EVP_CIPHER_INFO 107 | ||
| 12 | #define PEM_F_PEM_READ 108 | ||
| 13 | #define PEM_F_PEM_READ_BIO 109 | ||
| 14 | #define PEM_F_PEM_SEALFINAL 110 | ||
| 15 | #define PEM_F_PEM_SEALINIT 111 | ||
| 16 | #define PEM_F_PEM_SIGNFINAL 112 | ||
| 17 | #define PEM_F_PEM_WRITE 113 | ||
| 18 | #define PEM_F_PEM_WRITE_BIO 114 | ||
| 19 | #define PEM_F_PEM_X509_INFO_READ 115 | ||
| 20 | #define PEM_F_PEM_X509_INFO_READ_BIO 116 | ||
| 21 | #define PEM_F_PEM_X509_INFO_WRITE_BIO 117 | ||
| 22 | |||
| 23 | /* Reason codes. */ | ||
| 24 | #define PEM_R_BAD_BASE64_DECODE 100 | ||
| 25 | #define PEM_R_BAD_DECRYPT 101 | ||
| 26 | #define PEM_R_BAD_END_LINE 102 | ||
| 27 | #define PEM_R_BAD_IV_CHARS 103 | ||
| 28 | #define PEM_R_BAD_PASSWORD_READ 104 | ||
| 29 | #define PEM_R_NOT_DEK_INFO 105 | ||
| 30 | #define PEM_R_NOT_ENCRYPTED 106 | ||
| 31 | #define PEM_R_NOT_PROC_TYPE 107 | ||
| 32 | #define PEM_R_NO_START_LINE 108 | ||
| 33 | #define PEM_R_PROBLEMS_GETTING_PASSWORD 109 | ||
| 34 | #define PEM_R_PUBLIC_KEY_NO_RSA 110 | ||
| 35 | #define PEM_R_READ_KEY 111 | ||
| 36 | #define PEM_R_SHORT_HEADER 112 | ||
| 37 | #define PEM_R_UNSUPPORTED_CIPHER 113 | ||
| 38 | #define PEM_R_UNSUPPORTED_ENCRYPTION 114 | ||
diff --git a/src/lib/libssl/src/crypto/pem/pem.org b/src/lib/libssl/src/crypto/pem/pem.org new file mode 100644 index 0000000000..38952509dd --- /dev/null +++ b/src/lib/libssl/src/crypto/pem/pem.org | |||
| @@ -0,0 +1,562 @@ | |||
| 1 | /* crypto/pem/pem.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify pem.org since pem.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef HEADER_PEM_H | ||
| 68 | #define HEADER_PEM_H | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | extern "C" { | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #include "evp.h" | ||
| 75 | #include "x509.h" | ||
| 76 | |||
| 77 | #define PEM_OBJ_UNDEF 0 | ||
| 78 | #define PEM_OBJ_X509 1 | ||
| 79 | #define PEM_OBJ_X509_REQ 2 | ||
| 80 | #define PEM_OBJ_CRL 3 | ||
| 81 | #define PEM_OBJ_SSL_SESSION 4 | ||
| 82 | #define PEM_OBJ_PRIV_KEY 10 | ||
| 83 | #define PEM_OBJ_PRIV_RSA 11 | ||
| 84 | #define PEM_OBJ_PRIV_DSA 12 | ||
| 85 | #define PEM_OBJ_PRIV_DH 13 | ||
| 86 | #define PEM_OBJ_PUB_RSA 14 | ||
| 87 | #define PEM_OBJ_PUB_DSA 15 | ||
| 88 | #define PEM_OBJ_PUB_DH 16 | ||
| 89 | #define PEM_OBJ_DHPARAMS 17 | ||
| 90 | #define PEM_OBJ_DSAPARAMS 18 | ||
| 91 | #define PEM_OBJ_PRIV_RSA_PUBLIC 19 | ||
| 92 | |||
| 93 | #define PEM_ERROR 30 | ||
| 94 | #define PEM_DEK_DES_CBC 40 | ||
| 95 | #define PEM_DEK_IDEA_CBC 45 | ||
| 96 | #define PEM_DEK_DES_EDE 50 | ||
| 97 | #define PEM_DEK_DES_ECB 60 | ||
| 98 | #define PEM_DEK_RSA 70 | ||
| 99 | #define PEM_DEK_RSA_MD2 80 | ||
| 100 | #define PEM_DEK_RSA_MD5 90 | ||
| 101 | |||
| 102 | #define PEM_MD_MD2 NID_md2 | ||
| 103 | #define PEM_MD_MD5 NID_md5 | ||
| 104 | #define PEM_MD_SHA NID_sha | ||
| 105 | #define PEM_MD_MD2_RSA NID_md2WithRSAEncryption | ||
| 106 | #define PEM_MD_MD5_RSA NID_md5WithRSAEncryption | ||
| 107 | #define PEM_MD_SHA_RSA NID_sha1WithRSAEncryption | ||
| 108 | |||
| 109 | #define PEM_STRING_X509_OLD "X509 CERTIFICATE" | ||
| 110 | #define PEM_STRING_X509 "CERTIFICATE" | ||
| 111 | #define PEM_STRING_X509_REQ_OLD "NEW CERTIFICATE REQUEST" | ||
| 112 | #define PEM_STRING_X509_REQ "CERTIFICATE REQUEST" | ||
| 113 | #define PEM_STRING_X509_CRL "X509 CRL" | ||
| 114 | #define PEM_STRING_EVP_PKEY "PRIVATE KEY" | ||
| 115 | #define PEM_STRING_RSA "RSA PRIVATE KEY" | ||
| 116 | #define PEM_STRING_RSA_PUBLIC "RSA PUBLIC KEY" | ||
| 117 | #define PEM_STRING_DSA "DSA PRIVATE KEY" | ||
| 118 | #define PEM_STRING_PKCS7 "PKCS7" | ||
| 119 | #define PEM_STRING_DHPARAMS "DH PARAMETERS" | ||
| 120 | #define PEM_STRING_SSL_SESSION "SSL SESSION PARAMETERS" | ||
| 121 | #define PEM_STRING_DSAPARAMS "DSA PARAMETERS" | ||
| 122 | |||
| 123 | #ifndef HEADER_ENVELOPE_H | ||
| 124 | |||
| 125 | #define EVP_ENCODE_CTX_SIZE 92 | ||
| 126 | #define EVP_MD_SIZE 48 | ||
| 127 | #define EVP_MD_CTX_SIZE 152 | ||
| 128 | #define EVP_CIPHER_SIZE 28 | ||
| 129 | #define EVP_CIPHER_CTX_SIZE 4212 | ||
| 130 | #define EVP_MAX_MD_SIZE 20 | ||
| 131 | |||
| 132 | typedef struct evp_encode_ctx_st | ||
| 133 | { | ||
| 134 | char data[EVP_ENCODE_CTX_SIZE]; | ||
| 135 | } EVP_ENCODE_CTX; | ||
| 136 | |||
| 137 | typedef struct env_md_ctx_st | ||
| 138 | { | ||
| 139 | char data[EVP_MD_CTX_SIZE]; | ||
| 140 | } EVP_MD_CTX; | ||
| 141 | |||
| 142 | typedef struct evp_cipher_st | ||
| 143 | { | ||
| 144 | char data[EVP_CIPHER_SIZE]; | ||
| 145 | } EVP_CIPHER; | ||
| 146 | |||
| 147 | typedef struct evp_cipher_ctx_st | ||
| 148 | { | ||
| 149 | char data[EVP_CIPHER_CTX_SIZE]; | ||
| 150 | } EVP_CIPHER_CTX; | ||
| 151 | #endif | ||
| 152 | |||
| 153 | |||
| 154 | typedef struct PEM_Encode_Seal_st | ||
| 155 | { | ||
| 156 | EVP_ENCODE_CTX encode; | ||
| 157 | EVP_MD_CTX md; | ||
| 158 | EVP_CIPHER_CTX cipher; | ||
| 159 | } PEM_ENCODE_SEAL_CTX; | ||
| 160 | |||
| 161 | /* enc_type is one off */ | ||
| 162 | #define PEM_TYPE_ENCRYPTED 10 | ||
| 163 | #define PEM_TYPE_MIC_ONLY 20 | ||
| 164 | #define PEM_TYPE_MIC_CLEAR 30 | ||
| 165 | #define PEM_TYPE_CLEAR 40 | ||
| 166 | |||
| 167 | typedef struct pem_recip_st | ||
| 168 | { | ||
| 169 | char *name; | ||
| 170 | X509_NAME *dn; | ||
| 171 | |||
| 172 | int cipher; | ||
| 173 | int key_enc; | ||
| 174 | char iv[8]; | ||
| 175 | } PEM_USER; | ||
| 176 | |||
| 177 | typedef struct pem_ctx_st | ||
| 178 | { | ||
| 179 | int type; /* what type of object */ | ||
| 180 | |||
| 181 | struct { | ||
| 182 | int version; | ||
| 183 | int mode; | ||
| 184 | } proc_type; | ||
| 185 | |||
| 186 | char *domain; | ||
| 187 | |||
| 188 | struct { | ||
| 189 | int cipher; | ||
| 190 | unsigned char iv[8]; | ||
| 191 | } DEK_info; | ||
| 192 | |||
| 193 | PEM_USER *originator; | ||
| 194 | |||
| 195 | int num_recipient; | ||
| 196 | PEM_USER **recipient; | ||
| 197 | |||
| 198 | #ifdef HEADER_STACK_H | ||
| 199 | STACK *x509_chain; /* certificate chain */ | ||
| 200 | #else | ||
| 201 | char *x509_chain; /* certificate chain */ | ||
| 202 | #endif | ||
| 203 | EVP_MD *md; /* signature type */ | ||
| 204 | |||
| 205 | int md_enc; /* is the md encrypted or not? */ | ||
| 206 | int md_len; /* length of md_data */ | ||
| 207 | char *md_data; /* message digest, could be pkey encrypted */ | ||
| 208 | |||
| 209 | EVP_CIPHER *dec; /* date encryption cipher */ | ||
| 210 | int key_len; /* key length */ | ||
| 211 | unsigned char *key; /* key */ | ||
| 212 | unsigned char iv[8]; /* the iv */ | ||
| 213 | |||
| 214 | |||
| 215 | int data_enc; /* is the data encrypted */ | ||
| 216 | int data_len; | ||
| 217 | unsigned char *data; | ||
| 218 | } PEM_CTX; | ||
| 219 | |||
| 220 | #ifdef SSLEAY_MACROS | ||
| 221 | |||
| 222 | #define PEM_write_SSL_SESSION(fp,x) \ | ||
| 223 | PEM_ASN1_write((int (*)())i2d_SSL_SESSION, \ | ||
| 224 | PEM_STRING_SSL_SESSION,fp, (char *)x, NULL,NULL,0,NULL) | ||
| 225 | #define PEM_write_X509(fp,x) \ | ||
| 226 | PEM_ASN1_write((int (*)())i2d_X509,PEM_STRING_X509,fp, \ | ||
| 227 | (char *)x, NULL,NULL,0,NULL) | ||
| 228 | #define PEM_write_X509_REQ(fp,x) PEM_ASN1_write( \ | ||
| 229 | (int (*)())i2d_X509_REQ,PEM_STRING_X509_REQ,fp,(char *)x, \ | ||
| 230 | NULL,NULL,0,NULL) | ||
| 231 | #define PEM_write_X509_CRL(fp,x) \ | ||
| 232 | PEM_ASN1_write((int (*)())i2d_X509_CRL,PEM_STRING_X509_CRL, \ | ||
| 233 | fp,(char *)x, NULL,NULL,0,NULL) | ||
| 234 | #define PEM_write_RSAPrivateKey(fp,x,enc,kstr,klen,cb) \ | ||
| 235 | PEM_ASN1_write((int (*)())i2d_RSAPrivateKey,PEM_STRING_RSA,fp,\ | ||
| 236 | (char *)x,enc,kstr,klen,cb) | ||
| 237 | #define PEM_write_RSAPublicKey(fp,x) \ | ||
| 238 | PEM_ASN1_write((int (*)())i2d_RSAPublicKey,\ | ||
| 239 | PEM_STRING_RSA_PUBLIC,fp,(char *)x,NULL,NULL,0,NULL) | ||
| 240 | #define PEM_write_DSAPrivateKey(fp,x,enc,kstr,klen,cb) \ | ||
| 241 | PEM_ASN1_write((int (*)())i2d_DSAPrivateKey,PEM_STRING_DSA,fp,\ | ||
| 242 | (char *)x,enc,kstr,klen,cb) | ||
| 243 | #define PEM_write_PrivateKey(bp,x,enc,kstr,klen,cb) \ | ||
| 244 | PEM_ASN1_write((int (*)())i2d_PrivateKey,\ | ||
| 245 | (((x)->type == EVP_PKEY_DSA)?PEM_STRING_DSA:PEM_STRING_RSA),\ | ||
| 246 | bp,(char *)x,enc,kstr,klen,cb) | ||
| 247 | #define PEM_write_PKCS7(fp,x) \ | ||
| 248 | PEM_ASN1_write((int (*)())i2d_PKCS7,PEM_STRING_PKCS7,fp, \ | ||
| 249 | (char *)x, NULL,NULL,0,NULL) | ||
| 250 | #define PEM_write_DHparams(fp,x) \ | ||
| 251 | PEM_ASN1_write((int (*)())i2d_DHparams,PEM_STRING_DHPARAMS,fp,\ | ||
| 252 | (char *)x,NULL,NULL,0,NULL) | ||
| 253 | |||
| 254 | #define PEM_read_SSL_SESSION(fp,x,cb) (SSL_SESSION *)PEM_ASN1_read( \ | ||
| 255 | (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,fp,(char **)x,cb) | ||
| 256 | #define PEM_read_X509(fp,x,cb) (X509 *)PEM_ASN1_read( \ | ||
| 257 | (char *(*)())d2i_X509,PEM_STRING_X509,fp,(char **)x,cb) | ||
| 258 | #define PEM_read_X509_REQ(fp,x,cb) (X509_REQ *)PEM_ASN1_read( \ | ||
| 259 | (char *(*)())d2i_X509_REQ,PEM_STRING_X509_REQ,fp,(char **)x,cb) | ||
| 260 | #define PEM_read_X509_CRL(fp,x,cb) (X509_CRL *)PEM_ASN1_read( \ | ||
| 261 | (char *(*)())d2i_X509_CRL,PEM_STRING_X509_CRL,fp,(char **)x,cb) | ||
| 262 | #define PEM_read_RSAPrivateKey(fp,x,cb) (RSA *)PEM_ASN1_read( \ | ||
| 263 | (char *(*)())d2i_RSAPrivateKey,PEM_STRING_RSA,fp,(char **)x,cb) | ||
| 264 | #define PEM_read_RSAPublicKey(fp,x,cb) (RSA *)PEM_ASN1_read( \ | ||
| 265 | (char *(*)())d2i_RSAPublicKey,PEM_STRING_RSA_PUBLIC,fp,(char **)x,cb) | ||
| 266 | #define PEM_read_DSAPrivateKey(fp,x,cb) (DSA *)PEM_ASN1_read( \ | ||
| 267 | (char *(*)())d2i_DSAPrivateKey,PEM_STRING_DSA,fp,(char **)x,cb) | ||
| 268 | #define PEM_read_PrivateKey(fp,x,cb) (EVP_PKEY *)PEM_ASN1_read( \ | ||
| 269 | (char *(*)())d2i_PrivateKey,PEM_STRING_EVP_PKEY,fp,(char **)x,cb) | ||
| 270 | #define PEM_read_PKCS7(fp,x,cb) (PKCS7 *)PEM_ASN1_read( \ | ||
| 271 | (char *(*)())d2i_PKCS7,PEM_STRING_PKCS7,fp,(char **)x,cb) | ||
| 272 | #define PEM_read_DHparams(fp,x,cb) (DH *)PEM_ASN1_read( \ | ||
| 273 | (char *(*)())d2i_DHparams,PEM_STRING_DHPARAMS,fp,(char **)x,cb) | ||
| 274 | |||
| 275 | #define PEM_write_bio_SSL_SESSION(bp,x) \ | ||
| 276 | PEM_ASN1_write_bio((int (*)())i2d_SSL_SESSION, \ | ||
| 277 | PEM_STRING_SSL_SESSION,bp, (char *)x, NULL,NULL,0,NULL) | ||
| 278 | #define PEM_write_bio_X509(bp,x) \ | ||
| 279 | PEM_ASN1_write_bio((int (*)())i2d_X509,PEM_STRING_X509,bp, \ | ||
| 280 | (char *)x, NULL,NULL,0,NULL) | ||
| 281 | #define PEM_write_bio_X509_REQ(bp,x) PEM_ASN1_write_bio( \ | ||
| 282 | (int (*)())i2d_X509_REQ,PEM_STRING_X509_REQ,bp,(char *)x, \ | ||
| 283 | NULL,NULL,0,NULL) | ||
| 284 | #define PEM_write_bio_X509_CRL(bp,x) \ | ||
| 285 | PEM_ASN1_write_bio((int (*)())i2d_X509_CRL,PEM_STRING_X509_CRL,\ | ||
| 286 | bp,(char *)x, NULL,NULL,0,NULL) | ||
| 287 | #define PEM_write_bio_RSAPrivateKey(bp,x,enc,kstr,klen,cb) \ | ||
| 288 | PEM_ASN1_write_bio((int (*)())i2d_RSAPrivateKey,PEM_STRING_RSA,\ | ||
| 289 | bp,(char *)x,enc,kstr,klen,cb) | ||
| 290 | #define PEM_write_bio_RSAPublicKey(bp,x) \ | ||
| 291 | PEM_ASN1_write_bio((int (*)())i2d_RSAPublicKey, \ | ||
| 292 | PEM_STRING_RSA_PUBLIC,\ | ||
| 293 | bp,(char *)x,NULL,NULL,0,NULL) | ||
| 294 | #define PEM_write_bio_DSAPrivateKey(bp,x,enc,kstr,klen,cb) \ | ||
| 295 | PEM_ASN1_write_bio((int (*)())i2d_DSAPrivateKey,PEM_STRING_DSA,\ | ||
| 296 | bp,(char *)x,enc,kstr,klen,cb) | ||
| 297 | #define PEM_write_bio_PrivateKey(bp,x,enc,kstr,klen,cb) \ | ||
| 298 | PEM_ASN1_write_bio((int (*)())i2d_PrivateKey,\ | ||
| 299 | (((x)->type == EVP_PKEY_DSA)?PEM_STRING_DSA:PEM_STRING_RSA),\ | ||
| 300 | bp,(char *)x,enc,kstr,klen,cb) | ||
| 301 | #define PEM_write_bio_PKCS7(bp,x) \ | ||
| 302 | PEM_ASN1_write_bio((int (*)())i2d_PKCS7,PEM_STRING_PKCS7,bp, \ | ||
| 303 | (char *)x, NULL,NULL,0,NULL) | ||
| 304 | #define PEM_write_bio_DHparams(bp,x) \ | ||
| 305 | PEM_ASN1_write_bio((int (*)())i2d_DHparams,PEM_STRING_DHPARAMS,\ | ||
| 306 | bp,(char *)x,NULL,NULL,0,NULL) | ||
| 307 | #define PEM_write_bio_DSAparams(bp,x) \ | ||
| 308 | PEM_ASN1_write_bio((int (*)())i2d_DSAparams, \ | ||
| 309 | PEM_STRING_DSAPARAMS,bp,(char *)x,NULL,NULL,0,NULL) | ||
| 310 | |||
| 311 | #define PEM_read_bio_SSL_SESSION(bp,x,cb) (SSL_SESSION *)PEM_ASN1_read_bio( \ | ||
| 312 | (char *(*)())d2i_SSL_SESSION,PEM_STRING_SSL_SESSION,bp,(char **)x,cb) | ||
| 313 | #define PEM_read_bio_X509(bp,x,cb) (X509 *)PEM_ASN1_read_bio( \ | ||
| 314 | (char *(*)())d2i_X509,PEM_STRING_X509,bp,(char **)x,cb) | ||
| 315 | #define PEM_read_bio_X509_REQ(bp,x,cb) (X509_REQ *)PEM_ASN1_read_bio( \ | ||
| 316 | (char *(*)())d2i_X509_REQ,PEM_STRING_X509_REQ,bp,(char **)x,cb) | ||
| 317 | #define PEM_read_bio_X509_CRL(bp,x,cb) (X509_CRL *)PEM_ASN1_read_bio( \ | ||
| 318 | (char *(*)())d2i_X509_CRL,PEM_STRING_X509_CRL,bp,(char **)x,cb) | ||
| 319 | #define PEM_read_bio_RSAPrivateKey(bp,x,cb) (RSA *)PEM_ASN1_read_bio( \ | ||
| 320 | (char *(*)())d2i_RSAPrivateKey,PEM_STRING_RSA,bp,(char **)x,cb) | ||
| 321 | #define PEM_read_bio_RSAPublicKey(bp,x,cb) (RSA *)PEM_ASN1_read_bio( \ | ||
| 322 | (char *(*)())d2i_RSAPublicKey,PEM_STRING_RSA_PUBLIC,bp,(char **)x,cb) | ||
| 323 | #define PEM_read_bio_DSAPrivateKey(bp,x,cb) (DSA *)PEM_ASN1_read_bio( \ | ||
| 324 | (char *(*)())d2i_DSAPrivateKey,PEM_STRING_DSA,bp,(char **)x,cb) | ||
| 325 | #define PEM_read_bio_PrivateKey(bp,x,cb) (EVP_PKEY *)PEM_ASN1_read_bio( \ | ||
| 326 | (char *(*)())d2i_PrivateKey,PEM_STRING_EVP_PKEY,bp,(char **)x,cb) | ||
| 327 | |||
| 328 | #define PEM_read_bio_PKCS7(bp,x,cb) (PKCS7 *)PEM_ASN1_read_bio( \ | ||
| 329 | (char *(*)())d2i_PKCS7,PEM_STRING_PKCS7,bp,(char **)x,cb) | ||
| 330 | #define PEM_read_bio_DHparams(bp,x,cb) (DH *)PEM_ASN1_read_bio( \ | ||
| 331 | (char *(*)())d2i_DHparams,PEM_STRING_DHPARAMS,bp,(char **)x,cb) | ||
| 332 | #define PEM_read_bio_DSAparams(bp,x,cb) (DSA *)PEM_ASN1_read_bio( \ | ||
| 333 | (char *(*)())d2i_DSAparams,PEM_STRING_DSAPARAMS,bp,(char **)x,cb) | ||
| 334 | |||
| 335 | #endif | ||
| 336 | |||
| 337 | #ifndef NOPROTO | ||
| 338 | int PEM_get_EVP_CIPHER_INFO(char *header, EVP_CIPHER_INFO *cipher); | ||
| 339 | int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len, | ||
| 340 | int (*callback)()); | ||
| 341 | |||
| 342 | #ifdef HEADER_BIO_H | ||
| 343 | int PEM_read_bio(BIO *bp, char **name, char **header, | ||
| 344 | unsigned char **data,long *len); | ||
| 345 | int PEM_write_bio(BIO *bp,char *name,char *hdr,unsigned char *data, | ||
| 346 | long len); | ||
| 347 | char * PEM_ASN1_read_bio(char *(*d2i)(),char *name,BIO *bp,char **x, | ||
| 348 | int (*cb)()); | ||
| 349 | int PEM_ASN1_write_bio(int (*i2d)(),char *name,BIO *bp,char *x, | ||
| 350 | EVP_CIPHER *enc,unsigned char *kstr,int klen,int (*callback)()); | ||
| 351 | STACK * PEM_X509_INFO_read_bio(BIO *bp, STACK *sk, int (*cb)()); | ||
| 352 | int PEM_X509_INFO_write_bio(BIO *bp,X509_INFO *xi, EVP_CIPHER *enc, | ||
| 353 | unsigned char *kstr, int klen, int (*cb)()); | ||
| 354 | #endif | ||
| 355 | |||
| 356 | #ifndef WIN16 | ||
| 357 | int PEM_read(FILE *fp, char **name, char **header, | ||
| 358 | unsigned char **data,long *len); | ||
| 359 | int PEM_write(FILE *fp,char *name,char *hdr,unsigned char *data,long len); | ||
| 360 | char * PEM_ASN1_read(char *(*d2i)(),char *name,FILE *fp,char **x, | ||
| 361 | int (*cb)()); | ||
| 362 | int PEM_ASN1_write(int (*i2d)(),char *name,FILE *fp,char *x, | ||
| 363 | EVP_CIPHER *enc,unsigned char *kstr,int klen,int (*callback)()); | ||
| 364 | STACK * PEM_X509_INFO_read(FILE *fp, STACK *sk, int (*cb)()); | ||
| 365 | #endif | ||
| 366 | |||
| 367 | int PEM_SealInit(PEM_ENCODE_SEAL_CTX *ctx, EVP_CIPHER *type, | ||
| 368 | EVP_MD *md_type, unsigned char **ek, int *ekl, | ||
| 369 | unsigned char *iv, EVP_PKEY **pubk, int npubk); | ||
| 370 | void PEM_SealUpdate(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *out, int *outl, | ||
| 371 | unsigned char *in, int inl); | ||
| 372 | int PEM_SealFinal(PEM_ENCODE_SEAL_CTX *ctx, unsigned char *sig,int *sigl, | ||
| 373 | unsigned char *out, int *outl, EVP_PKEY *priv); | ||
| 374 | |||
| 375 | void PEM_SignInit(EVP_MD_CTX *ctx, EVP_MD *type); | ||
| 376 | void PEM_SignUpdate(EVP_MD_CTX *ctx,unsigned char *d,unsigned int cnt); | ||
| 377 | int PEM_SignFinal(EVP_MD_CTX *ctx, unsigned char *sigret, | ||
| 378 | unsigned int *siglen, EVP_PKEY *pkey); | ||
| 379 | |||
| 380 | void ERR_load_PEM_strings(void); | ||
| 381 | |||
| 382 | void PEM_proc_type(char *buf, int type); | ||
| 383 | void PEM_dek_info(char *buf, char *type, int len, char *str); | ||
| 384 | |||
| 385 | #ifndef SSLEAY_MACROS | ||
| 386 | |||
| 387 | #ifndef WIN16 | ||
| 388 | X509 *PEM_read_X509(FILE *fp,X509 **x,int (*cb)()); | ||
| 389 | X509_REQ *PEM_read_X509_REQ(FILE *fp,X509_REQ **x,int (*cb)()); | ||
| 390 | X509_CRL *PEM_read_X509_CRL(FILE *fp,X509_CRL **x,int (*cb)()); | ||
| 391 | RSA *PEM_read_RSAPrivateKey(FILE *fp,RSA **x,int (*cb)()); | ||
| 392 | RSA *PEM_read_RSAPublicKey(FILE *fp,RSA **x,int (*cb)()); | ||
| 393 | DSA *PEM_read_DSAPrivateKey(FILE *fp,DSA **x,int (*cb)()); | ||
| 394 | EVP_PKEY *PEM_read_PrivateKey(FILE *fp,EVP_PKEY **x,int (*cb)()); | ||
| 395 | PKCS7 *PEM_read_PKCS7(FILE *fp,PKCS7 **x,int (*cb)()); | ||
| 396 | DH *PEM_read_DHparams(FILE *fp,DH **x,int (*cb)()); | ||
| 397 | DSA *PEM_read_DSAparams(FILE *fp,DSA **x,int (*cb)()); | ||
| 398 | int PEM_write_X509(FILE *fp,X509 *x); | ||
| 399 | int PEM_write_X509_REQ(FILE *fp,X509_REQ *x); | ||
| 400 | int PEM_write_X509_CRL(FILE *fp,X509_CRL *x); | ||
| 401 | int PEM_write_RSAPrivateKey(FILE *fp,RSA *x,EVP_CIPHER *enc,unsigned char *kstr, | ||
| 402 | int klen,int (*cb)()); | ||
| 403 | int PEM_write_RSAPublicKey(FILE *fp,RSA *x); | ||
| 404 | int PEM_write_DSAPrivateKey(FILE *fp,DSA *x,EVP_CIPHER *enc,unsigned char *kstr, | ||
| 405 | int klen,int (*cb)()); | ||
| 406 | int PEM_write_PrivateKey(FILE *fp,EVP_PKEY *x,EVP_CIPHER *enc, | ||
| 407 | unsigned char *kstr,int klen,int (*cb)()); | ||
| 408 | int PEM_write_PKCS7(FILE *fp,PKCS7 *x); | ||
| 409 | int PEM_write_DHparams(FILE *fp,DH *x); | ||
| 410 | int PEM_write_DSAparams(FILE *fp,DSA *x); | ||
| 411 | #endif | ||
| 412 | |||
| 413 | #ifdef HEADER_BIO_H | ||
| 414 | X509 *PEM_read_bio_X509(BIO *bp,X509 **x,int (*cb)()); | ||
| 415 | X509_REQ *PEM_read_bio_X509_REQ(BIO *bp,X509_REQ **x,int (*cb)()); | ||
| 416 | X509_CRL *PEM_read_bio_X509_CRL(BIO *bp,X509_CRL **x,int (*cb)()); | ||
| 417 | RSA *PEM_read_bio_RSAPrivateKey(BIO *bp,RSA **x,int (*cb)()); | ||
| 418 | RSA *PEM_read_bio_RSAPublicKey(BIO *bp,RSA **x,int (*cb)()); | ||
| 419 | DSA *PEM_read_bio_DSAPrivateKey(BIO *bp,DSA **x,int (*cb)()); | ||
| 420 | EVP_PKEY *PEM_read_bio_PrivateKey(BIO *bp,EVP_PKEY **x,int (*cb)()); | ||
| 421 | PKCS7 *PEM_read_bio_PKCS7(BIO *bp,PKCS7 **x,int (*cb)()); | ||
| 422 | DH *PEM_read_bio_DHparams(BIO *bp,DH **x,int (*cb)()); | ||
| 423 | DSA *PEM_read_bio_DSAparams(BIO *bp,DSA **x,int (*cb)()); | ||
| 424 | int PEM_write_bio_X509(BIO *bp,X509 *x); | ||
| 425 | int PEM_write_bio_X509_REQ(BIO *bp,X509_REQ *x); | ||
| 426 | int PEM_write_bio_X509_CRL(BIO *bp,X509_CRL *x); | ||
| 427 | int PEM_write_bio_RSAPrivateKey(BIO *fp,RSA *x,EVP_CIPHER *enc, | ||
| 428 | unsigned char *kstr,int klen,int (*cb)()); | ||
| 429 | int PEM_write_bio_RSAPublicKey(BIO *fp,RSA *x); | ||
| 430 | int PEM_write_bio_DSAPrivateKey(BIO *fp,DSA *x,EVP_CIPHER *enc, | ||
| 431 | unsigned char *kstr,int klen,int (*cb)()); | ||
| 432 | int PEM_write_bio_PrivateKey(BIO *fp,EVP_PKEY *x,EVP_CIPHER *enc, | ||
| 433 | unsigned char *kstr,int klen,int (*cb)()); | ||
| 434 | int PEM_write_bio_PKCS7(BIO *bp,PKCS7 *x); | ||
| 435 | int PEM_write_bio_DHparams(BIO *bp,DH *x); | ||
| 436 | int PEM_write_bio_DSAparams(BIO *bp,DSA *x); | ||
| 437 | #endif | ||
| 438 | |||
| 439 | #endif /* SSLEAY_MACROS */ | ||
| 440 | |||
| 441 | |||
| 442 | #else | ||
| 443 | |||
| 444 | int PEM_get_EVP_CIPHER_INFO(); | ||
| 445 | int PEM_do_header(); | ||
| 446 | int PEM_read_bio(); | ||
| 447 | int PEM_write_bio(); | ||
| 448 | #ifndef WIN16 | ||
| 449 | int PEM_read(); | ||
| 450 | int PEM_write(); | ||
| 451 | STACK * PEM_X509_INFO_read(); | ||
| 452 | char * PEM_ASN1_read(); | ||
| 453 | int PEM_ASN1_write(); | ||
| 454 | #endif | ||
| 455 | STACK * PEM_X509_INFO_read_bio(); | ||
| 456 | int PEM_X509_INFO_write_bio(); | ||
| 457 | char * PEM_ASN1_read_bio(); | ||
| 458 | int PEM_ASN1_write_bio(); | ||
| 459 | int PEM_SealInit(); | ||
| 460 | void PEM_SealUpdate(); | ||
| 461 | int PEM_SealFinal(); | ||
| 462 | int PEM_SignFinal(); | ||
| 463 | |||
| 464 | void ERR_load_PEM_strings(); | ||
| 465 | |||
| 466 | void PEM_proc_type(); | ||
| 467 | void PEM_dek_info(); | ||
| 468 | |||
| 469 | #ifndef SSLEAY_MACROS | ||
| 470 | #ifndef WIN16 | ||
| 471 | X509 *PEM_read_X509(); | ||
| 472 | X509_REQ *PEM_read_X509_REQ(); | ||
| 473 | X509_CRL *PEM_read_X509_CRL(); | ||
| 474 | RSA *PEM_read_RSAPrivateKey(); | ||
| 475 | RSA *PEM_read_RSAPublicKey(); | ||
| 476 | DSA *PEM_read_DSAPrivateKey(); | ||
| 477 | EVP_PKEY *PEM_read_PrivateKey(); | ||
| 478 | PKCS7 *PEM_read_PKCS7(); | ||
| 479 | DH *PEM_read_DHparams(); | ||
| 480 | DSA *PEM_read_DSAparams(); | ||
| 481 | int PEM_write_X509(); | ||
| 482 | int PEM_write_X509_REQ(); | ||
| 483 | int PEM_write_X509_CRL(); | ||
| 484 | int PEM_write_RSAPrivateKey(); | ||
| 485 | int PEM_write_RSAPublicKey(); | ||
| 486 | int PEM_write_DSAPrivateKey(); | ||
| 487 | int PEM_write_PrivateKey(); | ||
| 488 | int PEM_write_PKCS7(); | ||
| 489 | int PEM_write_DHparams(); | ||
| 490 | int PEM_write_DSAparams(); | ||
| 491 | #endif | ||
| 492 | |||
| 493 | X509 *PEM_read_bio_X509(); | ||
| 494 | X509_REQ *PEM_read_bio_X509_REQ(); | ||
| 495 | X509_CRL *PEM_read_bio_X509_CRL(); | ||
| 496 | RSA *PEM_read_bio_RSAPrivateKey(); | ||
| 497 | RSA *PEM_read_bio_RSAPublicKey(); | ||
| 498 | DSA *PEM_read_bio_DSAPrivateKey(); | ||
| 499 | EVP_PKEY *PEM_read_bio_PrivateKey(); | ||
| 500 | PKCS7 *PEM_read_bio_PKCS7(); | ||
| 501 | DH *PEM_read_bio_DHparams(); | ||
| 502 | DSA *PEM_read_bio_DSAparams(); | ||
| 503 | int PEM_write_bio_X509(); | ||
| 504 | int PEM_write_bio_X509_REQ(); | ||
| 505 | int PEM_write_bio_X509_CRL(); | ||
| 506 | int PEM_write_bio_RSAPrivateKey(); | ||
| 507 | int PEM_write_bio_RSAPublicKey(); | ||
| 508 | int PEM_write_bio_DSAPrivateKey(); | ||
| 509 | int PEM_write_bio_PrivateKey(); | ||
| 510 | int PEM_write_bio_PKCS7(); | ||
| 511 | int PEM_write_bio_DHparams(); | ||
| 512 | int PEM_write_bio_DSAparams(); | ||
| 513 | |||
| 514 | #endif /* SSLEAY_MACROS */ | ||
| 515 | |||
| 516 | #endif | ||
| 517 | |||
| 518 | /* BEGIN ERROR CODES */ | ||
| 519 | /* Error codes for the PEM functions. */ | ||
| 520 | |||
| 521 | /* Function codes. */ | ||
| 522 | #define PEM_F_DEF_CALLBACK 100 | ||
| 523 | #define PEM_F_LOAD_IV 101 | ||
| 524 | #define PEM_F_PEM_ASN1_READ 102 | ||
| 525 | #define PEM_F_PEM_ASN1_READ_BIO 103 | ||
| 526 | #define PEM_F_PEM_ASN1_WRITE 104 | ||
| 527 | #define PEM_F_PEM_ASN1_WRITE_BIO 105 | ||
| 528 | #define PEM_F_PEM_DO_HEADER 106 | ||
| 529 | #define PEM_F_PEM_GET_EVP_CIPHER_INFO 107 | ||
| 530 | #define PEM_F_PEM_READ 108 | ||
| 531 | #define PEM_F_PEM_READ_BIO 109 | ||
| 532 | #define PEM_F_PEM_SEALFINAL 110 | ||
| 533 | #define PEM_F_PEM_SEALINIT 111 | ||
| 534 | #define PEM_F_PEM_SIGNFINAL 112 | ||
| 535 | #define PEM_F_PEM_WRITE 113 | ||
| 536 | #define PEM_F_PEM_WRITE_BIO 114 | ||
| 537 | #define PEM_F_PEM_X509_INFO_READ 115 | ||
| 538 | #define PEM_F_PEM_X509_INFO_READ_BIO 116 | ||
| 539 | #define PEM_F_PEM_X509_INFO_WRITE_BIO 117 | ||
| 540 | |||
| 541 | /* Reason codes. */ | ||
| 542 | #define PEM_R_BAD_BASE64_DECODE 100 | ||
| 543 | #define PEM_R_BAD_DECRYPT 101 | ||
| 544 | #define PEM_R_BAD_END_LINE 102 | ||
| 545 | #define PEM_R_BAD_IV_CHARS 103 | ||
| 546 | #define PEM_R_BAD_PASSWORD_READ 104 | ||
| 547 | #define PEM_R_NOT_DEK_INFO 105 | ||
| 548 | #define PEM_R_NOT_ENCRYPTED 106 | ||
| 549 | #define PEM_R_NOT_PROC_TYPE 107 | ||
| 550 | #define PEM_R_NO_START_LINE 108 | ||
| 551 | #define PEM_R_PROBLEMS_GETTING_PASSWORD 109 | ||
| 552 | #define PEM_R_PUBLIC_KEY_NO_RSA 110 | ||
| 553 | #define PEM_R_READ_KEY 111 | ||
| 554 | #define PEM_R_SHORT_HEADER 112 | ||
| 555 | #define PEM_R_UNSUPPORTED_CIPHER 113 | ||
| 556 | #define PEM_R_UNSUPPORTED_ENCRYPTION 114 | ||
| 557 | |||
| 558 | #ifdef __cplusplus | ||
| 559 | } | ||
| 560 | #endif | ||
| 561 | #endif | ||
| 562 | |||
diff --git a/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl b/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl new file mode 100644 index 0000000000..a88359b320 --- /dev/null +++ b/src/lib/libssl/src/crypto/pkcs7/Makefile.ssl | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/asn1/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= pkcs7 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=pkcs7 | ||
| 19 | ERRC=pkcs7err | ||
| 20 | GENERAL=Makefile README | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= pk7_lib.c pkcs7err.c pk7_doit.c | ||
| 26 | LIBOBJ= pk7_lib.o pkcs7err.o pk7_doit.o | ||
| 27 | |||
| 28 | SRC= $(LIBSRC) | ||
| 29 | |||
| 30 | EXHEADER= pkcs7.h | ||
| 31 | HEADER= $(EXHEADER) | ||
| 32 | |||
| 33 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 34 | |||
| 35 | top: | ||
| 36 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 37 | |||
| 38 | test: | ||
| 39 | |||
| 40 | all: lib | ||
| 41 | |||
| 42 | lib: $(LIBOBJ) | ||
| 43 | $(AR) $(LIB) $(LIBOBJ) | ||
| 44 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 45 | @touch lib | ||
| 46 | |||
| 47 | files: | ||
| 48 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 49 | |||
| 50 | links: | ||
| 51 | /bin/rm -f Makefile | ||
| 52 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 53 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 54 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 55 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 56 | |||
| 57 | install: | ||
| 58 | @for i in $(EXHEADER) ; \ | ||
| 59 | do \ | ||
| 60 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 61 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 62 | done; | ||
| 63 | |||
| 64 | tags: | ||
| 65 | ctags $(SRC) | ||
| 66 | |||
| 67 | tests: | ||
| 68 | |||
| 69 | lint: | ||
| 70 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 71 | |||
| 72 | depend: | ||
| 73 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 74 | |||
| 75 | dclean: | ||
| 76 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 77 | mv -f Makefile.new $(MAKEFILE) | ||
| 78 | |||
| 79 | clean: | ||
| 80 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 81 | |||
| 82 | errors: | ||
| 83 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 84 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 85 | |||
| 86 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/pkcs7/README b/src/lib/libssl/src/crypto/pkcs7/README new file mode 100644 index 0000000000..27001c6970 --- /dev/null +++ b/src/lib/libssl/src/crypto/pkcs7/README | |||
| @@ -0,0 +1,5 @@ | |||
| 1 | WARNING | ||
| 2 | |||
| 3 | Everything in this directory is experimental and is subject to change. | ||
| 4 | |||
| 5 | Do not rely on the stuff in here not changing in the next release | ||
diff --git a/src/lib/libssl/src/crypto/pkcs7/mf.p7 b/src/lib/libssl/src/crypto/pkcs7/mf.p7 new file mode 100644 index 0000000000..524335b4b3 --- /dev/null +++ b/src/lib/libssl/src/crypto/pkcs7/mf.p7 | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | -----BEGIN PKCS7----- | ||
| 2 | MIAGCSqGSIb3DQEHAqCAMIIC2QIBATEMMAoGCCqGSIb3DQIFMIAGCSqGSIb3DQEH | ||
| 3 | AQAAoIIB7TCCAekwggFSAgEAMA0GCSqGSIb3DQEBBAUAMFsxCzAJBgNVBAYTAkFV | ||
| 4 | MRMwEQYDVQQIEwpRdWVlbnNsYW5kMRowGAYDVQQKExFDcnlwdFNvZnQgUHR5IEx0 | ||
| 5 | ZDEbMBkGA1UEAxMSVGVzdCBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTc0NloX | ||
| 6 | DTk4MDYwOTEzNTc0NlowYzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xh | ||
| 7 | bmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMSMwIQYDVQQDExpTZXJ2ZXIg | ||
| 8 | dGVzdCBjZXJ0ICg1MTIgYml0KTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQCfs8OE | ||
| 9 | J5X/EjFSDxXvRhHErYDmNlsP3YDXYY3g/HJFCTT+VWZFQ0xol2r+qKCl3194/+7X | ||
| 10 | ZLg/BMtv/yr+/rntAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAeEzEdgr2nChPcALL | ||
| 11 | vY8gl/GIlpoAjPmKD+pLeGZI9s+SEX5u1q8nCrJ6ZzkfrRnqgI5Anmev9+qPZfdU | ||
| 12 | bz5zdVSf4sUL9nX9ChXjK9NCJA3UzQHSFqhZErGUwGNkAHYHp2+zAdY6Ho6rmMzt | ||
| 13 | g0CDu/sKR4qzm6REsQGS8kgpjz4xgcUwgcICAQEwYDBbMQswCQYDVQQGEwJBVTET | ||
| 14 | MBEGA1UECBMKUXVlZW5zbGFuZDEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQx | ||
| 15 | GzAZBgNVBAMTElRlc3QgQ0EgKDEwMjQgYml0KQIBADAKBggqhkiG9w0CBTANBgkq | ||
| 16 | hkiG9w0BAQQFAARALnrxJiOX9XZf2D+3vL8SKMQmMq55LltomwOLGUru/q1uVXzi | ||
| 17 | ARg7FSCegOpA1nunsTURMUGgrPXKK4XmL4IseQAAAAA= | ||
| 18 | -----END PKCS7----- | ||
diff --git a/src/lib/libssl/src/crypto/pkcs7/p7.tst b/src/lib/libssl/src/crypto/pkcs7/p7.tst new file mode 100644 index 0000000000..6d14dce163 --- /dev/null +++ b/src/lib/libssl/src/crypto/pkcs7/p7.tst | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | -----BEGIN PKCS7----- | ||
| 2 | MIAGCSqGSIb3DQEHAqCAMIIFsQIBATELMAkGBSsOAwIaBQAwgAYJKoZIhvcNAQcB | ||
| 3 | AACgggQdMIICJTCCAc+gAwIBAgIBIjANBgkqhkiG9w0BAQQFADCBgjELMAkGA1UE | ||
| 4 | BhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxETAPBgNVBAcTCEJyaXNiYW5lMRow | ||
| 5 | GAYDVQQKExFDcnlwdFNvZnQgUHR5IEx0ZDEUMBIGA1UECxMLZGV2ZWxvcG1lbnQx | ||
| 6 | GTAXBgNVBAMTEENyeXB0U29mdCBEZXYgQ0EwHhcNOTcwNjEzMTgxMDE3WhcNOTgw | ||
| 7 | NjEzMTgxMDE3WjCBiDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQx | ||
| 8 | ETAPBgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdFNvZnQgUHR5IEx0ZDEU | ||
| 9 | MBIGA1UECxMLSUlTIHRlc3RpbmcxDjAMBgNVBAMTBXRlc3QxMQ8wDQYJKoZIhvcN | ||
| 10 | AQkBFgAwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAxtWiv59VH42+rotrmFAyDxTc | ||
| 11 | J2osFt5uy/zEllx3vvjtwewqQxGUOwf6cjqFOTrnpEdVvwywpEhIQ5364bJqIwID | ||
| 12 | AQABoygwJjAkBglghkgBhvhCAQ0EFxYVR2VuZXJhdGVkIHdpdGggU1NMZWF5MA0G | ||
| 13 | CSqGSIb3DQEBBAUAA0EAMnYkNV2AdpeHPy/qlcdZx6MDGIJgrLhklhcn6Or6KiAP | ||
| 14 | t9+nv9XdOGHyMyQr9ufsweuQfAgJ9yjKPZR2/adTjTCCAfAwggGaAgEAMA0GCSqG | ||
| 15 | SIb3DQEBBAUAMIGCMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDER | ||
| 16 | MA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRQw | ||
| 17 | EgYDVQQLEwtkZXZlbG9wbWVudDEZMBcGA1UEAxMQQ3J5cHRTb2Z0IERldiBDQTAe | ||
| 18 | Fw05NzAzMjIxMzM0MDRaFw05ODAzMjIxMzM0MDRaMIGCMQswCQYDVQQGEwJBVTET | ||
| 19 | MBEGA1UECBMKUXVlZW5zbGFuZDERMA8GA1UEBxMIQnJpc2JhbmUxGjAYBgNVBAoT | ||
| 20 | EUNyeXB0U29mdCBQdHkgTHRkMRQwEgYDVQQLEwtkZXZlbG9wbWVudDEZMBcGA1UE | ||
| 21 | AxMQQ3J5cHRTb2Z0IERldiBDQTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDgDgKq | ||
| 22 | IBuUMAJi4c8juAqEZ8f8FcuDWT+HcScvNztRJy9K8DnbGpiSrzzix4El6N4A7vbl | ||
| 23 | crwn/0CZmQJguZpfAgMBAAEwDQYJKoZIhvcNAQEEBQADQQA0UUvxlXXe6wKkVukn | ||
| 24 | ZoCyXbjlNsqt2rwbvfZEam6fQP3S7uq+o1Pnj+KDgE33WxWbQAA9h8fY1LWN7X3a | ||
| 25 | yTm/MYIBbTCCAWkCAQEwgYgwgYIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVl | ||
| 26 | bnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0 | ||
| 27 | eSBMdGQxFDASBgNVBAsTC2RldmVsb3BtZW50MRkwFwYDVQQDExBDcnlwdFNvZnQg | ||
| 28 | RGV2IENBAgEiMAkGBSsOAwIaBQCgfTAYBgkqhkiG9w0BCQMxCwYJKoZIhvcNAQcB | ||
| 29 | MCMGCSqGSIb3DQEJBDEWBBSUVhbGkNE+KGqpOK13+FkfOkaoizAcBgkqhkiG9w0B | ||
| 30 | CQUxDxcNOTcwNzAxMDE0MzM0WjAeBgkqhkiG9w0BCQ8xETAPMA0GCCqGSIb3DQMC | ||
| 31 | AgEoMA0GCSqGSIb3DQEBAQUABECa9Jpo4w/fZOc3Vy78wZFAVF8kvpn7il99Ldsr | ||
| 32 | AQ4JiBmcfiSwEBBY6WuKT+/SYtFwZl1oXkTwB5AVCFIC/IFNAAAAAA== | ||
| 33 | -----END PKCS7----- | ||
diff --git a/src/lib/libssl/src/crypto/pkcs7/pkcs7.err b/src/lib/libssl/src/crypto/pkcs7/pkcs7.err new file mode 100644 index 0000000000..91413aae43 --- /dev/null +++ b/src/lib/libssl/src/crypto/pkcs7/pkcs7.err | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | /* Error codes for the PKCS7 functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define PKCS7_F_PKCS7_ADD_CERTIFICATE 100 | ||
| 5 | #define PKCS7_F_PKCS7_ADD_CRL 101 | ||
| 6 | #define PKCS7_F_PKCS7_ADD_RECIPIENT_INFO 102 | ||
| 7 | #define PKCS7_F_PKCS7_ADD_SIGNER 103 | ||
| 8 | #define PKCS7_F_PKCS7_CTRL 104 | ||
| 9 | #define PKCS7_F_PKCS7_DATAINIT 105 | ||
| 10 | #define PKCS7_F_PKCS7_DATASIGN 106 | ||
| 11 | #define PKCS7_F_PKCS7_DATAVERIFY 107 | ||
| 12 | #define PKCS7_F_PKCS7_SET_CIPHER 108 | ||
| 13 | #define PKCS7_F_PKCS7_SET_CONTENT 109 | ||
| 14 | #define PKCS7_F_PKCS7_SET_TYPE 110 | ||
| 15 | |||
| 16 | /* Reason codes. */ | ||
| 17 | #define PKCS7_R_INTERNAL_ERROR 100 | ||
| 18 | #define PKCS7_R_OPERATION_NOT_SUPPORTED_ON_THIS_TYPE 101 | ||
| 19 | #define PKCS7_R_SIGNATURE_FAILURE 102 | ||
| 20 | #define PKCS7_R_UNABLE_TO_FIND_CERTIFICATE 103 | ||
| 21 | #define PKCS7_R_UNABLE_TO_FIND_MEM_BIO 104 | ||
| 22 | #define PKCS7_R_UNABLE_TO_FIND_MESSAGE_DIGEST 105 | ||
| 23 | #define PKCS7_R_UNKNOWN_DIGEST_TYPE 106 | ||
| 24 | #define PKCS7_R_UNSUPPORTED_CIPHER_TYPE 107 | ||
| 25 | #define PKCS7_R_UNSUPPORTED_CONTENT_TYPE 108 | ||
| 26 | #define PKCS7_R_WRONG_CONTENT_TYPE 109 | ||
diff --git a/src/lib/libssl/src/crypto/rand/Makefile.ssl b/src/lib/libssl/src/crypto/rand/Makefile.ssl new file mode 100644 index 0000000000..d04f0a9b43 --- /dev/null +++ b/src/lib/libssl/src/crypto/rand/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/rand/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= rand | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST= randtest.c | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=md_rand.c randfile.c | ||
| 24 | LIBOBJ=md_rand.o randfile.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= rand.h | ||
| 29 | HEADER= $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/ranlib.sh b/src/lib/libssl/src/crypto/ranlib.sh new file mode 100644 index 0000000000..543f712c6b --- /dev/null +++ b/src/lib/libssl/src/crypto/ranlib.sh | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | cwd=`pwd` | ||
| 4 | cd /tmp | ||
| 5 | |||
| 6 | if [ -s /bin/ranlib ] ; then | ||
| 7 | RL=/bin/ranlib | ||
| 8 | else if [ -s /usr/bin/ranlib ] ; then | ||
| 9 | RL=/usr/bin/ranlib | ||
| 10 | fi | ||
| 11 | fi | ||
| 12 | |||
| 13 | if [ "x$RL" != "x" ] | ||
| 14 | then | ||
| 15 | case "$1" in | ||
| 16 | /*) | ||
| 17 | $RL "$1" | ||
| 18 | ;; | ||
| 19 | *) | ||
| 20 | $RL "$cwd/$1" | ||
| 21 | ;; | ||
| 22 | esac | ||
| 23 | fi | ||
diff --git a/src/lib/libssl/src/crypto/rc2/Makefile.ssl b/src/lib/libssl/src/crypto/rc2/Makefile.ssl new file mode 100644 index 0000000000..c5138f13e2 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc2/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/rc2/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= rc2 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST=rc2test.c | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=rc2_ecb.c rc2_skey.c rc2_cbc.c rc2cfb64.c rc2ofb64.c | ||
| 24 | LIBOBJ=rc2_ecb.o rc2_skey.o rc2_cbc.o rc2cfb64.o rc2ofb64.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= rc2.h | ||
| 29 | HEADER= rc2_locl.h $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/rc2/Makefile.uni b/src/lib/libssl/src/crypto/rc2/Makefile.uni new file mode 100644 index 0000000000..e50b3f2d19 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc2/Makefile.uni | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | # Targets | ||
| 2 | # make - twidle the options yourself :-) | ||
| 3 | # make cc - standard cc options | ||
| 4 | # make gcc - standard gcc options | ||
| 5 | |||
| 6 | DIR= rc2 | ||
| 7 | TOP= . | ||
| 8 | CC= gcc | ||
| 9 | CFLAG= -O3 -fomit-frame-pointer | ||
| 10 | |||
| 11 | CPP= $(CC) -E | ||
| 12 | INCLUDES= | ||
| 13 | INSTALLTOP=/usr/local/lib | ||
| 14 | MAKE= make | ||
| 15 | MAKEDEPEND= makedepend | ||
| 16 | MAKEFILE= Makefile.uni | ||
| 17 | AR= ar r | ||
| 18 | |||
| 19 | IDEA_ENC=rc2_cbc.o | ||
| 20 | |||
| 21 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 22 | |||
| 23 | GENERAL=Makefile | ||
| 24 | TEST=rc2test | ||
| 25 | APPS=rc2speed | ||
| 26 | |||
| 27 | LIB=librc2.a | ||
| 28 | LIBSRC=rc2_skey.c rc2_ecb.c rc2_cbc.c rc2cfb64.c rc2ofb64.c | ||
| 29 | LIBOBJ=rc2_skey.o rc2_ecb.o $(IDEA_ENC) rc2cfb64.o rc2ofb64.o | ||
| 30 | |||
| 31 | SRC= $(LIBSRC) | ||
| 32 | |||
| 33 | EXHEADER= rc2.h | ||
| 34 | HEADER= rc2_locl.h $(EXHEADER) | ||
| 35 | |||
| 36 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 37 | |||
| 38 | all: $(LIB) $(TEST) $(APPS) | ||
| 39 | |||
| 40 | $(LIB): $(LIBOBJ) | ||
| 41 | $(AR) $(LIB) $(LIBOBJ) | ||
| 42 | sh $(TOP)/ranlib.sh $(LIB) | ||
| 43 | |||
| 44 | test: $(TEST) | ||
| 45 | ./$(TEST) | ||
| 46 | |||
| 47 | $(TEST): $(TEST).c $(LIB) | ||
| 48 | $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB) | ||
| 49 | |||
| 50 | $(APPS): $(APPS).c $(LIB) | ||
| 51 | $(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB) | ||
| 52 | |||
| 53 | lint: | ||
| 54 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 55 | |||
| 56 | depend: | ||
| 57 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 58 | |||
| 59 | dclean: | ||
| 60 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 61 | mv -f Makefile.new $(MAKEFILE) | ||
| 62 | |||
| 63 | clean: | ||
| 64 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 65 | |||
| 66 | cc: | ||
| 67 | $(MAKE) CC="cc" CFLAG="-O" all | ||
| 68 | |||
| 69 | gcc: | ||
| 70 | $(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
| 71 | |||
| 72 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/rc2/rc2.org b/src/lib/libssl/src/crypto/rc2/rc2.org new file mode 100644 index 0000000000..37354cfa62 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc2/rc2.org | |||
| @@ -0,0 +1,118 @@ | |||
| 1 | /* crypto/rc2/rc2.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify rc2.org since rc2.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef HEADER_RC2_H | ||
| 68 | #define HEADER_RC2_H | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | extern "C" { | ||
| 72 | #endif | ||
| 73 | |||
| 74 | #define RC2_ENCRYPT 1 | ||
| 75 | #define RC2_DECRYPT 0 | ||
| 76 | |||
| 77 | /* I need to put in a mod for the alpha - eay */ | ||
| 78 | #define RC2_INT unsigned short | ||
| 79 | |||
| 80 | #define RC2_BLOCK 8 | ||
| 81 | #define RC2_KEY_LENGTH 16 | ||
| 82 | |||
| 83 | typedef struct rc2_key_st | ||
| 84 | { | ||
| 85 | RC2_INT data[64]; | ||
| 86 | } RC2_KEY; | ||
| 87 | |||
| 88 | #ifndef NOPROTO | ||
| 89 | |||
| 90 | void RC2_set_key(RC2_KEY *key, int len, unsigned char *data,int bits); | ||
| 91 | void RC2_ecb_encrypt(unsigned char *in,unsigned char *out,RC2_KEY *key, | ||
| 92 | int enc); | ||
| 93 | void RC2_encrypt(unsigned long *data,RC2_KEY *key); | ||
| 94 | void RC2_decrypt(unsigned long *data,RC2_KEY *key); | ||
| 95 | void RC2_cbc_encrypt(unsigned char *in, unsigned char *out, long length, | ||
| 96 | RC2_KEY *ks, unsigned char *iv, int enc); | ||
| 97 | void RC2_cfb64_encrypt(unsigned char *in, unsigned char *out, long length, | ||
| 98 | RC2_KEY *schedule, unsigned char *ivec, int *num, int enc); | ||
| 99 | void RC2_ofb64_encrypt(unsigned char *in, unsigned char *out, long length, | ||
| 100 | RC2_KEY *schedule, unsigned char *ivec, int *num); | ||
| 101 | |||
| 102 | #else | ||
| 103 | |||
| 104 | void RC2_set_key(); | ||
| 105 | void RC2_ecb_encrypt(); | ||
| 106 | void RC2_encrypt(); | ||
| 107 | void RC2_decrypt(); | ||
| 108 | void RC2_cbc_encrypt(); | ||
| 109 | void RC2_cfb64_encrypt(); | ||
| 110 | void RC2_ofb64_encrypt(); | ||
| 111 | |||
| 112 | #endif | ||
| 113 | |||
| 114 | #ifdef __cplusplus | ||
| 115 | } | ||
| 116 | #endif | ||
| 117 | |||
| 118 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/rc4/Makefile.ssl b/src/lib/libssl/src/crypto/rc4/Makefile.ssl new file mode 100644 index 0000000000..19c1e980f3 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc4/Makefile.ssl | |||
| @@ -0,0 +1,108 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/rc4/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= rc4 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | RC4_ENC=rc4_enc.o | ||
| 17 | # or use | ||
| 18 | #RC4_ENC=asm/rx86-elf.o | ||
| 19 | #RC4_ENC=asm/rx86-out.o | ||
| 20 | #RC4_ENC=asm/rx86-sol.o | ||
| 21 | #RC4_ENC=asm/rx86bdsi.o | ||
| 22 | |||
| 23 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 24 | |||
| 25 | GENERAL=Makefile | ||
| 26 | TEST=rc4test.c | ||
| 27 | APPS= | ||
| 28 | |||
| 29 | LIB=$(TOP)/libcrypto.a | ||
| 30 | LIBSRC=rc4_skey.c rc4_enc.c | ||
| 31 | LIBOBJ=rc4_skey.o $(RC4_ENC) | ||
| 32 | |||
| 33 | SRC= $(LIBSRC) | ||
| 34 | |||
| 35 | EXHEADER= rc4.h | ||
| 36 | HEADER= $(EXHEADER) rc4_locl.h | ||
| 37 | |||
| 38 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 39 | |||
| 40 | top: | ||
| 41 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 42 | |||
| 43 | all: lib | ||
| 44 | |||
| 45 | lib: $(LIBOBJ) | ||
| 46 | $(AR) $(LIB) $(LIBOBJ) | ||
| 47 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 48 | @touch lib | ||
| 49 | |||
| 50 | # elf | ||
| 51 | asm/rx86-elf.o: asm/rx86unix.cpp | ||
| 52 | $(CPP) -DELF asm/rx86unix.cpp | as -o asm/rx86-elf.o | ||
| 53 | |||
| 54 | # solaris | ||
| 55 | asm/rx86-sol.o: asm/rx86unix.cpp | ||
| 56 | $(CC) -E -DSOL asm/rx86unix.cpp | sed 's/^#.*//' > asm/rx86-sol.s | ||
| 57 | as -o asm/rx86-sol.o asm/rx86-sol.s | ||
| 58 | rm -f asm/rx86-sol.s | ||
| 59 | |||
| 60 | # a.out | ||
| 61 | asm/rx86-out.o: asm/rx86unix.cpp | ||
| 62 | $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o | ||
| 63 | |||
| 64 | # bsdi | ||
| 65 | asm/rx86bsdi.o: asm/rx86unix.cpp | ||
| 66 | $(CPP) -DBSDI asm/rx86unix.cpp | as -o asm/rx86bsdi.o | ||
| 67 | |||
| 68 | asm/rx86unix.cpp: | ||
| 69 | (cd asm; perl rc4-586.pl cpp >rx86unix.cpp) | ||
| 70 | |||
| 71 | files: | ||
| 72 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 73 | |||
| 74 | links: | ||
| 75 | /bin/rm -f Makefile | ||
| 76 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 77 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 78 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 79 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 80 | |||
| 81 | install: | ||
| 82 | @for i in $(EXHEADER) ; \ | ||
| 83 | do \ | ||
| 84 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 85 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 86 | done; | ||
| 87 | |||
| 88 | tags: | ||
| 89 | ctags $(SRC) | ||
| 90 | |||
| 91 | tests: | ||
| 92 | |||
| 93 | lint: | ||
| 94 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 95 | |||
| 96 | depend: | ||
| 97 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 98 | |||
| 99 | dclean: | ||
| 100 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 101 | mv -f Makefile.new $(MAKEFILE) | ||
| 102 | |||
| 103 | clean: | ||
| 104 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o | ||
| 105 | |||
| 106 | errors: | ||
| 107 | |||
| 108 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/rc4/Makefile.uni b/src/lib/libssl/src/crypto/rc4/Makefile.uni new file mode 100644 index 0000000000..79dc17b8d1 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc4/Makefile.uni | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | # Targets | ||
| 2 | # make - twidle the options yourself :-) | ||
| 3 | # make cc - standard cc options | ||
| 4 | # make gcc - standard gcc options | ||
| 5 | # make x86-elf - linux-elf etc | ||
| 6 | # make x86-out - linux-a.out, FreeBSD etc | ||
| 7 | # make x86-solaris | ||
| 8 | # make x86-bdsi | ||
| 9 | |||
| 10 | DIR= rc4 | ||
| 11 | TOP= . | ||
| 12 | CC= gcc | ||
| 13 | CFLAG= -O3 -fomit-frame-pointer | ||
| 14 | |||
| 15 | CPP= $(CC) -E | ||
| 16 | INCLUDES= | ||
| 17 | INSTALLTOP=/usr/local/lib | ||
| 18 | MAKE= make | ||
| 19 | MAKEDEPEND= makedepend | ||
| 20 | MAKEFILE= Makefile.uni | ||
| 21 | AR= ar r | ||
| 22 | |||
| 23 | RC4_ENC=rc4_enc.o | ||
| 24 | # or use | ||
| 25 | #RC4_ENC=asm/rx86-elf.o | ||
| 26 | #RC4_ENC=asm/rx86-out.o | ||
| 27 | #RC4_ENC=asm/rx86-sol.o | ||
| 28 | #RC4_ENC=asm/rx86bdsi.o | ||
| 29 | |||
| 30 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 31 | |||
| 32 | GENERAL=Makefile | ||
| 33 | TEST=rc4test | ||
| 34 | APPS=rc4speed | ||
| 35 | |||
| 36 | LIB=librc4.a | ||
| 37 | LIBSRC=rc4_skey.c rc4_enc.c | ||
| 38 | LIBOBJ=rc4_skey.o $(RC4_ENC) | ||
| 39 | |||
| 40 | SRC= $(LIBSRC) | ||
| 41 | |||
| 42 | EXHEADER= rc4.h | ||
| 43 | HEADER= $(EXHEADER) rc4_locl.h | ||
| 44 | |||
| 45 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 46 | |||
| 47 | all: $(LIB) $(TEST) $(APPS) | ||
| 48 | |||
| 49 | $(LIB): $(LIBOBJ) | ||
| 50 | $(AR) $(LIB) $(LIBOBJ) | ||
| 51 | sh $(TOP)/ranlib.sh $(LIB) | ||
| 52 | |||
| 53 | # elf | ||
| 54 | asm/rx86-elf.o: asm/rx86unix.cpp | ||
| 55 | $(CPP) -DELF asm/rx86unix.cpp | as -o asm/rx86-elf.o | ||
| 56 | |||
| 57 | # solaris | ||
| 58 | asm/rx86-sol.o: asm/rx86unix.cpp | ||
| 59 | $(CC) -E -DSOL asm/rx86unix.cpp | sed 's/^#.*//' > asm/rx86-sol.s | ||
| 60 | as -o asm/rx86-sol.o asm/rx86-sol.s | ||
| 61 | rm -f asm/rx86-sol.s | ||
| 62 | |||
| 63 | # a.out | ||
| 64 | asm/rx86-out.o: asm/rx86unix.cpp | ||
| 65 | $(CPP) -DOUT asm/rx86unix.cpp | as -o asm/rx86-out.o | ||
| 66 | |||
| 67 | # bsdi | ||
| 68 | asm/rx86bsdi.o: asm/rx86unix.cpp | ||
| 69 | $(CPP) -DBSDI asm/rx86unix.cpp | as -o asm/rx86bsdi.o | ||
| 70 | |||
| 71 | asm/rx86unix.cpp: | ||
| 72 | (cd asm; perl rc4-586.pl cpp >rx86unix.cpp) | ||
| 73 | |||
| 74 | test: $(TEST) | ||
| 75 | ./$(TEST) | ||
| 76 | |||
| 77 | $(TEST): $(TEST).c $(LIB) | ||
| 78 | $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB) | ||
| 79 | |||
| 80 | $(APPS): $(APPS).c $(LIB) | ||
| 81 | $(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB) | ||
| 82 | |||
| 83 | lint: | ||
| 84 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 85 | |||
| 86 | depend: | ||
| 87 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 88 | |||
| 89 | dclean: | ||
| 90 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 91 | mv -f Makefile.new $(MAKEFILE) | ||
| 92 | |||
| 93 | clean: | ||
| 94 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 95 | |||
| 96 | cc: | ||
| 97 | $(MAKE) CC="cc" CFLAG="-O" all | ||
| 98 | |||
| 99 | gcc: | ||
| 100 | $(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
| 101 | |||
| 102 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/rc4/asm/r4-win32.asm b/src/lib/libssl/src/crypto/rc4/asm/r4-win32.asm new file mode 100644 index 0000000000..70b0f7484c --- /dev/null +++ b/src/lib/libssl/src/crypto/rc4/asm/r4-win32.asm | |||
| @@ -0,0 +1,314 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by rc4-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE rc4-586.asm | ||
| 8 | .386 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _RC4 | ||
| 12 | |||
| 13 | _RC4 PROC NEAR | ||
| 14 | ; | ||
| 15 | push ebp | ||
| 16 | push ebx | ||
| 17 | mov ebp, DWORD PTR 12[esp] | ||
| 18 | mov ebx, DWORD PTR 16[esp] | ||
| 19 | push esi | ||
| 20 | push edi | ||
| 21 | mov ecx, DWORD PTR [ebp] | ||
| 22 | mov edx, DWORD PTR 4[ebp] | ||
| 23 | mov esi, DWORD PTR 28[esp] | ||
| 24 | inc ecx | ||
| 25 | sub esp, 12 | ||
| 26 | add ebp, 8 | ||
| 27 | and ecx, 255 | ||
| 28 | lea ebx, DWORD PTR [esi+ebx-8] | ||
| 29 | mov edi, DWORD PTR 44[esp] | ||
| 30 | mov DWORD PTR 8[esp],ebx | ||
| 31 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 32 | cmp ebx, esi | ||
| 33 | jl $L000end | ||
| 34 | L001start: | ||
| 35 | add esi, 8 | ||
| 36 | ; Round 0 | ||
| 37 | add edx, eax | ||
| 38 | and edx, 255 | ||
| 39 | inc ecx | ||
| 40 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 41 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 42 | add ebx, eax | ||
| 43 | and ecx, 255 | ||
| 44 | and ebx, 255 | ||
| 45 | mov DWORD PTR [edx*4+ebp],eax | ||
| 46 | nop | ||
| 47 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 48 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 49 | mov BYTE PTR [esp], bl | ||
| 50 | ; Round 1 | ||
| 51 | add edx, eax | ||
| 52 | and edx, 255 | ||
| 53 | inc ecx | ||
| 54 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 55 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 56 | add ebx, eax | ||
| 57 | and ecx, 255 | ||
| 58 | and ebx, 255 | ||
| 59 | mov DWORD PTR [edx*4+ebp],eax | ||
| 60 | nop | ||
| 61 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 62 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 63 | mov BYTE PTR 1[esp],bl | ||
| 64 | ; Round 2 | ||
| 65 | add edx, eax | ||
| 66 | and edx, 255 | ||
| 67 | inc ecx | ||
| 68 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 69 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 70 | add ebx, eax | ||
| 71 | and ecx, 255 | ||
| 72 | and ebx, 255 | ||
| 73 | mov DWORD PTR [edx*4+ebp],eax | ||
| 74 | nop | ||
| 75 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 76 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 77 | mov BYTE PTR 2[esp],bl | ||
| 78 | ; Round 3 | ||
| 79 | add edx, eax | ||
| 80 | and edx, 255 | ||
| 81 | inc ecx | ||
| 82 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 83 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 84 | add ebx, eax | ||
| 85 | and ecx, 255 | ||
| 86 | and ebx, 255 | ||
| 87 | mov DWORD PTR [edx*4+ebp],eax | ||
| 88 | nop | ||
| 89 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 90 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 91 | mov BYTE PTR 3[esp],bl | ||
| 92 | ; Round 4 | ||
| 93 | add edx, eax | ||
| 94 | and edx, 255 | ||
| 95 | inc ecx | ||
| 96 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 97 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 98 | add ebx, eax | ||
| 99 | and ecx, 255 | ||
| 100 | and ebx, 255 | ||
| 101 | mov DWORD PTR [edx*4+ebp],eax | ||
| 102 | nop | ||
| 103 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 104 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 105 | mov BYTE PTR 4[esp],bl | ||
| 106 | ; Round 5 | ||
| 107 | add edx, eax | ||
| 108 | and edx, 255 | ||
| 109 | inc ecx | ||
| 110 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 111 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 112 | add ebx, eax | ||
| 113 | and ecx, 255 | ||
| 114 | and ebx, 255 | ||
| 115 | mov DWORD PTR [edx*4+ebp],eax | ||
| 116 | nop | ||
| 117 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 118 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 119 | mov BYTE PTR 5[esp],bl | ||
| 120 | ; Round 6 | ||
| 121 | add edx, eax | ||
| 122 | and edx, 255 | ||
| 123 | inc ecx | ||
| 124 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 125 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 126 | add ebx, eax | ||
| 127 | and ecx, 255 | ||
| 128 | and ebx, 255 | ||
| 129 | mov DWORD PTR [edx*4+ebp],eax | ||
| 130 | nop | ||
| 131 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 132 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 133 | mov BYTE PTR 6[esp],bl | ||
| 134 | ; Round 7 | ||
| 135 | add edx, eax | ||
| 136 | and edx, 255 | ||
| 137 | inc ecx | ||
| 138 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 139 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 140 | add ebx, eax | ||
| 141 | and ecx, 255 | ||
| 142 | and ebx, 255 | ||
| 143 | mov DWORD PTR [edx*4+ebp],eax | ||
| 144 | nop | ||
| 145 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 146 | add edi, 8 | ||
| 147 | mov BYTE PTR 7[esp],bl | ||
| 148 | ; apply the cipher text | ||
| 149 | mov eax, DWORD PTR [esp] | ||
| 150 | mov ebx, DWORD PTR [esi-8] | ||
| 151 | xor eax, ebx | ||
| 152 | mov ebx, DWORD PTR [esi-4] | ||
| 153 | mov DWORD PTR [edi-8],eax | ||
| 154 | mov eax, DWORD PTR 4[esp] | ||
| 155 | xor eax, ebx | ||
| 156 | mov ebx, DWORD PTR 8[esp] | ||
| 157 | mov DWORD PTR [edi-4],eax | ||
| 158 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 159 | cmp esi, ebx | ||
| 160 | jle L001start | ||
| 161 | $L000end: | ||
| 162 | ; Round 0 | ||
| 163 | add ebx, 8 | ||
| 164 | inc esi | ||
| 165 | cmp ebx, esi | ||
| 166 | jl $L002finished | ||
| 167 | mov DWORD PTR 8[esp],ebx | ||
| 168 | add edx, eax | ||
| 169 | and edx, 255 | ||
| 170 | inc ecx | ||
| 171 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 172 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 173 | add ebx, eax | ||
| 174 | and ecx, 255 | ||
| 175 | and ebx, 255 | ||
| 176 | mov DWORD PTR [edx*4+ebp],eax | ||
| 177 | nop | ||
| 178 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 179 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 180 | mov bh, BYTE PTR [esi-1] | ||
| 181 | xor bl, bh | ||
| 182 | mov BYTE PTR [edi], bl | ||
| 183 | ; Round 1 | ||
| 184 | mov ebx, DWORD PTR 8[esp] | ||
| 185 | cmp ebx, esi | ||
| 186 | jle $L002finished | ||
| 187 | inc esi | ||
| 188 | add edx, eax | ||
| 189 | and edx, 255 | ||
| 190 | inc ecx | ||
| 191 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 192 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 193 | add ebx, eax | ||
| 194 | and ecx, 255 | ||
| 195 | and ebx, 255 | ||
| 196 | mov DWORD PTR [edx*4+ebp],eax | ||
| 197 | nop | ||
| 198 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 199 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 200 | mov bh, BYTE PTR [esi-1] | ||
| 201 | xor bl, bh | ||
| 202 | mov BYTE PTR 1[edi],bl | ||
| 203 | ; Round 2 | ||
| 204 | mov ebx, DWORD PTR 8[esp] | ||
| 205 | cmp ebx, esi | ||
| 206 | jle $L002finished | ||
| 207 | inc esi | ||
| 208 | add edx, eax | ||
| 209 | and edx, 255 | ||
| 210 | inc ecx | ||
| 211 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 212 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 213 | add ebx, eax | ||
| 214 | and ecx, 255 | ||
| 215 | and ebx, 255 | ||
| 216 | mov DWORD PTR [edx*4+ebp],eax | ||
| 217 | nop | ||
| 218 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 219 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 220 | mov bh, BYTE PTR [esi-1] | ||
| 221 | xor bl, bh | ||
| 222 | mov BYTE PTR 2[edi],bl | ||
| 223 | ; Round 3 | ||
| 224 | mov ebx, DWORD PTR 8[esp] | ||
| 225 | cmp ebx, esi | ||
| 226 | jle $L002finished | ||
| 227 | inc esi | ||
| 228 | add edx, eax | ||
| 229 | and edx, 255 | ||
| 230 | inc ecx | ||
| 231 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 232 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 233 | add ebx, eax | ||
| 234 | and ecx, 255 | ||
| 235 | and ebx, 255 | ||
| 236 | mov DWORD PTR [edx*4+ebp],eax | ||
| 237 | nop | ||
| 238 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 239 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 240 | mov bh, BYTE PTR [esi-1] | ||
| 241 | xor bl, bh | ||
| 242 | mov BYTE PTR 3[edi],bl | ||
| 243 | ; Round 4 | ||
| 244 | mov ebx, DWORD PTR 8[esp] | ||
| 245 | cmp ebx, esi | ||
| 246 | jle $L002finished | ||
| 247 | inc esi | ||
| 248 | add edx, eax | ||
| 249 | and edx, 255 | ||
| 250 | inc ecx | ||
| 251 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 252 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 253 | add ebx, eax | ||
| 254 | and ecx, 255 | ||
| 255 | and ebx, 255 | ||
| 256 | mov DWORD PTR [edx*4+ebp],eax | ||
| 257 | nop | ||
| 258 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 259 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 260 | mov bh, BYTE PTR [esi-1] | ||
| 261 | xor bl, bh | ||
| 262 | mov BYTE PTR 4[edi],bl | ||
| 263 | ; Round 5 | ||
| 264 | mov ebx, DWORD PTR 8[esp] | ||
| 265 | cmp ebx, esi | ||
| 266 | jle $L002finished | ||
| 267 | inc esi | ||
| 268 | add edx, eax | ||
| 269 | and edx, 255 | ||
| 270 | inc ecx | ||
| 271 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 272 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 273 | add ebx, eax | ||
| 274 | and ecx, 255 | ||
| 275 | and ebx, 255 | ||
| 276 | mov DWORD PTR [edx*4+ebp],eax | ||
| 277 | nop | ||
| 278 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 279 | mov eax, DWORD PTR [ecx*4+ebp] | ||
| 280 | mov bh, BYTE PTR [esi-1] | ||
| 281 | xor bl, bh | ||
| 282 | mov BYTE PTR 5[edi],bl | ||
| 283 | ; Round 6 | ||
| 284 | mov ebx, DWORD PTR 8[esp] | ||
| 285 | cmp ebx, esi | ||
| 286 | jle $L002finished | ||
| 287 | inc esi | ||
| 288 | add edx, eax | ||
| 289 | and edx, 255 | ||
| 290 | inc ecx | ||
| 291 | mov ebx, DWORD PTR [edx*4+ebp] | ||
| 292 | mov DWORD PTR [ecx*4+ebp-4],ebx | ||
| 293 | add ebx, eax | ||
| 294 | and ecx, 255 | ||
| 295 | and ebx, 255 | ||
| 296 | mov DWORD PTR [edx*4+ebp],eax | ||
| 297 | nop | ||
| 298 | mov ebx, DWORD PTR [ebx*4+ebp] | ||
| 299 | mov bh, BYTE PTR [esi-1] | ||
| 300 | xor bl, bh | ||
| 301 | mov BYTE PTR 6[edi],bl | ||
| 302 | $L002finished: | ||
| 303 | dec ecx | ||
| 304 | add esp, 12 | ||
| 305 | mov DWORD PTR [ebp-4],edx | ||
| 306 | mov BYTE PTR [ebp-8],cl | ||
| 307 | pop edi | ||
| 308 | pop esi | ||
| 309 | pop ebx | ||
| 310 | pop ebp | ||
| 311 | ret | ||
| 312 | _RC4 ENDP | ||
| 313 | _TEXT ENDS | ||
| 314 | END | ||
diff --git a/src/lib/libssl/src/crypto/rc4/asm/rx86unix.cpp b/src/lib/libssl/src/crypto/rc4/asm/rx86unix.cpp new file mode 100644 index 0000000000..ec1d72a110 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc4/asm/rx86unix.cpp | |||
| @@ -0,0 +1,358 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define RC4 _RC4 | ||
| 13 | |||
| 14 | #endif | ||
| 15 | |||
| 16 | #ifdef OUT | ||
| 17 | #define OK 1 | ||
| 18 | #define ALIGN 4 | ||
| 19 | #endif | ||
| 20 | |||
| 21 | #ifdef BSDI | ||
| 22 | #define OK 1 | ||
| 23 | #define ALIGN 4 | ||
| 24 | #undef SIZE | ||
| 25 | #undef TYPE | ||
| 26 | #define SIZE(a,b) | ||
| 27 | #define TYPE(a,b) | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #if defined(ELF) || defined(SOL) | ||
| 31 | #define OK 1 | ||
| 32 | #define ALIGN 16 | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifndef OK | ||
| 36 | You need to define one of | ||
| 37 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 38 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 39 | SOL - solaris systems, which are elf with strange comment lines | ||
| 40 | BSDI - a.out with a very primative version of as. | ||
| 41 | #endif | ||
| 42 | |||
| 43 | /* Let the Assembler begin :-) */ | ||
| 44 | /* Don't even think of reading this code */ | ||
| 45 | /* It was automatically generated by rc4-586.pl */ | ||
| 46 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 47 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 48 | /* eric <eay@cryptsoft.com> */ | ||
| 49 | |||
| 50 | .file "rc4-586.s" | ||
| 51 | .version "01.01" | ||
| 52 | gcc2_compiled.: | ||
| 53 | .text | ||
| 54 | .align ALIGN | ||
| 55 | .globl RC4 | ||
| 56 | TYPE(RC4,@function) | ||
| 57 | RC4: | ||
| 58 | |||
| 59 | pushl %ebp | ||
| 60 | pushl %ebx | ||
| 61 | movl 12(%esp), %ebp | ||
| 62 | movl 16(%esp), %ebx | ||
| 63 | pushl %esi | ||
| 64 | pushl %edi | ||
| 65 | movl (%ebp), %ecx | ||
| 66 | movl 4(%ebp), %edx | ||
| 67 | movl 28(%esp), %esi | ||
| 68 | incl %ecx | ||
| 69 | subl $12, %esp | ||
| 70 | addl $8, %ebp | ||
| 71 | andl $255, %ecx | ||
| 72 | leal -8(%ebx,%esi,), %ebx | ||
| 73 | movl 44(%esp), %edi | ||
| 74 | movl %ebx, 8(%esp) | ||
| 75 | movl (%ebp,%ecx,4), %eax | ||
| 76 | cmpl %esi, %ebx | ||
| 77 | jl .L000end | ||
| 78 | .L001start: | ||
| 79 | addl $8, %esi | ||
| 80 | /* Round 0 */ | ||
| 81 | addl %eax, %edx | ||
| 82 | andl $255, %edx | ||
| 83 | incl %ecx | ||
| 84 | movl (%ebp,%edx,4), %ebx | ||
| 85 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 86 | addl %eax, %ebx | ||
| 87 | andl $255, %ecx | ||
| 88 | andl $255, %ebx | ||
| 89 | movl %eax, (%ebp,%edx,4) | ||
| 90 | nop | ||
| 91 | movl (%ebp,%ebx,4), %ebx | ||
| 92 | movl (%ebp,%ecx,4), %eax | ||
| 93 | movb %bl, (%esp) | ||
| 94 | /* Round 1 */ | ||
| 95 | addl %eax, %edx | ||
| 96 | andl $255, %edx | ||
| 97 | incl %ecx | ||
| 98 | movl (%ebp,%edx,4), %ebx | ||
| 99 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 100 | addl %eax, %ebx | ||
| 101 | andl $255, %ecx | ||
| 102 | andl $255, %ebx | ||
| 103 | movl %eax, (%ebp,%edx,4) | ||
| 104 | nop | ||
| 105 | movl (%ebp,%ebx,4), %ebx | ||
| 106 | movl (%ebp,%ecx,4), %eax | ||
| 107 | movb %bl, 1(%esp) | ||
| 108 | /* Round 2 */ | ||
| 109 | addl %eax, %edx | ||
| 110 | andl $255, %edx | ||
| 111 | incl %ecx | ||
| 112 | movl (%ebp,%edx,4), %ebx | ||
| 113 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 114 | addl %eax, %ebx | ||
| 115 | andl $255, %ecx | ||
| 116 | andl $255, %ebx | ||
| 117 | movl %eax, (%ebp,%edx,4) | ||
| 118 | nop | ||
| 119 | movl (%ebp,%ebx,4), %ebx | ||
| 120 | movl (%ebp,%ecx,4), %eax | ||
| 121 | movb %bl, 2(%esp) | ||
| 122 | /* Round 3 */ | ||
| 123 | addl %eax, %edx | ||
| 124 | andl $255, %edx | ||
| 125 | incl %ecx | ||
| 126 | movl (%ebp,%edx,4), %ebx | ||
| 127 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 128 | addl %eax, %ebx | ||
| 129 | andl $255, %ecx | ||
| 130 | andl $255, %ebx | ||
| 131 | movl %eax, (%ebp,%edx,4) | ||
| 132 | nop | ||
| 133 | movl (%ebp,%ebx,4), %ebx | ||
| 134 | movl (%ebp,%ecx,4), %eax | ||
| 135 | movb %bl, 3(%esp) | ||
| 136 | /* Round 4 */ | ||
| 137 | addl %eax, %edx | ||
| 138 | andl $255, %edx | ||
| 139 | incl %ecx | ||
| 140 | movl (%ebp,%edx,4), %ebx | ||
| 141 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 142 | addl %eax, %ebx | ||
| 143 | andl $255, %ecx | ||
| 144 | andl $255, %ebx | ||
| 145 | movl %eax, (%ebp,%edx,4) | ||
| 146 | nop | ||
| 147 | movl (%ebp,%ebx,4), %ebx | ||
| 148 | movl (%ebp,%ecx,4), %eax | ||
| 149 | movb %bl, 4(%esp) | ||
| 150 | /* Round 5 */ | ||
| 151 | addl %eax, %edx | ||
| 152 | andl $255, %edx | ||
| 153 | incl %ecx | ||
| 154 | movl (%ebp,%edx,4), %ebx | ||
| 155 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 156 | addl %eax, %ebx | ||
| 157 | andl $255, %ecx | ||
| 158 | andl $255, %ebx | ||
| 159 | movl %eax, (%ebp,%edx,4) | ||
| 160 | nop | ||
| 161 | movl (%ebp,%ebx,4), %ebx | ||
| 162 | movl (%ebp,%ecx,4), %eax | ||
| 163 | movb %bl, 5(%esp) | ||
| 164 | /* Round 6 */ | ||
| 165 | addl %eax, %edx | ||
| 166 | andl $255, %edx | ||
| 167 | incl %ecx | ||
| 168 | movl (%ebp,%edx,4), %ebx | ||
| 169 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 170 | addl %eax, %ebx | ||
| 171 | andl $255, %ecx | ||
| 172 | andl $255, %ebx | ||
| 173 | movl %eax, (%ebp,%edx,4) | ||
| 174 | nop | ||
| 175 | movl (%ebp,%ebx,4), %ebx | ||
| 176 | movl (%ebp,%ecx,4), %eax | ||
| 177 | movb %bl, 6(%esp) | ||
| 178 | /* Round 7 */ | ||
| 179 | addl %eax, %edx | ||
| 180 | andl $255, %edx | ||
| 181 | incl %ecx | ||
| 182 | movl (%ebp,%edx,4), %ebx | ||
| 183 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 184 | addl %eax, %ebx | ||
| 185 | andl $255, %ecx | ||
| 186 | andl $255, %ebx | ||
| 187 | movl %eax, (%ebp,%edx,4) | ||
| 188 | nop | ||
| 189 | movl (%ebp,%ebx,4), %ebx | ||
| 190 | addl $8, %edi | ||
| 191 | movb %bl, 7(%esp) | ||
| 192 | /* apply the cipher text */ | ||
| 193 | movl (%esp), %eax | ||
| 194 | movl -8(%esi), %ebx | ||
| 195 | xorl %ebx, %eax | ||
| 196 | movl -4(%esi), %ebx | ||
| 197 | movl %eax, -8(%edi) | ||
| 198 | movl 4(%esp), %eax | ||
| 199 | xorl %ebx, %eax | ||
| 200 | movl 8(%esp), %ebx | ||
| 201 | movl %eax, -4(%edi) | ||
| 202 | movl (%ebp,%ecx,4), %eax | ||
| 203 | cmpl %ebx, %esi | ||
| 204 | jle .L001start | ||
| 205 | .L000end: | ||
| 206 | /* Round 0 */ | ||
| 207 | addl $8, %ebx | ||
| 208 | incl %esi | ||
| 209 | cmpl %esi, %ebx | ||
| 210 | jl .L002finished | ||
| 211 | movl %ebx, 8(%esp) | ||
| 212 | addl %eax, %edx | ||
| 213 | andl $255, %edx | ||
| 214 | incl %ecx | ||
| 215 | movl (%ebp,%edx,4), %ebx | ||
| 216 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 217 | addl %eax, %ebx | ||
| 218 | andl $255, %ecx | ||
| 219 | andl $255, %ebx | ||
| 220 | movl %eax, (%ebp,%edx,4) | ||
| 221 | nop | ||
| 222 | movl (%ebp,%ebx,4), %ebx | ||
| 223 | movl (%ebp,%ecx,4), %eax | ||
| 224 | movb -1(%esi), %bh | ||
| 225 | xorb %bh, %bl | ||
| 226 | movb %bl, (%edi) | ||
| 227 | /* Round 1 */ | ||
| 228 | movl 8(%esp), %ebx | ||
| 229 | cmpl %esi, %ebx | ||
| 230 | jle .L002finished | ||
| 231 | incl %esi | ||
| 232 | addl %eax, %edx | ||
| 233 | andl $255, %edx | ||
| 234 | incl %ecx | ||
| 235 | movl (%ebp,%edx,4), %ebx | ||
| 236 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 237 | addl %eax, %ebx | ||
| 238 | andl $255, %ecx | ||
| 239 | andl $255, %ebx | ||
| 240 | movl %eax, (%ebp,%edx,4) | ||
| 241 | nop | ||
| 242 | movl (%ebp,%ebx,4), %ebx | ||
| 243 | movl (%ebp,%ecx,4), %eax | ||
| 244 | movb -1(%esi), %bh | ||
| 245 | xorb %bh, %bl | ||
| 246 | movb %bl, 1(%edi) | ||
| 247 | /* Round 2 */ | ||
| 248 | movl 8(%esp), %ebx | ||
| 249 | cmpl %esi, %ebx | ||
| 250 | jle .L002finished | ||
| 251 | incl %esi | ||
| 252 | addl %eax, %edx | ||
| 253 | andl $255, %edx | ||
| 254 | incl %ecx | ||
| 255 | movl (%ebp,%edx,4), %ebx | ||
| 256 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 257 | addl %eax, %ebx | ||
| 258 | andl $255, %ecx | ||
| 259 | andl $255, %ebx | ||
| 260 | movl %eax, (%ebp,%edx,4) | ||
| 261 | nop | ||
| 262 | movl (%ebp,%ebx,4), %ebx | ||
| 263 | movl (%ebp,%ecx,4), %eax | ||
| 264 | movb -1(%esi), %bh | ||
| 265 | xorb %bh, %bl | ||
| 266 | movb %bl, 2(%edi) | ||
| 267 | /* Round 3 */ | ||
| 268 | movl 8(%esp), %ebx | ||
| 269 | cmpl %esi, %ebx | ||
| 270 | jle .L002finished | ||
| 271 | incl %esi | ||
| 272 | addl %eax, %edx | ||
| 273 | andl $255, %edx | ||
| 274 | incl %ecx | ||
| 275 | movl (%ebp,%edx,4), %ebx | ||
| 276 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 277 | addl %eax, %ebx | ||
| 278 | andl $255, %ecx | ||
| 279 | andl $255, %ebx | ||
| 280 | movl %eax, (%ebp,%edx,4) | ||
| 281 | nop | ||
| 282 | movl (%ebp,%ebx,4), %ebx | ||
| 283 | movl (%ebp,%ecx,4), %eax | ||
| 284 | movb -1(%esi), %bh | ||
| 285 | xorb %bh, %bl | ||
| 286 | movb %bl, 3(%edi) | ||
| 287 | /* Round 4 */ | ||
| 288 | movl 8(%esp), %ebx | ||
| 289 | cmpl %esi, %ebx | ||
| 290 | jle .L002finished | ||
| 291 | incl %esi | ||
| 292 | addl %eax, %edx | ||
| 293 | andl $255, %edx | ||
| 294 | incl %ecx | ||
| 295 | movl (%ebp,%edx,4), %ebx | ||
| 296 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 297 | addl %eax, %ebx | ||
| 298 | andl $255, %ecx | ||
| 299 | andl $255, %ebx | ||
| 300 | movl %eax, (%ebp,%edx,4) | ||
| 301 | nop | ||
| 302 | movl (%ebp,%ebx,4), %ebx | ||
| 303 | movl (%ebp,%ecx,4), %eax | ||
| 304 | movb -1(%esi), %bh | ||
| 305 | xorb %bh, %bl | ||
| 306 | movb %bl, 4(%edi) | ||
| 307 | /* Round 5 */ | ||
| 308 | movl 8(%esp), %ebx | ||
| 309 | cmpl %esi, %ebx | ||
| 310 | jle .L002finished | ||
| 311 | incl %esi | ||
| 312 | addl %eax, %edx | ||
| 313 | andl $255, %edx | ||
| 314 | incl %ecx | ||
| 315 | movl (%ebp,%edx,4), %ebx | ||
| 316 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 317 | addl %eax, %ebx | ||
| 318 | andl $255, %ecx | ||
| 319 | andl $255, %ebx | ||
| 320 | movl %eax, (%ebp,%edx,4) | ||
| 321 | nop | ||
| 322 | movl (%ebp,%ebx,4), %ebx | ||
| 323 | movl (%ebp,%ecx,4), %eax | ||
| 324 | movb -1(%esi), %bh | ||
| 325 | xorb %bh, %bl | ||
| 326 | movb %bl, 5(%edi) | ||
| 327 | /* Round 6 */ | ||
| 328 | movl 8(%esp), %ebx | ||
| 329 | cmpl %esi, %ebx | ||
| 330 | jle .L002finished | ||
| 331 | incl %esi | ||
| 332 | addl %eax, %edx | ||
| 333 | andl $255, %edx | ||
| 334 | incl %ecx | ||
| 335 | movl (%ebp,%edx,4), %ebx | ||
| 336 | movl %ebx, -4(%ebp,%ecx,4) | ||
| 337 | addl %eax, %ebx | ||
| 338 | andl $255, %ecx | ||
| 339 | andl $255, %ebx | ||
| 340 | movl %eax, (%ebp,%edx,4) | ||
| 341 | nop | ||
| 342 | movl (%ebp,%ebx,4), %ebx | ||
| 343 | movb -1(%esi), %bh | ||
| 344 | xorb %bh, %bl | ||
| 345 | movb %bl, 6(%edi) | ||
| 346 | .L002finished: | ||
| 347 | decl %ecx | ||
| 348 | addl $12, %esp | ||
| 349 | movl %edx, -4(%ebp) | ||
| 350 | movb %cl, -8(%ebp) | ||
| 351 | popl %edi | ||
| 352 | popl %esi | ||
| 353 | popl %ebx | ||
| 354 | popl %ebp | ||
| 355 | ret | ||
| 356 | .RC4_end: | ||
| 357 | SIZE(RC4,.RC4_end-RC4) | ||
| 358 | .ident "RC4" | ||
diff --git a/src/lib/libssl/src/crypto/rc4/rc4.org b/src/lib/libssl/src/crypto/rc4/rc4.org new file mode 100644 index 0000000000..c558651af8 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc4/rc4.org | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | /* crypto/rc4/rc4.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify rc4.org since rc4.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | #ifndef HEADER_RC4_H | ||
| 68 | #define HEADER_RC4_H | ||
| 69 | |||
| 70 | #ifdef __cplusplus | ||
| 71 | extern "C" { | ||
| 72 | #endif | ||
| 73 | |||
| 74 | /* using int types make the structure larger but make the code faster | ||
| 75 | * on most boxes I have tested - up to %20 faster. */ | ||
| 76 | #define RC4_INT unsigned int | ||
| 77 | |||
| 78 | typedef struct rc4_key_st | ||
| 79 | { | ||
| 80 | RC4_INT x,y; | ||
| 81 | RC4_INT data[256]; | ||
| 82 | } RC4_KEY; | ||
| 83 | |||
| 84 | #ifndef NOPROTO | ||
| 85 | |||
| 86 | char *RC4_options(void); | ||
| 87 | void RC4_set_key(RC4_KEY *key, int len, unsigned char *data); | ||
| 88 | void RC4(RC4_KEY *key, unsigned long len, unsigned char *indata, | ||
| 89 | unsigned char *outdata); | ||
| 90 | |||
| 91 | #else | ||
| 92 | |||
| 93 | char *RC4_options(); | ||
| 94 | void RC4_set_key(); | ||
| 95 | void RC4(); | ||
| 96 | |||
| 97 | #endif | ||
| 98 | |||
| 99 | #ifdef __cplusplus | ||
| 100 | } | ||
| 101 | #endif | ||
| 102 | |||
| 103 | #endif | ||
diff --git a/src/lib/libssl/src/crypto/rc4/rc4_locl.org b/src/lib/libssl/src/crypto/rc4/rc4_locl.org new file mode 100644 index 0000000000..1ef4455fb7 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc4/rc4_locl.org | |||
| @@ -0,0 +1,70 @@ | |||
| 1 | /* crypto/rc4/rc4_locl.org */ | ||
| 2 | /* Copyright (C) 1995-1997 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 | /* WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 60 | * | ||
| 61 | * Always modify bf_locl.org since bf_locl.h is automatically generated from | ||
| 62 | * it during SSLeay configuration. | ||
| 63 | * | ||
| 64 | * WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING WARNING | ||
| 65 | */ | ||
| 66 | |||
| 67 | /* if this is defined data[i] is used instead of *data, this is a %20 | ||
| 68 | * speedup on x86 */ | ||
| 69 | #undef RC4_INDEX | ||
| 70 | |||
diff --git a/src/lib/libssl/src/crypto/rc5/Makefile.ssl b/src/lib/libssl/src/crypto/rc5/Makefile.ssl new file mode 100644 index 0000000000..5e98ee2348 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc5/Makefile.ssl | |||
| @@ -0,0 +1,107 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/rc5/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= rc5 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | CPP= $(CC) -E | ||
| 9 | INCLUDES= | ||
| 10 | CFLAG=-g | ||
| 11 | INSTALLTOP=/usr/local/ssl | ||
| 12 | MAKE= make -f Makefile.ssl | ||
| 13 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 14 | MAKEFILE= Makefile.ssl | ||
| 15 | AR= ar r | ||
| 16 | |||
| 17 | RC5_ENC= rc5_enc.o | ||
| 18 | # or use | ||
| 19 | #DES_ENC= r586-elf.o | ||
| 20 | |||
| 21 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 22 | |||
| 23 | GENERAL=Makefile | ||
| 24 | TEST=rc5test.c | ||
| 25 | APPS= | ||
| 26 | |||
| 27 | LIB=$(TOP)/libcrypto.a | ||
| 28 | LIBSRC=rc5_skey.c rc5_ecb.c rc5_enc.c rc5cfb64.c rc5ofb64.c | ||
| 29 | LIBOBJ=rc5_skey.o rc5_ecb.o $(RC5_ENC) rc5cfb64.o rc5ofb64.o | ||
| 30 | |||
| 31 | SRC= $(LIBSRC) | ||
| 32 | |||
| 33 | EXHEADER= rc5.h | ||
| 34 | HEADER= rc5_locl.h $(EXHEADER) | ||
| 35 | |||
| 36 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 37 | |||
| 38 | top: | ||
| 39 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 40 | |||
| 41 | all: lib | ||
| 42 | |||
| 43 | lib: $(LIBOBJ) | ||
| 44 | $(AR) $(LIB) $(LIBOBJ) | ||
| 45 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 46 | @touch lib | ||
| 47 | |||
| 48 | # elf | ||
| 49 | asm/r586-elf.o: asm/r586unix.cpp | ||
| 50 | $(CPP) -DELF asm/r586unix.cpp | as -o asm/r586-elf.o | ||
| 51 | |||
| 52 | # solaris | ||
| 53 | asm/r586-sol.o: asm/r586unix.cpp | ||
| 54 | $(CC) -E -DSOL asm/r586unix.cpp | sed 's/^#.*//' > asm/r586-sol.s | ||
| 55 | as -o asm/r586-sol.o asm/r586-sol.s | ||
| 56 | rm -f asm/r586-sol.s | ||
| 57 | |||
| 58 | # a.out | ||
| 59 | asm/r586-out.o: asm/r586unix.cpp | ||
| 60 | $(CPP) -DOUT asm/r586unix.cpp | as -o asm/r586-out.o | ||
| 61 | |||
| 62 | # bsdi | ||
| 63 | asm/r586bsdi.o: asm/r586unix.cpp | ||
| 64 | $(CPP) -DBSDI asm/r586unix.cpp | as -o asm/r586bsdi.o | ||
| 65 | |||
| 66 | asm/r586unix.cpp: | ||
| 67 | (cd asm; perl rc5-586.pl cpp >r586unix.cpp) | ||
| 68 | |||
| 69 | files: | ||
| 70 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 71 | |||
| 72 | links: | ||
| 73 | /bin/rm -f Makefile | ||
| 74 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 75 | $(TOP)/util/point.sh ../../doc/rc5.doc rc5.doc ; | ||
| 76 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 77 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 78 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 79 | |||
| 80 | install: | ||
| 81 | @for i in $(EXHEADER) ; \ | ||
| 82 | do \ | ||
| 83 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 84 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 85 | done; | ||
| 86 | |||
| 87 | tags: | ||
| 88 | ctags $(SRC) | ||
| 89 | |||
| 90 | tests: | ||
| 91 | |||
| 92 | lint: | ||
| 93 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 94 | |||
| 95 | depend: | ||
| 96 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 97 | |||
| 98 | dclean: | ||
| 99 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 100 | mv -f Makefile.new $(MAKEFILE) | ||
| 101 | |||
| 102 | clean: | ||
| 103 | /bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 104 | |||
| 105 | errors: | ||
| 106 | |||
| 107 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/rc5/Makefile.uni b/src/lib/libssl/src/crypto/rc5/Makefile.uni new file mode 100644 index 0000000000..e50b3f2d19 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc5/Makefile.uni | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | # Targets | ||
| 2 | # make - twidle the options yourself :-) | ||
| 3 | # make cc - standard cc options | ||
| 4 | # make gcc - standard gcc options | ||
| 5 | |||
| 6 | DIR= rc2 | ||
| 7 | TOP= . | ||
| 8 | CC= gcc | ||
| 9 | CFLAG= -O3 -fomit-frame-pointer | ||
| 10 | |||
| 11 | CPP= $(CC) -E | ||
| 12 | INCLUDES= | ||
| 13 | INSTALLTOP=/usr/local/lib | ||
| 14 | MAKE= make | ||
| 15 | MAKEDEPEND= makedepend | ||
| 16 | MAKEFILE= Makefile.uni | ||
| 17 | AR= ar r | ||
| 18 | |||
| 19 | IDEA_ENC=rc2_cbc.o | ||
| 20 | |||
| 21 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 22 | |||
| 23 | GENERAL=Makefile | ||
| 24 | TEST=rc2test | ||
| 25 | APPS=rc2speed | ||
| 26 | |||
| 27 | LIB=librc2.a | ||
| 28 | LIBSRC=rc2_skey.c rc2_ecb.c rc2_cbc.c rc2cfb64.c rc2ofb64.c | ||
| 29 | LIBOBJ=rc2_skey.o rc2_ecb.o $(IDEA_ENC) rc2cfb64.o rc2ofb64.o | ||
| 30 | |||
| 31 | SRC= $(LIBSRC) | ||
| 32 | |||
| 33 | EXHEADER= rc2.h | ||
| 34 | HEADER= rc2_locl.h $(EXHEADER) | ||
| 35 | |||
| 36 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 37 | |||
| 38 | all: $(LIB) $(TEST) $(APPS) | ||
| 39 | |||
| 40 | $(LIB): $(LIBOBJ) | ||
| 41 | $(AR) $(LIB) $(LIBOBJ) | ||
| 42 | sh $(TOP)/ranlib.sh $(LIB) | ||
| 43 | |||
| 44 | test: $(TEST) | ||
| 45 | ./$(TEST) | ||
| 46 | |||
| 47 | $(TEST): $(TEST).c $(LIB) | ||
| 48 | $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB) | ||
| 49 | |||
| 50 | $(APPS): $(APPS).c $(LIB) | ||
| 51 | $(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB) | ||
| 52 | |||
| 53 | lint: | ||
| 54 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 55 | |||
| 56 | depend: | ||
| 57 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 58 | |||
| 59 | dclean: | ||
| 60 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 61 | mv -f Makefile.new $(MAKEFILE) | ||
| 62 | |||
| 63 | clean: | ||
| 64 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 65 | |||
| 66 | cc: | ||
| 67 | $(MAKE) CC="cc" CFLAG="-O" all | ||
| 68 | |||
| 69 | gcc: | ||
| 70 | $(MAKE) CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
| 71 | |||
| 72 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/rc5/asm/r5-win32.asm b/src/lib/libssl/src/crypto/rc5/asm/r5-win32.asm new file mode 100644 index 0000000000..f43d3711f0 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc5/asm/r5-win32.asm | |||
| @@ -0,0 +1,574 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by rc5-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE rc5-586.asm | ||
| 8 | .386 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _RC5_32_encrypt | ||
| 12 | |||
| 13 | _RC5_32_encrypt PROC NEAR | ||
| 14 | ; | ||
| 15 | push ebp | ||
| 16 | push esi | ||
| 17 | push edi | ||
| 18 | mov edx, DWORD PTR 16[esp] | ||
| 19 | mov ebp, DWORD PTR 20[esp] | ||
| 20 | ; Load the 2 words | ||
| 21 | mov edi, DWORD PTR [edx] | ||
| 22 | mov esi, DWORD PTR 4[edx] | ||
| 23 | push ebx | ||
| 24 | mov ebx, DWORD PTR [ebp] | ||
| 25 | add edi, DWORD PTR 4[ebp] | ||
| 26 | add esi, DWORD PTR 8[ebp] | ||
| 27 | xor edi, esi | ||
| 28 | mov eax, DWORD PTR 12[ebp] | ||
| 29 | mov ecx, esi | ||
| 30 | rol edi, cl | ||
| 31 | add edi, eax | ||
| 32 | xor esi, edi | ||
| 33 | mov eax, DWORD PTR 16[ebp] | ||
| 34 | mov ecx, edi | ||
| 35 | rol esi, cl | ||
| 36 | add esi, eax | ||
| 37 | xor edi, esi | ||
| 38 | mov eax, DWORD PTR 20[ebp] | ||
| 39 | mov ecx, esi | ||
| 40 | rol edi, cl | ||
| 41 | add edi, eax | ||
| 42 | xor esi, edi | ||
| 43 | mov eax, DWORD PTR 24[ebp] | ||
| 44 | mov ecx, edi | ||
| 45 | rol esi, cl | ||
| 46 | add esi, eax | ||
| 47 | xor edi, esi | ||
| 48 | mov eax, DWORD PTR 28[ebp] | ||
| 49 | mov ecx, esi | ||
| 50 | rol edi, cl | ||
| 51 | add edi, eax | ||
| 52 | xor esi, edi | ||
| 53 | mov eax, DWORD PTR 32[ebp] | ||
| 54 | mov ecx, edi | ||
| 55 | rol esi, cl | ||
| 56 | add esi, eax | ||
| 57 | xor edi, esi | ||
| 58 | mov eax, DWORD PTR 36[ebp] | ||
| 59 | mov ecx, esi | ||
| 60 | rol edi, cl | ||
| 61 | add edi, eax | ||
| 62 | xor esi, edi | ||
| 63 | mov eax, DWORD PTR 40[ebp] | ||
| 64 | mov ecx, edi | ||
| 65 | rol esi, cl | ||
| 66 | add esi, eax | ||
| 67 | xor edi, esi | ||
| 68 | mov eax, DWORD PTR 44[ebp] | ||
| 69 | mov ecx, esi | ||
| 70 | rol edi, cl | ||
| 71 | add edi, eax | ||
| 72 | xor esi, edi | ||
| 73 | mov eax, DWORD PTR 48[ebp] | ||
| 74 | mov ecx, edi | ||
| 75 | rol esi, cl | ||
| 76 | add esi, eax | ||
| 77 | xor edi, esi | ||
| 78 | mov eax, DWORD PTR 52[ebp] | ||
| 79 | mov ecx, esi | ||
| 80 | rol edi, cl | ||
| 81 | add edi, eax | ||
| 82 | xor esi, edi | ||
| 83 | mov eax, DWORD PTR 56[ebp] | ||
| 84 | mov ecx, edi | ||
| 85 | rol esi, cl | ||
| 86 | add esi, eax | ||
| 87 | xor edi, esi | ||
| 88 | mov eax, DWORD PTR 60[ebp] | ||
| 89 | mov ecx, esi | ||
| 90 | rol edi, cl | ||
| 91 | add edi, eax | ||
| 92 | xor esi, edi | ||
| 93 | mov eax, DWORD PTR 64[ebp] | ||
| 94 | mov ecx, edi | ||
| 95 | rol esi, cl | ||
| 96 | add esi, eax | ||
| 97 | xor edi, esi | ||
| 98 | mov eax, DWORD PTR 68[ebp] | ||
| 99 | mov ecx, esi | ||
| 100 | rol edi, cl | ||
| 101 | add edi, eax | ||
| 102 | xor esi, edi | ||
| 103 | mov eax, DWORD PTR 72[ebp] | ||
| 104 | mov ecx, edi | ||
| 105 | rol esi, cl | ||
| 106 | add esi, eax | ||
| 107 | cmp ebx, 8 | ||
| 108 | je $L000rc5_exit | ||
| 109 | xor edi, esi | ||
| 110 | mov eax, DWORD PTR 76[ebp] | ||
| 111 | mov ecx, esi | ||
| 112 | rol edi, cl | ||
| 113 | add edi, eax | ||
| 114 | xor esi, edi | ||
| 115 | mov eax, DWORD PTR 80[ebp] | ||
| 116 | mov ecx, edi | ||
| 117 | rol esi, cl | ||
| 118 | add esi, eax | ||
| 119 | xor edi, esi | ||
| 120 | mov eax, DWORD PTR 84[ebp] | ||
| 121 | mov ecx, esi | ||
| 122 | rol edi, cl | ||
| 123 | add edi, eax | ||
| 124 | xor esi, edi | ||
| 125 | mov eax, DWORD PTR 88[ebp] | ||
| 126 | mov ecx, edi | ||
| 127 | rol esi, cl | ||
| 128 | add esi, eax | ||
| 129 | xor edi, esi | ||
| 130 | mov eax, DWORD PTR 92[ebp] | ||
| 131 | mov ecx, esi | ||
| 132 | rol edi, cl | ||
| 133 | add edi, eax | ||
| 134 | xor esi, edi | ||
| 135 | mov eax, DWORD PTR 96[ebp] | ||
| 136 | mov ecx, edi | ||
| 137 | rol esi, cl | ||
| 138 | add esi, eax | ||
| 139 | xor edi, esi | ||
| 140 | mov eax, DWORD PTR 100[ebp] | ||
| 141 | mov ecx, esi | ||
| 142 | rol edi, cl | ||
| 143 | add edi, eax | ||
| 144 | xor esi, edi | ||
| 145 | mov eax, DWORD PTR 104[ebp] | ||
| 146 | mov ecx, edi | ||
| 147 | rol esi, cl | ||
| 148 | add esi, eax | ||
| 149 | cmp ebx, 12 | ||
| 150 | je $L000rc5_exit | ||
| 151 | xor edi, esi | ||
| 152 | mov eax, DWORD PTR 108[ebp] | ||
| 153 | mov ecx, esi | ||
| 154 | rol edi, cl | ||
| 155 | add edi, eax | ||
| 156 | xor esi, edi | ||
| 157 | mov eax, DWORD PTR 112[ebp] | ||
| 158 | mov ecx, edi | ||
| 159 | rol esi, cl | ||
| 160 | add esi, eax | ||
| 161 | xor edi, esi | ||
| 162 | mov eax, DWORD PTR 116[ebp] | ||
| 163 | mov ecx, esi | ||
| 164 | rol edi, cl | ||
| 165 | add edi, eax | ||
| 166 | xor esi, edi | ||
| 167 | mov eax, DWORD PTR 120[ebp] | ||
| 168 | mov ecx, edi | ||
| 169 | rol esi, cl | ||
| 170 | add esi, eax | ||
| 171 | xor edi, esi | ||
| 172 | mov eax, DWORD PTR 124[ebp] | ||
| 173 | mov ecx, esi | ||
| 174 | rol edi, cl | ||
| 175 | add edi, eax | ||
| 176 | xor esi, edi | ||
| 177 | mov eax, DWORD PTR 128[ebp] | ||
| 178 | mov ecx, edi | ||
| 179 | rol esi, cl | ||
| 180 | add esi, eax | ||
| 181 | xor edi, esi | ||
| 182 | mov eax, DWORD PTR 132[ebp] | ||
| 183 | mov ecx, esi | ||
| 184 | rol edi, cl | ||
| 185 | add edi, eax | ||
| 186 | xor esi, edi | ||
| 187 | mov eax, DWORD PTR 136[ebp] | ||
| 188 | mov ecx, edi | ||
| 189 | rol esi, cl | ||
| 190 | add esi, eax | ||
| 191 | $L000rc5_exit: | ||
| 192 | mov DWORD PTR [edx],edi | ||
| 193 | mov DWORD PTR 4[edx],esi | ||
| 194 | pop ebx | ||
| 195 | pop edi | ||
| 196 | pop esi | ||
| 197 | pop ebp | ||
| 198 | ret | ||
| 199 | _RC5_32_encrypt ENDP | ||
| 200 | _TEXT ENDS | ||
| 201 | _TEXT SEGMENT | ||
| 202 | PUBLIC _RC5_32_decrypt | ||
| 203 | |||
| 204 | _RC5_32_decrypt PROC NEAR | ||
| 205 | ; | ||
| 206 | push ebp | ||
| 207 | push esi | ||
| 208 | push edi | ||
| 209 | mov edx, DWORD PTR 16[esp] | ||
| 210 | mov ebp, DWORD PTR 20[esp] | ||
| 211 | ; Load the 2 words | ||
| 212 | mov edi, DWORD PTR [edx] | ||
| 213 | mov esi, DWORD PTR 4[edx] | ||
| 214 | push ebx | ||
| 215 | mov ebx, DWORD PTR [ebp] | ||
| 216 | cmp ebx, 12 | ||
| 217 | je $L001rc5_dec_12 | ||
| 218 | cmp ebx, 8 | ||
| 219 | je $L002rc5_dec_8 | ||
| 220 | mov eax, DWORD PTR 136[ebp] | ||
| 221 | sub esi, eax | ||
| 222 | mov ecx, edi | ||
| 223 | ror esi, cl | ||
| 224 | xor esi, edi | ||
| 225 | mov eax, DWORD PTR 132[ebp] | ||
| 226 | sub edi, eax | ||
| 227 | mov ecx, esi | ||
| 228 | ror edi, cl | ||
| 229 | xor edi, esi | ||
| 230 | mov eax, DWORD PTR 128[ebp] | ||
| 231 | sub esi, eax | ||
| 232 | mov ecx, edi | ||
| 233 | ror esi, cl | ||
| 234 | xor esi, edi | ||
| 235 | mov eax, DWORD PTR 124[ebp] | ||
| 236 | sub edi, eax | ||
| 237 | mov ecx, esi | ||
| 238 | ror edi, cl | ||
| 239 | xor edi, esi | ||
| 240 | mov eax, DWORD PTR 120[ebp] | ||
| 241 | sub esi, eax | ||
| 242 | mov ecx, edi | ||
| 243 | ror esi, cl | ||
| 244 | xor esi, edi | ||
| 245 | mov eax, DWORD PTR 116[ebp] | ||
| 246 | sub edi, eax | ||
| 247 | mov ecx, esi | ||
| 248 | ror edi, cl | ||
| 249 | xor edi, esi | ||
| 250 | mov eax, DWORD PTR 112[ebp] | ||
| 251 | sub esi, eax | ||
| 252 | mov ecx, edi | ||
| 253 | ror esi, cl | ||
| 254 | xor esi, edi | ||
| 255 | mov eax, DWORD PTR 108[ebp] | ||
| 256 | sub edi, eax | ||
| 257 | mov ecx, esi | ||
| 258 | ror edi, cl | ||
| 259 | xor edi, esi | ||
| 260 | $L001rc5_dec_12: | ||
| 261 | mov eax, DWORD PTR 104[ebp] | ||
| 262 | sub esi, eax | ||
| 263 | mov ecx, edi | ||
| 264 | ror esi, cl | ||
| 265 | xor esi, edi | ||
| 266 | mov eax, DWORD PTR 100[ebp] | ||
| 267 | sub edi, eax | ||
| 268 | mov ecx, esi | ||
| 269 | ror edi, cl | ||
| 270 | xor edi, esi | ||
| 271 | mov eax, DWORD PTR 96[ebp] | ||
| 272 | sub esi, eax | ||
| 273 | mov ecx, edi | ||
| 274 | ror esi, cl | ||
| 275 | xor esi, edi | ||
| 276 | mov eax, DWORD PTR 92[ebp] | ||
| 277 | sub edi, eax | ||
| 278 | mov ecx, esi | ||
| 279 | ror edi, cl | ||
| 280 | xor edi, esi | ||
| 281 | mov eax, DWORD PTR 88[ebp] | ||
| 282 | sub esi, eax | ||
| 283 | mov ecx, edi | ||
| 284 | ror esi, cl | ||
| 285 | xor esi, edi | ||
| 286 | mov eax, DWORD PTR 84[ebp] | ||
| 287 | sub edi, eax | ||
| 288 | mov ecx, esi | ||
| 289 | ror edi, cl | ||
| 290 | xor edi, esi | ||
| 291 | mov eax, DWORD PTR 80[ebp] | ||
| 292 | sub esi, eax | ||
| 293 | mov ecx, edi | ||
| 294 | ror esi, cl | ||
| 295 | xor esi, edi | ||
| 296 | mov eax, DWORD PTR 76[ebp] | ||
| 297 | sub edi, eax | ||
| 298 | mov ecx, esi | ||
| 299 | ror edi, cl | ||
| 300 | xor edi, esi | ||
| 301 | $L002rc5_dec_8: | ||
| 302 | mov eax, DWORD PTR 72[ebp] | ||
| 303 | sub esi, eax | ||
| 304 | mov ecx, edi | ||
| 305 | ror esi, cl | ||
| 306 | xor esi, edi | ||
| 307 | mov eax, DWORD PTR 68[ebp] | ||
| 308 | sub edi, eax | ||
| 309 | mov ecx, esi | ||
| 310 | ror edi, cl | ||
| 311 | xor edi, esi | ||
| 312 | mov eax, DWORD PTR 64[ebp] | ||
| 313 | sub esi, eax | ||
| 314 | mov ecx, edi | ||
| 315 | ror esi, cl | ||
| 316 | xor esi, edi | ||
| 317 | mov eax, DWORD PTR 60[ebp] | ||
| 318 | sub edi, eax | ||
| 319 | mov ecx, esi | ||
| 320 | ror edi, cl | ||
| 321 | xor edi, esi | ||
| 322 | mov eax, DWORD PTR 56[ebp] | ||
| 323 | sub esi, eax | ||
| 324 | mov ecx, edi | ||
| 325 | ror esi, cl | ||
| 326 | xor esi, edi | ||
| 327 | mov eax, DWORD PTR 52[ebp] | ||
| 328 | sub edi, eax | ||
| 329 | mov ecx, esi | ||
| 330 | ror edi, cl | ||
| 331 | xor edi, esi | ||
| 332 | mov eax, DWORD PTR 48[ebp] | ||
| 333 | sub esi, eax | ||
| 334 | mov ecx, edi | ||
| 335 | ror esi, cl | ||
| 336 | xor esi, edi | ||
| 337 | mov eax, DWORD PTR 44[ebp] | ||
| 338 | sub edi, eax | ||
| 339 | mov ecx, esi | ||
| 340 | ror edi, cl | ||
| 341 | xor edi, esi | ||
| 342 | mov eax, DWORD PTR 40[ebp] | ||
| 343 | sub esi, eax | ||
| 344 | mov ecx, edi | ||
| 345 | ror esi, cl | ||
| 346 | xor esi, edi | ||
| 347 | mov eax, DWORD PTR 36[ebp] | ||
| 348 | sub edi, eax | ||
| 349 | mov ecx, esi | ||
| 350 | ror edi, cl | ||
| 351 | xor edi, esi | ||
| 352 | mov eax, DWORD PTR 32[ebp] | ||
| 353 | sub esi, eax | ||
| 354 | mov ecx, edi | ||
| 355 | ror esi, cl | ||
| 356 | xor esi, edi | ||
| 357 | mov eax, DWORD PTR 28[ebp] | ||
| 358 | sub edi, eax | ||
| 359 | mov ecx, esi | ||
| 360 | ror edi, cl | ||
| 361 | xor edi, esi | ||
| 362 | mov eax, DWORD PTR 24[ebp] | ||
| 363 | sub esi, eax | ||
| 364 | mov ecx, edi | ||
| 365 | ror esi, cl | ||
| 366 | xor esi, edi | ||
| 367 | mov eax, DWORD PTR 20[ebp] | ||
| 368 | sub edi, eax | ||
| 369 | mov ecx, esi | ||
| 370 | ror edi, cl | ||
| 371 | xor edi, esi | ||
| 372 | mov eax, DWORD PTR 16[ebp] | ||
| 373 | sub esi, eax | ||
| 374 | mov ecx, edi | ||
| 375 | ror esi, cl | ||
| 376 | xor esi, edi | ||
| 377 | mov eax, DWORD PTR 12[ebp] | ||
| 378 | sub edi, eax | ||
| 379 | mov ecx, esi | ||
| 380 | ror edi, cl | ||
| 381 | xor edi, esi | ||
| 382 | sub esi, DWORD PTR 8[ebp] | ||
| 383 | sub edi, DWORD PTR 4[ebp] | ||
| 384 | L003rc5_exit: | ||
| 385 | mov DWORD PTR [edx],edi | ||
| 386 | mov DWORD PTR 4[edx],esi | ||
| 387 | pop ebx | ||
| 388 | pop edi | ||
| 389 | pop esi | ||
| 390 | pop ebp | ||
| 391 | ret | ||
| 392 | _RC5_32_decrypt ENDP | ||
| 393 | _TEXT ENDS | ||
| 394 | _TEXT SEGMENT | ||
| 395 | PUBLIC _RC5_32_cbc_encrypt | ||
| 396 | |||
| 397 | _RC5_32_cbc_encrypt PROC NEAR | ||
| 398 | ; | ||
| 399 | push ebp | ||
| 400 | push ebx | ||
| 401 | push esi | ||
| 402 | push edi | ||
| 403 | mov ebp, DWORD PTR 28[esp] | ||
| 404 | ; getting iv ptr from parameter 4 | ||
| 405 | mov ebx, DWORD PTR 36[esp] | ||
| 406 | mov esi, DWORD PTR [ebx] | ||
| 407 | mov edi, DWORD PTR 4[ebx] | ||
| 408 | push edi | ||
| 409 | push esi | ||
| 410 | push edi | ||
| 411 | push esi | ||
| 412 | mov ebx, esp | ||
| 413 | mov esi, DWORD PTR 36[esp] | ||
| 414 | mov edi, DWORD PTR 40[esp] | ||
| 415 | ; getting encrypt flag from parameter 5 | ||
| 416 | mov ecx, DWORD PTR 56[esp] | ||
| 417 | ; get and push parameter 3 | ||
| 418 | mov eax, DWORD PTR 48[esp] | ||
| 419 | push eax | ||
| 420 | push ebx | ||
| 421 | cmp ecx, 0 | ||
| 422 | jz $L004decrypt | ||
| 423 | and ebp, 4294967288 | ||
| 424 | mov eax, DWORD PTR 8[esp] | ||
| 425 | mov ebx, DWORD PTR 12[esp] | ||
| 426 | jz $L005encrypt_finish | ||
| 427 | L006encrypt_loop: | ||
| 428 | mov ecx, DWORD PTR [esi] | ||
| 429 | mov edx, DWORD PTR 4[esi] | ||
| 430 | xor eax, ecx | ||
| 431 | xor ebx, edx | ||
| 432 | mov DWORD PTR 8[esp],eax | ||
| 433 | mov DWORD PTR 12[esp],ebx | ||
| 434 | call _RC5_32_encrypt | ||
| 435 | mov eax, DWORD PTR 8[esp] | ||
| 436 | mov ebx, DWORD PTR 12[esp] | ||
| 437 | mov DWORD PTR [edi],eax | ||
| 438 | mov DWORD PTR 4[edi],ebx | ||
| 439 | add esi, 8 | ||
| 440 | add edi, 8 | ||
| 441 | sub ebp, 8 | ||
| 442 | jnz L006encrypt_loop | ||
| 443 | $L005encrypt_finish: | ||
| 444 | mov ebp, DWORD PTR 52[esp] | ||
| 445 | and ebp, 7 | ||
| 446 | jz $L007finish | ||
| 447 | xor ecx, ecx | ||
| 448 | xor edx, edx | ||
| 449 | mov ebp, DWORD PTR $L008cbc_enc_jmp_table[ebp*4] | ||
| 450 | jmp ebp | ||
| 451 | L009ej7: | ||
| 452 | mov dh, BYTE PTR 6[esi] | ||
| 453 | shl edx, 8 | ||
| 454 | L010ej6: | ||
| 455 | mov dh, BYTE PTR 5[esi] | ||
| 456 | L011ej5: | ||
| 457 | mov dl, BYTE PTR 4[esi] | ||
| 458 | L012ej4: | ||
| 459 | mov ecx, DWORD PTR [esi] | ||
| 460 | jmp $L013ejend | ||
| 461 | L014ej3: | ||
| 462 | mov ch, BYTE PTR 2[esi] | ||
| 463 | shl ecx, 8 | ||
| 464 | L015ej2: | ||
| 465 | mov ch, BYTE PTR 1[esi] | ||
| 466 | L016ej1: | ||
| 467 | mov cl, BYTE PTR [esi] | ||
| 468 | $L013ejend: | ||
| 469 | xor eax, ecx | ||
| 470 | xor ebx, edx | ||
| 471 | mov DWORD PTR 8[esp],eax | ||
| 472 | mov DWORD PTR 12[esp],ebx | ||
| 473 | call _RC5_32_encrypt | ||
| 474 | mov eax, DWORD PTR 8[esp] | ||
| 475 | mov ebx, DWORD PTR 12[esp] | ||
| 476 | mov DWORD PTR [edi],eax | ||
| 477 | mov DWORD PTR 4[edi],ebx | ||
| 478 | jmp $L007finish | ||
| 479 | $L004decrypt: | ||
| 480 | and ebp, 4294967288 | ||
| 481 | mov eax, DWORD PTR 16[esp] | ||
| 482 | mov ebx, DWORD PTR 20[esp] | ||
| 483 | jz $L017decrypt_finish | ||
| 484 | L018decrypt_loop: | ||
| 485 | mov eax, DWORD PTR [esi] | ||
| 486 | mov ebx, DWORD PTR 4[esi] | ||
| 487 | mov DWORD PTR 8[esp],eax | ||
| 488 | mov DWORD PTR 12[esp],ebx | ||
| 489 | call _RC5_32_decrypt | ||
| 490 | mov eax, DWORD PTR 8[esp] | ||
| 491 | mov ebx, DWORD PTR 12[esp] | ||
| 492 | mov ecx, DWORD PTR 16[esp] | ||
| 493 | mov edx, DWORD PTR 20[esp] | ||
| 494 | xor ecx, eax | ||
| 495 | xor edx, ebx | ||
| 496 | mov eax, DWORD PTR [esi] | ||
| 497 | mov ebx, DWORD PTR 4[esi] | ||
| 498 | mov DWORD PTR [edi],ecx | ||
| 499 | mov DWORD PTR 4[edi],edx | ||
| 500 | mov DWORD PTR 16[esp],eax | ||
| 501 | mov DWORD PTR 20[esp],ebx | ||
| 502 | add esi, 8 | ||
| 503 | add edi, 8 | ||
| 504 | sub ebp, 8 | ||
| 505 | jnz L018decrypt_loop | ||
| 506 | $L017decrypt_finish: | ||
| 507 | mov ebp, DWORD PTR 52[esp] | ||
| 508 | and ebp, 7 | ||
| 509 | jz $L007finish | ||
| 510 | mov eax, DWORD PTR [esi] | ||
| 511 | mov ebx, DWORD PTR 4[esi] | ||
| 512 | mov DWORD PTR 8[esp],eax | ||
| 513 | mov DWORD PTR 12[esp],ebx | ||
| 514 | call _RC5_32_decrypt | ||
| 515 | mov eax, DWORD PTR 8[esp] | ||
| 516 | mov ebx, DWORD PTR 12[esp] | ||
| 517 | mov ecx, DWORD PTR 16[esp] | ||
| 518 | mov edx, DWORD PTR 20[esp] | ||
| 519 | xor ecx, eax | ||
| 520 | xor edx, ebx | ||
| 521 | mov eax, DWORD PTR [esi] | ||
| 522 | mov ebx, DWORD PTR 4[esi] | ||
| 523 | L019dj7: | ||
| 524 | ror edx, 16 | ||
| 525 | mov BYTE PTR 6[edi],dl | ||
| 526 | shr edx, 16 | ||
| 527 | L020dj6: | ||
| 528 | mov BYTE PTR 5[edi],dh | ||
| 529 | L021dj5: | ||
| 530 | mov BYTE PTR 4[edi],dl | ||
| 531 | L022dj4: | ||
| 532 | mov DWORD PTR [edi],ecx | ||
| 533 | jmp $L023djend | ||
| 534 | L024dj3: | ||
| 535 | ror ecx, 16 | ||
| 536 | mov BYTE PTR 2[edi],cl | ||
| 537 | shl ecx, 16 | ||
| 538 | L025dj2: | ||
| 539 | mov BYTE PTR 1[esi],ch | ||
| 540 | L026dj1: | ||
| 541 | mov BYTE PTR [esi], cl | ||
| 542 | $L023djend: | ||
| 543 | jmp $L007finish | ||
| 544 | $L007finish: | ||
| 545 | mov ecx, DWORD PTR 60[esp] | ||
| 546 | add esp, 24 | ||
| 547 | mov DWORD PTR [ecx],eax | ||
| 548 | mov DWORD PTR 4[ecx],ebx | ||
| 549 | pop edi | ||
| 550 | pop esi | ||
| 551 | pop ebx | ||
| 552 | pop ebp | ||
| 553 | ret | ||
| 554 | $L008cbc_enc_jmp_table: | ||
| 555 | DD 0 | ||
| 556 | DD L016ej1 | ||
| 557 | DD L015ej2 | ||
| 558 | DD L014ej3 | ||
| 559 | DD L012ej4 | ||
| 560 | DD L011ej5 | ||
| 561 | DD L010ej6 | ||
| 562 | DD L009ej7 | ||
| 563 | L027cbc_dec_jmp_table: | ||
| 564 | DD 0 | ||
| 565 | DD L026dj1 | ||
| 566 | DD L025dj2 | ||
| 567 | DD L024dj3 | ||
| 568 | DD L022dj4 | ||
| 569 | DD L021dj5 | ||
| 570 | DD L020dj6 | ||
| 571 | DD L019dj7 | ||
| 572 | _RC5_32_cbc_encrypt ENDP | ||
| 573 | _TEXT ENDS | ||
| 574 | END | ||
diff --git a/src/lib/libssl/src/crypto/rc5/asm/r586unix.cpp b/src/lib/libssl/src/crypto/rc5/asm/r586unix.cpp new file mode 100644 index 0000000000..a25dd5a9a4 --- /dev/null +++ b/src/lib/libssl/src/crypto/rc5/asm/r586unix.cpp | |||
| @@ -0,0 +1,628 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define RC5_32_encrypt _RC5_32_encrypt | ||
| 13 | #define RC5_32_decrypt _RC5_32_decrypt | ||
| 14 | #define RC5_32_cbc_encrypt _RC5_32_cbc_encrypt | ||
| 15 | |||
| 16 | #endif | ||
| 17 | |||
| 18 | #ifdef OUT | ||
| 19 | #define OK 1 | ||
| 20 | #define ALIGN 4 | ||
| 21 | #endif | ||
| 22 | |||
| 23 | #ifdef BSDI | ||
| 24 | #define OK 1 | ||
| 25 | #define ALIGN 4 | ||
| 26 | #undef SIZE | ||
| 27 | #undef TYPE | ||
| 28 | #define SIZE(a,b) | ||
| 29 | #define TYPE(a,b) | ||
| 30 | #endif | ||
| 31 | |||
| 32 | #if defined(ELF) || defined(SOL) | ||
| 33 | #define OK 1 | ||
| 34 | #define ALIGN 16 | ||
| 35 | #endif | ||
| 36 | |||
| 37 | #ifndef OK | ||
| 38 | You need to define one of | ||
| 39 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 40 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 41 | SOL - solaris systems, which are elf with strange comment lines | ||
| 42 | BSDI - a.out with a very primative version of as. | ||
| 43 | #endif | ||
| 44 | |||
| 45 | /* Let the Assembler begin :-) */ | ||
| 46 | /* Don't even think of reading this code */ | ||
| 47 | /* It was automatically generated by rc5-586.pl */ | ||
| 48 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 49 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 50 | /* eric <eay@cryptsoft.com> */ | ||
| 51 | |||
| 52 | .file "rc5-586.s" | ||
| 53 | .version "01.01" | ||
| 54 | gcc2_compiled.: | ||
| 55 | .text | ||
| 56 | .align ALIGN | ||
| 57 | .globl RC5_32_encrypt | ||
| 58 | TYPE(RC5_32_encrypt,@function) | ||
| 59 | RC5_32_encrypt: | ||
| 60 | |||
| 61 | pushl %ebp | ||
| 62 | pushl %esi | ||
| 63 | pushl %edi | ||
| 64 | movl 16(%esp), %edx | ||
| 65 | movl 20(%esp), %ebp | ||
| 66 | /* Load the 2 words */ | ||
| 67 | movl (%edx), %edi | ||
| 68 | movl 4(%edx), %esi | ||
| 69 | pushl %ebx | ||
| 70 | movl (%ebp), %ebx | ||
| 71 | addl 4(%ebp), %edi | ||
| 72 | addl 8(%ebp), %esi | ||
| 73 | xorl %esi, %edi | ||
| 74 | movl 12(%ebp), %eax | ||
| 75 | movl %esi, %ecx | ||
| 76 | roll %cl, %edi | ||
| 77 | addl %eax, %edi | ||
| 78 | xorl %edi, %esi | ||
| 79 | movl 16(%ebp), %eax | ||
| 80 | movl %edi, %ecx | ||
| 81 | roll %cl, %esi | ||
| 82 | addl %eax, %esi | ||
| 83 | xorl %esi, %edi | ||
| 84 | movl 20(%ebp), %eax | ||
| 85 | movl %esi, %ecx | ||
| 86 | roll %cl, %edi | ||
| 87 | addl %eax, %edi | ||
| 88 | xorl %edi, %esi | ||
| 89 | movl 24(%ebp), %eax | ||
| 90 | movl %edi, %ecx | ||
| 91 | roll %cl, %esi | ||
| 92 | addl %eax, %esi | ||
| 93 | xorl %esi, %edi | ||
| 94 | movl 28(%ebp), %eax | ||
| 95 | movl %esi, %ecx | ||
| 96 | roll %cl, %edi | ||
| 97 | addl %eax, %edi | ||
| 98 | xorl %edi, %esi | ||
| 99 | movl 32(%ebp), %eax | ||
| 100 | movl %edi, %ecx | ||
| 101 | roll %cl, %esi | ||
| 102 | addl %eax, %esi | ||
| 103 | xorl %esi, %edi | ||
| 104 | movl 36(%ebp), %eax | ||
| 105 | movl %esi, %ecx | ||
| 106 | roll %cl, %edi | ||
| 107 | addl %eax, %edi | ||
| 108 | xorl %edi, %esi | ||
| 109 | movl 40(%ebp), %eax | ||
| 110 | movl %edi, %ecx | ||
| 111 | roll %cl, %esi | ||
| 112 | addl %eax, %esi | ||
| 113 | xorl %esi, %edi | ||
| 114 | movl 44(%ebp), %eax | ||
| 115 | movl %esi, %ecx | ||
| 116 | roll %cl, %edi | ||
| 117 | addl %eax, %edi | ||
| 118 | xorl %edi, %esi | ||
| 119 | movl 48(%ebp), %eax | ||
| 120 | movl %edi, %ecx | ||
| 121 | roll %cl, %esi | ||
| 122 | addl %eax, %esi | ||
| 123 | xorl %esi, %edi | ||
| 124 | movl 52(%ebp), %eax | ||
| 125 | movl %esi, %ecx | ||
| 126 | roll %cl, %edi | ||
| 127 | addl %eax, %edi | ||
| 128 | xorl %edi, %esi | ||
| 129 | movl 56(%ebp), %eax | ||
| 130 | movl %edi, %ecx | ||
| 131 | roll %cl, %esi | ||
| 132 | addl %eax, %esi | ||
| 133 | xorl %esi, %edi | ||
| 134 | movl 60(%ebp), %eax | ||
| 135 | movl %esi, %ecx | ||
| 136 | roll %cl, %edi | ||
| 137 | addl %eax, %edi | ||
| 138 | xorl %edi, %esi | ||
| 139 | movl 64(%ebp), %eax | ||
| 140 | movl %edi, %ecx | ||
| 141 | roll %cl, %esi | ||
| 142 | addl %eax, %esi | ||
| 143 | xorl %esi, %edi | ||
| 144 | movl 68(%ebp), %eax | ||
| 145 | movl %esi, %ecx | ||
| 146 | roll %cl, %edi | ||
| 147 | addl %eax, %edi | ||
| 148 | xorl %edi, %esi | ||
| 149 | movl 72(%ebp), %eax | ||
| 150 | movl %edi, %ecx | ||
| 151 | roll %cl, %esi | ||
| 152 | addl %eax, %esi | ||
| 153 | cmpl $8, %ebx | ||
| 154 | je .L000rc5_exit | ||
| 155 | xorl %esi, %edi | ||
| 156 | movl 76(%ebp), %eax | ||
| 157 | movl %esi, %ecx | ||
| 158 | roll %cl, %edi | ||
| 159 | addl %eax, %edi | ||
| 160 | xorl %edi, %esi | ||
| 161 | movl 80(%ebp), %eax | ||
| 162 | movl %edi, %ecx | ||
| 163 | roll %cl, %esi | ||
| 164 | addl %eax, %esi | ||
| 165 | xorl %esi, %edi | ||
| 166 | movl 84(%ebp), %eax | ||
| 167 | movl %esi, %ecx | ||
| 168 | roll %cl, %edi | ||
| 169 | addl %eax, %edi | ||
| 170 | xorl %edi, %esi | ||
| 171 | movl 88(%ebp), %eax | ||
| 172 | movl %edi, %ecx | ||
| 173 | roll %cl, %esi | ||
| 174 | addl %eax, %esi | ||
| 175 | xorl %esi, %edi | ||
| 176 | movl 92(%ebp), %eax | ||
| 177 | movl %esi, %ecx | ||
| 178 | roll %cl, %edi | ||
| 179 | addl %eax, %edi | ||
| 180 | xorl %edi, %esi | ||
| 181 | movl 96(%ebp), %eax | ||
| 182 | movl %edi, %ecx | ||
| 183 | roll %cl, %esi | ||
| 184 | addl %eax, %esi | ||
| 185 | xorl %esi, %edi | ||
| 186 | movl 100(%ebp), %eax | ||
| 187 | movl %esi, %ecx | ||
| 188 | roll %cl, %edi | ||
| 189 | addl %eax, %edi | ||
| 190 | xorl %edi, %esi | ||
| 191 | movl 104(%ebp), %eax | ||
| 192 | movl %edi, %ecx | ||
| 193 | roll %cl, %esi | ||
| 194 | addl %eax, %esi | ||
| 195 | cmpl $12, %ebx | ||
| 196 | je .L000rc5_exit | ||
| 197 | xorl %esi, %edi | ||
| 198 | movl 108(%ebp), %eax | ||
| 199 | movl %esi, %ecx | ||
| 200 | roll %cl, %edi | ||
| 201 | addl %eax, %edi | ||
| 202 | xorl %edi, %esi | ||
| 203 | movl 112(%ebp), %eax | ||
| 204 | movl %edi, %ecx | ||
| 205 | roll %cl, %esi | ||
| 206 | addl %eax, %esi | ||
| 207 | xorl %esi, %edi | ||
| 208 | movl 116(%ebp), %eax | ||
| 209 | movl %esi, %ecx | ||
| 210 | roll %cl, %edi | ||
| 211 | addl %eax, %edi | ||
| 212 | xorl %edi, %esi | ||
| 213 | movl 120(%ebp), %eax | ||
| 214 | movl %edi, %ecx | ||
| 215 | roll %cl, %esi | ||
| 216 | addl %eax, %esi | ||
| 217 | xorl %esi, %edi | ||
| 218 | movl 124(%ebp), %eax | ||
| 219 | movl %esi, %ecx | ||
| 220 | roll %cl, %edi | ||
| 221 | addl %eax, %edi | ||
| 222 | xorl %edi, %esi | ||
| 223 | movl 128(%ebp), %eax | ||
| 224 | movl %edi, %ecx | ||
| 225 | roll %cl, %esi | ||
| 226 | addl %eax, %esi | ||
| 227 | xorl %esi, %edi | ||
| 228 | movl 132(%ebp), %eax | ||
| 229 | movl %esi, %ecx | ||
| 230 | roll %cl, %edi | ||
| 231 | addl %eax, %edi | ||
| 232 | xorl %edi, %esi | ||
| 233 | movl 136(%ebp), %eax | ||
| 234 | movl %edi, %ecx | ||
| 235 | roll %cl, %esi | ||
| 236 | addl %eax, %esi | ||
| 237 | .L000rc5_exit: | ||
| 238 | movl %edi, (%edx) | ||
| 239 | movl %esi, 4(%edx) | ||
| 240 | popl %ebx | ||
| 241 | popl %edi | ||
| 242 | popl %esi | ||
| 243 | popl %ebp | ||
| 244 | ret | ||
| 245 | .RC5_32_encrypt_end: | ||
| 246 | SIZE(RC5_32_encrypt,.RC5_32_encrypt_end-RC5_32_encrypt) | ||
| 247 | .ident "desasm.pl" | ||
| 248 | .text | ||
| 249 | .align ALIGN | ||
| 250 | .globl RC5_32_decrypt | ||
| 251 | TYPE(RC5_32_decrypt,@function) | ||
| 252 | RC5_32_decrypt: | ||
| 253 | |||
| 254 | pushl %ebp | ||
| 255 | pushl %esi | ||
| 256 | pushl %edi | ||
| 257 | movl 16(%esp), %edx | ||
| 258 | movl 20(%esp), %ebp | ||
| 259 | /* Load the 2 words */ | ||
| 260 | movl (%edx), %edi | ||
| 261 | movl 4(%edx), %esi | ||
| 262 | pushl %ebx | ||
| 263 | movl (%ebp), %ebx | ||
| 264 | cmpl $12, %ebx | ||
| 265 | je .L001rc5_dec_12 | ||
| 266 | cmpl $8, %ebx | ||
| 267 | je .L002rc5_dec_8 | ||
| 268 | movl 136(%ebp), %eax | ||
| 269 | subl %eax, %esi | ||
| 270 | movl %edi, %ecx | ||
| 271 | rorl %cl, %esi | ||
| 272 | xorl %edi, %esi | ||
| 273 | movl 132(%ebp), %eax | ||
| 274 | subl %eax, %edi | ||
| 275 | movl %esi, %ecx | ||
| 276 | rorl %cl, %edi | ||
| 277 | xorl %esi, %edi | ||
| 278 | movl 128(%ebp), %eax | ||
| 279 | subl %eax, %esi | ||
| 280 | movl %edi, %ecx | ||
| 281 | rorl %cl, %esi | ||
| 282 | xorl %edi, %esi | ||
| 283 | movl 124(%ebp), %eax | ||
| 284 | subl %eax, %edi | ||
| 285 | movl %esi, %ecx | ||
| 286 | rorl %cl, %edi | ||
| 287 | xorl %esi, %edi | ||
| 288 | movl 120(%ebp), %eax | ||
| 289 | subl %eax, %esi | ||
| 290 | movl %edi, %ecx | ||
| 291 | rorl %cl, %esi | ||
| 292 | xorl %edi, %esi | ||
| 293 | movl 116(%ebp), %eax | ||
| 294 | subl %eax, %edi | ||
| 295 | movl %esi, %ecx | ||
| 296 | rorl %cl, %edi | ||
| 297 | xorl %esi, %edi | ||
| 298 | movl 112(%ebp), %eax | ||
| 299 | subl %eax, %esi | ||
| 300 | movl %edi, %ecx | ||
| 301 | rorl %cl, %esi | ||
| 302 | xorl %edi, %esi | ||
| 303 | movl 108(%ebp), %eax | ||
| 304 | subl %eax, %edi | ||
| 305 | movl %esi, %ecx | ||
| 306 | rorl %cl, %edi | ||
| 307 | xorl %esi, %edi | ||
| 308 | .L001rc5_dec_12: | ||
| 309 | movl 104(%ebp), %eax | ||
| 310 | subl %eax, %esi | ||
| 311 | movl %edi, %ecx | ||
| 312 | rorl %cl, %esi | ||
| 313 | xorl %edi, %esi | ||
| 314 | movl 100(%ebp), %eax | ||
| 315 | subl %eax, %edi | ||
| 316 | movl %esi, %ecx | ||
| 317 | rorl %cl, %edi | ||
| 318 | xorl %esi, %edi | ||
| 319 | movl 96(%ebp), %eax | ||
| 320 | subl %eax, %esi | ||
| 321 | movl %edi, %ecx | ||
| 322 | rorl %cl, %esi | ||
| 323 | xorl %edi, %esi | ||
| 324 | movl 92(%ebp), %eax | ||
| 325 | subl %eax, %edi | ||
| 326 | movl %esi, %ecx | ||
| 327 | rorl %cl, %edi | ||
| 328 | xorl %esi, %edi | ||
| 329 | movl 88(%ebp), %eax | ||
| 330 | subl %eax, %esi | ||
| 331 | movl %edi, %ecx | ||
| 332 | rorl %cl, %esi | ||
| 333 | xorl %edi, %esi | ||
| 334 | movl 84(%ebp), %eax | ||
| 335 | subl %eax, %edi | ||
| 336 | movl %esi, %ecx | ||
| 337 | rorl %cl, %edi | ||
| 338 | xorl %esi, %edi | ||
| 339 | movl 80(%ebp), %eax | ||
| 340 | subl %eax, %esi | ||
| 341 | movl %edi, %ecx | ||
| 342 | rorl %cl, %esi | ||
| 343 | xorl %edi, %esi | ||
| 344 | movl 76(%ebp), %eax | ||
| 345 | subl %eax, %edi | ||
| 346 | movl %esi, %ecx | ||
| 347 | rorl %cl, %edi | ||
| 348 | xorl %esi, %edi | ||
| 349 | .L002rc5_dec_8: | ||
| 350 | movl 72(%ebp), %eax | ||
| 351 | subl %eax, %esi | ||
| 352 | movl %edi, %ecx | ||
| 353 | rorl %cl, %esi | ||
| 354 | xorl %edi, %esi | ||
| 355 | movl 68(%ebp), %eax | ||
| 356 | subl %eax, %edi | ||
| 357 | movl %esi, %ecx | ||
| 358 | rorl %cl, %edi | ||
| 359 | xorl %esi, %edi | ||
| 360 | movl 64(%ebp), %eax | ||
| 361 | subl %eax, %esi | ||
| 362 | movl %edi, %ecx | ||
| 363 | rorl %cl, %esi | ||
| 364 | xorl %edi, %esi | ||
| 365 | movl 60(%ebp), %eax | ||
| 366 | subl %eax, %edi | ||
| 367 | movl %esi, %ecx | ||
| 368 | rorl %cl, %edi | ||
| 369 | xorl %esi, %edi | ||
| 370 | movl 56(%ebp), %eax | ||
| 371 | subl %eax, %esi | ||
| 372 | movl %edi, %ecx | ||
| 373 | rorl %cl, %esi | ||
| 374 | xorl %edi, %esi | ||
| 375 | movl 52(%ebp), %eax | ||
| 376 | subl %eax, %edi | ||
| 377 | movl %esi, %ecx | ||
| 378 | rorl %cl, %edi | ||
| 379 | xorl %esi, %edi | ||
| 380 | movl 48(%ebp), %eax | ||
| 381 | subl %eax, %esi | ||
| 382 | movl %edi, %ecx | ||
| 383 | rorl %cl, %esi | ||
| 384 | xorl %edi, %esi | ||
| 385 | movl 44(%ebp), %eax | ||
| 386 | subl %eax, %edi | ||
| 387 | movl %esi, %ecx | ||
| 388 | rorl %cl, %edi | ||
| 389 | xorl %esi, %edi | ||
| 390 | movl 40(%ebp), %eax | ||
| 391 | subl %eax, %esi | ||
| 392 | movl %edi, %ecx | ||
| 393 | rorl %cl, %esi | ||
| 394 | xorl %edi, %esi | ||
| 395 | movl 36(%ebp), %eax | ||
| 396 | subl %eax, %edi | ||
| 397 | movl %esi, %ecx | ||
| 398 | rorl %cl, %edi | ||
| 399 | xorl %esi, %edi | ||
| 400 | movl 32(%ebp), %eax | ||
| 401 | subl %eax, %esi | ||
| 402 | movl %edi, %ecx | ||
| 403 | rorl %cl, %esi | ||
| 404 | xorl %edi, %esi | ||
| 405 | movl 28(%ebp), %eax | ||
| 406 | subl %eax, %edi | ||
| 407 | movl %esi, %ecx | ||
| 408 | rorl %cl, %edi | ||
| 409 | xorl %esi, %edi | ||
| 410 | movl 24(%ebp), %eax | ||
| 411 | subl %eax, %esi | ||
| 412 | movl %edi, %ecx | ||
| 413 | rorl %cl, %esi | ||
| 414 | xorl %edi, %esi | ||
| 415 | movl 20(%ebp), %eax | ||
| 416 | subl %eax, %edi | ||
| 417 | movl %esi, %ecx | ||
| 418 | rorl %cl, %edi | ||
| 419 | xorl %esi, %edi | ||
| 420 | movl 16(%ebp), %eax | ||
| 421 | subl %eax, %esi | ||
| 422 | movl %edi, %ecx | ||
| 423 | rorl %cl, %esi | ||
| 424 | xorl %edi, %esi | ||
| 425 | movl 12(%ebp), %eax | ||
| 426 | subl %eax, %edi | ||
| 427 | movl %esi, %ecx | ||
| 428 | rorl %cl, %edi | ||
| 429 | xorl %esi, %edi | ||
| 430 | subl 8(%ebp), %esi | ||
| 431 | subl 4(%ebp), %edi | ||
| 432 | .L003rc5_exit: | ||
| 433 | movl %edi, (%edx) | ||
| 434 | movl %esi, 4(%edx) | ||
| 435 | popl %ebx | ||
| 436 | popl %edi | ||
| 437 | popl %esi | ||
| 438 | popl %ebp | ||
| 439 | ret | ||
| 440 | .RC5_32_decrypt_end: | ||
| 441 | SIZE(RC5_32_decrypt,.RC5_32_decrypt_end-RC5_32_decrypt) | ||
| 442 | .ident "desasm.pl" | ||
| 443 | .text | ||
| 444 | .align ALIGN | ||
| 445 | .globl RC5_32_cbc_encrypt | ||
| 446 | TYPE(RC5_32_cbc_encrypt,@function) | ||
| 447 | RC5_32_cbc_encrypt: | ||
| 448 | |||
| 449 | pushl %ebp | ||
| 450 | pushl %ebx | ||
| 451 | pushl %esi | ||
| 452 | pushl %edi | ||
| 453 | movl 28(%esp), %ebp | ||
| 454 | /* getting iv ptr from parameter 4 */ | ||
| 455 | movl 36(%esp), %ebx | ||
| 456 | movl (%ebx), %esi | ||
| 457 | movl 4(%ebx), %edi | ||
| 458 | pushl %edi | ||
| 459 | pushl %esi | ||
| 460 | pushl %edi | ||
| 461 | pushl %esi | ||
| 462 | movl %esp, %ebx | ||
| 463 | movl 36(%esp), %esi | ||
| 464 | movl 40(%esp), %edi | ||
| 465 | /* getting encrypt flag from parameter 5 */ | ||
| 466 | movl 56(%esp), %ecx | ||
| 467 | /* get and push parameter 3 */ | ||
| 468 | movl 48(%esp), %eax | ||
| 469 | pushl %eax | ||
| 470 | pushl %ebx | ||
| 471 | cmpl $0, %ecx | ||
| 472 | jz .L004decrypt | ||
| 473 | andl $4294967288, %ebp | ||
| 474 | movl 8(%esp), %eax | ||
| 475 | movl 12(%esp), %ebx | ||
| 476 | jz .L005encrypt_finish | ||
| 477 | .L006encrypt_loop: | ||
| 478 | movl (%esi), %ecx | ||
| 479 | movl 4(%esi), %edx | ||
| 480 | xorl %ecx, %eax | ||
| 481 | xorl %edx, %ebx | ||
| 482 | movl %eax, 8(%esp) | ||
| 483 | movl %ebx, 12(%esp) | ||
| 484 | call RC5_32_encrypt | ||
| 485 | movl 8(%esp), %eax | ||
| 486 | movl 12(%esp), %ebx | ||
| 487 | movl %eax, (%edi) | ||
| 488 | movl %ebx, 4(%edi) | ||
| 489 | addl $8, %esi | ||
| 490 | addl $8, %edi | ||
| 491 | subl $8, %ebp | ||
| 492 | jnz .L006encrypt_loop | ||
| 493 | .L005encrypt_finish: | ||
| 494 | movl 52(%esp), %ebp | ||
| 495 | andl $7, %ebp | ||
| 496 | jz .L007finish | ||
| 497 | xorl %ecx, %ecx | ||
| 498 | xorl %edx, %edx | ||
| 499 | movl .L008cbc_enc_jmp_table(,%ebp,4),%ebp | ||
| 500 | jmp *%ebp | ||
| 501 | .L009ej7: | ||
| 502 | movb 6(%esi), %dh | ||
| 503 | sall $8, %edx | ||
| 504 | .L010ej6: | ||
| 505 | movb 5(%esi), %dh | ||
| 506 | .L011ej5: | ||
| 507 | movb 4(%esi), %dl | ||
| 508 | .L012ej4: | ||
| 509 | movl (%esi), %ecx | ||
| 510 | jmp .L013ejend | ||
| 511 | .L014ej3: | ||
| 512 | movb 2(%esi), %ch | ||
| 513 | sall $8, %ecx | ||
| 514 | .L015ej2: | ||
| 515 | movb 1(%esi), %ch | ||
| 516 | .L016ej1: | ||
| 517 | movb (%esi), %cl | ||
| 518 | .L013ejend: | ||
| 519 | xorl %ecx, %eax | ||
| 520 | xorl %edx, %ebx | ||
| 521 | movl %eax, 8(%esp) | ||
| 522 | movl %ebx, 12(%esp) | ||
| 523 | call RC5_32_encrypt | ||
| 524 | movl 8(%esp), %eax | ||
| 525 | movl 12(%esp), %ebx | ||
| 526 | movl %eax, (%edi) | ||
| 527 | movl %ebx, 4(%edi) | ||
| 528 | jmp .L007finish | ||
| 529 | .align ALIGN | ||
| 530 | .L004decrypt: | ||
| 531 | andl $4294967288, %ebp | ||
| 532 | movl 16(%esp), %eax | ||
| 533 | movl 20(%esp), %ebx | ||
| 534 | jz .L017decrypt_finish | ||
| 535 | .L018decrypt_loop: | ||
| 536 | movl (%esi), %eax | ||
| 537 | movl 4(%esi), %ebx | ||
| 538 | movl %eax, 8(%esp) | ||
| 539 | movl %ebx, 12(%esp) | ||
| 540 | call RC5_32_decrypt | ||
| 541 | movl 8(%esp), %eax | ||
| 542 | movl 12(%esp), %ebx | ||
| 543 | movl 16(%esp), %ecx | ||
| 544 | movl 20(%esp), %edx | ||
| 545 | xorl %eax, %ecx | ||
| 546 | xorl %ebx, %edx | ||
| 547 | movl (%esi), %eax | ||
| 548 | movl 4(%esi), %ebx | ||
| 549 | movl %ecx, (%edi) | ||
| 550 | movl %edx, 4(%edi) | ||
| 551 | movl %eax, 16(%esp) | ||
| 552 | movl %ebx, 20(%esp) | ||
| 553 | addl $8, %esi | ||
| 554 | addl $8, %edi | ||
| 555 | subl $8, %ebp | ||
| 556 | jnz .L018decrypt_loop | ||
| 557 | .L017decrypt_finish: | ||
| 558 | movl 52(%esp), %ebp | ||
| 559 | andl $7, %ebp | ||
| 560 | jz .L007finish | ||
| 561 | movl (%esi), %eax | ||
| 562 | movl 4(%esi), %ebx | ||
| 563 | movl %eax, 8(%esp) | ||
| 564 | movl %ebx, 12(%esp) | ||
| 565 | call RC5_32_decrypt | ||
| 566 | movl 8(%esp), %eax | ||
| 567 | movl 12(%esp), %ebx | ||
| 568 | movl 16(%esp), %ecx | ||
| 569 | movl 20(%esp), %edx | ||
| 570 | xorl %eax, %ecx | ||
| 571 | xorl %ebx, %edx | ||
| 572 | movl (%esi), %eax | ||
| 573 | movl 4(%esi), %ebx | ||
| 574 | .L019dj7: | ||
| 575 | rorl $16, %edx | ||
| 576 | movb %dl, 6(%edi) | ||
| 577 | shrl $16, %edx | ||
| 578 | .L020dj6: | ||
| 579 | movb %dh, 5(%edi) | ||
| 580 | .L021dj5: | ||
| 581 | movb %dl, 4(%edi) | ||
| 582 | .L022dj4: | ||
| 583 | movl %ecx, (%edi) | ||
| 584 | jmp .L023djend | ||
| 585 | .L024dj3: | ||
| 586 | rorl $16, %ecx | ||
| 587 | movb %cl, 2(%edi) | ||
| 588 | sall $16, %ecx | ||
| 589 | .L025dj2: | ||
| 590 | movb %ch, 1(%esi) | ||
| 591 | .L026dj1: | ||
| 592 | movb %cl, (%esi) | ||
| 593 | .L023djend: | ||
| 594 | jmp .L007finish | ||
| 595 | .align ALIGN | ||
| 596 | .L007finish: | ||
| 597 | movl 60(%esp), %ecx | ||
| 598 | addl $24, %esp | ||
| 599 | movl %eax, (%ecx) | ||
| 600 | movl %ebx, 4(%ecx) | ||
| 601 | popl %edi | ||
| 602 | popl %esi | ||
| 603 | popl %ebx | ||
| 604 | popl %ebp | ||
| 605 | ret | ||
| 606 | .align ALIGN | ||
| 607 | .L008cbc_enc_jmp_table: | ||
| 608 | .long 0 | ||
| 609 | .long .L016ej1 | ||
| 610 | .long .L015ej2 | ||
| 611 | .long .L014ej3 | ||
| 612 | .long .L012ej4 | ||
| 613 | .long .L011ej5 | ||
| 614 | .long .L010ej6 | ||
| 615 | .long .L009ej7 | ||
| 616 | .align ALIGN | ||
| 617 | .L027cbc_dec_jmp_table: | ||
| 618 | .long 0 | ||
| 619 | .long .L026dj1 | ||
| 620 | .long .L025dj2 | ||
| 621 | .long .L024dj3 | ||
| 622 | .long .L022dj4 | ||
| 623 | .long .L021dj5 | ||
| 624 | .long .L020dj6 | ||
| 625 | .long .L019dj7 | ||
| 626 | .RC5_32_cbc_encrypt_end: | ||
| 627 | SIZE(RC5_32_cbc_encrypt,.RC5_32_cbc_encrypt_end-RC5_32_cbc_encrypt) | ||
| 628 | .ident "desasm.pl" | ||
diff --git a/src/lib/libssl/src/crypto/rc5/asm/rc5-586.pl b/src/lib/libssl/src/crypto/rc5/asm/rc5-586.pl new file mode 100644 index 0000000000..172bd9ee1b --- /dev/null +++ b/src/lib/libssl/src/crypto/rc5/asm/rc5-586.pl | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | push(@INC,"perlasm","../../perlasm"); | ||
| 4 | require "x86asm.pl"; | ||
| 5 | require "cbc.pl"; | ||
| 6 | |||
| 7 | &asm_init($ARGV[0],"rc5-586.pl"); | ||
| 8 | |||
| 9 | $RC5_MAX_ROUNDS=16; | ||
| 10 | $RC5_32_OFF=($RC5_MAX_ROUNDS+2)*4; | ||
| 11 | $A="edi"; | ||
| 12 | $B="esi"; | ||
| 13 | $S="ebp"; | ||
| 14 | $tmp1="eax"; | ||
| 15 | $r="ebx"; | ||
| 16 | $tmpc="ecx"; | ||
| 17 | $tmp4="edx"; | ||
| 18 | |||
| 19 | &RC5_32_encrypt("RC5_32_encrypt",1); | ||
| 20 | &RC5_32_encrypt("RC5_32_decrypt",0); | ||
| 21 | &cbc("RC5_32_cbc_encrypt","RC5_32_encrypt","RC5_32_decrypt",0,4,5,3,-1,-1); | ||
| 22 | &asm_finish(); | ||
| 23 | |||
| 24 | sub RC5_32_encrypt | ||
| 25 | { | ||
| 26 | local($name,$enc)=@_; | ||
| 27 | |||
| 28 | &function_begin_B($name,""); | ||
| 29 | |||
| 30 | &comment(""); | ||
| 31 | |||
| 32 | &push("ebp"); | ||
| 33 | &push("esi"); | ||
| 34 | &push("edi"); | ||
| 35 | &mov($tmp4,&wparam(0)); | ||
| 36 | &mov($S,&wparam(1)); | ||
| 37 | |||
| 38 | &comment("Load the 2 words"); | ||
| 39 | &mov($A,&DWP(0,$tmp4,"",0)); | ||
| 40 | &mov($B,&DWP(4,$tmp4,"",0)); | ||
| 41 | |||
| 42 | &push($r); | ||
| 43 | &mov($r, &DWP(0,$S,"",0)); | ||
| 44 | |||
| 45 | # encrypting part | ||
| 46 | |||
| 47 | if ($enc) | ||
| 48 | { | ||
| 49 | &add($A, &DWP(4+0,$S,"",0)); | ||
| 50 | &add($B, &DWP(4+4,$S,"",0)); | ||
| 51 | |||
| 52 | for ($i=0; $i<$RC5_MAX_ROUNDS; $i++) | ||
| 53 | { | ||
| 54 | &xor($A, $B); | ||
| 55 | &mov($tmp1, &DWP(12+$i*8,$S,"",0)); | ||
| 56 | &mov($tmpc, $B); | ||
| 57 | &rotl($A, &LB("ecx")); | ||
| 58 | &add($A, $tmp1); | ||
| 59 | |||
| 60 | &xor($B, $A); | ||
| 61 | &mov($tmp1, &DWP(16+$i*8,$S,"",0)); | ||
| 62 | &mov($tmpc, $A); | ||
| 63 | &rotl($B, &LB("ecx")); | ||
| 64 | &add($B, $tmp1); | ||
| 65 | if (($i == 7) || ($i == 11)) | ||
| 66 | { | ||
| 67 | &cmp($r, $i+1); | ||
| 68 | &je(&label("rc5_exit")); | ||
| 69 | } | ||
| 70 | } | ||
| 71 | } | ||
| 72 | else | ||
| 73 | { | ||
| 74 | &cmp($r, 12); | ||
| 75 | &je(&label("rc5_dec_12")); | ||
| 76 | &cmp($r, 8); | ||
| 77 | &je(&label("rc5_dec_8")); | ||
| 78 | for ($i=$RC5_MAX_ROUNDS; $i > 0; $i--) | ||
| 79 | { | ||
| 80 | &set_label("rc5_dec_$i") if ($i == 12) || ($i == 8); | ||
| 81 | &mov($tmp1, &DWP($i*8+8,$S,"",0)); | ||
| 82 | &sub($B, $tmp1); | ||
| 83 | &mov($tmpc, $A); | ||
| 84 | &rotr($B, &LB("ecx")); | ||
| 85 | &xor($B, $A); | ||
| 86 | |||
| 87 | &mov($tmp1, &DWP($i*8+4,$S,"",0)); | ||
| 88 | &sub($A, $tmp1); | ||
| 89 | &mov($tmpc, $B); | ||
| 90 | &rotr($A, &LB("ecx")); | ||
| 91 | &xor($A, $B); | ||
| 92 | } | ||
| 93 | &sub($B, &DWP(4+4,$S,"",0)); | ||
| 94 | &sub($A, &DWP(4+0,$S,"",0)); | ||
| 95 | } | ||
| 96 | |||
| 97 | &set_label("rc5_exit"); | ||
| 98 | &mov(&DWP(0,$tmp4,"",0),$A); | ||
| 99 | &mov(&DWP(4,$tmp4,"",0),$B); | ||
| 100 | |||
| 101 | &pop("ebx"); | ||
| 102 | &pop("edi"); | ||
| 103 | &pop("esi"); | ||
| 104 | &pop("ebp"); | ||
| 105 | &ret(); | ||
| 106 | &function_end_B($name); | ||
| 107 | } | ||
| 108 | |||
| 109 | |||
diff --git a/src/lib/libssl/src/crypto/ripemd/Makefile.ssl b/src/lib/libssl/src/crypto/ripemd/Makefile.ssl new file mode 100644 index 0000000000..67d47ceb2c --- /dev/null +++ b/src/lib/libssl/src/crypto/ripemd/Makefile.ssl | |||
| @@ -0,0 +1,104 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/ripemd/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= ripemd | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | CPP= $(CC) -E | ||
| 9 | INCLUDES= | ||
| 10 | CFLAG=-g | ||
| 11 | INSTALLTOP=/usr/local/ssl | ||
| 12 | MAKE= make -f Makefile.ssl | ||
| 13 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 14 | MAKEFILE= Makefile.ssl | ||
| 15 | AR= ar r | ||
| 16 | |||
| 17 | RIP_ASM_OBJ= | ||
| 18 | |||
| 19 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 20 | |||
| 21 | GENERAL=Makefile | ||
| 22 | TEST=rmdtest.c | ||
| 23 | APPS=rmd160.c | ||
| 24 | |||
| 25 | LIB=$(TOP)/libcrypto.a | ||
| 26 | LIBSRC=rmd_dgst.c rmd_one.c | ||
| 27 | LIBOBJ=rmd_dgst.o rmd_one.o $(RMD160_ASM_OBJ) | ||
| 28 | |||
| 29 | SRC= $(LIBSRC) | ||
| 30 | |||
| 31 | EXHEADER= ripemd.h | ||
| 32 | HEADER= rmd_locl.h rmdconst.h $(EXHEADER) | ||
| 33 | |||
| 34 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 35 | |||
| 36 | top: | ||
| 37 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 38 | |||
| 39 | all: lib | ||
| 40 | |||
| 41 | lib: $(LIBOBJ) | ||
| 42 | $(AR) $(LIB) $(LIBOBJ) | ||
| 43 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 44 | @touch lib | ||
| 45 | |||
| 46 | # elf | ||
| 47 | asm/rm86-elf.o: asm/rm86unix.cpp | ||
| 48 | $(CPP) -DELF asm/rm86unix.cpp | as -o asm/rm86-elf.o | ||
| 49 | |||
| 50 | # solaris | ||
| 51 | asm/rm86-sol.o: asm/rm86unix.cpp | ||
| 52 | $(CC) -E -DSOL asm/rm86unix.cpp | sed 's/^#.*//' > asm/rm86-sol.s | ||
| 53 | as -o asm/rm86-sol.o asm/rm86-sol.s | ||
| 54 | rm -f asm/rm86-sol.s | ||
| 55 | |||
| 56 | # a.out | ||
| 57 | asm/rm86-out.o: asm/rm86unix.cpp | ||
| 58 | $(CPP) -DOUT asm/rm86unix.cpp | as -o asm/rm86-out.o | ||
| 59 | |||
| 60 | # bsdi | ||
| 61 | asm/rm86bsdi.o: asm/rm86unix.cpp | ||
| 62 | $(CPP) -DBSDI asm/rm86unix.cpp | as -o asm/rm86bsdi.o | ||
| 63 | |||
| 64 | asm/rm86unix.cpp: | ||
| 65 | (cd asm; perl rmd-586.pl cpp >rm86unix.cpp) | ||
| 66 | |||
| 67 | files: | ||
| 68 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 69 | |||
| 70 | links: | ||
| 71 | /bin/rm -f Makefile | ||
| 72 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 73 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 74 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 75 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 76 | |||
| 77 | install: | ||
| 78 | @for i in $(EXHEADER) ; \ | ||
| 79 | do \ | ||
| 80 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 81 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 82 | done; | ||
| 83 | |||
| 84 | tags: | ||
| 85 | ctags $(SRC) | ||
| 86 | |||
| 87 | tests: | ||
| 88 | |||
| 89 | lint: | ||
| 90 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 91 | |||
| 92 | depend: | ||
| 93 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 94 | |||
| 95 | dclean: | ||
| 96 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 97 | mv -f Makefile.new $(MAKEFILE) | ||
| 98 | |||
| 99 | clean: | ||
| 100 | /bin/rm -f *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 101 | |||
| 102 | errors: | ||
| 103 | |||
| 104 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/ripemd/Makefile.uni b/src/lib/libssl/src/crypto/ripemd/Makefile.uni new file mode 100644 index 0000000000..54685712db --- /dev/null +++ b/src/lib/libssl/src/crypto/ripemd/Makefile.uni | |||
| @@ -0,0 +1,109 @@ | |||
| 1 | # Targets | ||
| 2 | # make - twidle the options yourself :-) | ||
| 3 | # make cc - standard cc options | ||
| 4 | # make gcc - standard gcc options | ||
| 5 | # make x86-elf - linux-elf etc | ||
| 6 | # make x86-out - linux-a.out, FreeBSD etc | ||
| 7 | # make x86-solaris | ||
| 8 | # make x86-bdsi | ||
| 9 | |||
| 10 | DIR= md5 | ||
| 11 | TOP= . | ||
| 12 | CC= gcc | ||
| 13 | CFLAG= -O3 -fomit-frame-pointer | ||
| 14 | |||
| 15 | CPP= $(CC) -E | ||
| 16 | INCLUDES= | ||
| 17 | INSTALLTOP=/usr/local/lib | ||
| 18 | MAKE= make | ||
| 19 | MAKEDEPEND= makedepend | ||
| 20 | MAKEFILE= Makefile.uni | ||
| 21 | AR= ar r | ||
| 22 | |||
| 23 | MD5_ASM_OBJ= | ||
| 24 | |||
| 25 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 26 | |||
| 27 | GENERAL=Makefile | ||
| 28 | TEST=md5test | ||
| 29 | APPS=md5 | ||
| 30 | |||
| 31 | LIB=libmd5.a | ||
| 32 | LIBSRC=md5_dgst.c md5_one.c | ||
| 33 | LIBOBJ=md5_dgst.o md5_one.o $(MD5_ASM_OBJ) | ||
| 34 | |||
| 35 | SRC= $(LIBSRC) | ||
| 36 | |||
| 37 | EXHEADER= md5.h | ||
| 38 | HEADER= md5_locl.h $(EXHEADER) | ||
| 39 | |||
| 40 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 41 | |||
| 42 | all: $(LIB) $(TEST) $(APPS) | ||
| 43 | |||
| 44 | $(LIB): $(LIBOBJ) | ||
| 45 | $(AR) $(LIB) $(LIBOBJ) | ||
| 46 | sh $(TOP)/ranlib.sh $(LIB) | ||
| 47 | |||
| 48 | # elf | ||
| 49 | asm/mx86-elf.o: asm/mx86unix.cpp | ||
| 50 | $(CPP) -DELF asm/mx86unix.cpp | as -o asm/mx86-elf.o | ||
| 51 | |||
| 52 | # solaris | ||
| 53 | asm/mx86-sol.o: asm/mx86unix.cpp | ||
| 54 | $(CC) -E -DSOL asm/mx86unix.cpp | sed 's/^#.*//' > asm/mx86-sol.s | ||
| 55 | as -o asm/mx86-sol.o asm/mx86-sol.s | ||
| 56 | rm -f asm/mx86-sol.s | ||
| 57 | |||
| 58 | # a.out | ||
| 59 | asm/mx86-out.o: asm/mx86unix.cpp | ||
| 60 | $(CPP) -DOUT asm/mx86unix.cpp | as -o asm/mx86-out.o | ||
| 61 | |||
| 62 | # bsdi | ||
| 63 | asm/mx86bsdi.o: asm/mx86unix.cpp | ||
| 64 | $(CPP) -DBSDI asm/mx86unix.cpp | as -o asm/mx86bsdi.o | ||
| 65 | |||
| 66 | asm/mx86unix.cpp: | ||
| 67 | (cd asm; perl md5-586.pl cpp >mx86unix.cpp) | ||
| 68 | |||
| 69 | test: $(TEST) | ||
| 70 | ./$(TEST) | ||
| 71 | |||
| 72 | $(TEST): $(TEST).c $(LIB) | ||
| 73 | $(CC) -o $(TEST) $(CFLAGS) $(TEST).c $(LIB) | ||
| 74 | |||
| 75 | $(APPS): $(APPS).c $(LIB) | ||
| 76 | $(CC) -o $(APPS) $(CFLAGS) $(APPS).c $(LIB) | ||
| 77 | |||
| 78 | lint: | ||
| 79 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 80 | |||
| 81 | depend: | ||
| 82 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 83 | |||
| 84 | dclean: | ||
| 85 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 86 | mv -f Makefile.new $(MAKEFILE) | ||
| 87 | |||
| 88 | clean: | ||
| 89 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 90 | |||
| 91 | cc: | ||
| 92 | $(MAKE) MD5_ASM_OBJ="" CC="cc" CFLAG="-O" all | ||
| 93 | |||
| 94 | gcc: | ||
| 95 | $(MAKE) MD5_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
| 96 | |||
| 97 | x86-elf: | ||
| 98 | $(MAKE) MD5_ASM_OBJ="asm/mx86-elf.o" CFLAG="-DELF -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 99 | |||
| 100 | x86-out: | ||
| 101 | $(MAKE) MD5_ASM_OBJ="asm/mx86-out.o" CFLAG="-DOUT -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 102 | |||
| 103 | x86-solaris: | ||
| 104 | $(MAKE) MD5_ASM_OBJ="asm/mx86-sol.o" CFLAG="-DSOL -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 105 | |||
| 106 | x86-bdsi: | ||
| 107 | $(MAKE) MD5_ASM_OBJ="asm/mx86-bdsi.o" CFLAG="-DBDSI -DMD5_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 108 | |||
| 109 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/ripemd/asm/rm-win32.asm b/src/lib/libssl/src/crypto/ripemd/asm/rm-win32.asm new file mode 100644 index 0000000000..bd38791c13 --- /dev/null +++ b/src/lib/libssl/src/crypto/ripemd/asm/rm-win32.asm | |||
| @@ -0,0 +1,1972 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by rmd-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE rmd-586.asm | ||
| 8 | .386 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _ripemd160_block_x86 | ||
| 12 | |||
| 13 | _ripemd160_block_x86 PROC NEAR | ||
| 14 | push esi | ||
| 15 | mov ecx, DWORD PTR 16[esp] | ||
| 16 | push edi | ||
| 17 | mov esi, DWORD PTR 16[esp] | ||
| 18 | push ebp | ||
| 19 | add ecx, esi | ||
| 20 | push ebx | ||
| 21 | sub ecx, 64 | ||
| 22 | sub esp, 88 | ||
| 23 | mov DWORD PTR [esp],ecx | ||
| 24 | mov edi, DWORD PTR 108[esp] | ||
| 25 | L000start: | ||
| 26 | ; | ||
| 27 | mov eax, DWORD PTR [esi] | ||
| 28 | mov ebx, DWORD PTR 4[esi] | ||
| 29 | mov DWORD PTR 4[esp],eax | ||
| 30 | mov DWORD PTR 8[esp],ebx | ||
| 31 | mov eax, DWORD PTR 8[esi] | ||
| 32 | mov ebx, DWORD PTR 12[esi] | ||
| 33 | mov DWORD PTR 12[esp],eax | ||
| 34 | mov DWORD PTR 16[esp],ebx | ||
| 35 | mov eax, DWORD PTR 16[esi] | ||
| 36 | mov ebx, DWORD PTR 20[esi] | ||
| 37 | mov DWORD PTR 20[esp],eax | ||
| 38 | mov DWORD PTR 24[esp],ebx | ||
| 39 | mov eax, DWORD PTR 24[esi] | ||
| 40 | mov ebx, DWORD PTR 28[esi] | ||
| 41 | mov DWORD PTR 28[esp],eax | ||
| 42 | mov DWORD PTR 32[esp],ebx | ||
| 43 | mov eax, DWORD PTR 32[esi] | ||
| 44 | mov ebx, DWORD PTR 36[esi] | ||
| 45 | mov DWORD PTR 36[esp],eax | ||
| 46 | mov DWORD PTR 40[esp],ebx | ||
| 47 | mov eax, DWORD PTR 40[esi] | ||
| 48 | mov ebx, DWORD PTR 44[esi] | ||
| 49 | mov DWORD PTR 44[esp],eax | ||
| 50 | mov DWORD PTR 48[esp],ebx | ||
| 51 | mov eax, DWORD PTR 48[esi] | ||
| 52 | mov ebx, DWORD PTR 52[esi] | ||
| 53 | mov DWORD PTR 52[esp],eax | ||
| 54 | mov DWORD PTR 56[esp],ebx | ||
| 55 | mov eax, DWORD PTR 56[esi] | ||
| 56 | mov ebx, DWORD PTR 60[esi] | ||
| 57 | mov DWORD PTR 60[esp],eax | ||
| 58 | mov DWORD PTR 64[esp],ebx | ||
| 59 | add esi, 64 | ||
| 60 | mov eax, DWORD PTR [edi] | ||
| 61 | mov DWORD PTR 112[esp],esi | ||
| 62 | mov ebx, DWORD PTR 4[edi] | ||
| 63 | mov ecx, DWORD PTR 8[edi] | ||
| 64 | mov edx, DWORD PTR 12[edi] | ||
| 65 | mov ebp, DWORD PTR 16[edi] | ||
| 66 | ; 0 | ||
| 67 | mov esi, ecx | ||
| 68 | xor esi, edx | ||
| 69 | mov edi, DWORD PTR 4[esp] | ||
| 70 | xor esi, ebx | ||
| 71 | add eax, edi | ||
| 72 | rol ecx, 10 | ||
| 73 | add eax, esi | ||
| 74 | mov esi, ebx | ||
| 75 | rol eax, 11 | ||
| 76 | add eax, ebp | ||
| 77 | ; 1 | ||
| 78 | xor esi, ecx | ||
| 79 | mov edi, DWORD PTR 8[esp] | ||
| 80 | xor esi, eax | ||
| 81 | add ebp, esi | ||
| 82 | mov esi, eax | ||
| 83 | rol ebx, 10 | ||
| 84 | add ebp, edi | ||
| 85 | xor esi, ebx | ||
| 86 | rol ebp, 14 | ||
| 87 | add ebp, edx | ||
| 88 | ; 2 | ||
| 89 | mov edi, DWORD PTR 12[esp] | ||
| 90 | xor esi, ebp | ||
| 91 | add edx, edi | ||
| 92 | rol eax, 10 | ||
| 93 | add edx, esi | ||
| 94 | mov esi, ebp | ||
| 95 | rol edx, 15 | ||
| 96 | add edx, ecx | ||
| 97 | ; 3 | ||
| 98 | xor esi, eax | ||
| 99 | mov edi, DWORD PTR 16[esp] | ||
| 100 | xor esi, edx | ||
| 101 | add ecx, esi | ||
| 102 | mov esi, edx | ||
| 103 | rol ebp, 10 | ||
| 104 | add ecx, edi | ||
| 105 | xor esi, ebp | ||
| 106 | rol ecx, 12 | ||
| 107 | add ecx, ebx | ||
| 108 | ; 4 | ||
| 109 | mov edi, DWORD PTR 20[esp] | ||
| 110 | xor esi, ecx | ||
| 111 | add ebx, edi | ||
| 112 | rol edx, 10 | ||
| 113 | add ebx, esi | ||
| 114 | mov esi, ecx | ||
| 115 | rol ebx, 5 | ||
| 116 | add ebx, eax | ||
| 117 | ; 5 | ||
| 118 | xor esi, edx | ||
| 119 | mov edi, DWORD PTR 24[esp] | ||
| 120 | xor esi, ebx | ||
| 121 | add eax, esi | ||
| 122 | mov esi, ebx | ||
| 123 | rol ecx, 10 | ||
| 124 | add eax, edi | ||
| 125 | xor esi, ecx | ||
| 126 | rol eax, 8 | ||
| 127 | add eax, ebp | ||
| 128 | ; 6 | ||
| 129 | mov edi, DWORD PTR 28[esp] | ||
| 130 | xor esi, eax | ||
| 131 | add ebp, edi | ||
| 132 | rol ebx, 10 | ||
| 133 | add ebp, esi | ||
| 134 | mov esi, eax | ||
| 135 | rol ebp, 7 | ||
| 136 | add ebp, edx | ||
| 137 | ; 7 | ||
| 138 | xor esi, ebx | ||
| 139 | mov edi, DWORD PTR 32[esp] | ||
| 140 | xor esi, ebp | ||
| 141 | add edx, esi | ||
| 142 | mov esi, ebp | ||
| 143 | rol eax, 10 | ||
| 144 | add edx, edi | ||
| 145 | xor esi, eax | ||
| 146 | rol edx, 9 | ||
| 147 | add edx, ecx | ||
| 148 | ; 8 | ||
| 149 | mov edi, DWORD PTR 36[esp] | ||
| 150 | xor esi, edx | ||
| 151 | add ecx, edi | ||
| 152 | rol ebp, 10 | ||
| 153 | add ecx, esi | ||
| 154 | mov esi, edx | ||
| 155 | rol ecx, 11 | ||
| 156 | add ecx, ebx | ||
| 157 | ; 9 | ||
| 158 | xor esi, ebp | ||
| 159 | mov edi, DWORD PTR 40[esp] | ||
| 160 | xor esi, ecx | ||
| 161 | add ebx, esi | ||
| 162 | mov esi, ecx | ||
| 163 | rol edx, 10 | ||
| 164 | add ebx, edi | ||
| 165 | xor esi, edx | ||
| 166 | rol ebx, 13 | ||
| 167 | add ebx, eax | ||
| 168 | ; 10 | ||
| 169 | mov edi, DWORD PTR 44[esp] | ||
| 170 | xor esi, ebx | ||
| 171 | add eax, edi | ||
| 172 | rol ecx, 10 | ||
| 173 | add eax, esi | ||
| 174 | mov esi, ebx | ||
| 175 | rol eax, 14 | ||
| 176 | add eax, ebp | ||
| 177 | ; 11 | ||
| 178 | xor esi, ecx | ||
| 179 | mov edi, DWORD PTR 48[esp] | ||
| 180 | xor esi, eax | ||
| 181 | add ebp, esi | ||
| 182 | mov esi, eax | ||
| 183 | rol ebx, 10 | ||
| 184 | add ebp, edi | ||
| 185 | xor esi, ebx | ||
| 186 | rol ebp, 15 | ||
| 187 | add ebp, edx | ||
| 188 | ; 12 | ||
| 189 | mov edi, DWORD PTR 52[esp] | ||
| 190 | xor esi, ebp | ||
| 191 | add edx, edi | ||
| 192 | rol eax, 10 | ||
| 193 | add edx, esi | ||
| 194 | mov esi, ebp | ||
| 195 | rol edx, 6 | ||
| 196 | add edx, ecx | ||
| 197 | ; 13 | ||
| 198 | xor esi, eax | ||
| 199 | mov edi, DWORD PTR 56[esp] | ||
| 200 | xor esi, edx | ||
| 201 | add ecx, esi | ||
| 202 | mov esi, edx | ||
| 203 | rol ebp, 10 | ||
| 204 | add ecx, edi | ||
| 205 | xor esi, ebp | ||
| 206 | rol ecx, 7 | ||
| 207 | add ecx, ebx | ||
| 208 | ; 14 | ||
| 209 | mov edi, DWORD PTR 60[esp] | ||
| 210 | xor esi, ecx | ||
| 211 | add ebx, edi | ||
| 212 | rol edx, 10 | ||
| 213 | add ebx, esi | ||
| 214 | mov esi, ecx | ||
| 215 | rol ebx, 9 | ||
| 216 | add ebx, eax | ||
| 217 | ; 15 | ||
| 218 | xor esi, edx | ||
| 219 | mov edi, DWORD PTR 64[esp] | ||
| 220 | xor esi, ebx | ||
| 221 | add eax, esi | ||
| 222 | mov esi, -1 | ||
| 223 | rol ecx, 10 | ||
| 224 | add eax, edi | ||
| 225 | mov edi, DWORD PTR 32[esp] | ||
| 226 | rol eax, 8 | ||
| 227 | add eax, ebp | ||
| 228 | ; 16 | ||
| 229 | add ebp, edi | ||
| 230 | mov edi, ebx | ||
| 231 | sub esi, eax | ||
| 232 | and edi, eax | ||
| 233 | and esi, ecx | ||
| 234 | or edi, esi | ||
| 235 | mov esi, DWORD PTR 20[esp] | ||
| 236 | rol ebx, 10 | ||
| 237 | lea ebp, DWORD PTR 1518500249[edi*1+ebp] | ||
| 238 | mov edi, -1 | ||
| 239 | rol ebp, 7 | ||
| 240 | add ebp, edx | ||
| 241 | ; 17 | ||
| 242 | add edx, esi | ||
| 243 | mov esi, eax | ||
| 244 | sub edi, ebp | ||
| 245 | and esi, ebp | ||
| 246 | and edi, ebx | ||
| 247 | or esi, edi | ||
| 248 | mov edi, DWORD PTR 56[esp] | ||
| 249 | rol eax, 10 | ||
| 250 | lea edx, DWORD PTR 1518500249[esi*1+edx] | ||
| 251 | mov esi, -1 | ||
| 252 | rol edx, 6 | ||
| 253 | add edx, ecx | ||
| 254 | ; 18 | ||
| 255 | add ecx, edi | ||
| 256 | mov edi, ebp | ||
| 257 | sub esi, edx | ||
| 258 | and edi, edx | ||
| 259 | and esi, eax | ||
| 260 | or edi, esi | ||
| 261 | mov esi, DWORD PTR 8[esp] | ||
| 262 | rol ebp, 10 | ||
| 263 | lea ecx, DWORD PTR 1518500249[edi*1+ecx] | ||
| 264 | mov edi, -1 | ||
| 265 | rol ecx, 8 | ||
| 266 | add ecx, ebx | ||
| 267 | ; 19 | ||
| 268 | add ebx, esi | ||
| 269 | mov esi, edx | ||
| 270 | sub edi, ecx | ||
| 271 | and esi, ecx | ||
| 272 | and edi, ebp | ||
| 273 | or esi, edi | ||
| 274 | mov edi, DWORD PTR 44[esp] | ||
| 275 | rol edx, 10 | ||
| 276 | lea ebx, DWORD PTR 1518500249[esi*1+ebx] | ||
| 277 | mov esi, -1 | ||
| 278 | rol ebx, 13 | ||
| 279 | add ebx, eax | ||
| 280 | ; 20 | ||
| 281 | add eax, edi | ||
| 282 | mov edi, ecx | ||
| 283 | sub esi, ebx | ||
| 284 | and edi, ebx | ||
| 285 | and esi, edx | ||
| 286 | or edi, esi | ||
| 287 | mov esi, DWORD PTR 28[esp] | ||
| 288 | rol ecx, 10 | ||
| 289 | lea eax, DWORD PTR 1518500249[edi*1+eax] | ||
| 290 | mov edi, -1 | ||
| 291 | rol eax, 11 | ||
| 292 | add eax, ebp | ||
| 293 | ; 21 | ||
| 294 | add ebp, esi | ||
| 295 | mov esi, ebx | ||
| 296 | sub edi, eax | ||
| 297 | and esi, eax | ||
| 298 | and edi, ecx | ||
| 299 | or esi, edi | ||
| 300 | mov edi, DWORD PTR 64[esp] | ||
| 301 | rol ebx, 10 | ||
| 302 | lea ebp, DWORD PTR 1518500249[esi*1+ebp] | ||
| 303 | mov esi, -1 | ||
| 304 | rol ebp, 9 | ||
| 305 | add ebp, edx | ||
| 306 | ; 22 | ||
| 307 | add edx, edi | ||
| 308 | mov edi, eax | ||
| 309 | sub esi, ebp | ||
| 310 | and edi, ebp | ||
| 311 | and esi, ebx | ||
| 312 | or edi, esi | ||
| 313 | mov esi, DWORD PTR 16[esp] | ||
| 314 | rol eax, 10 | ||
| 315 | lea edx, DWORD PTR 1518500249[edi*1+edx] | ||
| 316 | mov edi, -1 | ||
| 317 | rol edx, 7 | ||
| 318 | add edx, ecx | ||
| 319 | ; 23 | ||
| 320 | add ecx, esi | ||
| 321 | mov esi, ebp | ||
| 322 | sub edi, edx | ||
| 323 | and esi, edx | ||
| 324 | and edi, eax | ||
| 325 | or esi, edi | ||
| 326 | mov edi, DWORD PTR 52[esp] | ||
| 327 | rol ebp, 10 | ||
| 328 | lea ecx, DWORD PTR 1518500249[esi*1+ecx] | ||
| 329 | mov esi, -1 | ||
| 330 | rol ecx, 15 | ||
| 331 | add ecx, ebx | ||
| 332 | ; 24 | ||
| 333 | add ebx, edi | ||
| 334 | mov edi, edx | ||
| 335 | sub esi, ecx | ||
| 336 | and edi, ecx | ||
| 337 | and esi, ebp | ||
| 338 | or edi, esi | ||
| 339 | mov esi, DWORD PTR 4[esp] | ||
| 340 | rol edx, 10 | ||
| 341 | lea ebx, DWORD PTR 1518500249[edi*1+ebx] | ||
| 342 | mov edi, -1 | ||
| 343 | rol ebx, 7 | ||
| 344 | add ebx, eax | ||
| 345 | ; 25 | ||
| 346 | add eax, esi | ||
| 347 | mov esi, ecx | ||
| 348 | sub edi, ebx | ||
| 349 | and esi, ebx | ||
| 350 | and edi, edx | ||
| 351 | or esi, edi | ||
| 352 | mov edi, DWORD PTR 40[esp] | ||
| 353 | rol ecx, 10 | ||
| 354 | lea eax, DWORD PTR 1518500249[esi*1+eax] | ||
| 355 | mov esi, -1 | ||
| 356 | rol eax, 12 | ||
| 357 | add eax, ebp | ||
| 358 | ; 26 | ||
| 359 | add ebp, edi | ||
| 360 | mov edi, ebx | ||
| 361 | sub esi, eax | ||
| 362 | and edi, eax | ||
| 363 | and esi, ecx | ||
| 364 | or edi, esi | ||
| 365 | mov esi, DWORD PTR 24[esp] | ||
| 366 | rol ebx, 10 | ||
| 367 | lea ebp, DWORD PTR 1518500249[edi*1+ebp] | ||
| 368 | mov edi, -1 | ||
| 369 | rol ebp, 15 | ||
| 370 | add ebp, edx | ||
| 371 | ; 27 | ||
| 372 | add edx, esi | ||
| 373 | mov esi, eax | ||
| 374 | sub edi, ebp | ||
| 375 | and esi, ebp | ||
| 376 | and edi, ebx | ||
| 377 | or esi, edi | ||
| 378 | mov edi, DWORD PTR 12[esp] | ||
| 379 | rol eax, 10 | ||
| 380 | lea edx, DWORD PTR 1518500249[esi*1+edx] | ||
| 381 | mov esi, -1 | ||
| 382 | rol edx, 9 | ||
| 383 | add edx, ecx | ||
| 384 | ; 28 | ||
| 385 | add ecx, edi | ||
| 386 | mov edi, ebp | ||
| 387 | sub esi, edx | ||
| 388 | and edi, edx | ||
| 389 | and esi, eax | ||
| 390 | or edi, esi | ||
| 391 | mov esi, DWORD PTR 60[esp] | ||
| 392 | rol ebp, 10 | ||
| 393 | lea ecx, DWORD PTR 1518500249[edi*1+ecx] | ||
| 394 | mov edi, -1 | ||
| 395 | rol ecx, 11 | ||
| 396 | add ecx, ebx | ||
| 397 | ; 29 | ||
| 398 | add ebx, esi | ||
| 399 | mov esi, edx | ||
| 400 | sub edi, ecx | ||
| 401 | and esi, ecx | ||
| 402 | and edi, ebp | ||
| 403 | or esi, edi | ||
| 404 | mov edi, DWORD PTR 48[esp] | ||
| 405 | rol edx, 10 | ||
| 406 | lea ebx, DWORD PTR 1518500249[esi*1+ebx] | ||
| 407 | mov esi, -1 | ||
| 408 | rol ebx, 7 | ||
| 409 | add ebx, eax | ||
| 410 | ; 30 | ||
| 411 | add eax, edi | ||
| 412 | mov edi, ecx | ||
| 413 | sub esi, ebx | ||
| 414 | and edi, ebx | ||
| 415 | and esi, edx | ||
| 416 | or edi, esi | ||
| 417 | mov esi, DWORD PTR 36[esp] | ||
| 418 | rol ecx, 10 | ||
| 419 | lea eax, DWORD PTR 1518500249[edi*1+eax] | ||
| 420 | mov edi, -1 | ||
| 421 | rol eax, 13 | ||
| 422 | add eax, ebp | ||
| 423 | ; 31 | ||
| 424 | add ebp, esi | ||
| 425 | mov esi, ebx | ||
| 426 | sub edi, eax | ||
| 427 | and esi, eax | ||
| 428 | and edi, ecx | ||
| 429 | or esi, edi | ||
| 430 | mov edi, -1 | ||
| 431 | rol ebx, 10 | ||
| 432 | lea ebp, DWORD PTR 1518500249[esi*1+ebp] | ||
| 433 | sub edi, eax | ||
| 434 | rol ebp, 12 | ||
| 435 | add ebp, edx | ||
| 436 | ; 32 | ||
| 437 | mov esi, DWORD PTR 16[esp] | ||
| 438 | or edi, ebp | ||
| 439 | add edx, esi | ||
| 440 | xor edi, ebx | ||
| 441 | mov esi, -1 | ||
| 442 | rol eax, 10 | ||
| 443 | lea edx, DWORD PTR 1859775393[edi*1+edx] | ||
| 444 | sub esi, ebp | ||
| 445 | rol edx, 11 | ||
| 446 | add edx, ecx | ||
| 447 | ; 33 | ||
| 448 | mov edi, DWORD PTR 44[esp] | ||
| 449 | or esi, edx | ||
| 450 | add ecx, edi | ||
| 451 | xor esi, eax | ||
| 452 | mov edi, -1 | ||
| 453 | rol ebp, 10 | ||
| 454 | lea ecx, DWORD PTR 1859775393[esi*1+ecx] | ||
| 455 | sub edi, edx | ||
| 456 | rol ecx, 13 | ||
| 457 | add ecx, ebx | ||
| 458 | ; 34 | ||
| 459 | mov esi, DWORD PTR 60[esp] | ||
| 460 | or edi, ecx | ||
| 461 | add ebx, esi | ||
| 462 | xor edi, ebp | ||
| 463 | mov esi, -1 | ||
| 464 | rol edx, 10 | ||
| 465 | lea ebx, DWORD PTR 1859775393[edi*1+ebx] | ||
| 466 | sub esi, ecx | ||
| 467 | rol ebx, 6 | ||
| 468 | add ebx, eax | ||
| 469 | ; 35 | ||
| 470 | mov edi, DWORD PTR 20[esp] | ||
| 471 | or esi, ebx | ||
| 472 | add eax, edi | ||
| 473 | xor esi, edx | ||
| 474 | mov edi, -1 | ||
| 475 | rol ecx, 10 | ||
| 476 | lea eax, DWORD PTR 1859775393[esi*1+eax] | ||
| 477 | sub edi, ebx | ||
| 478 | rol eax, 7 | ||
| 479 | add eax, ebp | ||
| 480 | ; 36 | ||
| 481 | mov esi, DWORD PTR 40[esp] | ||
| 482 | or edi, eax | ||
| 483 | add ebp, esi | ||
| 484 | xor edi, ecx | ||
| 485 | mov esi, -1 | ||
| 486 | rol ebx, 10 | ||
| 487 | lea ebp, DWORD PTR 1859775393[edi*1+ebp] | ||
| 488 | sub esi, eax | ||
| 489 | rol ebp, 14 | ||
| 490 | add ebp, edx | ||
| 491 | ; 37 | ||
| 492 | mov edi, DWORD PTR 64[esp] | ||
| 493 | or esi, ebp | ||
| 494 | add edx, edi | ||
| 495 | xor esi, ebx | ||
| 496 | mov edi, -1 | ||
| 497 | rol eax, 10 | ||
| 498 | lea edx, DWORD PTR 1859775393[esi*1+edx] | ||
| 499 | sub edi, ebp | ||
| 500 | rol edx, 9 | ||
| 501 | add edx, ecx | ||
| 502 | ; 38 | ||
| 503 | mov esi, DWORD PTR 36[esp] | ||
| 504 | or edi, edx | ||
| 505 | add ecx, esi | ||
| 506 | xor edi, eax | ||
| 507 | mov esi, -1 | ||
| 508 | rol ebp, 10 | ||
| 509 | lea ecx, DWORD PTR 1859775393[edi*1+ecx] | ||
| 510 | sub esi, edx | ||
| 511 | rol ecx, 13 | ||
| 512 | add ecx, ebx | ||
| 513 | ; 39 | ||
| 514 | mov edi, DWORD PTR 8[esp] | ||
| 515 | or esi, ecx | ||
| 516 | add ebx, edi | ||
| 517 | xor esi, ebp | ||
| 518 | mov edi, -1 | ||
| 519 | rol edx, 10 | ||
| 520 | lea ebx, DWORD PTR 1859775393[esi*1+ebx] | ||
| 521 | sub edi, ecx | ||
| 522 | rol ebx, 15 | ||
| 523 | add ebx, eax | ||
| 524 | ; 40 | ||
| 525 | mov esi, DWORD PTR 12[esp] | ||
| 526 | or edi, ebx | ||
| 527 | add eax, esi | ||
| 528 | xor edi, edx | ||
| 529 | mov esi, -1 | ||
| 530 | rol ecx, 10 | ||
| 531 | lea eax, DWORD PTR 1859775393[edi*1+eax] | ||
| 532 | sub esi, ebx | ||
| 533 | rol eax, 14 | ||
| 534 | add eax, ebp | ||
| 535 | ; 41 | ||
| 536 | mov edi, DWORD PTR 32[esp] | ||
| 537 | or esi, eax | ||
| 538 | add ebp, edi | ||
| 539 | xor esi, ecx | ||
| 540 | mov edi, -1 | ||
| 541 | rol ebx, 10 | ||
| 542 | lea ebp, DWORD PTR 1859775393[esi*1+ebp] | ||
| 543 | sub edi, eax | ||
| 544 | rol ebp, 8 | ||
| 545 | add ebp, edx | ||
| 546 | ; 42 | ||
| 547 | mov esi, DWORD PTR 4[esp] | ||
| 548 | or edi, ebp | ||
| 549 | add edx, esi | ||
| 550 | xor edi, ebx | ||
| 551 | mov esi, -1 | ||
| 552 | rol eax, 10 | ||
| 553 | lea edx, DWORD PTR 1859775393[edi*1+edx] | ||
| 554 | sub esi, ebp | ||
| 555 | rol edx, 13 | ||
| 556 | add edx, ecx | ||
| 557 | ; 43 | ||
| 558 | mov edi, DWORD PTR 28[esp] | ||
| 559 | or esi, edx | ||
| 560 | add ecx, edi | ||
| 561 | xor esi, eax | ||
| 562 | mov edi, -1 | ||
| 563 | rol ebp, 10 | ||
| 564 | lea ecx, DWORD PTR 1859775393[esi*1+ecx] | ||
| 565 | sub edi, edx | ||
| 566 | rol ecx, 6 | ||
| 567 | add ecx, ebx | ||
| 568 | ; 44 | ||
| 569 | mov esi, DWORD PTR 56[esp] | ||
| 570 | or edi, ecx | ||
| 571 | add ebx, esi | ||
| 572 | xor edi, ebp | ||
| 573 | mov esi, -1 | ||
| 574 | rol edx, 10 | ||
| 575 | lea ebx, DWORD PTR 1859775393[edi*1+ebx] | ||
| 576 | sub esi, ecx | ||
| 577 | rol ebx, 5 | ||
| 578 | add ebx, eax | ||
| 579 | ; 45 | ||
| 580 | mov edi, DWORD PTR 48[esp] | ||
| 581 | or esi, ebx | ||
| 582 | add eax, edi | ||
| 583 | xor esi, edx | ||
| 584 | mov edi, -1 | ||
| 585 | rol ecx, 10 | ||
| 586 | lea eax, DWORD PTR 1859775393[esi*1+eax] | ||
| 587 | sub edi, ebx | ||
| 588 | rol eax, 12 | ||
| 589 | add eax, ebp | ||
| 590 | ; 46 | ||
| 591 | mov esi, DWORD PTR 24[esp] | ||
| 592 | or edi, eax | ||
| 593 | add ebp, esi | ||
| 594 | xor edi, ecx | ||
| 595 | mov esi, -1 | ||
| 596 | rol ebx, 10 | ||
| 597 | lea ebp, DWORD PTR 1859775393[edi*1+ebp] | ||
| 598 | sub esi, eax | ||
| 599 | rol ebp, 7 | ||
| 600 | add ebp, edx | ||
| 601 | ; 47 | ||
| 602 | mov edi, DWORD PTR 52[esp] | ||
| 603 | or esi, ebp | ||
| 604 | add edx, edi | ||
| 605 | xor esi, ebx | ||
| 606 | mov edi, -1 | ||
| 607 | rol eax, 10 | ||
| 608 | lea edx, DWORD PTR 1859775393[esi*1+edx] | ||
| 609 | mov esi, eax | ||
| 610 | rol edx, 5 | ||
| 611 | add edx, ecx | ||
| 612 | ; 48 | ||
| 613 | sub edi, eax | ||
| 614 | and esi, edx | ||
| 615 | and edi, ebp | ||
| 616 | or edi, esi | ||
| 617 | mov esi, DWORD PTR 8[esp] | ||
| 618 | rol ebp, 10 | ||
| 619 | lea ecx, DWORD PTR 2400959708[edi+ecx] | ||
| 620 | mov edi, -1 | ||
| 621 | add ecx, esi | ||
| 622 | mov esi, ebp | ||
| 623 | rol ecx, 11 | ||
| 624 | add ecx, ebx | ||
| 625 | ; 49 | ||
| 626 | sub edi, ebp | ||
| 627 | and esi, ecx | ||
| 628 | and edi, edx | ||
| 629 | or edi, esi | ||
| 630 | mov esi, DWORD PTR 40[esp] | ||
| 631 | rol edx, 10 | ||
| 632 | lea ebx, DWORD PTR 2400959708[edi+ebx] | ||
| 633 | mov edi, -1 | ||
| 634 | add ebx, esi | ||
| 635 | mov esi, edx | ||
| 636 | rol ebx, 12 | ||
| 637 | add ebx, eax | ||
| 638 | ; 50 | ||
| 639 | sub edi, edx | ||
| 640 | and esi, ebx | ||
| 641 | and edi, ecx | ||
| 642 | or edi, esi | ||
| 643 | mov esi, DWORD PTR 48[esp] | ||
| 644 | rol ecx, 10 | ||
| 645 | lea eax, DWORD PTR 2400959708[edi+eax] | ||
| 646 | mov edi, -1 | ||
| 647 | add eax, esi | ||
| 648 | mov esi, ecx | ||
| 649 | rol eax, 14 | ||
| 650 | add eax, ebp | ||
| 651 | ; 51 | ||
| 652 | sub edi, ecx | ||
| 653 | and esi, eax | ||
| 654 | and edi, ebx | ||
| 655 | or edi, esi | ||
| 656 | mov esi, DWORD PTR 44[esp] | ||
| 657 | rol ebx, 10 | ||
| 658 | lea ebp, DWORD PTR 2400959708[edi+ebp] | ||
| 659 | mov edi, -1 | ||
| 660 | add ebp, esi | ||
| 661 | mov esi, ebx | ||
| 662 | rol ebp, 15 | ||
| 663 | add ebp, edx | ||
| 664 | ; 52 | ||
| 665 | sub edi, ebx | ||
| 666 | and esi, ebp | ||
| 667 | and edi, eax | ||
| 668 | or edi, esi | ||
| 669 | mov esi, DWORD PTR 4[esp] | ||
| 670 | rol eax, 10 | ||
| 671 | lea edx, DWORD PTR 2400959708[edi+edx] | ||
| 672 | mov edi, -1 | ||
| 673 | add edx, esi | ||
| 674 | mov esi, eax | ||
| 675 | rol edx, 14 | ||
| 676 | add edx, ecx | ||
| 677 | ; 53 | ||
| 678 | sub edi, eax | ||
| 679 | and esi, edx | ||
| 680 | and edi, ebp | ||
| 681 | or edi, esi | ||
| 682 | mov esi, DWORD PTR 36[esp] | ||
| 683 | rol ebp, 10 | ||
| 684 | lea ecx, DWORD PTR 2400959708[edi+ecx] | ||
| 685 | mov edi, -1 | ||
| 686 | add ecx, esi | ||
| 687 | mov esi, ebp | ||
| 688 | rol ecx, 15 | ||
| 689 | add ecx, ebx | ||
| 690 | ; 54 | ||
| 691 | sub edi, ebp | ||
| 692 | and esi, ecx | ||
| 693 | and edi, edx | ||
| 694 | or edi, esi | ||
| 695 | mov esi, DWORD PTR 52[esp] | ||
| 696 | rol edx, 10 | ||
| 697 | lea ebx, DWORD PTR 2400959708[edi+ebx] | ||
| 698 | mov edi, -1 | ||
| 699 | add ebx, esi | ||
| 700 | mov esi, edx | ||
| 701 | rol ebx, 9 | ||
| 702 | add ebx, eax | ||
| 703 | ; 55 | ||
| 704 | sub edi, edx | ||
| 705 | and esi, ebx | ||
| 706 | and edi, ecx | ||
| 707 | or edi, esi | ||
| 708 | mov esi, DWORD PTR 20[esp] | ||
| 709 | rol ecx, 10 | ||
| 710 | lea eax, DWORD PTR 2400959708[edi+eax] | ||
| 711 | mov edi, -1 | ||
| 712 | add eax, esi | ||
| 713 | mov esi, ecx | ||
| 714 | rol eax, 8 | ||
| 715 | add eax, ebp | ||
| 716 | ; 56 | ||
| 717 | sub edi, ecx | ||
| 718 | and esi, eax | ||
| 719 | and edi, ebx | ||
| 720 | or edi, esi | ||
| 721 | mov esi, DWORD PTR 56[esp] | ||
| 722 | rol ebx, 10 | ||
| 723 | lea ebp, DWORD PTR 2400959708[edi+ebp] | ||
| 724 | mov edi, -1 | ||
| 725 | add ebp, esi | ||
| 726 | mov esi, ebx | ||
| 727 | rol ebp, 9 | ||
| 728 | add ebp, edx | ||
| 729 | ; 57 | ||
| 730 | sub edi, ebx | ||
| 731 | and esi, ebp | ||
| 732 | and edi, eax | ||
| 733 | or edi, esi | ||
| 734 | mov esi, DWORD PTR 16[esp] | ||
| 735 | rol eax, 10 | ||
| 736 | lea edx, DWORD PTR 2400959708[edi+edx] | ||
| 737 | mov edi, -1 | ||
| 738 | add edx, esi | ||
| 739 | mov esi, eax | ||
| 740 | rol edx, 14 | ||
| 741 | add edx, ecx | ||
| 742 | ; 58 | ||
| 743 | sub edi, eax | ||
| 744 | and esi, edx | ||
| 745 | and edi, ebp | ||
| 746 | or edi, esi | ||
| 747 | mov esi, DWORD PTR 32[esp] | ||
| 748 | rol ebp, 10 | ||
| 749 | lea ecx, DWORD PTR 2400959708[edi+ecx] | ||
| 750 | mov edi, -1 | ||
| 751 | add ecx, esi | ||
| 752 | mov esi, ebp | ||
| 753 | rol ecx, 5 | ||
| 754 | add ecx, ebx | ||
| 755 | ; 59 | ||
| 756 | sub edi, ebp | ||
| 757 | and esi, ecx | ||
| 758 | and edi, edx | ||
| 759 | or edi, esi | ||
| 760 | mov esi, DWORD PTR 64[esp] | ||
| 761 | rol edx, 10 | ||
| 762 | lea ebx, DWORD PTR 2400959708[edi+ebx] | ||
| 763 | mov edi, -1 | ||
| 764 | add ebx, esi | ||
| 765 | mov esi, edx | ||
| 766 | rol ebx, 6 | ||
| 767 | add ebx, eax | ||
| 768 | ; 60 | ||
| 769 | sub edi, edx | ||
| 770 | and esi, ebx | ||
| 771 | and edi, ecx | ||
| 772 | or edi, esi | ||
| 773 | mov esi, DWORD PTR 60[esp] | ||
| 774 | rol ecx, 10 | ||
| 775 | lea eax, DWORD PTR 2400959708[edi+eax] | ||
| 776 | mov edi, -1 | ||
| 777 | add eax, esi | ||
| 778 | mov esi, ecx | ||
| 779 | rol eax, 8 | ||
| 780 | add eax, ebp | ||
| 781 | ; 61 | ||
| 782 | sub edi, ecx | ||
| 783 | and esi, eax | ||
| 784 | and edi, ebx | ||
| 785 | or edi, esi | ||
| 786 | mov esi, DWORD PTR 24[esp] | ||
| 787 | rol ebx, 10 | ||
| 788 | lea ebp, DWORD PTR 2400959708[edi+ebp] | ||
| 789 | mov edi, -1 | ||
| 790 | add ebp, esi | ||
| 791 | mov esi, ebx | ||
| 792 | rol ebp, 6 | ||
| 793 | add ebp, edx | ||
| 794 | ; 62 | ||
| 795 | sub edi, ebx | ||
| 796 | and esi, ebp | ||
| 797 | and edi, eax | ||
| 798 | or edi, esi | ||
| 799 | mov esi, DWORD PTR 28[esp] | ||
| 800 | rol eax, 10 | ||
| 801 | lea edx, DWORD PTR 2400959708[edi+edx] | ||
| 802 | mov edi, -1 | ||
| 803 | add edx, esi | ||
| 804 | mov esi, eax | ||
| 805 | rol edx, 5 | ||
| 806 | add edx, ecx | ||
| 807 | ; 63 | ||
| 808 | sub edi, eax | ||
| 809 | and esi, edx | ||
| 810 | and edi, ebp | ||
| 811 | or edi, esi | ||
| 812 | mov esi, DWORD PTR 12[esp] | ||
| 813 | rol ebp, 10 | ||
| 814 | lea ecx, DWORD PTR 2400959708[edi+ecx] | ||
| 815 | mov edi, -1 | ||
| 816 | add ecx, esi | ||
| 817 | sub edi, ebp | ||
| 818 | rol ecx, 12 | ||
| 819 | add ecx, ebx | ||
| 820 | ; 64 | ||
| 821 | mov esi, DWORD PTR 20[esp] | ||
| 822 | or edi, edx | ||
| 823 | add ebx, esi | ||
| 824 | xor edi, ecx | ||
| 825 | mov esi, -1 | ||
| 826 | rol edx, 10 | ||
| 827 | lea ebx, DWORD PTR 2840853838[edi*1+ebx] | ||
| 828 | sub esi, edx | ||
| 829 | rol ebx, 9 | ||
| 830 | add ebx, eax | ||
| 831 | ; 65 | ||
| 832 | mov edi, DWORD PTR 4[esp] | ||
| 833 | or esi, ecx | ||
| 834 | add eax, edi | ||
| 835 | xor esi, ebx | ||
| 836 | mov edi, -1 | ||
| 837 | rol ecx, 10 | ||
| 838 | lea eax, DWORD PTR 2840853838[esi*1+eax] | ||
| 839 | sub edi, ecx | ||
| 840 | rol eax, 15 | ||
| 841 | add eax, ebp | ||
| 842 | ; 66 | ||
| 843 | mov esi, DWORD PTR 24[esp] | ||
| 844 | or edi, ebx | ||
| 845 | add ebp, esi | ||
| 846 | xor edi, eax | ||
| 847 | mov esi, -1 | ||
| 848 | rol ebx, 10 | ||
| 849 | lea ebp, DWORD PTR 2840853838[edi*1+ebp] | ||
| 850 | sub esi, ebx | ||
| 851 | rol ebp, 5 | ||
| 852 | add ebp, edx | ||
| 853 | ; 67 | ||
| 854 | mov edi, DWORD PTR 40[esp] | ||
| 855 | or esi, eax | ||
| 856 | add edx, edi | ||
| 857 | xor esi, ebp | ||
| 858 | mov edi, -1 | ||
| 859 | rol eax, 10 | ||
| 860 | lea edx, DWORD PTR 2840853838[esi*1+edx] | ||
| 861 | sub edi, eax | ||
| 862 | rol edx, 11 | ||
| 863 | add edx, ecx | ||
| 864 | ; 68 | ||
| 865 | mov esi, DWORD PTR 32[esp] | ||
| 866 | or edi, ebp | ||
| 867 | add ecx, esi | ||
| 868 | xor edi, edx | ||
| 869 | mov esi, -1 | ||
| 870 | rol ebp, 10 | ||
| 871 | lea ecx, DWORD PTR 2840853838[edi*1+ecx] | ||
| 872 | sub esi, ebp | ||
| 873 | rol ecx, 6 | ||
| 874 | add ecx, ebx | ||
| 875 | ; 69 | ||
| 876 | mov edi, DWORD PTR 52[esp] | ||
| 877 | or esi, edx | ||
| 878 | add ebx, edi | ||
| 879 | xor esi, ecx | ||
| 880 | mov edi, -1 | ||
| 881 | rol edx, 10 | ||
| 882 | lea ebx, DWORD PTR 2840853838[esi*1+ebx] | ||
| 883 | sub edi, edx | ||
| 884 | rol ebx, 8 | ||
| 885 | add ebx, eax | ||
| 886 | ; 70 | ||
| 887 | mov esi, DWORD PTR 12[esp] | ||
| 888 | or edi, ecx | ||
| 889 | add eax, esi | ||
| 890 | xor edi, ebx | ||
| 891 | mov esi, -1 | ||
| 892 | rol ecx, 10 | ||
| 893 | lea eax, DWORD PTR 2840853838[edi*1+eax] | ||
| 894 | sub esi, ecx | ||
| 895 | rol eax, 13 | ||
| 896 | add eax, ebp | ||
| 897 | ; 71 | ||
| 898 | mov edi, DWORD PTR 44[esp] | ||
| 899 | or esi, ebx | ||
| 900 | add ebp, edi | ||
| 901 | xor esi, eax | ||
| 902 | mov edi, -1 | ||
| 903 | rol ebx, 10 | ||
| 904 | lea ebp, DWORD PTR 2840853838[esi*1+ebp] | ||
| 905 | sub edi, ebx | ||
| 906 | rol ebp, 12 | ||
| 907 | add ebp, edx | ||
| 908 | ; 72 | ||
| 909 | mov esi, DWORD PTR 60[esp] | ||
| 910 | or edi, eax | ||
| 911 | add edx, esi | ||
| 912 | xor edi, ebp | ||
| 913 | mov esi, -1 | ||
| 914 | rol eax, 10 | ||
| 915 | lea edx, DWORD PTR 2840853838[edi*1+edx] | ||
| 916 | sub esi, eax | ||
| 917 | rol edx, 5 | ||
| 918 | add edx, ecx | ||
| 919 | ; 73 | ||
| 920 | mov edi, DWORD PTR 8[esp] | ||
| 921 | or esi, ebp | ||
| 922 | add ecx, edi | ||
| 923 | xor esi, edx | ||
| 924 | mov edi, -1 | ||
| 925 | rol ebp, 10 | ||
| 926 | lea ecx, DWORD PTR 2840853838[esi*1+ecx] | ||
| 927 | sub edi, ebp | ||
| 928 | rol ecx, 12 | ||
| 929 | add ecx, ebx | ||
| 930 | ; 74 | ||
| 931 | mov esi, DWORD PTR 16[esp] | ||
| 932 | or edi, edx | ||
| 933 | add ebx, esi | ||
| 934 | xor edi, ecx | ||
| 935 | mov esi, -1 | ||
| 936 | rol edx, 10 | ||
| 937 | lea ebx, DWORD PTR 2840853838[edi*1+ebx] | ||
| 938 | sub esi, edx | ||
| 939 | rol ebx, 13 | ||
| 940 | add ebx, eax | ||
| 941 | ; 75 | ||
| 942 | mov edi, DWORD PTR 36[esp] | ||
| 943 | or esi, ecx | ||
| 944 | add eax, edi | ||
| 945 | xor esi, ebx | ||
| 946 | mov edi, -1 | ||
| 947 | rol ecx, 10 | ||
| 948 | lea eax, DWORD PTR 2840853838[esi*1+eax] | ||
| 949 | sub edi, ecx | ||
| 950 | rol eax, 14 | ||
| 951 | add eax, ebp | ||
| 952 | ; 76 | ||
| 953 | mov esi, DWORD PTR 48[esp] | ||
| 954 | or edi, ebx | ||
| 955 | add ebp, esi | ||
| 956 | xor edi, eax | ||
| 957 | mov esi, -1 | ||
| 958 | rol ebx, 10 | ||
| 959 | lea ebp, DWORD PTR 2840853838[edi*1+ebp] | ||
| 960 | sub esi, ebx | ||
| 961 | rol ebp, 11 | ||
| 962 | add ebp, edx | ||
| 963 | ; 77 | ||
| 964 | mov edi, DWORD PTR 28[esp] | ||
| 965 | or esi, eax | ||
| 966 | add edx, edi | ||
| 967 | xor esi, ebp | ||
| 968 | mov edi, -1 | ||
| 969 | rol eax, 10 | ||
| 970 | lea edx, DWORD PTR 2840853838[esi*1+edx] | ||
| 971 | sub edi, eax | ||
| 972 | rol edx, 8 | ||
| 973 | add edx, ecx | ||
| 974 | ; 78 | ||
| 975 | mov esi, DWORD PTR 64[esp] | ||
| 976 | or edi, ebp | ||
| 977 | add ecx, esi | ||
| 978 | xor edi, edx | ||
| 979 | mov esi, -1 | ||
| 980 | rol ebp, 10 | ||
| 981 | lea ecx, DWORD PTR 2840853838[edi*1+ecx] | ||
| 982 | sub esi, ebp | ||
| 983 | rol ecx, 5 | ||
| 984 | add ecx, ebx | ||
| 985 | ; 79 | ||
| 986 | mov edi, DWORD PTR 56[esp] | ||
| 987 | or esi, edx | ||
| 988 | add ebx, edi | ||
| 989 | xor esi, ecx | ||
| 990 | mov edi, DWORD PTR 108[esp] | ||
| 991 | rol edx, 10 | ||
| 992 | lea ebx, DWORD PTR 2840853838[esi*1+ebx] | ||
| 993 | mov DWORD PTR 68[esp],eax | ||
| 994 | rol ebx, 6 | ||
| 995 | add ebx, eax | ||
| 996 | mov eax, DWORD PTR [edi] | ||
| 997 | mov DWORD PTR 72[esp],ebx | ||
| 998 | mov DWORD PTR 76[esp],ecx | ||
| 999 | mov ebx, DWORD PTR 4[edi] | ||
| 1000 | mov DWORD PTR 80[esp],edx | ||
| 1001 | mov ecx, DWORD PTR 8[edi] | ||
| 1002 | mov DWORD PTR 84[esp],ebp | ||
| 1003 | mov edx, DWORD PTR 12[edi] | ||
| 1004 | mov ebp, DWORD PTR 16[edi] | ||
| 1005 | ; 80 | ||
| 1006 | mov edi, -1 | ||
| 1007 | sub edi, edx | ||
| 1008 | mov esi, DWORD PTR 24[esp] | ||
| 1009 | or edi, ecx | ||
| 1010 | add eax, esi | ||
| 1011 | xor edi, ebx | ||
| 1012 | mov esi, -1 | ||
| 1013 | rol ecx, 10 | ||
| 1014 | lea eax, DWORD PTR 1352829926[edi*1+eax] | ||
| 1015 | sub esi, ecx | ||
| 1016 | rol eax, 8 | ||
| 1017 | add eax, ebp | ||
| 1018 | ; 81 | ||
| 1019 | mov edi, DWORD PTR 60[esp] | ||
| 1020 | or esi, ebx | ||
| 1021 | add ebp, edi | ||
| 1022 | xor esi, eax | ||
| 1023 | mov edi, -1 | ||
| 1024 | rol ebx, 10 | ||
| 1025 | lea ebp, DWORD PTR 1352829926[esi*1+ebp] | ||
| 1026 | sub edi, ebx | ||
| 1027 | rol ebp, 9 | ||
| 1028 | add ebp, edx | ||
| 1029 | ; 82 | ||
| 1030 | mov esi, DWORD PTR 32[esp] | ||
| 1031 | or edi, eax | ||
| 1032 | add edx, esi | ||
| 1033 | xor edi, ebp | ||
| 1034 | mov esi, -1 | ||
| 1035 | rol eax, 10 | ||
| 1036 | lea edx, DWORD PTR 1352829926[edi*1+edx] | ||
| 1037 | sub esi, eax | ||
| 1038 | rol edx, 9 | ||
| 1039 | add edx, ecx | ||
| 1040 | ; 83 | ||
| 1041 | mov edi, DWORD PTR 4[esp] | ||
| 1042 | or esi, ebp | ||
| 1043 | add ecx, edi | ||
| 1044 | xor esi, edx | ||
| 1045 | mov edi, -1 | ||
| 1046 | rol ebp, 10 | ||
| 1047 | lea ecx, DWORD PTR 1352829926[esi*1+ecx] | ||
| 1048 | sub edi, ebp | ||
| 1049 | rol ecx, 11 | ||
| 1050 | add ecx, ebx | ||
| 1051 | ; 84 | ||
| 1052 | mov esi, DWORD PTR 40[esp] | ||
| 1053 | or edi, edx | ||
| 1054 | add ebx, esi | ||
| 1055 | xor edi, ecx | ||
| 1056 | mov esi, -1 | ||
| 1057 | rol edx, 10 | ||
| 1058 | lea ebx, DWORD PTR 1352829926[edi*1+ebx] | ||
| 1059 | sub esi, edx | ||
| 1060 | rol ebx, 13 | ||
| 1061 | add ebx, eax | ||
| 1062 | ; 85 | ||
| 1063 | mov edi, DWORD PTR 12[esp] | ||
| 1064 | or esi, ecx | ||
| 1065 | add eax, edi | ||
| 1066 | xor esi, ebx | ||
| 1067 | mov edi, -1 | ||
| 1068 | rol ecx, 10 | ||
| 1069 | lea eax, DWORD PTR 1352829926[esi*1+eax] | ||
| 1070 | sub edi, ecx | ||
| 1071 | rol eax, 15 | ||
| 1072 | add eax, ebp | ||
| 1073 | ; 86 | ||
| 1074 | mov esi, DWORD PTR 48[esp] | ||
| 1075 | or edi, ebx | ||
| 1076 | add ebp, esi | ||
| 1077 | xor edi, eax | ||
| 1078 | mov esi, -1 | ||
| 1079 | rol ebx, 10 | ||
| 1080 | lea ebp, DWORD PTR 1352829926[edi*1+ebp] | ||
| 1081 | sub esi, ebx | ||
| 1082 | rol ebp, 15 | ||
| 1083 | add ebp, edx | ||
| 1084 | ; 87 | ||
| 1085 | mov edi, DWORD PTR 20[esp] | ||
| 1086 | or esi, eax | ||
| 1087 | add edx, edi | ||
| 1088 | xor esi, ebp | ||
| 1089 | mov edi, -1 | ||
| 1090 | rol eax, 10 | ||
| 1091 | lea edx, DWORD PTR 1352829926[esi*1+edx] | ||
| 1092 | sub edi, eax | ||
| 1093 | rol edx, 5 | ||
| 1094 | add edx, ecx | ||
| 1095 | ; 88 | ||
| 1096 | mov esi, DWORD PTR 56[esp] | ||
| 1097 | or edi, ebp | ||
| 1098 | add ecx, esi | ||
| 1099 | xor edi, edx | ||
| 1100 | mov esi, -1 | ||
| 1101 | rol ebp, 10 | ||
| 1102 | lea ecx, DWORD PTR 1352829926[edi*1+ecx] | ||
| 1103 | sub esi, ebp | ||
| 1104 | rol ecx, 7 | ||
| 1105 | add ecx, ebx | ||
| 1106 | ; 89 | ||
| 1107 | mov edi, DWORD PTR 28[esp] | ||
| 1108 | or esi, edx | ||
| 1109 | add ebx, edi | ||
| 1110 | xor esi, ecx | ||
| 1111 | mov edi, -1 | ||
| 1112 | rol edx, 10 | ||
| 1113 | lea ebx, DWORD PTR 1352829926[esi*1+ebx] | ||
| 1114 | sub edi, edx | ||
| 1115 | rol ebx, 7 | ||
| 1116 | add ebx, eax | ||
| 1117 | ; 90 | ||
| 1118 | mov esi, DWORD PTR 64[esp] | ||
| 1119 | or edi, ecx | ||
| 1120 | add eax, esi | ||
| 1121 | xor edi, ebx | ||
| 1122 | mov esi, -1 | ||
| 1123 | rol ecx, 10 | ||
| 1124 | lea eax, DWORD PTR 1352829926[edi*1+eax] | ||
| 1125 | sub esi, ecx | ||
| 1126 | rol eax, 8 | ||
| 1127 | add eax, ebp | ||
| 1128 | ; 91 | ||
| 1129 | mov edi, DWORD PTR 36[esp] | ||
| 1130 | or esi, ebx | ||
| 1131 | add ebp, edi | ||
| 1132 | xor esi, eax | ||
| 1133 | mov edi, -1 | ||
| 1134 | rol ebx, 10 | ||
| 1135 | lea ebp, DWORD PTR 1352829926[esi*1+ebp] | ||
| 1136 | sub edi, ebx | ||
| 1137 | rol ebp, 11 | ||
| 1138 | add ebp, edx | ||
| 1139 | ; 92 | ||
| 1140 | mov esi, DWORD PTR 8[esp] | ||
| 1141 | or edi, eax | ||
| 1142 | add edx, esi | ||
| 1143 | xor edi, ebp | ||
| 1144 | mov esi, -1 | ||
| 1145 | rol eax, 10 | ||
| 1146 | lea edx, DWORD PTR 1352829926[edi*1+edx] | ||
| 1147 | sub esi, eax | ||
| 1148 | rol edx, 14 | ||
| 1149 | add edx, ecx | ||
| 1150 | ; 93 | ||
| 1151 | mov edi, DWORD PTR 44[esp] | ||
| 1152 | or esi, ebp | ||
| 1153 | add ecx, edi | ||
| 1154 | xor esi, edx | ||
| 1155 | mov edi, -1 | ||
| 1156 | rol ebp, 10 | ||
| 1157 | lea ecx, DWORD PTR 1352829926[esi*1+ecx] | ||
| 1158 | sub edi, ebp | ||
| 1159 | rol ecx, 14 | ||
| 1160 | add ecx, ebx | ||
| 1161 | ; 94 | ||
| 1162 | mov esi, DWORD PTR 16[esp] | ||
| 1163 | or edi, edx | ||
| 1164 | add ebx, esi | ||
| 1165 | xor edi, ecx | ||
| 1166 | mov esi, -1 | ||
| 1167 | rol edx, 10 | ||
| 1168 | lea ebx, DWORD PTR 1352829926[edi*1+ebx] | ||
| 1169 | sub esi, edx | ||
| 1170 | rol ebx, 12 | ||
| 1171 | add ebx, eax | ||
| 1172 | ; 95 | ||
| 1173 | mov edi, DWORD PTR 52[esp] | ||
| 1174 | or esi, ecx | ||
| 1175 | add eax, edi | ||
| 1176 | xor esi, ebx | ||
| 1177 | mov edi, -1 | ||
| 1178 | rol ecx, 10 | ||
| 1179 | lea eax, DWORD PTR 1352829926[esi*1+eax] | ||
| 1180 | mov esi, ecx | ||
| 1181 | rol eax, 6 | ||
| 1182 | add eax, ebp | ||
| 1183 | ; 96 | ||
| 1184 | sub edi, ecx | ||
| 1185 | and esi, eax | ||
| 1186 | and edi, ebx | ||
| 1187 | or edi, esi | ||
| 1188 | mov esi, DWORD PTR 28[esp] | ||
| 1189 | rol ebx, 10 | ||
| 1190 | lea ebp, DWORD PTR 1548603684[edi+ebp] | ||
| 1191 | mov edi, -1 | ||
| 1192 | add ebp, esi | ||
| 1193 | mov esi, ebx | ||
| 1194 | rol ebp, 9 | ||
| 1195 | add ebp, edx | ||
| 1196 | ; 97 | ||
| 1197 | sub edi, ebx | ||
| 1198 | and esi, ebp | ||
| 1199 | and edi, eax | ||
| 1200 | or edi, esi | ||
| 1201 | mov esi, DWORD PTR 48[esp] | ||
| 1202 | rol eax, 10 | ||
| 1203 | lea edx, DWORD PTR 1548603684[edi+edx] | ||
| 1204 | mov edi, -1 | ||
| 1205 | add edx, esi | ||
| 1206 | mov esi, eax | ||
| 1207 | rol edx, 13 | ||
| 1208 | add edx, ecx | ||
| 1209 | ; 98 | ||
| 1210 | sub edi, eax | ||
| 1211 | and esi, edx | ||
| 1212 | and edi, ebp | ||
| 1213 | or edi, esi | ||
| 1214 | mov esi, DWORD PTR 16[esp] | ||
| 1215 | rol ebp, 10 | ||
| 1216 | lea ecx, DWORD PTR 1548603684[edi+ecx] | ||
| 1217 | mov edi, -1 | ||
| 1218 | add ecx, esi | ||
| 1219 | mov esi, ebp | ||
| 1220 | rol ecx, 15 | ||
| 1221 | add ecx, ebx | ||
| 1222 | ; 99 | ||
| 1223 | sub edi, ebp | ||
| 1224 | and esi, ecx | ||
| 1225 | and edi, edx | ||
| 1226 | or edi, esi | ||
| 1227 | mov esi, DWORD PTR 32[esp] | ||
| 1228 | rol edx, 10 | ||
| 1229 | lea ebx, DWORD PTR 1548603684[edi+ebx] | ||
| 1230 | mov edi, -1 | ||
| 1231 | add ebx, esi | ||
| 1232 | mov esi, edx | ||
| 1233 | rol ebx, 7 | ||
| 1234 | add ebx, eax | ||
| 1235 | ; 100 | ||
| 1236 | sub edi, edx | ||
| 1237 | and esi, ebx | ||
| 1238 | and edi, ecx | ||
| 1239 | or edi, esi | ||
| 1240 | mov esi, DWORD PTR 4[esp] | ||
| 1241 | rol ecx, 10 | ||
| 1242 | lea eax, DWORD PTR 1548603684[edi+eax] | ||
| 1243 | mov edi, -1 | ||
| 1244 | add eax, esi | ||
| 1245 | mov esi, ecx | ||
| 1246 | rol eax, 12 | ||
| 1247 | add eax, ebp | ||
| 1248 | ; 101 | ||
| 1249 | sub edi, ecx | ||
| 1250 | and esi, eax | ||
| 1251 | and edi, ebx | ||
| 1252 | or edi, esi | ||
| 1253 | mov esi, DWORD PTR 56[esp] | ||
| 1254 | rol ebx, 10 | ||
| 1255 | lea ebp, DWORD PTR 1548603684[edi+ebp] | ||
| 1256 | mov edi, -1 | ||
| 1257 | add ebp, esi | ||
| 1258 | mov esi, ebx | ||
| 1259 | rol ebp, 8 | ||
| 1260 | add ebp, edx | ||
| 1261 | ; 102 | ||
| 1262 | sub edi, ebx | ||
| 1263 | and esi, ebp | ||
| 1264 | and edi, eax | ||
| 1265 | or edi, esi | ||
| 1266 | mov esi, DWORD PTR 24[esp] | ||
| 1267 | rol eax, 10 | ||
| 1268 | lea edx, DWORD PTR 1548603684[edi+edx] | ||
| 1269 | mov edi, -1 | ||
| 1270 | add edx, esi | ||
| 1271 | mov esi, eax | ||
| 1272 | rol edx, 9 | ||
| 1273 | add edx, ecx | ||
| 1274 | ; 103 | ||
| 1275 | sub edi, eax | ||
| 1276 | and esi, edx | ||
| 1277 | and edi, ebp | ||
| 1278 | or edi, esi | ||
| 1279 | mov esi, DWORD PTR 44[esp] | ||
| 1280 | rol ebp, 10 | ||
| 1281 | lea ecx, DWORD PTR 1548603684[edi+ecx] | ||
| 1282 | mov edi, -1 | ||
| 1283 | add ecx, esi | ||
| 1284 | mov esi, ebp | ||
| 1285 | rol ecx, 11 | ||
| 1286 | add ecx, ebx | ||
| 1287 | ; 104 | ||
| 1288 | sub edi, ebp | ||
| 1289 | and esi, ecx | ||
| 1290 | and edi, edx | ||
| 1291 | or edi, esi | ||
| 1292 | mov esi, DWORD PTR 60[esp] | ||
| 1293 | rol edx, 10 | ||
| 1294 | lea ebx, DWORD PTR 1548603684[edi+ebx] | ||
| 1295 | mov edi, -1 | ||
| 1296 | add ebx, esi | ||
| 1297 | mov esi, edx | ||
| 1298 | rol ebx, 7 | ||
| 1299 | add ebx, eax | ||
| 1300 | ; 105 | ||
| 1301 | sub edi, edx | ||
| 1302 | and esi, ebx | ||
| 1303 | and edi, ecx | ||
| 1304 | or edi, esi | ||
| 1305 | mov esi, DWORD PTR 64[esp] | ||
| 1306 | rol ecx, 10 | ||
| 1307 | lea eax, DWORD PTR 1548603684[edi+eax] | ||
| 1308 | mov edi, -1 | ||
| 1309 | add eax, esi | ||
| 1310 | mov esi, ecx | ||
| 1311 | rol eax, 7 | ||
| 1312 | add eax, ebp | ||
| 1313 | ; 106 | ||
| 1314 | sub edi, ecx | ||
| 1315 | and esi, eax | ||
| 1316 | and edi, ebx | ||
| 1317 | or edi, esi | ||
| 1318 | mov esi, DWORD PTR 36[esp] | ||
| 1319 | rol ebx, 10 | ||
| 1320 | lea ebp, DWORD PTR 1548603684[edi+ebp] | ||
| 1321 | mov edi, -1 | ||
| 1322 | add ebp, esi | ||
| 1323 | mov esi, ebx | ||
| 1324 | rol ebp, 12 | ||
| 1325 | add ebp, edx | ||
| 1326 | ; 107 | ||
| 1327 | sub edi, ebx | ||
| 1328 | and esi, ebp | ||
| 1329 | and edi, eax | ||
| 1330 | or edi, esi | ||
| 1331 | mov esi, DWORD PTR 52[esp] | ||
| 1332 | rol eax, 10 | ||
| 1333 | lea edx, DWORD PTR 1548603684[edi+edx] | ||
| 1334 | mov edi, -1 | ||
| 1335 | add edx, esi | ||
| 1336 | mov esi, eax | ||
| 1337 | rol edx, 7 | ||
| 1338 | add edx, ecx | ||
| 1339 | ; 108 | ||
| 1340 | sub edi, eax | ||
| 1341 | and esi, edx | ||
| 1342 | and edi, ebp | ||
| 1343 | or edi, esi | ||
| 1344 | mov esi, DWORD PTR 20[esp] | ||
| 1345 | rol ebp, 10 | ||
| 1346 | lea ecx, DWORD PTR 1548603684[edi+ecx] | ||
| 1347 | mov edi, -1 | ||
| 1348 | add ecx, esi | ||
| 1349 | mov esi, ebp | ||
| 1350 | rol ecx, 6 | ||
| 1351 | add ecx, ebx | ||
| 1352 | ; 109 | ||
| 1353 | sub edi, ebp | ||
| 1354 | and esi, ecx | ||
| 1355 | and edi, edx | ||
| 1356 | or edi, esi | ||
| 1357 | mov esi, DWORD PTR 40[esp] | ||
| 1358 | rol edx, 10 | ||
| 1359 | lea ebx, DWORD PTR 1548603684[edi+ebx] | ||
| 1360 | mov edi, -1 | ||
| 1361 | add ebx, esi | ||
| 1362 | mov esi, edx | ||
| 1363 | rol ebx, 15 | ||
| 1364 | add ebx, eax | ||
| 1365 | ; 110 | ||
| 1366 | sub edi, edx | ||
| 1367 | and esi, ebx | ||
| 1368 | and edi, ecx | ||
| 1369 | or edi, esi | ||
| 1370 | mov esi, DWORD PTR 8[esp] | ||
| 1371 | rol ecx, 10 | ||
| 1372 | lea eax, DWORD PTR 1548603684[edi+eax] | ||
| 1373 | mov edi, -1 | ||
| 1374 | add eax, esi | ||
| 1375 | mov esi, ecx | ||
| 1376 | rol eax, 13 | ||
| 1377 | add eax, ebp | ||
| 1378 | ; 111 | ||
| 1379 | sub edi, ecx | ||
| 1380 | and esi, eax | ||
| 1381 | and edi, ebx | ||
| 1382 | or edi, esi | ||
| 1383 | mov esi, DWORD PTR 12[esp] | ||
| 1384 | rol ebx, 10 | ||
| 1385 | lea ebp, DWORD PTR 1548603684[edi+ebp] | ||
| 1386 | mov edi, -1 | ||
| 1387 | add ebp, esi | ||
| 1388 | sub edi, eax | ||
| 1389 | rol ebp, 11 | ||
| 1390 | add ebp, edx | ||
| 1391 | ; 112 | ||
| 1392 | mov esi, DWORD PTR 64[esp] | ||
| 1393 | or edi, ebp | ||
| 1394 | add edx, esi | ||
| 1395 | xor edi, ebx | ||
| 1396 | mov esi, -1 | ||
| 1397 | rol eax, 10 | ||
| 1398 | lea edx, DWORD PTR 1836072691[edi*1+edx] | ||
| 1399 | sub esi, ebp | ||
| 1400 | rol edx, 9 | ||
| 1401 | add edx, ecx | ||
| 1402 | ; 113 | ||
| 1403 | mov edi, DWORD PTR 24[esp] | ||
| 1404 | or esi, edx | ||
| 1405 | add ecx, edi | ||
| 1406 | xor esi, eax | ||
| 1407 | mov edi, -1 | ||
| 1408 | rol ebp, 10 | ||
| 1409 | lea ecx, DWORD PTR 1836072691[esi*1+ecx] | ||
| 1410 | sub edi, edx | ||
| 1411 | rol ecx, 7 | ||
| 1412 | add ecx, ebx | ||
| 1413 | ; 114 | ||
| 1414 | mov esi, DWORD PTR 8[esp] | ||
| 1415 | or edi, ecx | ||
| 1416 | add ebx, esi | ||
| 1417 | xor edi, ebp | ||
| 1418 | mov esi, -1 | ||
| 1419 | rol edx, 10 | ||
| 1420 | lea ebx, DWORD PTR 1836072691[edi*1+ebx] | ||
| 1421 | sub esi, ecx | ||
| 1422 | rol ebx, 15 | ||
| 1423 | add ebx, eax | ||
| 1424 | ; 115 | ||
| 1425 | mov edi, DWORD PTR 16[esp] | ||
| 1426 | or esi, ebx | ||
| 1427 | add eax, edi | ||
| 1428 | xor esi, edx | ||
| 1429 | mov edi, -1 | ||
| 1430 | rol ecx, 10 | ||
| 1431 | lea eax, DWORD PTR 1836072691[esi*1+eax] | ||
| 1432 | sub edi, ebx | ||
| 1433 | rol eax, 11 | ||
| 1434 | add eax, ebp | ||
| 1435 | ; 116 | ||
| 1436 | mov esi, DWORD PTR 32[esp] | ||
| 1437 | or edi, eax | ||
| 1438 | add ebp, esi | ||
| 1439 | xor edi, ecx | ||
| 1440 | mov esi, -1 | ||
| 1441 | rol ebx, 10 | ||
| 1442 | lea ebp, DWORD PTR 1836072691[edi*1+ebp] | ||
| 1443 | sub esi, eax | ||
| 1444 | rol ebp, 8 | ||
| 1445 | add ebp, edx | ||
| 1446 | ; 117 | ||
| 1447 | mov edi, DWORD PTR 60[esp] | ||
| 1448 | or esi, ebp | ||
| 1449 | add edx, edi | ||
| 1450 | xor esi, ebx | ||
| 1451 | mov edi, -1 | ||
| 1452 | rol eax, 10 | ||
| 1453 | lea edx, DWORD PTR 1836072691[esi*1+edx] | ||
| 1454 | sub edi, ebp | ||
| 1455 | rol edx, 6 | ||
| 1456 | add edx, ecx | ||
| 1457 | ; 118 | ||
| 1458 | mov esi, DWORD PTR 28[esp] | ||
| 1459 | or edi, edx | ||
| 1460 | add ecx, esi | ||
| 1461 | xor edi, eax | ||
| 1462 | mov esi, -1 | ||
| 1463 | rol ebp, 10 | ||
| 1464 | lea ecx, DWORD PTR 1836072691[edi*1+ecx] | ||
| 1465 | sub esi, edx | ||
| 1466 | rol ecx, 6 | ||
| 1467 | add ecx, ebx | ||
| 1468 | ; 119 | ||
| 1469 | mov edi, DWORD PTR 40[esp] | ||
| 1470 | or esi, ecx | ||
| 1471 | add ebx, edi | ||
| 1472 | xor esi, ebp | ||
| 1473 | mov edi, -1 | ||
| 1474 | rol edx, 10 | ||
| 1475 | lea ebx, DWORD PTR 1836072691[esi*1+ebx] | ||
| 1476 | sub edi, ecx | ||
| 1477 | rol ebx, 14 | ||
| 1478 | add ebx, eax | ||
| 1479 | ; 120 | ||
| 1480 | mov esi, DWORD PTR 48[esp] | ||
| 1481 | or edi, ebx | ||
| 1482 | add eax, esi | ||
| 1483 | xor edi, edx | ||
| 1484 | mov esi, -1 | ||
| 1485 | rol ecx, 10 | ||
| 1486 | lea eax, DWORD PTR 1836072691[edi*1+eax] | ||
| 1487 | sub esi, ebx | ||
| 1488 | rol eax, 12 | ||
| 1489 | add eax, ebp | ||
| 1490 | ; 121 | ||
| 1491 | mov edi, DWORD PTR 36[esp] | ||
| 1492 | or esi, eax | ||
| 1493 | add ebp, edi | ||
| 1494 | xor esi, ecx | ||
| 1495 | mov edi, -1 | ||
| 1496 | rol ebx, 10 | ||
| 1497 | lea ebp, DWORD PTR 1836072691[esi*1+ebp] | ||
| 1498 | sub edi, eax | ||
| 1499 | rol ebp, 13 | ||
| 1500 | add ebp, edx | ||
| 1501 | ; 122 | ||
| 1502 | mov esi, DWORD PTR 52[esp] | ||
| 1503 | or edi, ebp | ||
| 1504 | add edx, esi | ||
| 1505 | xor edi, ebx | ||
| 1506 | mov esi, -1 | ||
| 1507 | rol eax, 10 | ||
| 1508 | lea edx, DWORD PTR 1836072691[edi*1+edx] | ||
| 1509 | sub esi, ebp | ||
| 1510 | rol edx, 5 | ||
| 1511 | add edx, ecx | ||
| 1512 | ; 123 | ||
| 1513 | mov edi, DWORD PTR 12[esp] | ||
| 1514 | or esi, edx | ||
| 1515 | add ecx, edi | ||
| 1516 | xor esi, eax | ||
| 1517 | mov edi, -1 | ||
| 1518 | rol ebp, 10 | ||
| 1519 | lea ecx, DWORD PTR 1836072691[esi*1+ecx] | ||
| 1520 | sub edi, edx | ||
| 1521 | rol ecx, 14 | ||
| 1522 | add ecx, ebx | ||
| 1523 | ; 124 | ||
| 1524 | mov esi, DWORD PTR 44[esp] | ||
| 1525 | or edi, ecx | ||
| 1526 | add ebx, esi | ||
| 1527 | xor edi, ebp | ||
| 1528 | mov esi, -1 | ||
| 1529 | rol edx, 10 | ||
| 1530 | lea ebx, DWORD PTR 1836072691[edi*1+ebx] | ||
| 1531 | sub esi, ecx | ||
| 1532 | rol ebx, 13 | ||
| 1533 | add ebx, eax | ||
| 1534 | ; 125 | ||
| 1535 | mov edi, DWORD PTR 4[esp] | ||
| 1536 | or esi, ebx | ||
| 1537 | add eax, edi | ||
| 1538 | xor esi, edx | ||
| 1539 | mov edi, -1 | ||
| 1540 | rol ecx, 10 | ||
| 1541 | lea eax, DWORD PTR 1836072691[esi*1+eax] | ||
| 1542 | sub edi, ebx | ||
| 1543 | rol eax, 13 | ||
| 1544 | add eax, ebp | ||
| 1545 | ; 126 | ||
| 1546 | mov esi, DWORD PTR 20[esp] | ||
| 1547 | or edi, eax | ||
| 1548 | add ebp, esi | ||
| 1549 | xor edi, ecx | ||
| 1550 | mov esi, -1 | ||
| 1551 | rol ebx, 10 | ||
| 1552 | lea ebp, DWORD PTR 1836072691[edi*1+ebp] | ||
| 1553 | sub esi, eax | ||
| 1554 | rol ebp, 7 | ||
| 1555 | add ebp, edx | ||
| 1556 | ; 127 | ||
| 1557 | mov edi, DWORD PTR 56[esp] | ||
| 1558 | or esi, ebp | ||
| 1559 | add edx, edi | ||
| 1560 | xor esi, ebx | ||
| 1561 | mov edi, DWORD PTR 36[esp] | ||
| 1562 | rol eax, 10 | ||
| 1563 | lea edx, DWORD PTR 1836072691[esi*1+edx] | ||
| 1564 | mov esi, -1 | ||
| 1565 | rol edx, 5 | ||
| 1566 | add edx, ecx | ||
| 1567 | ; 128 | ||
| 1568 | add ecx, edi | ||
| 1569 | mov edi, ebp | ||
| 1570 | sub esi, edx | ||
| 1571 | and edi, edx | ||
| 1572 | and esi, eax | ||
| 1573 | or edi, esi | ||
| 1574 | mov esi, DWORD PTR 28[esp] | ||
| 1575 | rol ebp, 10 | ||
| 1576 | lea ecx, DWORD PTR 2053994217[edi*1+ecx] | ||
| 1577 | mov edi, -1 | ||
| 1578 | rol ecx, 15 | ||
| 1579 | add ecx, ebx | ||
| 1580 | ; 129 | ||
| 1581 | add ebx, esi | ||
| 1582 | mov esi, edx | ||
| 1583 | sub edi, ecx | ||
| 1584 | and esi, ecx | ||
| 1585 | and edi, ebp | ||
| 1586 | or esi, edi | ||
| 1587 | mov edi, DWORD PTR 20[esp] | ||
| 1588 | rol edx, 10 | ||
| 1589 | lea ebx, DWORD PTR 2053994217[esi*1+ebx] | ||
| 1590 | mov esi, -1 | ||
| 1591 | rol ebx, 5 | ||
| 1592 | add ebx, eax | ||
| 1593 | ; 130 | ||
| 1594 | add eax, edi | ||
| 1595 | mov edi, ecx | ||
| 1596 | sub esi, ebx | ||
| 1597 | and edi, ebx | ||
| 1598 | and esi, edx | ||
| 1599 | or edi, esi | ||
| 1600 | mov esi, DWORD PTR 8[esp] | ||
| 1601 | rol ecx, 10 | ||
| 1602 | lea eax, DWORD PTR 2053994217[edi*1+eax] | ||
| 1603 | mov edi, -1 | ||
| 1604 | rol eax, 8 | ||
| 1605 | add eax, ebp | ||
| 1606 | ; 131 | ||
| 1607 | add ebp, esi | ||
| 1608 | mov esi, ebx | ||
| 1609 | sub edi, eax | ||
| 1610 | and esi, eax | ||
| 1611 | and edi, ecx | ||
| 1612 | or esi, edi | ||
| 1613 | mov edi, DWORD PTR 16[esp] | ||
| 1614 | rol ebx, 10 | ||
| 1615 | lea ebp, DWORD PTR 2053994217[esi*1+ebp] | ||
| 1616 | mov esi, -1 | ||
| 1617 | rol ebp, 11 | ||
| 1618 | add ebp, edx | ||
| 1619 | ; 132 | ||
| 1620 | add edx, edi | ||
| 1621 | mov edi, eax | ||
| 1622 | sub esi, ebp | ||
| 1623 | and edi, ebp | ||
| 1624 | and esi, ebx | ||
| 1625 | or edi, esi | ||
| 1626 | mov esi, DWORD PTR 48[esp] | ||
| 1627 | rol eax, 10 | ||
| 1628 | lea edx, DWORD PTR 2053994217[edi*1+edx] | ||
| 1629 | mov edi, -1 | ||
| 1630 | rol edx, 14 | ||
| 1631 | add edx, ecx | ||
| 1632 | ; 133 | ||
| 1633 | add ecx, esi | ||
| 1634 | mov esi, ebp | ||
| 1635 | sub edi, edx | ||
| 1636 | and esi, edx | ||
| 1637 | and edi, eax | ||
| 1638 | or esi, edi | ||
| 1639 | mov edi, DWORD PTR 64[esp] | ||
| 1640 | rol ebp, 10 | ||
| 1641 | lea ecx, DWORD PTR 2053994217[esi*1+ecx] | ||
| 1642 | mov esi, -1 | ||
| 1643 | rol ecx, 14 | ||
| 1644 | add ecx, ebx | ||
| 1645 | ; 134 | ||
| 1646 | add ebx, edi | ||
| 1647 | mov edi, edx | ||
| 1648 | sub esi, ecx | ||
| 1649 | and edi, ecx | ||
| 1650 | and esi, ebp | ||
| 1651 | or edi, esi | ||
| 1652 | mov esi, DWORD PTR 4[esp] | ||
| 1653 | rol edx, 10 | ||
| 1654 | lea ebx, DWORD PTR 2053994217[edi*1+ebx] | ||
| 1655 | mov edi, -1 | ||
| 1656 | rol ebx, 6 | ||
| 1657 | add ebx, eax | ||
| 1658 | ; 135 | ||
| 1659 | add eax, esi | ||
| 1660 | mov esi, ecx | ||
| 1661 | sub edi, ebx | ||
| 1662 | and esi, ebx | ||
| 1663 | and edi, edx | ||
| 1664 | or esi, edi | ||
| 1665 | mov edi, DWORD PTR 24[esp] | ||
| 1666 | rol ecx, 10 | ||
| 1667 | lea eax, DWORD PTR 2053994217[esi*1+eax] | ||
| 1668 | mov esi, -1 | ||
| 1669 | rol eax, 14 | ||
| 1670 | add eax, ebp | ||
| 1671 | ; 136 | ||
| 1672 | add ebp, edi | ||
| 1673 | mov edi, ebx | ||
| 1674 | sub esi, eax | ||
| 1675 | and edi, eax | ||
| 1676 | and esi, ecx | ||
| 1677 | or edi, esi | ||
| 1678 | mov esi, DWORD PTR 52[esp] | ||
| 1679 | rol ebx, 10 | ||
| 1680 | lea ebp, DWORD PTR 2053994217[edi*1+ebp] | ||
| 1681 | mov edi, -1 | ||
| 1682 | rol ebp, 6 | ||
| 1683 | add ebp, edx | ||
| 1684 | ; 137 | ||
| 1685 | add edx, esi | ||
| 1686 | mov esi, eax | ||
| 1687 | sub edi, ebp | ||
| 1688 | and esi, ebp | ||
| 1689 | and edi, ebx | ||
| 1690 | or esi, edi | ||
| 1691 | mov edi, DWORD PTR 12[esp] | ||
| 1692 | rol eax, 10 | ||
| 1693 | lea edx, DWORD PTR 2053994217[esi*1+edx] | ||
| 1694 | mov esi, -1 | ||
| 1695 | rol edx, 9 | ||
| 1696 | add edx, ecx | ||
| 1697 | ; 138 | ||
| 1698 | add ecx, edi | ||
| 1699 | mov edi, ebp | ||
| 1700 | sub esi, edx | ||
| 1701 | and edi, edx | ||
| 1702 | and esi, eax | ||
| 1703 | or edi, esi | ||
| 1704 | mov esi, DWORD PTR 56[esp] | ||
| 1705 | rol ebp, 10 | ||
| 1706 | lea ecx, DWORD PTR 2053994217[edi*1+ecx] | ||
| 1707 | mov edi, -1 | ||
| 1708 | rol ecx, 12 | ||
| 1709 | add ecx, ebx | ||
| 1710 | ; 139 | ||
| 1711 | add ebx, esi | ||
| 1712 | mov esi, edx | ||
| 1713 | sub edi, ecx | ||
| 1714 | and esi, ecx | ||
| 1715 | and edi, ebp | ||
| 1716 | or esi, edi | ||
| 1717 | mov edi, DWORD PTR 40[esp] | ||
| 1718 | rol edx, 10 | ||
| 1719 | lea ebx, DWORD PTR 2053994217[esi*1+ebx] | ||
| 1720 | mov esi, -1 | ||
| 1721 | rol ebx, 9 | ||
| 1722 | add ebx, eax | ||
| 1723 | ; 140 | ||
| 1724 | add eax, edi | ||
| 1725 | mov edi, ecx | ||
| 1726 | sub esi, ebx | ||
| 1727 | and edi, ebx | ||
| 1728 | and esi, edx | ||
| 1729 | or edi, esi | ||
| 1730 | mov esi, DWORD PTR 32[esp] | ||
| 1731 | rol ecx, 10 | ||
| 1732 | lea eax, DWORD PTR 2053994217[edi*1+eax] | ||
| 1733 | mov edi, -1 | ||
| 1734 | rol eax, 12 | ||
| 1735 | add eax, ebp | ||
| 1736 | ; 141 | ||
| 1737 | add ebp, esi | ||
| 1738 | mov esi, ebx | ||
| 1739 | sub edi, eax | ||
| 1740 | and esi, eax | ||
| 1741 | and edi, ecx | ||
| 1742 | or esi, edi | ||
| 1743 | mov edi, DWORD PTR 44[esp] | ||
| 1744 | rol ebx, 10 | ||
| 1745 | lea ebp, DWORD PTR 2053994217[esi*1+ebp] | ||
| 1746 | mov esi, -1 | ||
| 1747 | rol ebp, 5 | ||
| 1748 | add ebp, edx | ||
| 1749 | ; 142 | ||
| 1750 | add edx, edi | ||
| 1751 | mov edi, eax | ||
| 1752 | sub esi, ebp | ||
| 1753 | and edi, ebp | ||
| 1754 | and esi, ebx | ||
| 1755 | or edi, esi | ||
| 1756 | mov esi, DWORD PTR 60[esp] | ||
| 1757 | rol eax, 10 | ||
| 1758 | lea edx, DWORD PTR 2053994217[edi*1+edx] | ||
| 1759 | mov edi, -1 | ||
| 1760 | rol edx, 15 | ||
| 1761 | add edx, ecx | ||
| 1762 | ; 143 | ||
| 1763 | add ecx, esi | ||
| 1764 | mov esi, ebp | ||
| 1765 | sub edi, edx | ||
| 1766 | and esi, edx | ||
| 1767 | and edi, eax | ||
| 1768 | or edi, esi | ||
| 1769 | mov esi, edx | ||
| 1770 | rol ebp, 10 | ||
| 1771 | lea ecx, DWORD PTR 2053994217[edi*1+ecx] | ||
| 1772 | xor esi, ebp | ||
| 1773 | rol ecx, 8 | ||
| 1774 | add ecx, ebx | ||
| 1775 | ; 144 | ||
| 1776 | mov edi, DWORD PTR 52[esp] | ||
| 1777 | xor esi, ecx | ||
| 1778 | add ebx, edi | ||
| 1779 | rol edx, 10 | ||
| 1780 | add ebx, esi | ||
| 1781 | mov esi, ecx | ||
| 1782 | rol ebx, 8 | ||
| 1783 | add ebx, eax | ||
| 1784 | ; 145 | ||
| 1785 | xor esi, edx | ||
| 1786 | mov edi, DWORD PTR 64[esp] | ||
| 1787 | xor esi, ebx | ||
| 1788 | add eax, esi | ||
| 1789 | mov esi, ebx | ||
| 1790 | rol ecx, 10 | ||
| 1791 | add eax, edi | ||
| 1792 | xor esi, ecx | ||
| 1793 | rol eax, 5 | ||
| 1794 | add eax, ebp | ||
| 1795 | ; 146 | ||
| 1796 | mov edi, DWORD PTR 44[esp] | ||
| 1797 | xor esi, eax | ||
| 1798 | add ebp, edi | ||
| 1799 | rol ebx, 10 | ||
| 1800 | add ebp, esi | ||
| 1801 | mov esi, eax | ||
| 1802 | rol ebp, 12 | ||
| 1803 | add ebp, edx | ||
| 1804 | ; 147 | ||
| 1805 | xor esi, ebx | ||
| 1806 | mov edi, DWORD PTR 20[esp] | ||
| 1807 | xor esi, ebp | ||
| 1808 | add edx, esi | ||
| 1809 | mov esi, ebp | ||
| 1810 | rol eax, 10 | ||
| 1811 | add edx, edi | ||
| 1812 | xor esi, eax | ||
| 1813 | rol edx, 9 | ||
| 1814 | add edx, ecx | ||
| 1815 | ; 148 | ||
| 1816 | mov edi, DWORD PTR 8[esp] | ||
| 1817 | xor esi, edx | ||
| 1818 | add ecx, edi | ||
| 1819 | rol ebp, 10 | ||
| 1820 | add ecx, esi | ||
| 1821 | mov esi, edx | ||
| 1822 | rol ecx, 12 | ||
| 1823 | add ecx, ebx | ||
| 1824 | ; 149 | ||
| 1825 | xor esi, ebp | ||
| 1826 | mov edi, DWORD PTR 24[esp] | ||
| 1827 | xor esi, ecx | ||
| 1828 | add ebx, esi | ||
| 1829 | mov esi, ecx | ||
| 1830 | rol edx, 10 | ||
| 1831 | add ebx, edi | ||
| 1832 | xor esi, edx | ||
| 1833 | rol ebx, 5 | ||
| 1834 | add ebx, eax | ||
| 1835 | ; 150 | ||
| 1836 | mov edi, DWORD PTR 36[esp] | ||
| 1837 | xor esi, ebx | ||
| 1838 | add eax, edi | ||
| 1839 | rol ecx, 10 | ||
| 1840 | add eax, esi | ||
| 1841 | mov esi, ebx | ||
| 1842 | rol eax, 14 | ||
| 1843 | add eax, ebp | ||
| 1844 | ; 151 | ||
| 1845 | xor esi, ecx | ||
| 1846 | mov edi, DWORD PTR 32[esp] | ||
| 1847 | xor esi, eax | ||
| 1848 | add ebp, esi | ||
| 1849 | mov esi, eax | ||
| 1850 | rol ebx, 10 | ||
| 1851 | add ebp, edi | ||
| 1852 | xor esi, ebx | ||
| 1853 | rol ebp, 6 | ||
| 1854 | add ebp, edx | ||
| 1855 | ; 152 | ||
| 1856 | mov edi, DWORD PTR 28[esp] | ||
| 1857 | xor esi, ebp | ||
| 1858 | add edx, edi | ||
| 1859 | rol eax, 10 | ||
| 1860 | add edx, esi | ||
| 1861 | mov esi, ebp | ||
| 1862 | rol edx, 8 | ||
| 1863 | add edx, ecx | ||
| 1864 | ; 153 | ||
| 1865 | xor esi, eax | ||
| 1866 | mov edi, DWORD PTR 12[esp] | ||
| 1867 | xor esi, edx | ||
| 1868 | add ecx, esi | ||
| 1869 | mov esi, edx | ||
| 1870 | rol ebp, 10 | ||
| 1871 | add ecx, edi | ||
| 1872 | xor esi, ebp | ||
| 1873 | rol ecx, 13 | ||
| 1874 | add ecx, ebx | ||
| 1875 | ; 154 | ||
| 1876 | mov edi, DWORD PTR 56[esp] | ||
| 1877 | xor esi, ecx | ||
| 1878 | add ebx, edi | ||
| 1879 | rol edx, 10 | ||
| 1880 | add ebx, esi | ||
| 1881 | mov esi, ecx | ||
| 1882 | rol ebx, 6 | ||
| 1883 | add ebx, eax | ||
| 1884 | ; 155 | ||
| 1885 | xor esi, edx | ||
| 1886 | mov edi, DWORD PTR 60[esp] | ||
| 1887 | xor esi, ebx | ||
| 1888 | add eax, esi | ||
| 1889 | mov esi, ebx | ||
| 1890 | rol ecx, 10 | ||
| 1891 | add eax, edi | ||
| 1892 | xor esi, ecx | ||
| 1893 | rol eax, 5 | ||
| 1894 | add eax, ebp | ||
| 1895 | ; 156 | ||
| 1896 | mov edi, DWORD PTR 4[esp] | ||
| 1897 | xor esi, eax | ||
| 1898 | add ebp, edi | ||
| 1899 | rol ebx, 10 | ||
| 1900 | add ebp, esi | ||
| 1901 | mov esi, eax | ||
| 1902 | rol ebp, 15 | ||
| 1903 | add ebp, edx | ||
| 1904 | ; 157 | ||
| 1905 | xor esi, ebx | ||
| 1906 | mov edi, DWORD PTR 16[esp] | ||
| 1907 | xor esi, ebp | ||
| 1908 | add edx, esi | ||
| 1909 | mov esi, ebp | ||
| 1910 | rol eax, 10 | ||
| 1911 | add edx, edi | ||
| 1912 | xor esi, eax | ||
| 1913 | rol edx, 13 | ||
| 1914 | add edx, ecx | ||
| 1915 | ; 158 | ||
| 1916 | mov edi, DWORD PTR 40[esp] | ||
| 1917 | xor esi, edx | ||
| 1918 | add ecx, edi | ||
| 1919 | rol ebp, 10 | ||
| 1920 | add ecx, esi | ||
| 1921 | mov esi, edx | ||
| 1922 | rol ecx, 11 | ||
| 1923 | add ecx, ebx | ||
| 1924 | ; 159 | ||
| 1925 | xor esi, ebp | ||
| 1926 | mov edi, DWORD PTR 48[esp] | ||
| 1927 | xor esi, ecx | ||
| 1928 | add ebx, esi | ||
| 1929 | rol edx, 10 | ||
| 1930 | add ebx, edi | ||
| 1931 | mov edi, DWORD PTR 108[esp] | ||
| 1932 | rol ebx, 11 | ||
| 1933 | add ebx, eax | ||
| 1934 | mov esi, DWORD PTR 4[edi] | ||
| 1935 | add edx, esi | ||
| 1936 | mov esi, DWORD PTR 76[esp] | ||
| 1937 | add edx, esi | ||
| 1938 | mov esi, DWORD PTR 8[edi] | ||
| 1939 | add ebp, esi | ||
| 1940 | mov esi, DWORD PTR 80[esp] | ||
| 1941 | add ebp, esi | ||
| 1942 | mov esi, DWORD PTR 12[edi] | ||
| 1943 | add eax, esi | ||
| 1944 | mov esi, DWORD PTR 84[esp] | ||
| 1945 | add eax, esi | ||
| 1946 | mov esi, DWORD PTR 16[edi] | ||
| 1947 | add ebx, esi | ||
| 1948 | mov esi, DWORD PTR 68[esp] | ||
| 1949 | add ebx, esi | ||
| 1950 | mov esi, DWORD PTR [edi] | ||
| 1951 | add ecx, esi | ||
| 1952 | mov esi, DWORD PTR 72[esp] | ||
| 1953 | add ecx, esi | ||
| 1954 | mov DWORD PTR [edi],edx | ||
| 1955 | mov DWORD PTR 4[edi],ebp | ||
| 1956 | mov DWORD PTR 8[edi],eax | ||
| 1957 | mov DWORD PTR 12[edi],ebx | ||
| 1958 | mov DWORD PTR 16[edi],ecx | ||
| 1959 | mov edi, DWORD PTR [esp] | ||
| 1960 | mov esi, DWORD PTR 112[esp] | ||
| 1961 | cmp edi, esi | ||
| 1962 | mov edi, DWORD PTR 108[esp] | ||
| 1963 | jge L000start | ||
| 1964 | add esp, 88 | ||
| 1965 | pop ebx | ||
| 1966 | pop ebp | ||
| 1967 | pop edi | ||
| 1968 | pop esi | ||
| 1969 | ret | ||
| 1970 | _ripemd160_block_x86 ENDP | ||
| 1971 | _TEXT ENDS | ||
| 1972 | END | ||
diff --git a/src/lib/libssl/src/crypto/ripemd/asm/rm86unix.cpp b/src/lib/libssl/src/crypto/ripemd/asm/rm86unix.cpp new file mode 100644 index 0000000000..f90f6f2fd6 --- /dev/null +++ b/src/lib/libssl/src/crypto/ripemd/asm/rm86unix.cpp | |||
| @@ -0,0 +1,2016 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define ripemd160_block_x86 _ripemd160_block_x86 | ||
| 13 | |||
| 14 | #endif | ||
| 15 | |||
| 16 | #ifdef OUT | ||
| 17 | #define OK 1 | ||
| 18 | #define ALIGN 4 | ||
| 19 | #endif | ||
| 20 | |||
| 21 | #ifdef BSDI | ||
| 22 | #define OK 1 | ||
| 23 | #define ALIGN 4 | ||
| 24 | #undef SIZE | ||
| 25 | #undef TYPE | ||
| 26 | #define SIZE(a,b) | ||
| 27 | #define TYPE(a,b) | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #if defined(ELF) || defined(SOL) | ||
| 31 | #define OK 1 | ||
| 32 | #define ALIGN 16 | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifndef OK | ||
| 36 | You need to define one of | ||
| 37 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 38 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 39 | SOL - solaris systems, which are elf with strange comment lines | ||
| 40 | BSDI - a.out with a very primative version of as. | ||
| 41 | #endif | ||
| 42 | |||
| 43 | /* Let the Assembler begin :-) */ | ||
| 44 | /* Don't even think of reading this code */ | ||
| 45 | /* It was automatically generated by rmd-586.pl */ | ||
| 46 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 47 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 48 | /* eric <eay@cryptsoft.com> */ | ||
| 49 | |||
| 50 | .file "rmd-586.s" | ||
| 51 | .version "01.01" | ||
| 52 | gcc2_compiled.: | ||
| 53 | .text | ||
| 54 | .align ALIGN | ||
| 55 | .globl ripemd160_block_x86 | ||
| 56 | TYPE(ripemd160_block_x86,@function) | ||
| 57 | ripemd160_block_x86: | ||
| 58 | pushl %esi | ||
| 59 | movl 16(%esp), %ecx | ||
| 60 | pushl %edi | ||
| 61 | movl 16(%esp), %esi | ||
| 62 | pushl %ebp | ||
| 63 | addl %esi, %ecx | ||
| 64 | pushl %ebx | ||
| 65 | subl $64, %ecx | ||
| 66 | subl $88, %esp | ||
| 67 | movl %ecx, (%esp) | ||
| 68 | movl 108(%esp), %edi | ||
| 69 | .L000start: | ||
| 70 | |||
| 71 | movl (%esi), %eax | ||
| 72 | movl 4(%esi), %ebx | ||
| 73 | movl %eax, 4(%esp) | ||
| 74 | movl %ebx, 8(%esp) | ||
| 75 | movl 8(%esi), %eax | ||
| 76 | movl 12(%esi), %ebx | ||
| 77 | movl %eax, 12(%esp) | ||
| 78 | movl %ebx, 16(%esp) | ||
| 79 | movl 16(%esi), %eax | ||
| 80 | movl 20(%esi), %ebx | ||
| 81 | movl %eax, 20(%esp) | ||
| 82 | movl %ebx, 24(%esp) | ||
| 83 | movl 24(%esi), %eax | ||
| 84 | movl 28(%esi), %ebx | ||
| 85 | movl %eax, 28(%esp) | ||
| 86 | movl %ebx, 32(%esp) | ||
| 87 | movl 32(%esi), %eax | ||
| 88 | movl 36(%esi), %ebx | ||
| 89 | movl %eax, 36(%esp) | ||
| 90 | movl %ebx, 40(%esp) | ||
| 91 | movl 40(%esi), %eax | ||
| 92 | movl 44(%esi), %ebx | ||
| 93 | movl %eax, 44(%esp) | ||
| 94 | movl %ebx, 48(%esp) | ||
| 95 | movl 48(%esi), %eax | ||
| 96 | movl 52(%esi), %ebx | ||
| 97 | movl %eax, 52(%esp) | ||
| 98 | movl %ebx, 56(%esp) | ||
| 99 | movl 56(%esi), %eax | ||
| 100 | movl 60(%esi), %ebx | ||
| 101 | movl %eax, 60(%esp) | ||
| 102 | movl %ebx, 64(%esp) | ||
| 103 | addl $64, %esi | ||
| 104 | movl (%edi), %eax | ||
| 105 | movl %esi, 112(%esp) | ||
| 106 | movl 4(%edi), %ebx | ||
| 107 | movl 8(%edi), %ecx | ||
| 108 | movl 12(%edi), %edx | ||
| 109 | movl 16(%edi), %ebp | ||
| 110 | /* 0 */ | ||
| 111 | movl %ecx, %esi | ||
| 112 | xorl %edx, %esi | ||
| 113 | movl 4(%esp), %edi | ||
| 114 | xorl %ebx, %esi | ||
| 115 | addl %edi, %eax | ||
| 116 | roll $10, %ecx | ||
| 117 | addl %esi, %eax | ||
| 118 | movl %ebx, %esi | ||
| 119 | roll $11, %eax | ||
| 120 | addl %ebp, %eax | ||
| 121 | /* 1 */ | ||
| 122 | xorl %ecx, %esi | ||
| 123 | movl 8(%esp), %edi | ||
| 124 | xorl %eax, %esi | ||
| 125 | addl %esi, %ebp | ||
| 126 | movl %eax, %esi | ||
| 127 | roll $10, %ebx | ||
| 128 | addl %edi, %ebp | ||
| 129 | xorl %ebx, %esi | ||
| 130 | roll $14, %ebp | ||
| 131 | addl %edx, %ebp | ||
| 132 | /* 2 */ | ||
| 133 | movl 12(%esp), %edi | ||
| 134 | xorl %ebp, %esi | ||
| 135 | addl %edi, %edx | ||
| 136 | roll $10, %eax | ||
| 137 | addl %esi, %edx | ||
| 138 | movl %ebp, %esi | ||
| 139 | roll $15, %edx | ||
| 140 | addl %ecx, %edx | ||
| 141 | /* 3 */ | ||
| 142 | xorl %eax, %esi | ||
| 143 | movl 16(%esp), %edi | ||
| 144 | xorl %edx, %esi | ||
| 145 | addl %esi, %ecx | ||
| 146 | movl %edx, %esi | ||
| 147 | roll $10, %ebp | ||
| 148 | addl %edi, %ecx | ||
| 149 | xorl %ebp, %esi | ||
| 150 | roll $12, %ecx | ||
| 151 | addl %ebx, %ecx | ||
| 152 | /* 4 */ | ||
| 153 | movl 20(%esp), %edi | ||
| 154 | xorl %ecx, %esi | ||
| 155 | addl %edi, %ebx | ||
| 156 | roll $10, %edx | ||
| 157 | addl %esi, %ebx | ||
| 158 | movl %ecx, %esi | ||
| 159 | roll $5, %ebx | ||
| 160 | addl %eax, %ebx | ||
| 161 | /* 5 */ | ||
| 162 | xorl %edx, %esi | ||
| 163 | movl 24(%esp), %edi | ||
| 164 | xorl %ebx, %esi | ||
| 165 | addl %esi, %eax | ||
| 166 | movl %ebx, %esi | ||
| 167 | roll $10, %ecx | ||
| 168 | addl %edi, %eax | ||
| 169 | xorl %ecx, %esi | ||
| 170 | roll $8, %eax | ||
| 171 | addl %ebp, %eax | ||
| 172 | /* 6 */ | ||
| 173 | movl 28(%esp), %edi | ||
| 174 | xorl %eax, %esi | ||
| 175 | addl %edi, %ebp | ||
| 176 | roll $10, %ebx | ||
| 177 | addl %esi, %ebp | ||
| 178 | movl %eax, %esi | ||
| 179 | roll $7, %ebp | ||
| 180 | addl %edx, %ebp | ||
| 181 | /* 7 */ | ||
| 182 | xorl %ebx, %esi | ||
| 183 | movl 32(%esp), %edi | ||
| 184 | xorl %ebp, %esi | ||
| 185 | addl %esi, %edx | ||
| 186 | movl %ebp, %esi | ||
| 187 | roll $10, %eax | ||
| 188 | addl %edi, %edx | ||
| 189 | xorl %eax, %esi | ||
| 190 | roll $9, %edx | ||
| 191 | addl %ecx, %edx | ||
| 192 | /* 8 */ | ||
| 193 | movl 36(%esp), %edi | ||
| 194 | xorl %edx, %esi | ||
| 195 | addl %edi, %ecx | ||
| 196 | roll $10, %ebp | ||
| 197 | addl %esi, %ecx | ||
| 198 | movl %edx, %esi | ||
| 199 | roll $11, %ecx | ||
| 200 | addl %ebx, %ecx | ||
| 201 | /* 9 */ | ||
| 202 | xorl %ebp, %esi | ||
| 203 | movl 40(%esp), %edi | ||
| 204 | xorl %ecx, %esi | ||
| 205 | addl %esi, %ebx | ||
| 206 | movl %ecx, %esi | ||
| 207 | roll $10, %edx | ||
| 208 | addl %edi, %ebx | ||
| 209 | xorl %edx, %esi | ||
| 210 | roll $13, %ebx | ||
| 211 | addl %eax, %ebx | ||
| 212 | /* 10 */ | ||
| 213 | movl 44(%esp), %edi | ||
| 214 | xorl %ebx, %esi | ||
| 215 | addl %edi, %eax | ||
| 216 | roll $10, %ecx | ||
| 217 | addl %esi, %eax | ||
| 218 | movl %ebx, %esi | ||
| 219 | roll $14, %eax | ||
| 220 | addl %ebp, %eax | ||
| 221 | /* 11 */ | ||
| 222 | xorl %ecx, %esi | ||
| 223 | movl 48(%esp), %edi | ||
| 224 | xorl %eax, %esi | ||
| 225 | addl %esi, %ebp | ||
| 226 | movl %eax, %esi | ||
| 227 | roll $10, %ebx | ||
| 228 | addl %edi, %ebp | ||
| 229 | xorl %ebx, %esi | ||
| 230 | roll $15, %ebp | ||
| 231 | addl %edx, %ebp | ||
| 232 | /* 12 */ | ||
| 233 | movl 52(%esp), %edi | ||
| 234 | xorl %ebp, %esi | ||
| 235 | addl %edi, %edx | ||
| 236 | roll $10, %eax | ||
| 237 | addl %esi, %edx | ||
| 238 | movl %ebp, %esi | ||
| 239 | roll $6, %edx | ||
| 240 | addl %ecx, %edx | ||
| 241 | /* 13 */ | ||
| 242 | xorl %eax, %esi | ||
| 243 | movl 56(%esp), %edi | ||
| 244 | xorl %edx, %esi | ||
| 245 | addl %esi, %ecx | ||
| 246 | movl %edx, %esi | ||
| 247 | roll $10, %ebp | ||
| 248 | addl %edi, %ecx | ||
| 249 | xorl %ebp, %esi | ||
| 250 | roll $7, %ecx | ||
| 251 | addl %ebx, %ecx | ||
| 252 | /* 14 */ | ||
| 253 | movl 60(%esp), %edi | ||
| 254 | xorl %ecx, %esi | ||
| 255 | addl %edi, %ebx | ||
| 256 | roll $10, %edx | ||
| 257 | addl %esi, %ebx | ||
| 258 | movl %ecx, %esi | ||
| 259 | roll $9, %ebx | ||
| 260 | addl %eax, %ebx | ||
| 261 | /* 15 */ | ||
| 262 | xorl %edx, %esi | ||
| 263 | movl 64(%esp), %edi | ||
| 264 | xorl %ebx, %esi | ||
| 265 | addl %esi, %eax | ||
| 266 | movl $-1, %esi | ||
| 267 | roll $10, %ecx | ||
| 268 | addl %edi, %eax | ||
| 269 | movl 32(%esp), %edi | ||
| 270 | roll $8, %eax | ||
| 271 | addl %ebp, %eax | ||
| 272 | /* 16 */ | ||
| 273 | addl %edi, %ebp | ||
| 274 | movl %ebx, %edi | ||
| 275 | subl %eax, %esi | ||
| 276 | andl %eax, %edi | ||
| 277 | andl %ecx, %esi | ||
| 278 | orl %esi, %edi | ||
| 279 | movl 20(%esp), %esi | ||
| 280 | roll $10, %ebx | ||
| 281 | leal 1518500249(%ebp,%edi,1),%ebp | ||
| 282 | movl $-1, %edi | ||
| 283 | roll $7, %ebp | ||
| 284 | addl %edx, %ebp | ||
| 285 | /* 17 */ | ||
| 286 | addl %esi, %edx | ||
| 287 | movl %eax, %esi | ||
| 288 | subl %ebp, %edi | ||
| 289 | andl %ebp, %esi | ||
| 290 | andl %ebx, %edi | ||
| 291 | orl %edi, %esi | ||
| 292 | movl 56(%esp), %edi | ||
| 293 | roll $10, %eax | ||
| 294 | leal 1518500249(%edx,%esi,1),%edx | ||
| 295 | movl $-1, %esi | ||
| 296 | roll $6, %edx | ||
| 297 | addl %ecx, %edx | ||
| 298 | /* 18 */ | ||
| 299 | addl %edi, %ecx | ||
| 300 | movl %ebp, %edi | ||
| 301 | subl %edx, %esi | ||
| 302 | andl %edx, %edi | ||
| 303 | andl %eax, %esi | ||
| 304 | orl %esi, %edi | ||
| 305 | movl 8(%esp), %esi | ||
| 306 | roll $10, %ebp | ||
| 307 | leal 1518500249(%ecx,%edi,1),%ecx | ||
| 308 | movl $-1, %edi | ||
| 309 | roll $8, %ecx | ||
| 310 | addl %ebx, %ecx | ||
| 311 | /* 19 */ | ||
| 312 | addl %esi, %ebx | ||
| 313 | movl %edx, %esi | ||
| 314 | subl %ecx, %edi | ||
| 315 | andl %ecx, %esi | ||
| 316 | andl %ebp, %edi | ||
| 317 | orl %edi, %esi | ||
| 318 | movl 44(%esp), %edi | ||
| 319 | roll $10, %edx | ||
| 320 | leal 1518500249(%ebx,%esi,1),%ebx | ||
| 321 | movl $-1, %esi | ||
| 322 | roll $13, %ebx | ||
| 323 | addl %eax, %ebx | ||
| 324 | /* 20 */ | ||
| 325 | addl %edi, %eax | ||
| 326 | movl %ecx, %edi | ||
| 327 | subl %ebx, %esi | ||
| 328 | andl %ebx, %edi | ||
| 329 | andl %edx, %esi | ||
| 330 | orl %esi, %edi | ||
| 331 | movl 28(%esp), %esi | ||
| 332 | roll $10, %ecx | ||
| 333 | leal 1518500249(%eax,%edi,1),%eax | ||
| 334 | movl $-1, %edi | ||
| 335 | roll $11, %eax | ||
| 336 | addl %ebp, %eax | ||
| 337 | /* 21 */ | ||
| 338 | addl %esi, %ebp | ||
| 339 | movl %ebx, %esi | ||
| 340 | subl %eax, %edi | ||
| 341 | andl %eax, %esi | ||
| 342 | andl %ecx, %edi | ||
| 343 | orl %edi, %esi | ||
| 344 | movl 64(%esp), %edi | ||
| 345 | roll $10, %ebx | ||
| 346 | leal 1518500249(%ebp,%esi,1),%ebp | ||
| 347 | movl $-1, %esi | ||
| 348 | roll $9, %ebp | ||
| 349 | addl %edx, %ebp | ||
| 350 | /* 22 */ | ||
| 351 | addl %edi, %edx | ||
| 352 | movl %eax, %edi | ||
| 353 | subl %ebp, %esi | ||
| 354 | andl %ebp, %edi | ||
| 355 | andl %ebx, %esi | ||
| 356 | orl %esi, %edi | ||
| 357 | movl 16(%esp), %esi | ||
| 358 | roll $10, %eax | ||
| 359 | leal 1518500249(%edx,%edi,1),%edx | ||
| 360 | movl $-1, %edi | ||
| 361 | roll $7, %edx | ||
| 362 | addl %ecx, %edx | ||
| 363 | /* 23 */ | ||
| 364 | addl %esi, %ecx | ||
| 365 | movl %ebp, %esi | ||
| 366 | subl %edx, %edi | ||
| 367 | andl %edx, %esi | ||
| 368 | andl %eax, %edi | ||
| 369 | orl %edi, %esi | ||
| 370 | movl 52(%esp), %edi | ||
| 371 | roll $10, %ebp | ||
| 372 | leal 1518500249(%ecx,%esi,1),%ecx | ||
| 373 | movl $-1, %esi | ||
| 374 | roll $15, %ecx | ||
| 375 | addl %ebx, %ecx | ||
| 376 | /* 24 */ | ||
| 377 | addl %edi, %ebx | ||
| 378 | movl %edx, %edi | ||
| 379 | subl %ecx, %esi | ||
| 380 | andl %ecx, %edi | ||
| 381 | andl %ebp, %esi | ||
| 382 | orl %esi, %edi | ||
| 383 | movl 4(%esp), %esi | ||
| 384 | roll $10, %edx | ||
| 385 | leal 1518500249(%ebx,%edi,1),%ebx | ||
| 386 | movl $-1, %edi | ||
| 387 | roll $7, %ebx | ||
| 388 | addl %eax, %ebx | ||
| 389 | /* 25 */ | ||
| 390 | addl %esi, %eax | ||
| 391 | movl %ecx, %esi | ||
| 392 | subl %ebx, %edi | ||
| 393 | andl %ebx, %esi | ||
| 394 | andl %edx, %edi | ||
| 395 | orl %edi, %esi | ||
| 396 | movl 40(%esp), %edi | ||
| 397 | roll $10, %ecx | ||
| 398 | leal 1518500249(%eax,%esi,1),%eax | ||
| 399 | movl $-1, %esi | ||
| 400 | roll $12, %eax | ||
| 401 | addl %ebp, %eax | ||
| 402 | /* 26 */ | ||
| 403 | addl %edi, %ebp | ||
| 404 | movl %ebx, %edi | ||
| 405 | subl %eax, %esi | ||
| 406 | andl %eax, %edi | ||
| 407 | andl %ecx, %esi | ||
| 408 | orl %esi, %edi | ||
| 409 | movl 24(%esp), %esi | ||
| 410 | roll $10, %ebx | ||
| 411 | leal 1518500249(%ebp,%edi,1),%ebp | ||
| 412 | movl $-1, %edi | ||
| 413 | roll $15, %ebp | ||
| 414 | addl %edx, %ebp | ||
| 415 | /* 27 */ | ||
| 416 | addl %esi, %edx | ||
| 417 | movl %eax, %esi | ||
| 418 | subl %ebp, %edi | ||
| 419 | andl %ebp, %esi | ||
| 420 | andl %ebx, %edi | ||
| 421 | orl %edi, %esi | ||
| 422 | movl 12(%esp), %edi | ||
| 423 | roll $10, %eax | ||
| 424 | leal 1518500249(%edx,%esi,1),%edx | ||
| 425 | movl $-1, %esi | ||
| 426 | roll $9, %edx | ||
| 427 | addl %ecx, %edx | ||
| 428 | /* 28 */ | ||
| 429 | addl %edi, %ecx | ||
| 430 | movl %ebp, %edi | ||
| 431 | subl %edx, %esi | ||
| 432 | andl %edx, %edi | ||
| 433 | andl %eax, %esi | ||
| 434 | orl %esi, %edi | ||
| 435 | movl 60(%esp), %esi | ||
| 436 | roll $10, %ebp | ||
| 437 | leal 1518500249(%ecx,%edi,1),%ecx | ||
| 438 | movl $-1, %edi | ||
| 439 | roll $11, %ecx | ||
| 440 | addl %ebx, %ecx | ||
| 441 | /* 29 */ | ||
| 442 | addl %esi, %ebx | ||
| 443 | movl %edx, %esi | ||
| 444 | subl %ecx, %edi | ||
| 445 | andl %ecx, %esi | ||
| 446 | andl %ebp, %edi | ||
| 447 | orl %edi, %esi | ||
| 448 | movl 48(%esp), %edi | ||
| 449 | roll $10, %edx | ||
| 450 | leal 1518500249(%ebx,%esi,1),%ebx | ||
| 451 | movl $-1, %esi | ||
| 452 | roll $7, %ebx | ||
| 453 | addl %eax, %ebx | ||
| 454 | /* 30 */ | ||
| 455 | addl %edi, %eax | ||
| 456 | movl %ecx, %edi | ||
| 457 | subl %ebx, %esi | ||
| 458 | andl %ebx, %edi | ||
| 459 | andl %edx, %esi | ||
| 460 | orl %esi, %edi | ||
| 461 | movl 36(%esp), %esi | ||
| 462 | roll $10, %ecx | ||
| 463 | leal 1518500249(%eax,%edi,1),%eax | ||
| 464 | movl $-1, %edi | ||
| 465 | roll $13, %eax | ||
| 466 | addl %ebp, %eax | ||
| 467 | /* 31 */ | ||
| 468 | addl %esi, %ebp | ||
| 469 | movl %ebx, %esi | ||
| 470 | subl %eax, %edi | ||
| 471 | andl %eax, %esi | ||
| 472 | andl %ecx, %edi | ||
| 473 | orl %edi, %esi | ||
| 474 | movl $-1, %edi | ||
| 475 | roll $10, %ebx | ||
| 476 | leal 1518500249(%ebp,%esi,1),%ebp | ||
| 477 | subl %eax, %edi | ||
| 478 | roll $12, %ebp | ||
| 479 | addl %edx, %ebp | ||
| 480 | /* 32 */ | ||
| 481 | movl 16(%esp), %esi | ||
| 482 | orl %ebp, %edi | ||
| 483 | addl %esi, %edx | ||
| 484 | xorl %ebx, %edi | ||
| 485 | movl $-1, %esi | ||
| 486 | roll $10, %eax | ||
| 487 | leal 1859775393(%edx,%edi,1),%edx | ||
| 488 | subl %ebp, %esi | ||
| 489 | roll $11, %edx | ||
| 490 | addl %ecx, %edx | ||
| 491 | /* 33 */ | ||
| 492 | movl 44(%esp), %edi | ||
| 493 | orl %edx, %esi | ||
| 494 | addl %edi, %ecx | ||
| 495 | xorl %eax, %esi | ||
| 496 | movl $-1, %edi | ||
| 497 | roll $10, %ebp | ||
| 498 | leal 1859775393(%ecx,%esi,1),%ecx | ||
| 499 | subl %edx, %edi | ||
| 500 | roll $13, %ecx | ||
| 501 | addl %ebx, %ecx | ||
| 502 | /* 34 */ | ||
| 503 | movl 60(%esp), %esi | ||
| 504 | orl %ecx, %edi | ||
| 505 | addl %esi, %ebx | ||
| 506 | xorl %ebp, %edi | ||
| 507 | movl $-1, %esi | ||
| 508 | roll $10, %edx | ||
| 509 | leal 1859775393(%ebx,%edi,1),%ebx | ||
| 510 | subl %ecx, %esi | ||
| 511 | roll $6, %ebx | ||
| 512 | addl %eax, %ebx | ||
| 513 | /* 35 */ | ||
| 514 | movl 20(%esp), %edi | ||
| 515 | orl %ebx, %esi | ||
| 516 | addl %edi, %eax | ||
| 517 | xorl %edx, %esi | ||
| 518 | movl $-1, %edi | ||
| 519 | roll $10, %ecx | ||
| 520 | leal 1859775393(%eax,%esi,1),%eax | ||
| 521 | subl %ebx, %edi | ||
| 522 | roll $7, %eax | ||
| 523 | addl %ebp, %eax | ||
| 524 | /* 36 */ | ||
| 525 | movl 40(%esp), %esi | ||
| 526 | orl %eax, %edi | ||
| 527 | addl %esi, %ebp | ||
| 528 | xorl %ecx, %edi | ||
| 529 | movl $-1, %esi | ||
| 530 | roll $10, %ebx | ||
| 531 | leal 1859775393(%ebp,%edi,1),%ebp | ||
| 532 | subl %eax, %esi | ||
| 533 | roll $14, %ebp | ||
| 534 | addl %edx, %ebp | ||
| 535 | /* 37 */ | ||
| 536 | movl 64(%esp), %edi | ||
| 537 | orl %ebp, %esi | ||
| 538 | addl %edi, %edx | ||
| 539 | xorl %ebx, %esi | ||
| 540 | movl $-1, %edi | ||
| 541 | roll $10, %eax | ||
| 542 | leal 1859775393(%edx,%esi,1),%edx | ||
| 543 | subl %ebp, %edi | ||
| 544 | roll $9, %edx | ||
| 545 | addl %ecx, %edx | ||
| 546 | /* 38 */ | ||
| 547 | movl 36(%esp), %esi | ||
| 548 | orl %edx, %edi | ||
| 549 | addl %esi, %ecx | ||
| 550 | xorl %eax, %edi | ||
| 551 | movl $-1, %esi | ||
| 552 | roll $10, %ebp | ||
| 553 | leal 1859775393(%ecx,%edi,1),%ecx | ||
| 554 | subl %edx, %esi | ||
| 555 | roll $13, %ecx | ||
| 556 | addl %ebx, %ecx | ||
| 557 | /* 39 */ | ||
| 558 | movl 8(%esp), %edi | ||
| 559 | orl %ecx, %esi | ||
| 560 | addl %edi, %ebx | ||
| 561 | xorl %ebp, %esi | ||
| 562 | movl $-1, %edi | ||
| 563 | roll $10, %edx | ||
| 564 | leal 1859775393(%ebx,%esi,1),%ebx | ||
| 565 | subl %ecx, %edi | ||
| 566 | roll $15, %ebx | ||
| 567 | addl %eax, %ebx | ||
| 568 | /* 40 */ | ||
| 569 | movl 12(%esp), %esi | ||
| 570 | orl %ebx, %edi | ||
| 571 | addl %esi, %eax | ||
| 572 | xorl %edx, %edi | ||
| 573 | movl $-1, %esi | ||
| 574 | roll $10, %ecx | ||
| 575 | leal 1859775393(%eax,%edi,1),%eax | ||
| 576 | subl %ebx, %esi | ||
| 577 | roll $14, %eax | ||
| 578 | addl %ebp, %eax | ||
| 579 | /* 41 */ | ||
| 580 | movl 32(%esp), %edi | ||
| 581 | orl %eax, %esi | ||
| 582 | addl %edi, %ebp | ||
| 583 | xorl %ecx, %esi | ||
| 584 | movl $-1, %edi | ||
| 585 | roll $10, %ebx | ||
| 586 | leal 1859775393(%ebp,%esi,1),%ebp | ||
| 587 | subl %eax, %edi | ||
| 588 | roll $8, %ebp | ||
| 589 | addl %edx, %ebp | ||
| 590 | /* 42 */ | ||
| 591 | movl 4(%esp), %esi | ||
| 592 | orl %ebp, %edi | ||
| 593 | addl %esi, %edx | ||
| 594 | xorl %ebx, %edi | ||
| 595 | movl $-1, %esi | ||
| 596 | roll $10, %eax | ||
| 597 | leal 1859775393(%edx,%edi,1),%edx | ||
| 598 | subl %ebp, %esi | ||
| 599 | roll $13, %edx | ||
| 600 | addl %ecx, %edx | ||
| 601 | /* 43 */ | ||
| 602 | movl 28(%esp), %edi | ||
| 603 | orl %edx, %esi | ||
| 604 | addl %edi, %ecx | ||
| 605 | xorl %eax, %esi | ||
| 606 | movl $-1, %edi | ||
| 607 | roll $10, %ebp | ||
| 608 | leal 1859775393(%ecx,%esi,1),%ecx | ||
| 609 | subl %edx, %edi | ||
| 610 | roll $6, %ecx | ||
| 611 | addl %ebx, %ecx | ||
| 612 | /* 44 */ | ||
| 613 | movl 56(%esp), %esi | ||
| 614 | orl %ecx, %edi | ||
| 615 | addl %esi, %ebx | ||
| 616 | xorl %ebp, %edi | ||
| 617 | movl $-1, %esi | ||
| 618 | roll $10, %edx | ||
| 619 | leal 1859775393(%ebx,%edi,1),%ebx | ||
| 620 | subl %ecx, %esi | ||
| 621 | roll $5, %ebx | ||
| 622 | addl %eax, %ebx | ||
| 623 | /* 45 */ | ||
| 624 | movl 48(%esp), %edi | ||
| 625 | orl %ebx, %esi | ||
| 626 | addl %edi, %eax | ||
| 627 | xorl %edx, %esi | ||
| 628 | movl $-1, %edi | ||
| 629 | roll $10, %ecx | ||
| 630 | leal 1859775393(%eax,%esi,1),%eax | ||
| 631 | subl %ebx, %edi | ||
| 632 | roll $12, %eax | ||
| 633 | addl %ebp, %eax | ||
| 634 | /* 46 */ | ||
| 635 | movl 24(%esp), %esi | ||
| 636 | orl %eax, %edi | ||
| 637 | addl %esi, %ebp | ||
| 638 | xorl %ecx, %edi | ||
| 639 | movl $-1, %esi | ||
| 640 | roll $10, %ebx | ||
| 641 | leal 1859775393(%ebp,%edi,1),%ebp | ||
| 642 | subl %eax, %esi | ||
| 643 | roll $7, %ebp | ||
| 644 | addl %edx, %ebp | ||
| 645 | /* 47 */ | ||
| 646 | movl 52(%esp), %edi | ||
| 647 | orl %ebp, %esi | ||
| 648 | addl %edi, %edx | ||
| 649 | xorl %ebx, %esi | ||
| 650 | movl $-1, %edi | ||
| 651 | roll $10, %eax | ||
| 652 | leal 1859775393(%edx,%esi,1),%edx | ||
| 653 | movl %eax, %esi | ||
| 654 | roll $5, %edx | ||
| 655 | addl %ecx, %edx | ||
| 656 | /* 48 */ | ||
| 657 | subl %eax, %edi | ||
| 658 | andl %edx, %esi | ||
| 659 | andl %ebp, %edi | ||
| 660 | orl %esi, %edi | ||
| 661 | movl 8(%esp), %esi | ||
| 662 | roll $10, %ebp | ||
| 663 | leal 2400959708(%ecx,%edi,),%ecx | ||
| 664 | movl $-1, %edi | ||
| 665 | addl %esi, %ecx | ||
| 666 | movl %ebp, %esi | ||
| 667 | roll $11, %ecx | ||
| 668 | addl %ebx, %ecx | ||
| 669 | /* 49 */ | ||
| 670 | subl %ebp, %edi | ||
| 671 | andl %ecx, %esi | ||
| 672 | andl %edx, %edi | ||
| 673 | orl %esi, %edi | ||
| 674 | movl 40(%esp), %esi | ||
| 675 | roll $10, %edx | ||
| 676 | leal 2400959708(%ebx,%edi,),%ebx | ||
| 677 | movl $-1, %edi | ||
| 678 | addl %esi, %ebx | ||
| 679 | movl %edx, %esi | ||
| 680 | roll $12, %ebx | ||
| 681 | addl %eax, %ebx | ||
| 682 | /* 50 */ | ||
| 683 | subl %edx, %edi | ||
| 684 | andl %ebx, %esi | ||
| 685 | andl %ecx, %edi | ||
| 686 | orl %esi, %edi | ||
| 687 | movl 48(%esp), %esi | ||
| 688 | roll $10, %ecx | ||
| 689 | leal 2400959708(%eax,%edi,),%eax | ||
| 690 | movl $-1, %edi | ||
| 691 | addl %esi, %eax | ||
| 692 | movl %ecx, %esi | ||
| 693 | roll $14, %eax | ||
| 694 | addl %ebp, %eax | ||
| 695 | /* 51 */ | ||
| 696 | subl %ecx, %edi | ||
| 697 | andl %eax, %esi | ||
| 698 | andl %ebx, %edi | ||
| 699 | orl %esi, %edi | ||
| 700 | movl 44(%esp), %esi | ||
| 701 | roll $10, %ebx | ||
| 702 | leal 2400959708(%ebp,%edi,),%ebp | ||
| 703 | movl $-1, %edi | ||
| 704 | addl %esi, %ebp | ||
| 705 | movl %ebx, %esi | ||
| 706 | roll $15, %ebp | ||
| 707 | addl %edx, %ebp | ||
| 708 | /* 52 */ | ||
| 709 | subl %ebx, %edi | ||
| 710 | andl %ebp, %esi | ||
| 711 | andl %eax, %edi | ||
| 712 | orl %esi, %edi | ||
| 713 | movl 4(%esp), %esi | ||
| 714 | roll $10, %eax | ||
| 715 | leal 2400959708(%edx,%edi,),%edx | ||
| 716 | movl $-1, %edi | ||
| 717 | addl %esi, %edx | ||
| 718 | movl %eax, %esi | ||
| 719 | roll $14, %edx | ||
| 720 | addl %ecx, %edx | ||
| 721 | /* 53 */ | ||
| 722 | subl %eax, %edi | ||
| 723 | andl %edx, %esi | ||
| 724 | andl %ebp, %edi | ||
| 725 | orl %esi, %edi | ||
| 726 | movl 36(%esp), %esi | ||
| 727 | roll $10, %ebp | ||
| 728 | leal 2400959708(%ecx,%edi,),%ecx | ||
| 729 | movl $-1, %edi | ||
| 730 | addl %esi, %ecx | ||
| 731 | movl %ebp, %esi | ||
| 732 | roll $15, %ecx | ||
| 733 | addl %ebx, %ecx | ||
| 734 | /* 54 */ | ||
| 735 | subl %ebp, %edi | ||
| 736 | andl %ecx, %esi | ||
| 737 | andl %edx, %edi | ||
| 738 | orl %esi, %edi | ||
| 739 | movl 52(%esp), %esi | ||
| 740 | roll $10, %edx | ||
| 741 | leal 2400959708(%ebx,%edi,),%ebx | ||
| 742 | movl $-1, %edi | ||
| 743 | addl %esi, %ebx | ||
| 744 | movl %edx, %esi | ||
| 745 | roll $9, %ebx | ||
| 746 | addl %eax, %ebx | ||
| 747 | /* 55 */ | ||
| 748 | subl %edx, %edi | ||
| 749 | andl %ebx, %esi | ||
| 750 | andl %ecx, %edi | ||
| 751 | orl %esi, %edi | ||
| 752 | movl 20(%esp), %esi | ||
| 753 | roll $10, %ecx | ||
| 754 | leal 2400959708(%eax,%edi,),%eax | ||
| 755 | movl $-1, %edi | ||
| 756 | addl %esi, %eax | ||
| 757 | movl %ecx, %esi | ||
| 758 | roll $8, %eax | ||
| 759 | addl %ebp, %eax | ||
| 760 | /* 56 */ | ||
| 761 | subl %ecx, %edi | ||
| 762 | andl %eax, %esi | ||
| 763 | andl %ebx, %edi | ||
| 764 | orl %esi, %edi | ||
| 765 | movl 56(%esp), %esi | ||
| 766 | roll $10, %ebx | ||
| 767 | leal 2400959708(%ebp,%edi,),%ebp | ||
| 768 | movl $-1, %edi | ||
| 769 | addl %esi, %ebp | ||
| 770 | movl %ebx, %esi | ||
| 771 | roll $9, %ebp | ||
| 772 | addl %edx, %ebp | ||
| 773 | /* 57 */ | ||
| 774 | subl %ebx, %edi | ||
| 775 | andl %ebp, %esi | ||
| 776 | andl %eax, %edi | ||
| 777 | orl %esi, %edi | ||
| 778 | movl 16(%esp), %esi | ||
| 779 | roll $10, %eax | ||
| 780 | leal 2400959708(%edx,%edi,),%edx | ||
| 781 | movl $-1, %edi | ||
| 782 | addl %esi, %edx | ||
| 783 | movl %eax, %esi | ||
| 784 | roll $14, %edx | ||
| 785 | addl %ecx, %edx | ||
| 786 | /* 58 */ | ||
| 787 | subl %eax, %edi | ||
| 788 | andl %edx, %esi | ||
| 789 | andl %ebp, %edi | ||
| 790 | orl %esi, %edi | ||
| 791 | movl 32(%esp), %esi | ||
| 792 | roll $10, %ebp | ||
| 793 | leal 2400959708(%ecx,%edi,),%ecx | ||
| 794 | movl $-1, %edi | ||
| 795 | addl %esi, %ecx | ||
| 796 | movl %ebp, %esi | ||
| 797 | roll $5, %ecx | ||
| 798 | addl %ebx, %ecx | ||
| 799 | /* 59 */ | ||
| 800 | subl %ebp, %edi | ||
| 801 | andl %ecx, %esi | ||
| 802 | andl %edx, %edi | ||
| 803 | orl %esi, %edi | ||
| 804 | movl 64(%esp), %esi | ||
| 805 | roll $10, %edx | ||
| 806 | leal 2400959708(%ebx,%edi,),%ebx | ||
| 807 | movl $-1, %edi | ||
| 808 | addl %esi, %ebx | ||
| 809 | movl %edx, %esi | ||
| 810 | roll $6, %ebx | ||
| 811 | addl %eax, %ebx | ||
| 812 | /* 60 */ | ||
| 813 | subl %edx, %edi | ||
| 814 | andl %ebx, %esi | ||
| 815 | andl %ecx, %edi | ||
| 816 | orl %esi, %edi | ||
| 817 | movl 60(%esp), %esi | ||
| 818 | roll $10, %ecx | ||
| 819 | leal 2400959708(%eax,%edi,),%eax | ||
| 820 | movl $-1, %edi | ||
| 821 | addl %esi, %eax | ||
| 822 | movl %ecx, %esi | ||
| 823 | roll $8, %eax | ||
| 824 | addl %ebp, %eax | ||
| 825 | /* 61 */ | ||
| 826 | subl %ecx, %edi | ||
| 827 | andl %eax, %esi | ||
| 828 | andl %ebx, %edi | ||
| 829 | orl %esi, %edi | ||
| 830 | movl 24(%esp), %esi | ||
| 831 | roll $10, %ebx | ||
| 832 | leal 2400959708(%ebp,%edi,),%ebp | ||
| 833 | movl $-1, %edi | ||
| 834 | addl %esi, %ebp | ||
| 835 | movl %ebx, %esi | ||
| 836 | roll $6, %ebp | ||
| 837 | addl %edx, %ebp | ||
| 838 | /* 62 */ | ||
| 839 | subl %ebx, %edi | ||
| 840 | andl %ebp, %esi | ||
| 841 | andl %eax, %edi | ||
| 842 | orl %esi, %edi | ||
| 843 | movl 28(%esp), %esi | ||
| 844 | roll $10, %eax | ||
| 845 | leal 2400959708(%edx,%edi,),%edx | ||
| 846 | movl $-1, %edi | ||
| 847 | addl %esi, %edx | ||
| 848 | movl %eax, %esi | ||
| 849 | roll $5, %edx | ||
| 850 | addl %ecx, %edx | ||
| 851 | /* 63 */ | ||
| 852 | subl %eax, %edi | ||
| 853 | andl %edx, %esi | ||
| 854 | andl %ebp, %edi | ||
| 855 | orl %esi, %edi | ||
| 856 | movl 12(%esp), %esi | ||
| 857 | roll $10, %ebp | ||
| 858 | leal 2400959708(%ecx,%edi,),%ecx | ||
| 859 | movl $-1, %edi | ||
| 860 | addl %esi, %ecx | ||
| 861 | subl %ebp, %edi | ||
| 862 | roll $12, %ecx | ||
| 863 | addl %ebx, %ecx | ||
| 864 | /* 64 */ | ||
| 865 | movl 20(%esp), %esi | ||
| 866 | orl %edx, %edi | ||
| 867 | addl %esi, %ebx | ||
| 868 | xorl %ecx, %edi | ||
| 869 | movl $-1, %esi | ||
| 870 | roll $10, %edx | ||
| 871 | leal 2840853838(%ebx,%edi,1),%ebx | ||
| 872 | subl %edx, %esi | ||
| 873 | roll $9, %ebx | ||
| 874 | addl %eax, %ebx | ||
| 875 | /* 65 */ | ||
| 876 | movl 4(%esp), %edi | ||
| 877 | orl %ecx, %esi | ||
| 878 | addl %edi, %eax | ||
| 879 | xorl %ebx, %esi | ||
| 880 | movl $-1, %edi | ||
| 881 | roll $10, %ecx | ||
| 882 | leal 2840853838(%eax,%esi,1),%eax | ||
| 883 | subl %ecx, %edi | ||
| 884 | roll $15, %eax | ||
| 885 | addl %ebp, %eax | ||
| 886 | /* 66 */ | ||
| 887 | movl 24(%esp), %esi | ||
| 888 | orl %ebx, %edi | ||
| 889 | addl %esi, %ebp | ||
| 890 | xorl %eax, %edi | ||
| 891 | movl $-1, %esi | ||
| 892 | roll $10, %ebx | ||
| 893 | leal 2840853838(%ebp,%edi,1),%ebp | ||
| 894 | subl %ebx, %esi | ||
| 895 | roll $5, %ebp | ||
| 896 | addl %edx, %ebp | ||
| 897 | /* 67 */ | ||
| 898 | movl 40(%esp), %edi | ||
| 899 | orl %eax, %esi | ||
| 900 | addl %edi, %edx | ||
| 901 | xorl %ebp, %esi | ||
| 902 | movl $-1, %edi | ||
| 903 | roll $10, %eax | ||
| 904 | leal 2840853838(%edx,%esi,1),%edx | ||
| 905 | subl %eax, %edi | ||
| 906 | roll $11, %edx | ||
| 907 | addl %ecx, %edx | ||
| 908 | /* 68 */ | ||
| 909 | movl 32(%esp), %esi | ||
| 910 | orl %ebp, %edi | ||
| 911 | addl %esi, %ecx | ||
| 912 | xorl %edx, %edi | ||
| 913 | movl $-1, %esi | ||
| 914 | roll $10, %ebp | ||
| 915 | leal 2840853838(%ecx,%edi,1),%ecx | ||
| 916 | subl %ebp, %esi | ||
| 917 | roll $6, %ecx | ||
| 918 | addl %ebx, %ecx | ||
| 919 | /* 69 */ | ||
| 920 | movl 52(%esp), %edi | ||
| 921 | orl %edx, %esi | ||
| 922 | addl %edi, %ebx | ||
| 923 | xorl %ecx, %esi | ||
| 924 | movl $-1, %edi | ||
| 925 | roll $10, %edx | ||
| 926 | leal 2840853838(%ebx,%esi,1),%ebx | ||
| 927 | subl %edx, %edi | ||
| 928 | roll $8, %ebx | ||
| 929 | addl %eax, %ebx | ||
| 930 | /* 70 */ | ||
| 931 | movl 12(%esp), %esi | ||
| 932 | orl %ecx, %edi | ||
| 933 | addl %esi, %eax | ||
| 934 | xorl %ebx, %edi | ||
| 935 | movl $-1, %esi | ||
| 936 | roll $10, %ecx | ||
| 937 | leal 2840853838(%eax,%edi,1),%eax | ||
| 938 | subl %ecx, %esi | ||
| 939 | roll $13, %eax | ||
| 940 | addl %ebp, %eax | ||
| 941 | /* 71 */ | ||
| 942 | movl 44(%esp), %edi | ||
| 943 | orl %ebx, %esi | ||
| 944 | addl %edi, %ebp | ||
| 945 | xorl %eax, %esi | ||
| 946 | movl $-1, %edi | ||
| 947 | roll $10, %ebx | ||
| 948 | leal 2840853838(%ebp,%esi,1),%ebp | ||
| 949 | subl %ebx, %edi | ||
| 950 | roll $12, %ebp | ||
| 951 | addl %edx, %ebp | ||
| 952 | /* 72 */ | ||
| 953 | movl 60(%esp), %esi | ||
| 954 | orl %eax, %edi | ||
| 955 | addl %esi, %edx | ||
| 956 | xorl %ebp, %edi | ||
| 957 | movl $-1, %esi | ||
| 958 | roll $10, %eax | ||
| 959 | leal 2840853838(%edx,%edi,1),%edx | ||
| 960 | subl %eax, %esi | ||
| 961 | roll $5, %edx | ||
| 962 | addl %ecx, %edx | ||
| 963 | /* 73 */ | ||
| 964 | movl 8(%esp), %edi | ||
| 965 | orl %ebp, %esi | ||
| 966 | addl %edi, %ecx | ||
| 967 | xorl %edx, %esi | ||
| 968 | movl $-1, %edi | ||
| 969 | roll $10, %ebp | ||
| 970 | leal 2840853838(%ecx,%esi,1),%ecx | ||
| 971 | subl %ebp, %edi | ||
| 972 | roll $12, %ecx | ||
| 973 | addl %ebx, %ecx | ||
| 974 | /* 74 */ | ||
| 975 | movl 16(%esp), %esi | ||
| 976 | orl %edx, %edi | ||
| 977 | addl %esi, %ebx | ||
| 978 | xorl %ecx, %edi | ||
| 979 | movl $-1, %esi | ||
| 980 | roll $10, %edx | ||
| 981 | leal 2840853838(%ebx,%edi,1),%ebx | ||
| 982 | subl %edx, %esi | ||
| 983 | roll $13, %ebx | ||
| 984 | addl %eax, %ebx | ||
| 985 | /* 75 */ | ||
| 986 | movl 36(%esp), %edi | ||
| 987 | orl %ecx, %esi | ||
| 988 | addl %edi, %eax | ||
| 989 | xorl %ebx, %esi | ||
| 990 | movl $-1, %edi | ||
| 991 | roll $10, %ecx | ||
| 992 | leal 2840853838(%eax,%esi,1),%eax | ||
| 993 | subl %ecx, %edi | ||
| 994 | roll $14, %eax | ||
| 995 | addl %ebp, %eax | ||
| 996 | /* 76 */ | ||
| 997 | movl 48(%esp), %esi | ||
| 998 | orl %ebx, %edi | ||
| 999 | addl %esi, %ebp | ||
| 1000 | xorl %eax, %edi | ||
| 1001 | movl $-1, %esi | ||
| 1002 | roll $10, %ebx | ||
| 1003 | leal 2840853838(%ebp,%edi,1),%ebp | ||
| 1004 | subl %ebx, %esi | ||
| 1005 | roll $11, %ebp | ||
| 1006 | addl %edx, %ebp | ||
| 1007 | /* 77 */ | ||
| 1008 | movl 28(%esp), %edi | ||
| 1009 | orl %eax, %esi | ||
| 1010 | addl %edi, %edx | ||
| 1011 | xorl %ebp, %esi | ||
| 1012 | movl $-1, %edi | ||
| 1013 | roll $10, %eax | ||
| 1014 | leal 2840853838(%edx,%esi,1),%edx | ||
| 1015 | subl %eax, %edi | ||
| 1016 | roll $8, %edx | ||
| 1017 | addl %ecx, %edx | ||
| 1018 | /* 78 */ | ||
| 1019 | movl 64(%esp), %esi | ||
| 1020 | orl %ebp, %edi | ||
| 1021 | addl %esi, %ecx | ||
| 1022 | xorl %edx, %edi | ||
| 1023 | movl $-1, %esi | ||
| 1024 | roll $10, %ebp | ||
| 1025 | leal 2840853838(%ecx,%edi,1),%ecx | ||
| 1026 | subl %ebp, %esi | ||
| 1027 | roll $5, %ecx | ||
| 1028 | addl %ebx, %ecx | ||
| 1029 | /* 79 */ | ||
| 1030 | movl 56(%esp), %edi | ||
| 1031 | orl %edx, %esi | ||
| 1032 | addl %edi, %ebx | ||
| 1033 | xorl %ecx, %esi | ||
| 1034 | movl 108(%esp), %edi | ||
| 1035 | roll $10, %edx | ||
| 1036 | leal 2840853838(%ebx,%esi,1),%ebx | ||
| 1037 | movl %eax, 68(%esp) | ||
| 1038 | roll $6, %ebx | ||
| 1039 | addl %eax, %ebx | ||
| 1040 | movl (%edi), %eax | ||
| 1041 | movl %ebx, 72(%esp) | ||
| 1042 | movl %ecx, 76(%esp) | ||
| 1043 | movl 4(%edi), %ebx | ||
| 1044 | movl %edx, 80(%esp) | ||
| 1045 | movl 8(%edi), %ecx | ||
| 1046 | movl %ebp, 84(%esp) | ||
| 1047 | movl 12(%edi), %edx | ||
| 1048 | movl 16(%edi), %ebp | ||
| 1049 | /* 80 */ | ||
| 1050 | movl $-1, %edi | ||
| 1051 | subl %edx, %edi | ||
| 1052 | movl 24(%esp), %esi | ||
| 1053 | orl %ecx, %edi | ||
| 1054 | addl %esi, %eax | ||
| 1055 | xorl %ebx, %edi | ||
| 1056 | movl $-1, %esi | ||
| 1057 | roll $10, %ecx | ||
| 1058 | leal 1352829926(%eax,%edi,1),%eax | ||
| 1059 | subl %ecx, %esi | ||
| 1060 | roll $8, %eax | ||
| 1061 | addl %ebp, %eax | ||
| 1062 | /* 81 */ | ||
| 1063 | movl 60(%esp), %edi | ||
| 1064 | orl %ebx, %esi | ||
| 1065 | addl %edi, %ebp | ||
| 1066 | xorl %eax, %esi | ||
| 1067 | movl $-1, %edi | ||
| 1068 | roll $10, %ebx | ||
| 1069 | leal 1352829926(%ebp,%esi,1),%ebp | ||
| 1070 | subl %ebx, %edi | ||
| 1071 | roll $9, %ebp | ||
| 1072 | addl %edx, %ebp | ||
| 1073 | /* 82 */ | ||
| 1074 | movl 32(%esp), %esi | ||
| 1075 | orl %eax, %edi | ||
| 1076 | addl %esi, %edx | ||
| 1077 | xorl %ebp, %edi | ||
| 1078 | movl $-1, %esi | ||
| 1079 | roll $10, %eax | ||
| 1080 | leal 1352829926(%edx,%edi,1),%edx | ||
| 1081 | subl %eax, %esi | ||
| 1082 | roll $9, %edx | ||
| 1083 | addl %ecx, %edx | ||
| 1084 | /* 83 */ | ||
| 1085 | movl 4(%esp), %edi | ||
| 1086 | orl %ebp, %esi | ||
| 1087 | addl %edi, %ecx | ||
| 1088 | xorl %edx, %esi | ||
| 1089 | movl $-1, %edi | ||
| 1090 | roll $10, %ebp | ||
| 1091 | leal 1352829926(%ecx,%esi,1),%ecx | ||
| 1092 | subl %ebp, %edi | ||
| 1093 | roll $11, %ecx | ||
| 1094 | addl %ebx, %ecx | ||
| 1095 | /* 84 */ | ||
| 1096 | movl 40(%esp), %esi | ||
| 1097 | orl %edx, %edi | ||
| 1098 | addl %esi, %ebx | ||
| 1099 | xorl %ecx, %edi | ||
| 1100 | movl $-1, %esi | ||
| 1101 | roll $10, %edx | ||
| 1102 | leal 1352829926(%ebx,%edi,1),%ebx | ||
| 1103 | subl %edx, %esi | ||
| 1104 | roll $13, %ebx | ||
| 1105 | addl %eax, %ebx | ||
| 1106 | /* 85 */ | ||
| 1107 | movl 12(%esp), %edi | ||
| 1108 | orl %ecx, %esi | ||
| 1109 | addl %edi, %eax | ||
| 1110 | xorl %ebx, %esi | ||
| 1111 | movl $-1, %edi | ||
| 1112 | roll $10, %ecx | ||
| 1113 | leal 1352829926(%eax,%esi,1),%eax | ||
| 1114 | subl %ecx, %edi | ||
| 1115 | roll $15, %eax | ||
| 1116 | addl %ebp, %eax | ||
| 1117 | /* 86 */ | ||
| 1118 | movl 48(%esp), %esi | ||
| 1119 | orl %ebx, %edi | ||
| 1120 | addl %esi, %ebp | ||
| 1121 | xorl %eax, %edi | ||
| 1122 | movl $-1, %esi | ||
| 1123 | roll $10, %ebx | ||
| 1124 | leal 1352829926(%ebp,%edi,1),%ebp | ||
| 1125 | subl %ebx, %esi | ||
| 1126 | roll $15, %ebp | ||
| 1127 | addl %edx, %ebp | ||
| 1128 | /* 87 */ | ||
| 1129 | movl 20(%esp), %edi | ||
| 1130 | orl %eax, %esi | ||
| 1131 | addl %edi, %edx | ||
| 1132 | xorl %ebp, %esi | ||
| 1133 | movl $-1, %edi | ||
| 1134 | roll $10, %eax | ||
| 1135 | leal 1352829926(%edx,%esi,1),%edx | ||
| 1136 | subl %eax, %edi | ||
| 1137 | roll $5, %edx | ||
| 1138 | addl %ecx, %edx | ||
| 1139 | /* 88 */ | ||
| 1140 | movl 56(%esp), %esi | ||
| 1141 | orl %ebp, %edi | ||
| 1142 | addl %esi, %ecx | ||
| 1143 | xorl %edx, %edi | ||
| 1144 | movl $-1, %esi | ||
| 1145 | roll $10, %ebp | ||
| 1146 | leal 1352829926(%ecx,%edi,1),%ecx | ||
| 1147 | subl %ebp, %esi | ||
| 1148 | roll $7, %ecx | ||
| 1149 | addl %ebx, %ecx | ||
| 1150 | /* 89 */ | ||
| 1151 | movl 28(%esp), %edi | ||
| 1152 | orl %edx, %esi | ||
| 1153 | addl %edi, %ebx | ||
| 1154 | xorl %ecx, %esi | ||
| 1155 | movl $-1, %edi | ||
| 1156 | roll $10, %edx | ||
| 1157 | leal 1352829926(%ebx,%esi,1),%ebx | ||
| 1158 | subl %edx, %edi | ||
| 1159 | roll $7, %ebx | ||
| 1160 | addl %eax, %ebx | ||
| 1161 | /* 90 */ | ||
| 1162 | movl 64(%esp), %esi | ||
| 1163 | orl %ecx, %edi | ||
| 1164 | addl %esi, %eax | ||
| 1165 | xorl %ebx, %edi | ||
| 1166 | movl $-1, %esi | ||
| 1167 | roll $10, %ecx | ||
| 1168 | leal 1352829926(%eax,%edi,1),%eax | ||
| 1169 | subl %ecx, %esi | ||
| 1170 | roll $8, %eax | ||
| 1171 | addl %ebp, %eax | ||
| 1172 | /* 91 */ | ||
| 1173 | movl 36(%esp), %edi | ||
| 1174 | orl %ebx, %esi | ||
| 1175 | addl %edi, %ebp | ||
| 1176 | xorl %eax, %esi | ||
| 1177 | movl $-1, %edi | ||
| 1178 | roll $10, %ebx | ||
| 1179 | leal 1352829926(%ebp,%esi,1),%ebp | ||
| 1180 | subl %ebx, %edi | ||
| 1181 | roll $11, %ebp | ||
| 1182 | addl %edx, %ebp | ||
| 1183 | /* 92 */ | ||
| 1184 | movl 8(%esp), %esi | ||
| 1185 | orl %eax, %edi | ||
| 1186 | addl %esi, %edx | ||
| 1187 | xorl %ebp, %edi | ||
| 1188 | movl $-1, %esi | ||
| 1189 | roll $10, %eax | ||
| 1190 | leal 1352829926(%edx,%edi,1),%edx | ||
| 1191 | subl %eax, %esi | ||
| 1192 | roll $14, %edx | ||
| 1193 | addl %ecx, %edx | ||
| 1194 | /* 93 */ | ||
| 1195 | movl 44(%esp), %edi | ||
| 1196 | orl %ebp, %esi | ||
| 1197 | addl %edi, %ecx | ||
| 1198 | xorl %edx, %esi | ||
| 1199 | movl $-1, %edi | ||
| 1200 | roll $10, %ebp | ||
| 1201 | leal 1352829926(%ecx,%esi,1),%ecx | ||
| 1202 | subl %ebp, %edi | ||
| 1203 | roll $14, %ecx | ||
| 1204 | addl %ebx, %ecx | ||
| 1205 | /* 94 */ | ||
| 1206 | movl 16(%esp), %esi | ||
| 1207 | orl %edx, %edi | ||
| 1208 | addl %esi, %ebx | ||
| 1209 | xorl %ecx, %edi | ||
| 1210 | movl $-1, %esi | ||
| 1211 | roll $10, %edx | ||
| 1212 | leal 1352829926(%ebx,%edi,1),%ebx | ||
| 1213 | subl %edx, %esi | ||
| 1214 | roll $12, %ebx | ||
| 1215 | addl %eax, %ebx | ||
| 1216 | /* 95 */ | ||
| 1217 | movl 52(%esp), %edi | ||
| 1218 | orl %ecx, %esi | ||
| 1219 | addl %edi, %eax | ||
| 1220 | xorl %ebx, %esi | ||
| 1221 | movl $-1, %edi | ||
| 1222 | roll $10, %ecx | ||
| 1223 | leal 1352829926(%eax,%esi,1),%eax | ||
| 1224 | movl %ecx, %esi | ||
| 1225 | roll $6, %eax | ||
| 1226 | addl %ebp, %eax | ||
| 1227 | /* 96 */ | ||
| 1228 | subl %ecx, %edi | ||
| 1229 | andl %eax, %esi | ||
| 1230 | andl %ebx, %edi | ||
| 1231 | orl %esi, %edi | ||
| 1232 | movl 28(%esp), %esi | ||
| 1233 | roll $10, %ebx | ||
| 1234 | leal 1548603684(%ebp,%edi,),%ebp | ||
| 1235 | movl $-1, %edi | ||
| 1236 | addl %esi, %ebp | ||
| 1237 | movl %ebx, %esi | ||
| 1238 | roll $9, %ebp | ||
| 1239 | addl %edx, %ebp | ||
| 1240 | /* 97 */ | ||
| 1241 | subl %ebx, %edi | ||
| 1242 | andl %ebp, %esi | ||
| 1243 | andl %eax, %edi | ||
| 1244 | orl %esi, %edi | ||
| 1245 | movl 48(%esp), %esi | ||
| 1246 | roll $10, %eax | ||
| 1247 | leal 1548603684(%edx,%edi,),%edx | ||
| 1248 | movl $-1, %edi | ||
| 1249 | addl %esi, %edx | ||
| 1250 | movl %eax, %esi | ||
| 1251 | roll $13, %edx | ||
| 1252 | addl %ecx, %edx | ||
| 1253 | /* 98 */ | ||
| 1254 | subl %eax, %edi | ||
| 1255 | andl %edx, %esi | ||
| 1256 | andl %ebp, %edi | ||
| 1257 | orl %esi, %edi | ||
| 1258 | movl 16(%esp), %esi | ||
| 1259 | roll $10, %ebp | ||
| 1260 | leal 1548603684(%ecx,%edi,),%ecx | ||
| 1261 | movl $-1, %edi | ||
| 1262 | addl %esi, %ecx | ||
| 1263 | movl %ebp, %esi | ||
| 1264 | roll $15, %ecx | ||
| 1265 | addl %ebx, %ecx | ||
| 1266 | /* 99 */ | ||
| 1267 | subl %ebp, %edi | ||
| 1268 | andl %ecx, %esi | ||
| 1269 | andl %edx, %edi | ||
| 1270 | orl %esi, %edi | ||
| 1271 | movl 32(%esp), %esi | ||
| 1272 | roll $10, %edx | ||
| 1273 | leal 1548603684(%ebx,%edi,),%ebx | ||
| 1274 | movl $-1, %edi | ||
| 1275 | addl %esi, %ebx | ||
| 1276 | movl %edx, %esi | ||
| 1277 | roll $7, %ebx | ||
| 1278 | addl %eax, %ebx | ||
| 1279 | /* 100 */ | ||
| 1280 | subl %edx, %edi | ||
| 1281 | andl %ebx, %esi | ||
| 1282 | andl %ecx, %edi | ||
| 1283 | orl %esi, %edi | ||
| 1284 | movl 4(%esp), %esi | ||
| 1285 | roll $10, %ecx | ||
| 1286 | leal 1548603684(%eax,%edi,),%eax | ||
| 1287 | movl $-1, %edi | ||
| 1288 | addl %esi, %eax | ||
| 1289 | movl %ecx, %esi | ||
| 1290 | roll $12, %eax | ||
| 1291 | addl %ebp, %eax | ||
| 1292 | /* 101 */ | ||
| 1293 | subl %ecx, %edi | ||
| 1294 | andl %eax, %esi | ||
| 1295 | andl %ebx, %edi | ||
| 1296 | orl %esi, %edi | ||
| 1297 | movl 56(%esp), %esi | ||
| 1298 | roll $10, %ebx | ||
| 1299 | leal 1548603684(%ebp,%edi,),%ebp | ||
| 1300 | movl $-1, %edi | ||
| 1301 | addl %esi, %ebp | ||
| 1302 | movl %ebx, %esi | ||
| 1303 | roll $8, %ebp | ||
| 1304 | addl %edx, %ebp | ||
| 1305 | /* 102 */ | ||
| 1306 | subl %ebx, %edi | ||
| 1307 | andl %ebp, %esi | ||
| 1308 | andl %eax, %edi | ||
| 1309 | orl %esi, %edi | ||
| 1310 | movl 24(%esp), %esi | ||
| 1311 | roll $10, %eax | ||
| 1312 | leal 1548603684(%edx,%edi,),%edx | ||
| 1313 | movl $-1, %edi | ||
| 1314 | addl %esi, %edx | ||
| 1315 | movl %eax, %esi | ||
| 1316 | roll $9, %edx | ||
| 1317 | addl %ecx, %edx | ||
| 1318 | /* 103 */ | ||
| 1319 | subl %eax, %edi | ||
| 1320 | andl %edx, %esi | ||
| 1321 | andl %ebp, %edi | ||
| 1322 | orl %esi, %edi | ||
| 1323 | movl 44(%esp), %esi | ||
| 1324 | roll $10, %ebp | ||
| 1325 | leal 1548603684(%ecx,%edi,),%ecx | ||
| 1326 | movl $-1, %edi | ||
| 1327 | addl %esi, %ecx | ||
| 1328 | movl %ebp, %esi | ||
| 1329 | roll $11, %ecx | ||
| 1330 | addl %ebx, %ecx | ||
| 1331 | /* 104 */ | ||
| 1332 | subl %ebp, %edi | ||
| 1333 | andl %ecx, %esi | ||
| 1334 | andl %edx, %edi | ||
| 1335 | orl %esi, %edi | ||
| 1336 | movl 60(%esp), %esi | ||
| 1337 | roll $10, %edx | ||
| 1338 | leal 1548603684(%ebx,%edi,),%ebx | ||
| 1339 | movl $-1, %edi | ||
| 1340 | addl %esi, %ebx | ||
| 1341 | movl %edx, %esi | ||
| 1342 | roll $7, %ebx | ||
| 1343 | addl %eax, %ebx | ||
| 1344 | /* 105 */ | ||
| 1345 | subl %edx, %edi | ||
| 1346 | andl %ebx, %esi | ||
| 1347 | andl %ecx, %edi | ||
| 1348 | orl %esi, %edi | ||
| 1349 | movl 64(%esp), %esi | ||
| 1350 | roll $10, %ecx | ||
| 1351 | leal 1548603684(%eax,%edi,),%eax | ||
| 1352 | movl $-1, %edi | ||
| 1353 | addl %esi, %eax | ||
| 1354 | movl %ecx, %esi | ||
| 1355 | roll $7, %eax | ||
| 1356 | addl %ebp, %eax | ||
| 1357 | /* 106 */ | ||
| 1358 | subl %ecx, %edi | ||
| 1359 | andl %eax, %esi | ||
| 1360 | andl %ebx, %edi | ||
| 1361 | orl %esi, %edi | ||
| 1362 | movl 36(%esp), %esi | ||
| 1363 | roll $10, %ebx | ||
| 1364 | leal 1548603684(%ebp,%edi,),%ebp | ||
| 1365 | movl $-1, %edi | ||
| 1366 | addl %esi, %ebp | ||
| 1367 | movl %ebx, %esi | ||
| 1368 | roll $12, %ebp | ||
| 1369 | addl %edx, %ebp | ||
| 1370 | /* 107 */ | ||
| 1371 | subl %ebx, %edi | ||
| 1372 | andl %ebp, %esi | ||
| 1373 | andl %eax, %edi | ||
| 1374 | orl %esi, %edi | ||
| 1375 | movl 52(%esp), %esi | ||
| 1376 | roll $10, %eax | ||
| 1377 | leal 1548603684(%edx,%edi,),%edx | ||
| 1378 | movl $-1, %edi | ||
| 1379 | addl %esi, %edx | ||
| 1380 | movl %eax, %esi | ||
| 1381 | roll $7, %edx | ||
| 1382 | addl %ecx, %edx | ||
| 1383 | /* 108 */ | ||
| 1384 | subl %eax, %edi | ||
| 1385 | andl %edx, %esi | ||
| 1386 | andl %ebp, %edi | ||
| 1387 | orl %esi, %edi | ||
| 1388 | movl 20(%esp), %esi | ||
| 1389 | roll $10, %ebp | ||
| 1390 | leal 1548603684(%ecx,%edi,),%ecx | ||
| 1391 | movl $-1, %edi | ||
| 1392 | addl %esi, %ecx | ||
| 1393 | movl %ebp, %esi | ||
| 1394 | roll $6, %ecx | ||
| 1395 | addl %ebx, %ecx | ||
| 1396 | /* 109 */ | ||
| 1397 | subl %ebp, %edi | ||
| 1398 | andl %ecx, %esi | ||
| 1399 | andl %edx, %edi | ||
| 1400 | orl %esi, %edi | ||
| 1401 | movl 40(%esp), %esi | ||
| 1402 | roll $10, %edx | ||
| 1403 | leal 1548603684(%ebx,%edi,),%ebx | ||
| 1404 | movl $-1, %edi | ||
| 1405 | addl %esi, %ebx | ||
| 1406 | movl %edx, %esi | ||
| 1407 | roll $15, %ebx | ||
| 1408 | addl %eax, %ebx | ||
| 1409 | /* 110 */ | ||
| 1410 | subl %edx, %edi | ||
| 1411 | andl %ebx, %esi | ||
| 1412 | andl %ecx, %edi | ||
| 1413 | orl %esi, %edi | ||
| 1414 | movl 8(%esp), %esi | ||
| 1415 | roll $10, %ecx | ||
| 1416 | leal 1548603684(%eax,%edi,),%eax | ||
| 1417 | movl $-1, %edi | ||
| 1418 | addl %esi, %eax | ||
| 1419 | movl %ecx, %esi | ||
| 1420 | roll $13, %eax | ||
| 1421 | addl %ebp, %eax | ||
| 1422 | /* 111 */ | ||
| 1423 | subl %ecx, %edi | ||
| 1424 | andl %eax, %esi | ||
| 1425 | andl %ebx, %edi | ||
| 1426 | orl %esi, %edi | ||
| 1427 | movl 12(%esp), %esi | ||
| 1428 | roll $10, %ebx | ||
| 1429 | leal 1548603684(%ebp,%edi,),%ebp | ||
| 1430 | movl $-1, %edi | ||
| 1431 | addl %esi, %ebp | ||
| 1432 | subl %eax, %edi | ||
| 1433 | roll $11, %ebp | ||
| 1434 | addl %edx, %ebp | ||
| 1435 | /* 112 */ | ||
| 1436 | movl 64(%esp), %esi | ||
| 1437 | orl %ebp, %edi | ||
| 1438 | addl %esi, %edx | ||
| 1439 | xorl %ebx, %edi | ||
| 1440 | movl $-1, %esi | ||
| 1441 | roll $10, %eax | ||
| 1442 | leal 1836072691(%edx,%edi,1),%edx | ||
| 1443 | subl %ebp, %esi | ||
| 1444 | roll $9, %edx | ||
| 1445 | addl %ecx, %edx | ||
| 1446 | /* 113 */ | ||
| 1447 | movl 24(%esp), %edi | ||
| 1448 | orl %edx, %esi | ||
| 1449 | addl %edi, %ecx | ||
| 1450 | xorl %eax, %esi | ||
| 1451 | movl $-1, %edi | ||
| 1452 | roll $10, %ebp | ||
| 1453 | leal 1836072691(%ecx,%esi,1),%ecx | ||
| 1454 | subl %edx, %edi | ||
| 1455 | roll $7, %ecx | ||
| 1456 | addl %ebx, %ecx | ||
| 1457 | /* 114 */ | ||
| 1458 | movl 8(%esp), %esi | ||
| 1459 | orl %ecx, %edi | ||
| 1460 | addl %esi, %ebx | ||
| 1461 | xorl %ebp, %edi | ||
| 1462 | movl $-1, %esi | ||
| 1463 | roll $10, %edx | ||
| 1464 | leal 1836072691(%ebx,%edi,1),%ebx | ||
| 1465 | subl %ecx, %esi | ||
| 1466 | roll $15, %ebx | ||
| 1467 | addl %eax, %ebx | ||
| 1468 | /* 115 */ | ||
| 1469 | movl 16(%esp), %edi | ||
| 1470 | orl %ebx, %esi | ||
| 1471 | addl %edi, %eax | ||
| 1472 | xorl %edx, %esi | ||
| 1473 | movl $-1, %edi | ||
| 1474 | roll $10, %ecx | ||
| 1475 | leal 1836072691(%eax,%esi,1),%eax | ||
| 1476 | subl %ebx, %edi | ||
| 1477 | roll $11, %eax | ||
| 1478 | addl %ebp, %eax | ||
| 1479 | /* 116 */ | ||
| 1480 | movl 32(%esp), %esi | ||
| 1481 | orl %eax, %edi | ||
| 1482 | addl %esi, %ebp | ||
| 1483 | xorl %ecx, %edi | ||
| 1484 | movl $-1, %esi | ||
| 1485 | roll $10, %ebx | ||
| 1486 | leal 1836072691(%ebp,%edi,1),%ebp | ||
| 1487 | subl %eax, %esi | ||
| 1488 | roll $8, %ebp | ||
| 1489 | addl %edx, %ebp | ||
| 1490 | /* 117 */ | ||
| 1491 | movl 60(%esp), %edi | ||
| 1492 | orl %ebp, %esi | ||
| 1493 | addl %edi, %edx | ||
| 1494 | xorl %ebx, %esi | ||
| 1495 | movl $-1, %edi | ||
| 1496 | roll $10, %eax | ||
| 1497 | leal 1836072691(%edx,%esi,1),%edx | ||
| 1498 | subl %ebp, %edi | ||
| 1499 | roll $6, %edx | ||
| 1500 | addl %ecx, %edx | ||
| 1501 | /* 118 */ | ||
| 1502 | movl 28(%esp), %esi | ||
| 1503 | orl %edx, %edi | ||
| 1504 | addl %esi, %ecx | ||
| 1505 | xorl %eax, %edi | ||
| 1506 | movl $-1, %esi | ||
| 1507 | roll $10, %ebp | ||
| 1508 | leal 1836072691(%ecx,%edi,1),%ecx | ||
| 1509 | subl %edx, %esi | ||
| 1510 | roll $6, %ecx | ||
| 1511 | addl %ebx, %ecx | ||
| 1512 | /* 119 */ | ||
| 1513 | movl 40(%esp), %edi | ||
| 1514 | orl %ecx, %esi | ||
| 1515 | addl %edi, %ebx | ||
| 1516 | xorl %ebp, %esi | ||
| 1517 | movl $-1, %edi | ||
| 1518 | roll $10, %edx | ||
| 1519 | leal 1836072691(%ebx,%esi,1),%ebx | ||
| 1520 | subl %ecx, %edi | ||
| 1521 | roll $14, %ebx | ||
| 1522 | addl %eax, %ebx | ||
| 1523 | /* 120 */ | ||
| 1524 | movl 48(%esp), %esi | ||
| 1525 | orl %ebx, %edi | ||
| 1526 | addl %esi, %eax | ||
| 1527 | xorl %edx, %edi | ||
| 1528 | movl $-1, %esi | ||
| 1529 | roll $10, %ecx | ||
| 1530 | leal 1836072691(%eax,%edi,1),%eax | ||
| 1531 | subl %ebx, %esi | ||
| 1532 | roll $12, %eax | ||
| 1533 | addl %ebp, %eax | ||
| 1534 | /* 121 */ | ||
| 1535 | movl 36(%esp), %edi | ||
| 1536 | orl %eax, %esi | ||
| 1537 | addl %edi, %ebp | ||
| 1538 | xorl %ecx, %esi | ||
| 1539 | movl $-1, %edi | ||
| 1540 | roll $10, %ebx | ||
| 1541 | leal 1836072691(%ebp,%esi,1),%ebp | ||
| 1542 | subl %eax, %edi | ||
| 1543 | roll $13, %ebp | ||
| 1544 | addl %edx, %ebp | ||
| 1545 | /* 122 */ | ||
| 1546 | movl 52(%esp), %esi | ||
| 1547 | orl %ebp, %edi | ||
| 1548 | addl %esi, %edx | ||
| 1549 | xorl %ebx, %edi | ||
| 1550 | movl $-1, %esi | ||
| 1551 | roll $10, %eax | ||
| 1552 | leal 1836072691(%edx,%edi,1),%edx | ||
| 1553 | subl %ebp, %esi | ||
| 1554 | roll $5, %edx | ||
| 1555 | addl %ecx, %edx | ||
| 1556 | /* 123 */ | ||
| 1557 | movl 12(%esp), %edi | ||
| 1558 | orl %edx, %esi | ||
| 1559 | addl %edi, %ecx | ||
| 1560 | xorl %eax, %esi | ||
| 1561 | movl $-1, %edi | ||
| 1562 | roll $10, %ebp | ||
| 1563 | leal 1836072691(%ecx,%esi,1),%ecx | ||
| 1564 | subl %edx, %edi | ||
| 1565 | roll $14, %ecx | ||
| 1566 | addl %ebx, %ecx | ||
| 1567 | /* 124 */ | ||
| 1568 | movl 44(%esp), %esi | ||
| 1569 | orl %ecx, %edi | ||
| 1570 | addl %esi, %ebx | ||
| 1571 | xorl %ebp, %edi | ||
| 1572 | movl $-1, %esi | ||
| 1573 | roll $10, %edx | ||
| 1574 | leal 1836072691(%ebx,%edi,1),%ebx | ||
| 1575 | subl %ecx, %esi | ||
| 1576 | roll $13, %ebx | ||
| 1577 | addl %eax, %ebx | ||
| 1578 | /* 125 */ | ||
| 1579 | movl 4(%esp), %edi | ||
| 1580 | orl %ebx, %esi | ||
| 1581 | addl %edi, %eax | ||
| 1582 | xorl %edx, %esi | ||
| 1583 | movl $-1, %edi | ||
| 1584 | roll $10, %ecx | ||
| 1585 | leal 1836072691(%eax,%esi,1),%eax | ||
| 1586 | subl %ebx, %edi | ||
| 1587 | roll $13, %eax | ||
| 1588 | addl %ebp, %eax | ||
| 1589 | /* 126 */ | ||
| 1590 | movl 20(%esp), %esi | ||
| 1591 | orl %eax, %edi | ||
| 1592 | addl %esi, %ebp | ||
| 1593 | xorl %ecx, %edi | ||
| 1594 | movl $-1, %esi | ||
| 1595 | roll $10, %ebx | ||
| 1596 | leal 1836072691(%ebp,%edi,1),%ebp | ||
| 1597 | subl %eax, %esi | ||
| 1598 | roll $7, %ebp | ||
| 1599 | addl %edx, %ebp | ||
| 1600 | /* 127 */ | ||
| 1601 | movl 56(%esp), %edi | ||
| 1602 | orl %ebp, %esi | ||
| 1603 | addl %edi, %edx | ||
| 1604 | xorl %ebx, %esi | ||
| 1605 | movl 36(%esp), %edi | ||
| 1606 | roll $10, %eax | ||
| 1607 | leal 1836072691(%edx,%esi,1),%edx | ||
| 1608 | movl $-1, %esi | ||
| 1609 | roll $5, %edx | ||
| 1610 | addl %ecx, %edx | ||
| 1611 | /* 128 */ | ||
| 1612 | addl %edi, %ecx | ||
| 1613 | movl %ebp, %edi | ||
| 1614 | subl %edx, %esi | ||
| 1615 | andl %edx, %edi | ||
| 1616 | andl %eax, %esi | ||
| 1617 | orl %esi, %edi | ||
| 1618 | movl 28(%esp), %esi | ||
| 1619 | roll $10, %ebp | ||
| 1620 | leal 2053994217(%ecx,%edi,1),%ecx | ||
| 1621 | movl $-1, %edi | ||
| 1622 | roll $15, %ecx | ||
| 1623 | addl %ebx, %ecx | ||
| 1624 | /* 129 */ | ||
| 1625 | addl %esi, %ebx | ||
| 1626 | movl %edx, %esi | ||
| 1627 | subl %ecx, %edi | ||
| 1628 | andl %ecx, %esi | ||
| 1629 | andl %ebp, %edi | ||
| 1630 | orl %edi, %esi | ||
| 1631 | movl 20(%esp), %edi | ||
| 1632 | roll $10, %edx | ||
| 1633 | leal 2053994217(%ebx,%esi,1),%ebx | ||
| 1634 | movl $-1, %esi | ||
| 1635 | roll $5, %ebx | ||
| 1636 | addl %eax, %ebx | ||
| 1637 | /* 130 */ | ||
| 1638 | addl %edi, %eax | ||
| 1639 | movl %ecx, %edi | ||
| 1640 | subl %ebx, %esi | ||
| 1641 | andl %ebx, %edi | ||
| 1642 | andl %edx, %esi | ||
| 1643 | orl %esi, %edi | ||
| 1644 | movl 8(%esp), %esi | ||
| 1645 | roll $10, %ecx | ||
| 1646 | leal 2053994217(%eax,%edi,1),%eax | ||
| 1647 | movl $-1, %edi | ||
| 1648 | roll $8, %eax | ||
| 1649 | addl %ebp, %eax | ||
| 1650 | /* 131 */ | ||
| 1651 | addl %esi, %ebp | ||
| 1652 | movl %ebx, %esi | ||
| 1653 | subl %eax, %edi | ||
| 1654 | andl %eax, %esi | ||
| 1655 | andl %ecx, %edi | ||
| 1656 | orl %edi, %esi | ||
| 1657 | movl 16(%esp), %edi | ||
| 1658 | roll $10, %ebx | ||
| 1659 | leal 2053994217(%ebp,%esi,1),%ebp | ||
| 1660 | movl $-1, %esi | ||
| 1661 | roll $11, %ebp | ||
| 1662 | addl %edx, %ebp | ||
| 1663 | /* 132 */ | ||
| 1664 | addl %edi, %edx | ||
| 1665 | movl %eax, %edi | ||
| 1666 | subl %ebp, %esi | ||
| 1667 | andl %ebp, %edi | ||
| 1668 | andl %ebx, %esi | ||
| 1669 | orl %esi, %edi | ||
| 1670 | movl 48(%esp), %esi | ||
| 1671 | roll $10, %eax | ||
| 1672 | leal 2053994217(%edx,%edi,1),%edx | ||
| 1673 | movl $-1, %edi | ||
| 1674 | roll $14, %edx | ||
| 1675 | addl %ecx, %edx | ||
| 1676 | /* 133 */ | ||
| 1677 | addl %esi, %ecx | ||
| 1678 | movl %ebp, %esi | ||
| 1679 | subl %edx, %edi | ||
| 1680 | andl %edx, %esi | ||
| 1681 | andl %eax, %edi | ||
| 1682 | orl %edi, %esi | ||
| 1683 | movl 64(%esp), %edi | ||
| 1684 | roll $10, %ebp | ||
| 1685 | leal 2053994217(%ecx,%esi,1),%ecx | ||
| 1686 | movl $-1, %esi | ||
| 1687 | roll $14, %ecx | ||
| 1688 | addl %ebx, %ecx | ||
| 1689 | /* 134 */ | ||
| 1690 | addl %edi, %ebx | ||
| 1691 | movl %edx, %edi | ||
| 1692 | subl %ecx, %esi | ||
| 1693 | andl %ecx, %edi | ||
| 1694 | andl %ebp, %esi | ||
| 1695 | orl %esi, %edi | ||
| 1696 | movl 4(%esp), %esi | ||
| 1697 | roll $10, %edx | ||
| 1698 | leal 2053994217(%ebx,%edi,1),%ebx | ||
| 1699 | movl $-1, %edi | ||
| 1700 | roll $6, %ebx | ||
| 1701 | addl %eax, %ebx | ||
| 1702 | /* 135 */ | ||
| 1703 | addl %esi, %eax | ||
| 1704 | movl %ecx, %esi | ||
| 1705 | subl %ebx, %edi | ||
| 1706 | andl %ebx, %esi | ||
| 1707 | andl %edx, %edi | ||
| 1708 | orl %edi, %esi | ||
| 1709 | movl 24(%esp), %edi | ||
| 1710 | roll $10, %ecx | ||
| 1711 | leal 2053994217(%eax,%esi,1),%eax | ||
| 1712 | movl $-1, %esi | ||
| 1713 | roll $14, %eax | ||
| 1714 | addl %ebp, %eax | ||
| 1715 | /* 136 */ | ||
| 1716 | addl %edi, %ebp | ||
| 1717 | movl %ebx, %edi | ||
| 1718 | subl %eax, %esi | ||
| 1719 | andl %eax, %edi | ||
| 1720 | andl %ecx, %esi | ||
| 1721 | orl %esi, %edi | ||
| 1722 | movl 52(%esp), %esi | ||
| 1723 | roll $10, %ebx | ||
| 1724 | leal 2053994217(%ebp,%edi,1),%ebp | ||
| 1725 | movl $-1, %edi | ||
| 1726 | roll $6, %ebp | ||
| 1727 | addl %edx, %ebp | ||
| 1728 | /* 137 */ | ||
| 1729 | addl %esi, %edx | ||
| 1730 | movl %eax, %esi | ||
| 1731 | subl %ebp, %edi | ||
| 1732 | andl %ebp, %esi | ||
| 1733 | andl %ebx, %edi | ||
| 1734 | orl %edi, %esi | ||
| 1735 | movl 12(%esp), %edi | ||
| 1736 | roll $10, %eax | ||
| 1737 | leal 2053994217(%edx,%esi,1),%edx | ||
| 1738 | movl $-1, %esi | ||
| 1739 | roll $9, %edx | ||
| 1740 | addl %ecx, %edx | ||
| 1741 | /* 138 */ | ||
| 1742 | addl %edi, %ecx | ||
| 1743 | movl %ebp, %edi | ||
| 1744 | subl %edx, %esi | ||
| 1745 | andl %edx, %edi | ||
| 1746 | andl %eax, %esi | ||
| 1747 | orl %esi, %edi | ||
| 1748 | movl 56(%esp), %esi | ||
| 1749 | roll $10, %ebp | ||
| 1750 | leal 2053994217(%ecx,%edi,1),%ecx | ||
| 1751 | movl $-1, %edi | ||
| 1752 | roll $12, %ecx | ||
| 1753 | addl %ebx, %ecx | ||
| 1754 | /* 139 */ | ||
| 1755 | addl %esi, %ebx | ||
| 1756 | movl %edx, %esi | ||
| 1757 | subl %ecx, %edi | ||
| 1758 | andl %ecx, %esi | ||
| 1759 | andl %ebp, %edi | ||
| 1760 | orl %edi, %esi | ||
| 1761 | movl 40(%esp), %edi | ||
| 1762 | roll $10, %edx | ||
| 1763 | leal 2053994217(%ebx,%esi,1),%ebx | ||
| 1764 | movl $-1, %esi | ||
| 1765 | roll $9, %ebx | ||
| 1766 | addl %eax, %ebx | ||
| 1767 | /* 140 */ | ||
| 1768 | addl %edi, %eax | ||
| 1769 | movl %ecx, %edi | ||
| 1770 | subl %ebx, %esi | ||
| 1771 | andl %ebx, %edi | ||
| 1772 | andl %edx, %esi | ||
| 1773 | orl %esi, %edi | ||
| 1774 | movl 32(%esp), %esi | ||
| 1775 | roll $10, %ecx | ||
| 1776 | leal 2053994217(%eax,%edi,1),%eax | ||
| 1777 | movl $-1, %edi | ||
| 1778 | roll $12, %eax | ||
| 1779 | addl %ebp, %eax | ||
| 1780 | /* 141 */ | ||
| 1781 | addl %esi, %ebp | ||
| 1782 | movl %ebx, %esi | ||
| 1783 | subl %eax, %edi | ||
| 1784 | andl %eax, %esi | ||
| 1785 | andl %ecx, %edi | ||
| 1786 | orl %edi, %esi | ||
| 1787 | movl 44(%esp), %edi | ||
| 1788 | roll $10, %ebx | ||
| 1789 | leal 2053994217(%ebp,%esi,1),%ebp | ||
| 1790 | movl $-1, %esi | ||
| 1791 | roll $5, %ebp | ||
| 1792 | addl %edx, %ebp | ||
| 1793 | /* 142 */ | ||
| 1794 | addl %edi, %edx | ||
| 1795 | movl %eax, %edi | ||
| 1796 | subl %ebp, %esi | ||
| 1797 | andl %ebp, %edi | ||
| 1798 | andl %ebx, %esi | ||
| 1799 | orl %esi, %edi | ||
| 1800 | movl 60(%esp), %esi | ||
| 1801 | roll $10, %eax | ||
| 1802 | leal 2053994217(%edx,%edi,1),%edx | ||
| 1803 | movl $-1, %edi | ||
| 1804 | roll $15, %edx | ||
| 1805 | addl %ecx, %edx | ||
| 1806 | /* 143 */ | ||
| 1807 | addl %esi, %ecx | ||
| 1808 | movl %ebp, %esi | ||
| 1809 | subl %edx, %edi | ||
| 1810 | andl %edx, %esi | ||
| 1811 | andl %eax, %edi | ||
| 1812 | orl %esi, %edi | ||
| 1813 | movl %edx, %esi | ||
| 1814 | roll $10, %ebp | ||
| 1815 | leal 2053994217(%ecx,%edi,1),%ecx | ||
| 1816 | xorl %ebp, %esi | ||
| 1817 | roll $8, %ecx | ||
| 1818 | addl %ebx, %ecx | ||
| 1819 | /* 144 */ | ||
| 1820 | movl 52(%esp), %edi | ||
| 1821 | xorl %ecx, %esi | ||
| 1822 | addl %edi, %ebx | ||
| 1823 | roll $10, %edx | ||
| 1824 | addl %esi, %ebx | ||
| 1825 | movl %ecx, %esi | ||
| 1826 | roll $8, %ebx | ||
| 1827 | addl %eax, %ebx | ||
| 1828 | /* 145 */ | ||
| 1829 | xorl %edx, %esi | ||
| 1830 | movl 64(%esp), %edi | ||
| 1831 | xorl %ebx, %esi | ||
| 1832 | addl %esi, %eax | ||
| 1833 | movl %ebx, %esi | ||
| 1834 | roll $10, %ecx | ||
| 1835 | addl %edi, %eax | ||
| 1836 | xorl %ecx, %esi | ||
| 1837 | roll $5, %eax | ||
| 1838 | addl %ebp, %eax | ||
| 1839 | /* 146 */ | ||
| 1840 | movl 44(%esp), %edi | ||
| 1841 | xorl %eax, %esi | ||
| 1842 | addl %edi, %ebp | ||
| 1843 | roll $10, %ebx | ||
| 1844 | addl %esi, %ebp | ||
| 1845 | movl %eax, %esi | ||
| 1846 | roll $12, %ebp | ||
| 1847 | addl %edx, %ebp | ||
| 1848 | /* 147 */ | ||
| 1849 | xorl %ebx, %esi | ||
| 1850 | movl 20(%esp), %edi | ||
| 1851 | xorl %ebp, %esi | ||
| 1852 | addl %esi, %edx | ||
| 1853 | movl %ebp, %esi | ||
| 1854 | roll $10, %eax | ||
| 1855 | addl %edi, %edx | ||
| 1856 | xorl %eax, %esi | ||
| 1857 | roll $9, %edx | ||
| 1858 | addl %ecx, %edx | ||
| 1859 | /* 148 */ | ||
| 1860 | movl 8(%esp), %edi | ||
| 1861 | xorl %edx, %esi | ||
| 1862 | addl %edi, %ecx | ||
| 1863 | roll $10, %ebp | ||
| 1864 | addl %esi, %ecx | ||
| 1865 | movl %edx, %esi | ||
| 1866 | roll $12, %ecx | ||
| 1867 | addl %ebx, %ecx | ||
| 1868 | /* 149 */ | ||
| 1869 | xorl %ebp, %esi | ||
| 1870 | movl 24(%esp), %edi | ||
| 1871 | xorl %ecx, %esi | ||
| 1872 | addl %esi, %ebx | ||
| 1873 | movl %ecx, %esi | ||
| 1874 | roll $10, %edx | ||
| 1875 | addl %edi, %ebx | ||
| 1876 | xorl %edx, %esi | ||
| 1877 | roll $5, %ebx | ||
| 1878 | addl %eax, %ebx | ||
| 1879 | /* 150 */ | ||
| 1880 | movl 36(%esp), %edi | ||
| 1881 | xorl %ebx, %esi | ||
| 1882 | addl %edi, %eax | ||
| 1883 | roll $10, %ecx | ||
| 1884 | addl %esi, %eax | ||
| 1885 | movl %ebx, %esi | ||
| 1886 | roll $14, %eax | ||
| 1887 | addl %ebp, %eax | ||
| 1888 | /* 151 */ | ||
| 1889 | xorl %ecx, %esi | ||
| 1890 | movl 32(%esp), %edi | ||
| 1891 | xorl %eax, %esi | ||
| 1892 | addl %esi, %ebp | ||
| 1893 | movl %eax, %esi | ||
| 1894 | roll $10, %ebx | ||
| 1895 | addl %edi, %ebp | ||
| 1896 | xorl %ebx, %esi | ||
| 1897 | roll $6, %ebp | ||
| 1898 | addl %edx, %ebp | ||
| 1899 | /* 152 */ | ||
| 1900 | movl 28(%esp), %edi | ||
| 1901 | xorl %ebp, %esi | ||
| 1902 | addl %edi, %edx | ||
| 1903 | roll $10, %eax | ||
| 1904 | addl %esi, %edx | ||
| 1905 | movl %ebp, %esi | ||
| 1906 | roll $8, %edx | ||
| 1907 | addl %ecx, %edx | ||
| 1908 | /* 153 */ | ||
| 1909 | xorl %eax, %esi | ||
| 1910 | movl 12(%esp), %edi | ||
| 1911 | xorl %edx, %esi | ||
| 1912 | addl %esi, %ecx | ||
| 1913 | movl %edx, %esi | ||
| 1914 | roll $10, %ebp | ||
| 1915 | addl %edi, %ecx | ||
| 1916 | xorl %ebp, %esi | ||
| 1917 | roll $13, %ecx | ||
| 1918 | addl %ebx, %ecx | ||
| 1919 | /* 154 */ | ||
| 1920 | movl 56(%esp), %edi | ||
| 1921 | xorl %ecx, %esi | ||
| 1922 | addl %edi, %ebx | ||
| 1923 | roll $10, %edx | ||
| 1924 | addl %esi, %ebx | ||
| 1925 | movl %ecx, %esi | ||
| 1926 | roll $6, %ebx | ||
| 1927 | addl %eax, %ebx | ||
| 1928 | /* 155 */ | ||
| 1929 | xorl %edx, %esi | ||
| 1930 | movl 60(%esp), %edi | ||
| 1931 | xorl %ebx, %esi | ||
| 1932 | addl %esi, %eax | ||
| 1933 | movl %ebx, %esi | ||
| 1934 | roll $10, %ecx | ||
| 1935 | addl %edi, %eax | ||
| 1936 | xorl %ecx, %esi | ||
| 1937 | roll $5, %eax | ||
| 1938 | addl %ebp, %eax | ||
| 1939 | /* 156 */ | ||
| 1940 | movl 4(%esp), %edi | ||
| 1941 | xorl %eax, %esi | ||
| 1942 | addl %edi, %ebp | ||
| 1943 | roll $10, %ebx | ||
| 1944 | addl %esi, %ebp | ||
| 1945 | movl %eax, %esi | ||
| 1946 | roll $15, %ebp | ||
| 1947 | addl %edx, %ebp | ||
| 1948 | /* 157 */ | ||
| 1949 | xorl %ebx, %esi | ||
| 1950 | movl 16(%esp), %edi | ||
| 1951 | xorl %ebp, %esi | ||
| 1952 | addl %esi, %edx | ||
| 1953 | movl %ebp, %esi | ||
| 1954 | roll $10, %eax | ||
| 1955 | addl %edi, %edx | ||
| 1956 | xorl %eax, %esi | ||
| 1957 | roll $13, %edx | ||
| 1958 | addl %ecx, %edx | ||
| 1959 | /* 158 */ | ||
| 1960 | movl 40(%esp), %edi | ||
| 1961 | xorl %edx, %esi | ||
| 1962 | addl %edi, %ecx | ||
| 1963 | roll $10, %ebp | ||
| 1964 | addl %esi, %ecx | ||
| 1965 | movl %edx, %esi | ||
| 1966 | roll $11, %ecx | ||
| 1967 | addl %ebx, %ecx | ||
| 1968 | /* 159 */ | ||
| 1969 | xorl %ebp, %esi | ||
| 1970 | movl 48(%esp), %edi | ||
| 1971 | xorl %ecx, %esi | ||
| 1972 | addl %esi, %ebx | ||
| 1973 | roll $10, %edx | ||
| 1974 | addl %edi, %ebx | ||
| 1975 | movl 108(%esp), %edi | ||
| 1976 | roll $11, %ebx | ||
| 1977 | addl %eax, %ebx | ||
| 1978 | movl 4(%edi), %esi | ||
| 1979 | addl %esi, %edx | ||
| 1980 | movl 76(%esp), %esi | ||
| 1981 | addl %esi, %edx | ||
| 1982 | movl 8(%edi), %esi | ||
| 1983 | addl %esi, %ebp | ||
| 1984 | movl 80(%esp), %esi | ||
| 1985 | addl %esi, %ebp | ||
| 1986 | movl 12(%edi), %esi | ||
| 1987 | addl %esi, %eax | ||
| 1988 | movl 84(%esp), %esi | ||
| 1989 | addl %esi, %eax | ||
| 1990 | movl 16(%edi), %esi | ||
| 1991 | addl %esi, %ebx | ||
| 1992 | movl 68(%esp), %esi | ||
| 1993 | addl %esi, %ebx | ||
| 1994 | movl (%edi), %esi | ||
| 1995 | addl %esi, %ecx | ||
| 1996 | movl 72(%esp), %esi | ||
| 1997 | addl %esi, %ecx | ||
| 1998 | movl %edx, (%edi) | ||
| 1999 | movl %ebp, 4(%edi) | ||
| 2000 | movl %eax, 8(%edi) | ||
| 2001 | movl %ebx, 12(%edi) | ||
| 2002 | movl %ecx, 16(%edi) | ||
| 2003 | movl (%esp), %edi | ||
| 2004 | movl 112(%esp), %esi | ||
| 2005 | cmpl %esi, %edi | ||
| 2006 | movl 108(%esp), %edi | ||
| 2007 | jge .L000start | ||
| 2008 | addl $88, %esp | ||
| 2009 | popl %ebx | ||
| 2010 | popl %ebp | ||
| 2011 | popl %edi | ||
| 2012 | popl %esi | ||
| 2013 | ret | ||
| 2014 | .ripemd160_block_x86_end: | ||
| 2015 | SIZE(ripemd160_block_x86,.ripemd160_block_x86_end-ripemd160_block_x86) | ||
| 2016 | .ident "desasm.pl" | ||
diff --git a/src/lib/libssl/src/crypto/rsa/Makefile.ssl b/src/lib/libssl/src/crypto/rsa/Makefile.ssl new file mode 100644 index 0000000000..d52f2e609e --- /dev/null +++ b/src/lib/libssl/src/crypto/rsa/Makefile.ssl | |||
| @@ -0,0 +1,86 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/rsa/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= rsa | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=rsa | ||
| 19 | ERRC=rsa_err | ||
| 20 | GENERAL=Makefile | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= rsa_eay.c rsa_gen.c rsa_lib.c rsa_sign.c rsa_saos.c $(ERRC).c \ | ||
| 26 | rsa_pk1.c rsa_ssl.c rsa_none.c | ||
| 27 | LIBOBJ= rsa_eay.o rsa_gen.o rsa_lib.o rsa_sign.o rsa_saos.o $(ERRC).o \ | ||
| 28 | rsa_pk1.o rsa_ssl.o rsa_none.o | ||
| 29 | |||
| 30 | SRC= $(LIBSRC) | ||
| 31 | |||
| 32 | EXHEADER= rsa.h | ||
| 33 | HEADER= $(EXHEADER) | ||
| 34 | |||
| 35 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 36 | |||
| 37 | top: | ||
| 38 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 39 | |||
| 40 | all: lib | ||
| 41 | |||
| 42 | lib: $(LIBOBJ) | ||
| 43 | $(AR) $(LIB) $(LIBOBJ) | ||
| 44 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 45 | @touch lib | ||
| 46 | |||
| 47 | files: | ||
| 48 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 49 | |||
| 50 | links: | ||
| 51 | /bin/rm -f Makefile | ||
| 52 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 53 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 54 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 55 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 56 | |||
| 57 | install: | ||
| 58 | @for i in $(EXHEADER) ; \ | ||
| 59 | do \ | ||
| 60 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 61 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 62 | done; | ||
| 63 | |||
| 64 | tags: | ||
| 65 | ctags $(SRC) | ||
| 66 | |||
| 67 | tests: | ||
| 68 | |||
| 69 | lint: | ||
| 70 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 71 | |||
| 72 | depend: | ||
| 73 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 74 | |||
| 75 | dclean: | ||
| 76 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 77 | mv -f Makefile.new $(MAKEFILE) | ||
| 78 | |||
| 79 | clean: | ||
| 80 | /bin/rm -f *.o */*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 81 | |||
| 82 | errors: | ||
| 83 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 84 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 85 | |||
| 86 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/rsa/rsa.err b/src/lib/libssl/src/crypto/rsa/rsa.err new file mode 100644 index 0000000000..5ded1b5fa2 --- /dev/null +++ b/src/lib/libssl/src/crypto/rsa/rsa.err | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | /* Error codes for the RSA functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define RSA_F_RSA_EAY_PRIVATE_DECRYPT 100 | ||
| 5 | #define RSA_F_RSA_EAY_PRIVATE_ENCRYPT 101 | ||
| 6 | #define RSA_F_RSA_EAY_PUBLIC_DECRYPT 102 | ||
| 7 | #define RSA_F_RSA_EAY_PUBLIC_ENCRYPT 103 | ||
| 8 | #define RSA_F_RSA_GENERATE_KEY 104 | ||
| 9 | #define RSA_F_RSA_NEW_METHOD 105 | ||
| 10 | #define RSA_F_RSA_PADDING_ADD_NONE 106 | ||
| 11 | #define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_1 107 | ||
| 12 | #define RSA_F_RSA_PADDING_ADD_PKCS1_TYPE_2 108 | ||
| 13 | #define RSA_F_RSA_PADDING_ADD_SSLV23 109 | ||
| 14 | #define RSA_F_RSA_PADDING_CHECK_NONE 110 | ||
| 15 | #define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_1 111 | ||
| 16 | #define RSA_F_RSA_PADDING_CHECK_PKCS1_TYPE_2 112 | ||
| 17 | #define RSA_F_RSA_PADDING_CHECK_SSLV23 113 | ||
| 18 | #define RSA_F_RSA_PRINT 114 | ||
| 19 | #define RSA_F_RSA_PRINT_FP 115 | ||
| 20 | #define RSA_F_RSA_SIGN 116 | ||
| 21 | #define RSA_F_RSA_SIGN_ASN1_OCTET_STRING 117 | ||
| 22 | #define RSA_F_RSA_VERIFY 118 | ||
| 23 | #define RSA_F_RSA_VERIFY_ASN1_OCTET_STRING 119 | ||
| 24 | |||
| 25 | /* Reason codes. */ | ||
| 26 | #define RSA_R_ALGORITHM_MISMATCH 100 | ||
| 27 | #define RSA_R_BAD_E_VALUE 101 | ||
| 28 | #define RSA_R_BAD_FIXED_HEADER_DECRYPT 102 | ||
| 29 | #define RSA_R_BAD_PAD_BYTE_COUNT 103 | ||
| 30 | #define RSA_R_BAD_SIGNATURE 104 | ||
| 31 | #define RSA_R_BAD_ZERO_BYTE 105 | ||
| 32 | #define RSA_R_BLOCK_TYPE_IS_NOT_01 106 | ||
| 33 | #define RSA_R_BLOCK_TYPE_IS_NOT_02 107 | ||
| 34 | #define RSA_R_DATA_GREATER_THAN_MOD_LEN 108 | ||
| 35 | #define RSA_R_DATA_TOO_LARGE 109 | ||
| 36 | #define RSA_R_DATA_TOO_LARGE_FOR_KEY_SIZE 110 | ||
| 37 | #define RSA_R_DATA_TOO_SMALL 111 | ||
| 38 | #define RSA_R_DIGEST_TOO_BIG_FOR_RSA_KEY 112 | ||
| 39 | #define RSA_R_NULL_BEFORE_BLOCK_MISSING 113 | ||
| 40 | #define RSA_R_PADDING_CHECK_FAILED 114 | ||
| 41 | #define RSA_R_SSLV3_ROLLBACK_ATTACK 115 | ||
| 42 | #define RSA_R_THE_ASN1_OBJECT_IDENTIFIER_IS_NOT_KNOWN_FOR_THIS_MD 116 | ||
| 43 | #define RSA_R_UNKNOWN_ALGORITHM_TYPE 117 | ||
| 44 | #define RSA_R_UNKNOWN_PADDING_TYPE 118 | ||
| 45 | #define RSA_R_WRONG_SIGNATURE_LENGTH 119 | ||
diff --git a/src/lib/libssl/src/crypto/sha/Makefile.ssl b/src/lib/libssl/src/crypto/sha/Makefile.ssl new file mode 100644 index 0000000000..eeb545d140 --- /dev/null +++ b/src/lib/libssl/src/crypto/sha/Makefile.ssl | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/sha/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= sha | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | SHA1_ASM_OBJ= | ||
| 17 | |||
| 18 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 19 | |||
| 20 | GENERAL=Makefile | ||
| 21 | TEST=shatest.c sha1test.c | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c | ||
| 26 | LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA1_ASM_OBJ) | ||
| 27 | |||
| 28 | SRC= $(LIBSRC) | ||
| 29 | |||
| 30 | EXHEADER= sha.h | ||
| 31 | HEADER= sha_locl.h $(EXHEADER) | ||
| 32 | |||
| 33 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 34 | |||
| 35 | top: | ||
| 36 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 37 | |||
| 38 | all: lib | ||
| 39 | |||
| 40 | lib: $(LIBOBJ) | ||
| 41 | $(AR) $(LIB) $(LIBOBJ) | ||
| 42 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 43 | @touch lib | ||
| 44 | |||
| 45 | # elf | ||
| 46 | asm/sx86-elf.o: asm/sx86unix.cpp | ||
| 47 | $(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o | ||
| 48 | |||
| 49 | # solaris | ||
| 50 | asm/sx86-sol.o: asm/sx86unix.cpp | ||
| 51 | $(CC) -E -DSOL asm/sx86unix.cpp | sed 's/^#.*//' > asm/sx86-sol.s | ||
| 52 | as -o asm/sx86-sol.o asm/sx86-sol.s | ||
| 53 | rm -f asm/sx86-sol.s | ||
| 54 | |||
| 55 | # a.out | ||
| 56 | asm/sx86-out.o: asm/sx86unix.cpp | ||
| 57 | $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o | ||
| 58 | |||
| 59 | # bsdi | ||
| 60 | asm/sx86bsdi.o: asm/sx86unix.cpp | ||
| 61 | $(CPP) -DBSDI asm/sx86unix.cpp | as -o asm/sx86bsdi.o | ||
| 62 | |||
| 63 | asm/sx86unix.cpp: | ||
| 64 | (cd asm; perl sha1-586.pl cpp >sx86unix.cpp) | ||
| 65 | |||
| 66 | files: | ||
| 67 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 68 | |||
| 69 | links: | ||
| 70 | /bin/rm -f Makefile | ||
| 71 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 72 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 73 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 74 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 75 | |||
| 76 | install: | ||
| 77 | @for i in $(EXHEADER) ; \ | ||
| 78 | do \ | ||
| 79 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 80 | chmod 644 $(INSTALLTOP)/include/$$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) $(INCLUDES) $(PROGS) $(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 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff asm/*.o | ||
| 100 | |||
| 101 | errors: | ||
| 102 | |||
| 103 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/sha/Makefile.uni b/src/lib/libssl/src/crypto/sha/Makefile.uni new file mode 100644 index 0000000000..f3236755b2 --- /dev/null +++ b/src/lib/libssl/src/crypto/sha/Makefile.uni | |||
| @@ -0,0 +1,122 @@ | |||
| 1 | # Targets | ||
| 2 | # make - twidle the options yourself :-) | ||
| 3 | # make cc - standard cc options | ||
| 4 | # make gcc - standard gcc options | ||
| 5 | # make x86-elf - linux-elf etc | ||
| 6 | # make x86-out - linux-a.out, FreeBSD etc | ||
| 7 | # make x86-solaris | ||
| 8 | # make x86-bdsi | ||
| 9 | |||
| 10 | DIR= sha | ||
| 11 | TOP= . | ||
| 12 | CC= gcc | ||
| 13 | CFLAG= -O3 -fomit-frame-pointer | ||
| 14 | |||
| 15 | CPP= $(CC) -E | ||
| 16 | INCLUDES= | ||
| 17 | INSTALLTOP=/usr/local/lib | ||
| 18 | MAKE= make | ||
| 19 | MAKEDEPEND= makedepend | ||
| 20 | MAKEFILE= Makefile.uni | ||
| 21 | AR= ar r | ||
| 22 | |||
| 23 | SHA_ASM_OBJ= | ||
| 24 | |||
| 25 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 26 | |||
| 27 | GENERAL=Makefile | ||
| 28 | |||
| 29 | TEST1=shatest | ||
| 30 | TEST2=sha1test | ||
| 31 | APP1=sha | ||
| 32 | APP2=sha1 | ||
| 33 | |||
| 34 | TEST=$(TEST1) $(TEST2) | ||
| 35 | APPS=$(APP1) $(APP2) | ||
| 36 | |||
| 37 | LIB=libsha.a | ||
| 38 | LIBSRC=sha_dgst.c sha1dgst.c sha_one.c sha1_one.c | ||
| 39 | LIBOBJ=sha_dgst.o sha1dgst.o sha_one.o sha1_one.o $(SHA_ASM_OBJ) | ||
| 40 | |||
| 41 | SRC= $(LIBSRC) | ||
| 42 | |||
| 43 | EXHEADER= sha.h | ||
| 44 | HEADER= sha_locl.h $(EXHEADER) | ||
| 45 | |||
| 46 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 47 | |||
| 48 | all: $(LIB) $(TEST) $(APPS) | ||
| 49 | |||
| 50 | $(LIB): $(LIBOBJ) | ||
| 51 | $(AR) $(LIB) $(LIBOBJ) | ||
| 52 | sh $(TOP)/ranlib.sh $(LIB) | ||
| 53 | |||
| 54 | # elf | ||
| 55 | asm/sx86-elf.o: asm/sx86unix.cpp | ||
| 56 | $(CPP) -DELF asm/sx86unix.cpp | as -o asm/sx86-elf.o | ||
| 57 | |||
| 58 | # solaris | ||
| 59 | asm/sx86-sol.o: asm/sx86unix.cpp | ||
| 60 | $(CC) -E -DSOL asm/sx86unix.cpp | sed 's/^#.*//' > asm/sx86-sol.s | ||
| 61 | as -o asm/sx86-sol.o asm/sx86-sol.s | ||
| 62 | rm -f asm/sx86-sol.s | ||
| 63 | |||
| 64 | # a.out | ||
| 65 | asm/sx86-out.o: asm/sx86unix.cpp | ||
| 66 | $(CPP) -DOUT asm/sx86unix.cpp | as -o asm/sx86-out.o | ||
| 67 | |||
| 68 | # bsdi | ||
| 69 | asm/sx86bsdi.o: asm/sx86unix.cpp | ||
| 70 | $(CPP) -DBSDI asm/sx86unix.cpp | as -o asm/sx86bsdi.o | ||
| 71 | |||
| 72 | asm/sx86unix.cpp: | ||
| 73 | (cd asm; perl sha1-586.pl cpp >sx86unix.cpp) | ||
| 74 | |||
| 75 | test: $(TEST) | ||
| 76 | ./$(TEST1) | ||
| 77 | ./$(TEST2) | ||
| 78 | |||
| 79 | $(TEST1): $(TEST1).c $(LIB) | ||
| 80 | $(CC) -o $(TEST1) $(CFLAGS) $(TEST1).c $(LIB) | ||
| 81 | |||
| 82 | $(TEST2): $(TEST2).c $(LIB) | ||
| 83 | $(CC) -o $(TEST2) $(CFLAGS) $(TEST2).c $(LIB) | ||
| 84 | |||
| 85 | $(APP1): $(APP1).c $(LIB) | ||
| 86 | $(CC) -o $(APP1) $(CFLAGS) $(APP1).c $(LIB) | ||
| 87 | |||
| 88 | $(APP2): $(APP2).c $(LIB) | ||
| 89 | $(CC) -o $(APP2) $(CFLAGS) $(APP2).c $(LIB) | ||
| 90 | |||
| 91 | lint: | ||
| 92 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 93 | |||
| 94 | depend: | ||
| 95 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 96 | |||
| 97 | dclean: | ||
| 98 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 99 | mv -f Makefile.new $(MAKEFILE) | ||
| 100 | |||
| 101 | clean: | ||
| 102 | /bin/rm -f $(LIB) $(TEST) $(APPS) *.o asm/*.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 103 | |||
| 104 | cc: | ||
| 105 | $(MAKE) SHA_ASM_OBJ="" CC="cc" CFLAG="-O" all | ||
| 106 | |||
| 107 | gcc: | ||
| 108 | $(MAKE) SHA_ASM_OBJ="" CC="gcc" CFLAGS="-O3 -fomit-frame-pointer" all | ||
| 109 | |||
| 110 | x86-elf: | ||
| 111 | $(MAKE) SHA_ASM_OBJ="asm/sx86-elf.o" CFLAG="-DELF -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 112 | |||
| 113 | x86-out: | ||
| 114 | $(MAKE) SHA_ASM_OBJ="asm/sx86-out.o" CFLAG="-DOUT -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 115 | |||
| 116 | x86-solaris: | ||
| 117 | $(MAKE) SHA_ASM_OBJ="asm/sx86-sol.o" CFLAG="-DSOL -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 118 | |||
| 119 | x86-bdsi: | ||
| 120 | $(MAKE) SHA_ASM_OBJ="asm/sx86-bdsi.o" CFLAG="-DBDSI -DSHA1_ASM -DL_ENDIAN $(CFLAGS)" all | ||
| 121 | |||
| 122 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/sha/asm/s1-win32.asm b/src/lib/libssl/src/crypto/sha/asm/s1-win32.asm new file mode 100644 index 0000000000..61335666b9 --- /dev/null +++ b/src/lib/libssl/src/crypto/sha/asm/s1-win32.asm | |||
| @@ -0,0 +1,1664 @@ | |||
| 1 | ; Don't even think of reading this code | ||
| 2 | ; It was automatically generated by sha1-586.pl | ||
| 3 | ; Which is a perl program used to generate the x86 assember for | ||
| 4 | ; any of elf, a.out, BSDI,Win32, or Solaris | ||
| 5 | ; eric <eay@cryptsoft.com> | ||
| 6 | ; | ||
| 7 | TITLE sha1-586.asm | ||
| 8 | .486 | ||
| 9 | .model FLAT | ||
| 10 | _TEXT SEGMENT | ||
| 11 | PUBLIC _sha1_block_x86 | ||
| 12 | |||
| 13 | _sha1_block_x86 PROC NEAR | ||
| 14 | push esi | ||
| 15 | push ebp | ||
| 16 | mov eax, DWORD PTR 20[esp] | ||
| 17 | mov esi, DWORD PTR 16[esp] | ||
| 18 | add eax, esi | ||
| 19 | mov ebp, DWORD PTR 12[esp] | ||
| 20 | push ebx | ||
| 21 | sub eax, 64 | ||
| 22 | push edi | ||
| 23 | mov ebx, DWORD PTR 4[ebp] | ||
| 24 | sub esp, 72 | ||
| 25 | mov edx, DWORD PTR 12[ebp] | ||
| 26 | mov edi, DWORD PTR 16[ebp] | ||
| 27 | mov ecx, DWORD PTR 8[ebp] | ||
| 28 | mov DWORD PTR 68[esp],eax | ||
| 29 | ; First we need to setup the X array | ||
| 30 | mov eax, DWORD PTR [esi] | ||
| 31 | L000start: | ||
| 32 | ; First, load the words onto the stack in network byte order | ||
| 33 | bswap eax | ||
| 34 | mov DWORD PTR [esp],eax | ||
| 35 | mov eax, DWORD PTR 4[esi] | ||
| 36 | bswap eax | ||
| 37 | mov DWORD PTR 4[esp],eax | ||
| 38 | mov eax, DWORD PTR 8[esi] | ||
| 39 | bswap eax | ||
| 40 | mov DWORD PTR 8[esp],eax | ||
| 41 | mov eax, DWORD PTR 12[esi] | ||
| 42 | bswap eax | ||
| 43 | mov DWORD PTR 12[esp],eax | ||
| 44 | mov eax, DWORD PTR 16[esi] | ||
| 45 | bswap eax | ||
| 46 | mov DWORD PTR 16[esp],eax | ||
| 47 | mov eax, DWORD PTR 20[esi] | ||
| 48 | bswap eax | ||
| 49 | mov DWORD PTR 20[esp],eax | ||
| 50 | mov eax, DWORD PTR 24[esi] | ||
| 51 | bswap eax | ||
| 52 | mov DWORD PTR 24[esp],eax | ||
| 53 | mov eax, DWORD PTR 28[esi] | ||
| 54 | bswap eax | ||
| 55 | mov DWORD PTR 28[esp],eax | ||
| 56 | mov eax, DWORD PTR 32[esi] | ||
| 57 | bswap eax | ||
| 58 | mov DWORD PTR 32[esp],eax | ||
| 59 | mov eax, DWORD PTR 36[esi] | ||
| 60 | bswap eax | ||
| 61 | mov DWORD PTR 36[esp],eax | ||
| 62 | mov eax, DWORD PTR 40[esi] | ||
| 63 | bswap eax | ||
| 64 | mov DWORD PTR 40[esp],eax | ||
| 65 | mov eax, DWORD PTR 44[esi] | ||
| 66 | bswap eax | ||
| 67 | mov DWORD PTR 44[esp],eax | ||
| 68 | mov eax, DWORD PTR 48[esi] | ||
| 69 | bswap eax | ||
| 70 | mov DWORD PTR 48[esp],eax | ||
| 71 | mov eax, DWORD PTR 52[esi] | ||
| 72 | bswap eax | ||
| 73 | mov DWORD PTR 52[esp],eax | ||
| 74 | mov eax, DWORD PTR 56[esi] | ||
| 75 | bswap eax | ||
| 76 | mov DWORD PTR 56[esp],eax | ||
| 77 | mov eax, DWORD PTR 60[esi] | ||
| 78 | bswap eax | ||
| 79 | mov DWORD PTR 60[esp],eax | ||
| 80 | ; We now have the X array on the stack | ||
| 81 | ; starting at sp-4 | ||
| 82 | mov DWORD PTR 64[esp],esi | ||
| 83 | ; | ||
| 84 | ; Start processing | ||
| 85 | mov eax, DWORD PTR [ebp] | ||
| 86 | ; 00_15 0 | ||
| 87 | mov esi, ecx | ||
| 88 | mov ebp, eax | ||
| 89 | xor esi, edx | ||
| 90 | rol ebp, 5 | ||
| 91 | and esi, ebx | ||
| 92 | add ebp, edi | ||
| 93 | ror ebx, 1 | ||
| 94 | mov edi, DWORD PTR [esp] | ||
| 95 | ror ebx, 1 | ||
| 96 | xor esi, edx | ||
| 97 | lea ebp, DWORD PTR 1518500249[edi*1+ebp] | ||
| 98 | mov edi, ebx | ||
| 99 | add esi, ebp | ||
| 100 | xor edi, ecx | ||
| 101 | mov ebp, esi | ||
| 102 | and edi, eax | ||
| 103 | rol ebp, 5 | ||
| 104 | add ebp, edx | ||
| 105 | mov edx, DWORD PTR 4[esp] | ||
| 106 | ror eax, 1 | ||
| 107 | xor edi, ecx | ||
| 108 | ror eax, 1 | ||
| 109 | lea ebp, DWORD PTR 1518500249[edx*1+ebp] | ||
| 110 | add edi, ebp | ||
| 111 | ; 00_15 2 | ||
| 112 | mov edx, eax | ||
| 113 | mov ebp, edi | ||
| 114 | xor edx, ebx | ||
| 115 | rol ebp, 5 | ||
| 116 | and edx, esi | ||
| 117 | add ebp, ecx | ||
| 118 | ror esi, 1 | ||
| 119 | mov ecx, DWORD PTR 8[esp] | ||
| 120 | ror esi, 1 | ||
| 121 | xor edx, ebx | ||
| 122 | lea ebp, DWORD PTR 1518500249[ecx*1+ebp] | ||
| 123 | mov ecx, esi | ||
| 124 | add edx, ebp | ||
| 125 | xor ecx, eax | ||
| 126 | mov ebp, edx | ||
| 127 | and ecx, edi | ||
| 128 | rol ebp, 5 | ||
| 129 | add ebp, ebx | ||
| 130 | mov ebx, DWORD PTR 12[esp] | ||
| 131 | ror edi, 1 | ||
| 132 | xor ecx, eax | ||
| 133 | ror edi, 1 | ||
| 134 | lea ebp, DWORD PTR 1518500249[ebx*1+ebp] | ||
| 135 | add ecx, ebp | ||
| 136 | ; 00_15 4 | ||
| 137 | mov ebx, edi | ||
| 138 | mov ebp, ecx | ||
| 139 | xor ebx, esi | ||
| 140 | rol ebp, 5 | ||
| 141 | and ebx, edx | ||
| 142 | add ebp, eax | ||
| 143 | ror edx, 1 | ||
| 144 | mov eax, DWORD PTR 16[esp] | ||
| 145 | ror edx, 1 | ||
| 146 | xor ebx, esi | ||
| 147 | lea ebp, DWORD PTR 1518500249[eax*1+ebp] | ||
| 148 | mov eax, edx | ||
| 149 | add ebx, ebp | ||
| 150 | xor eax, edi | ||
| 151 | mov ebp, ebx | ||
| 152 | and eax, ecx | ||
| 153 | rol ebp, 5 | ||
| 154 | add ebp, esi | ||
| 155 | mov esi, DWORD PTR 20[esp] | ||
| 156 | ror ecx, 1 | ||
| 157 | xor eax, edi | ||
| 158 | ror ecx, 1 | ||
| 159 | lea ebp, DWORD PTR 1518500249[esi*1+ebp] | ||
| 160 | add eax, ebp | ||
| 161 | ; 00_15 6 | ||
| 162 | mov esi, ecx | ||
| 163 | mov ebp, eax | ||
| 164 | xor esi, edx | ||
| 165 | rol ebp, 5 | ||
| 166 | and esi, ebx | ||
| 167 | add ebp, edi | ||
| 168 | ror ebx, 1 | ||
| 169 | mov edi, DWORD PTR 24[esp] | ||
| 170 | ror ebx, 1 | ||
| 171 | xor esi, edx | ||
| 172 | lea ebp, DWORD PTR 1518500249[edi*1+ebp] | ||
| 173 | mov edi, ebx | ||
| 174 | add esi, ebp | ||
| 175 | xor edi, ecx | ||
| 176 | mov ebp, esi | ||
| 177 | and edi, eax | ||
| 178 | rol ebp, 5 | ||
| 179 | add ebp, edx | ||
| 180 | mov edx, DWORD PTR 28[esp] | ||
| 181 | ror eax, 1 | ||
| 182 | xor edi, ecx | ||
| 183 | ror eax, 1 | ||
| 184 | lea ebp, DWORD PTR 1518500249[edx*1+ebp] | ||
| 185 | add edi, ebp | ||
| 186 | ; 00_15 8 | ||
| 187 | mov edx, eax | ||
| 188 | mov ebp, edi | ||
| 189 | xor edx, ebx | ||
| 190 | rol ebp, 5 | ||
| 191 | and edx, esi | ||
| 192 | add ebp, ecx | ||
| 193 | ror esi, 1 | ||
| 194 | mov ecx, DWORD PTR 32[esp] | ||
| 195 | ror esi, 1 | ||
| 196 | xor edx, ebx | ||
| 197 | lea ebp, DWORD PTR 1518500249[ecx*1+ebp] | ||
| 198 | mov ecx, esi | ||
| 199 | add edx, ebp | ||
| 200 | xor ecx, eax | ||
| 201 | mov ebp, edx | ||
| 202 | and ecx, edi | ||
| 203 | rol ebp, 5 | ||
| 204 | add ebp, ebx | ||
| 205 | mov ebx, DWORD PTR 36[esp] | ||
| 206 | ror edi, 1 | ||
| 207 | xor ecx, eax | ||
| 208 | ror edi, 1 | ||
| 209 | lea ebp, DWORD PTR 1518500249[ebx*1+ebp] | ||
| 210 | add ecx, ebp | ||
| 211 | ; 00_15 10 | ||
| 212 | mov ebx, edi | ||
| 213 | mov ebp, ecx | ||
| 214 | xor ebx, esi | ||
| 215 | rol ebp, 5 | ||
| 216 | and ebx, edx | ||
| 217 | add ebp, eax | ||
| 218 | ror edx, 1 | ||
| 219 | mov eax, DWORD PTR 40[esp] | ||
| 220 | ror edx, 1 | ||
| 221 | xor ebx, esi | ||
| 222 | lea ebp, DWORD PTR 1518500249[eax*1+ebp] | ||
| 223 | mov eax, edx | ||
| 224 | add ebx, ebp | ||
| 225 | xor eax, edi | ||
| 226 | mov ebp, ebx | ||
| 227 | and eax, ecx | ||
| 228 | rol ebp, 5 | ||
| 229 | add ebp, esi | ||
| 230 | mov esi, DWORD PTR 44[esp] | ||
| 231 | ror ecx, 1 | ||
| 232 | xor eax, edi | ||
| 233 | ror ecx, 1 | ||
| 234 | lea ebp, DWORD PTR 1518500249[esi*1+ebp] | ||
| 235 | add eax, ebp | ||
| 236 | ; 00_15 12 | ||
| 237 | mov esi, ecx | ||
| 238 | mov ebp, eax | ||
| 239 | xor esi, edx | ||
| 240 | rol ebp, 5 | ||
| 241 | and esi, ebx | ||
| 242 | add ebp, edi | ||
| 243 | ror ebx, 1 | ||
| 244 | mov edi, DWORD PTR 48[esp] | ||
| 245 | ror ebx, 1 | ||
| 246 | xor esi, edx | ||
| 247 | lea ebp, DWORD PTR 1518500249[edi*1+ebp] | ||
| 248 | mov edi, ebx | ||
| 249 | add esi, ebp | ||
| 250 | xor edi, ecx | ||
| 251 | mov ebp, esi | ||
| 252 | and edi, eax | ||
| 253 | rol ebp, 5 | ||
| 254 | add ebp, edx | ||
| 255 | mov edx, DWORD PTR 52[esp] | ||
| 256 | ror eax, 1 | ||
| 257 | xor edi, ecx | ||
| 258 | ror eax, 1 | ||
| 259 | lea ebp, DWORD PTR 1518500249[edx*1+ebp] | ||
| 260 | add edi, ebp | ||
| 261 | ; 00_15 14 | ||
| 262 | mov edx, eax | ||
| 263 | mov ebp, edi | ||
| 264 | xor edx, ebx | ||
| 265 | rol ebp, 5 | ||
| 266 | and edx, esi | ||
| 267 | add ebp, ecx | ||
| 268 | ror esi, 1 | ||
| 269 | mov ecx, DWORD PTR 56[esp] | ||
| 270 | ror esi, 1 | ||
| 271 | xor edx, ebx | ||
| 272 | lea ebp, DWORD PTR 1518500249[ecx*1+ebp] | ||
| 273 | mov ecx, esi | ||
| 274 | add edx, ebp | ||
| 275 | xor ecx, eax | ||
| 276 | mov ebp, edx | ||
| 277 | and ecx, edi | ||
| 278 | rol ebp, 5 | ||
| 279 | add ebp, ebx | ||
| 280 | mov ebx, DWORD PTR 60[esp] | ||
| 281 | ror edi, 1 | ||
| 282 | xor ecx, eax | ||
| 283 | ror edi, 1 | ||
| 284 | lea ebp, DWORD PTR 1518500249[ebx*1+ebp] | ||
| 285 | add ecx, ebp | ||
| 286 | ; 16_19 16 | ||
| 287 | nop | ||
| 288 | mov ebp, DWORD PTR [esp] | ||
| 289 | mov ebx, DWORD PTR 8[esp] | ||
| 290 | xor ebx, ebp | ||
| 291 | mov ebp, DWORD PTR 32[esp] | ||
| 292 | xor ebx, ebp | ||
| 293 | mov ebp, DWORD PTR 52[esp] | ||
| 294 | xor ebx, ebp | ||
| 295 | mov ebp, edi | ||
| 296 | rol ebx, 1 | ||
| 297 | xor ebp, esi | ||
| 298 | mov DWORD PTR [esp],ebx | ||
| 299 | and ebp, edx | ||
| 300 | lea ebx, DWORD PTR 1518500249[eax*1+ebx] | ||
| 301 | xor ebp, esi | ||
| 302 | mov eax, ecx | ||
| 303 | add ebx, ebp | ||
| 304 | rol eax, 5 | ||
| 305 | ror edx, 1 | ||
| 306 | add ebx, eax | ||
| 307 | mov eax, DWORD PTR 4[esp] | ||
| 308 | mov ebp, DWORD PTR 12[esp] | ||
| 309 | xor eax, ebp | ||
| 310 | mov ebp, DWORD PTR 36[esp] | ||
| 311 | xor eax, ebp | ||
| 312 | mov ebp, DWORD PTR 56[esp] | ||
| 313 | ror edx, 1 | ||
| 314 | xor eax, ebp | ||
| 315 | rol eax, 1 | ||
| 316 | mov ebp, edx | ||
| 317 | xor ebp, edi | ||
| 318 | mov DWORD PTR 4[esp],eax | ||
| 319 | and ebp, ecx | ||
| 320 | lea eax, DWORD PTR 1518500249[esi*1+eax] | ||
| 321 | xor ebp, edi | ||
| 322 | mov esi, ebx | ||
| 323 | rol esi, 5 | ||
| 324 | ror ecx, 1 | ||
| 325 | add eax, esi | ||
| 326 | ror ecx, 1 | ||
| 327 | add eax, ebp | ||
| 328 | ; 16_19 18 | ||
| 329 | mov ebp, DWORD PTR 8[esp] | ||
| 330 | mov esi, DWORD PTR 16[esp] | ||
| 331 | xor esi, ebp | ||
| 332 | mov ebp, DWORD PTR 40[esp] | ||
| 333 | xor esi, ebp | ||
| 334 | mov ebp, DWORD PTR 60[esp] | ||
| 335 | xor esi, ebp | ||
| 336 | mov ebp, ecx | ||
| 337 | rol esi, 1 | ||
| 338 | xor ebp, edx | ||
| 339 | mov DWORD PTR 8[esp],esi | ||
| 340 | and ebp, ebx | ||
| 341 | lea esi, DWORD PTR 1518500249[edi*1+esi] | ||
| 342 | xor ebp, edx | ||
| 343 | mov edi, eax | ||
| 344 | add esi, ebp | ||
| 345 | rol edi, 5 | ||
| 346 | ror ebx, 1 | ||
| 347 | add esi, edi | ||
| 348 | mov edi, DWORD PTR 12[esp] | ||
| 349 | mov ebp, DWORD PTR 20[esp] | ||
| 350 | xor edi, ebp | ||
| 351 | mov ebp, DWORD PTR 44[esp] | ||
| 352 | xor edi, ebp | ||
| 353 | mov ebp, DWORD PTR [esp] | ||
| 354 | ror ebx, 1 | ||
| 355 | xor edi, ebp | ||
| 356 | rol edi, 1 | ||
| 357 | mov ebp, ebx | ||
| 358 | xor ebp, ecx | ||
| 359 | mov DWORD PTR 12[esp],edi | ||
| 360 | and ebp, eax | ||
| 361 | lea edi, DWORD PTR 1518500249[edx*1+edi] | ||
| 362 | xor ebp, ecx | ||
| 363 | mov edx, esi | ||
| 364 | rol edx, 5 | ||
| 365 | ror eax, 1 | ||
| 366 | add edi, edx | ||
| 367 | ror eax, 1 | ||
| 368 | add edi, ebp | ||
| 369 | ; 20_39 20 | ||
| 370 | mov edx, DWORD PTR 16[esp] | ||
| 371 | mov ebp, DWORD PTR 24[esp] | ||
| 372 | xor edx, ebp | ||
| 373 | mov ebp, DWORD PTR 48[esp] | ||
| 374 | xor edx, ebp | ||
| 375 | mov ebp, DWORD PTR 4[esp] | ||
| 376 | xor edx, ebp | ||
| 377 | mov ebp, esi | ||
| 378 | rol edx, 1 | ||
| 379 | xor ebp, eax | ||
| 380 | mov DWORD PTR 16[esp],edx | ||
| 381 | xor ebp, ebx | ||
| 382 | lea edx, DWORD PTR 1859775393[ecx*1+edx] | ||
| 383 | mov ecx, edi | ||
| 384 | rol ecx, 5 | ||
| 385 | ror esi, 1 | ||
| 386 | add ecx, ebp | ||
| 387 | ror esi, 1 | ||
| 388 | add edx, ecx | ||
| 389 | ; 20_39 21 | ||
| 390 | mov ecx, DWORD PTR 20[esp] | ||
| 391 | mov ebp, DWORD PTR 28[esp] | ||
| 392 | xor ecx, ebp | ||
| 393 | mov ebp, DWORD PTR 52[esp] | ||
| 394 | xor ecx, ebp | ||
| 395 | mov ebp, DWORD PTR 8[esp] | ||
| 396 | xor ecx, ebp | ||
| 397 | mov ebp, edi | ||
| 398 | rol ecx, 1 | ||
| 399 | xor ebp, esi | ||
| 400 | mov DWORD PTR 20[esp],ecx | ||
| 401 | xor ebp, eax | ||
| 402 | lea ecx, DWORD PTR 1859775393[ebx*1+ecx] | ||
| 403 | mov ebx, edx | ||
| 404 | rol ebx, 5 | ||
| 405 | ror edi, 1 | ||
| 406 | add ebx, ebp | ||
| 407 | ror edi, 1 | ||
| 408 | add ecx, ebx | ||
| 409 | ; 20_39 22 | ||
| 410 | mov ebx, DWORD PTR 24[esp] | ||
| 411 | mov ebp, DWORD PTR 32[esp] | ||
| 412 | xor ebx, ebp | ||
| 413 | mov ebp, DWORD PTR 56[esp] | ||
| 414 | xor ebx, ebp | ||
| 415 | mov ebp, DWORD PTR 12[esp] | ||
| 416 | xor ebx, ebp | ||
| 417 | mov ebp, edx | ||
| 418 | rol ebx, 1 | ||
| 419 | xor ebp, edi | ||
| 420 | mov DWORD PTR 24[esp],ebx | ||
| 421 | xor ebp, esi | ||
| 422 | lea ebx, DWORD PTR 1859775393[eax*1+ebx] | ||
| 423 | mov eax, ecx | ||
| 424 | rol eax, 5 | ||
| 425 | ror edx, 1 | ||
| 426 | add eax, ebp | ||
| 427 | ror edx, 1 | ||
| 428 | add ebx, eax | ||
| 429 | ; 20_39 23 | ||
| 430 | mov eax, DWORD PTR 28[esp] | ||
| 431 | mov ebp, DWORD PTR 36[esp] | ||
| 432 | xor eax, ebp | ||
| 433 | mov ebp, DWORD PTR 60[esp] | ||
| 434 | xor eax, ebp | ||
| 435 | mov ebp, DWORD PTR 16[esp] | ||
| 436 | xor eax, ebp | ||
| 437 | mov ebp, ecx | ||
| 438 | rol eax, 1 | ||
| 439 | xor ebp, edx | ||
| 440 | mov DWORD PTR 28[esp],eax | ||
| 441 | xor ebp, edi | ||
| 442 | lea eax, DWORD PTR 1859775393[esi*1+eax] | ||
| 443 | mov esi, ebx | ||
| 444 | rol esi, 5 | ||
| 445 | ror ecx, 1 | ||
| 446 | add esi, ebp | ||
| 447 | ror ecx, 1 | ||
| 448 | add eax, esi | ||
| 449 | ; 20_39 24 | ||
| 450 | mov esi, DWORD PTR 32[esp] | ||
| 451 | mov ebp, DWORD PTR 40[esp] | ||
| 452 | xor esi, ebp | ||
| 453 | mov ebp, DWORD PTR [esp] | ||
| 454 | xor esi, ebp | ||
| 455 | mov ebp, DWORD PTR 20[esp] | ||
| 456 | xor esi, ebp | ||
| 457 | mov ebp, ebx | ||
| 458 | rol esi, 1 | ||
| 459 | xor ebp, ecx | ||
| 460 | mov DWORD PTR 32[esp],esi | ||
| 461 | xor ebp, edx | ||
| 462 | lea esi, DWORD PTR 1859775393[edi*1+esi] | ||
| 463 | mov edi, eax | ||
| 464 | rol edi, 5 | ||
| 465 | ror ebx, 1 | ||
| 466 | add edi, ebp | ||
| 467 | ror ebx, 1 | ||
| 468 | add esi, edi | ||
| 469 | ; 20_39 25 | ||
| 470 | mov edi, DWORD PTR 36[esp] | ||
| 471 | mov ebp, DWORD PTR 44[esp] | ||
| 472 | xor edi, ebp | ||
| 473 | mov ebp, DWORD PTR 4[esp] | ||
| 474 | xor edi, ebp | ||
| 475 | mov ebp, DWORD PTR 24[esp] | ||
| 476 | xor edi, ebp | ||
| 477 | mov ebp, eax | ||
| 478 | rol edi, 1 | ||
| 479 | xor ebp, ebx | ||
| 480 | mov DWORD PTR 36[esp],edi | ||
| 481 | xor ebp, ecx | ||
| 482 | lea edi, DWORD PTR 1859775393[edx*1+edi] | ||
| 483 | mov edx, esi | ||
| 484 | rol edx, 5 | ||
| 485 | ror eax, 1 | ||
| 486 | add edx, ebp | ||
| 487 | ror eax, 1 | ||
| 488 | add edi, edx | ||
| 489 | ; 20_39 26 | ||
| 490 | mov edx, DWORD PTR 40[esp] | ||
| 491 | mov ebp, DWORD PTR 48[esp] | ||
| 492 | xor edx, ebp | ||
| 493 | mov ebp, DWORD PTR 8[esp] | ||
| 494 | xor edx, ebp | ||
| 495 | mov ebp, DWORD PTR 28[esp] | ||
| 496 | xor edx, ebp | ||
| 497 | mov ebp, esi | ||
| 498 | rol edx, 1 | ||
| 499 | xor ebp, eax | ||
| 500 | mov DWORD PTR 40[esp],edx | ||
| 501 | xor ebp, ebx | ||
| 502 | lea edx, DWORD PTR 1859775393[ecx*1+edx] | ||
| 503 | mov ecx, edi | ||
| 504 | rol ecx, 5 | ||
| 505 | ror esi, 1 | ||
| 506 | add ecx, ebp | ||
| 507 | ror esi, 1 | ||
| 508 | add edx, ecx | ||
| 509 | ; 20_39 27 | ||
| 510 | mov ecx, DWORD PTR 44[esp] | ||
| 511 | mov ebp, DWORD PTR 52[esp] | ||
| 512 | xor ecx, ebp | ||
| 513 | mov ebp, DWORD PTR 12[esp] | ||
| 514 | xor ecx, ebp | ||
| 515 | mov ebp, DWORD PTR 32[esp] | ||
| 516 | xor ecx, ebp | ||
| 517 | mov ebp, edi | ||
| 518 | rol ecx, 1 | ||
| 519 | xor ebp, esi | ||
| 520 | mov DWORD PTR 44[esp],ecx | ||
| 521 | xor ebp, eax | ||
| 522 | lea ecx, DWORD PTR 1859775393[ebx*1+ecx] | ||
| 523 | mov ebx, edx | ||
| 524 | rol ebx, 5 | ||
| 525 | ror edi, 1 | ||
| 526 | add ebx, ebp | ||
| 527 | ror edi, 1 | ||
| 528 | add ecx, ebx | ||
| 529 | ; 20_39 28 | ||
| 530 | mov ebx, DWORD PTR 48[esp] | ||
| 531 | mov ebp, DWORD PTR 56[esp] | ||
| 532 | xor ebx, ebp | ||
| 533 | mov ebp, DWORD PTR 16[esp] | ||
| 534 | xor ebx, ebp | ||
| 535 | mov ebp, DWORD PTR 36[esp] | ||
| 536 | xor ebx, ebp | ||
| 537 | mov ebp, edx | ||
| 538 | rol ebx, 1 | ||
| 539 | xor ebp, edi | ||
| 540 | mov DWORD PTR 48[esp],ebx | ||
| 541 | xor ebp, esi | ||
| 542 | lea ebx, DWORD PTR 1859775393[eax*1+ebx] | ||
| 543 | mov eax, ecx | ||
| 544 | rol eax, 5 | ||
| 545 | ror edx, 1 | ||
| 546 | add eax, ebp | ||
| 547 | ror edx, 1 | ||
| 548 | add ebx, eax | ||
| 549 | ; 20_39 29 | ||
| 550 | mov eax, DWORD PTR 52[esp] | ||
| 551 | mov ebp, DWORD PTR 60[esp] | ||
| 552 | xor eax, ebp | ||
| 553 | mov ebp, DWORD PTR 20[esp] | ||
| 554 | xor eax, ebp | ||
| 555 | mov ebp, DWORD PTR 40[esp] | ||
| 556 | xor eax, ebp | ||
| 557 | mov ebp, ecx | ||
| 558 | rol eax, 1 | ||
| 559 | xor ebp, edx | ||
| 560 | mov DWORD PTR 52[esp],eax | ||
| 561 | xor ebp, edi | ||
| 562 | lea eax, DWORD PTR 1859775393[esi*1+eax] | ||
| 563 | mov esi, ebx | ||
| 564 | rol esi, 5 | ||
| 565 | ror ecx, 1 | ||
| 566 | add esi, ebp | ||
| 567 | ror ecx, 1 | ||
| 568 | add eax, esi | ||
| 569 | ; 20_39 30 | ||
| 570 | mov esi, DWORD PTR 56[esp] | ||
| 571 | mov ebp, DWORD PTR [esp] | ||
| 572 | xor esi, ebp | ||
| 573 | mov ebp, DWORD PTR 24[esp] | ||
| 574 | xor esi, ebp | ||
| 575 | mov ebp, DWORD PTR 44[esp] | ||
| 576 | xor esi, ebp | ||
| 577 | mov ebp, ebx | ||
| 578 | rol esi, 1 | ||
| 579 | xor ebp, ecx | ||
| 580 | mov DWORD PTR 56[esp],esi | ||
| 581 | xor ebp, edx | ||
| 582 | lea esi, DWORD PTR 1859775393[edi*1+esi] | ||
| 583 | mov edi, eax | ||
| 584 | rol edi, 5 | ||
| 585 | ror ebx, 1 | ||
| 586 | add edi, ebp | ||
| 587 | ror ebx, 1 | ||
| 588 | add esi, edi | ||
| 589 | ; 20_39 31 | ||
| 590 | mov edi, DWORD PTR 60[esp] | ||
| 591 | mov ebp, DWORD PTR 4[esp] | ||
| 592 | xor edi, ebp | ||
| 593 | mov ebp, DWORD PTR 28[esp] | ||
| 594 | xor edi, ebp | ||
| 595 | mov ebp, DWORD PTR 48[esp] | ||
| 596 | xor edi, ebp | ||
| 597 | mov ebp, eax | ||
| 598 | rol edi, 1 | ||
| 599 | xor ebp, ebx | ||
| 600 | mov DWORD PTR 60[esp],edi | ||
| 601 | xor ebp, ecx | ||
| 602 | lea edi, DWORD PTR 1859775393[edx*1+edi] | ||
| 603 | mov edx, esi | ||
| 604 | rol edx, 5 | ||
| 605 | ror eax, 1 | ||
| 606 | add edx, ebp | ||
| 607 | ror eax, 1 | ||
| 608 | add edi, edx | ||
| 609 | ; 20_39 32 | ||
| 610 | mov edx, DWORD PTR [esp] | ||
| 611 | mov ebp, DWORD PTR 8[esp] | ||
| 612 | xor edx, ebp | ||
| 613 | mov ebp, DWORD PTR 32[esp] | ||
| 614 | xor edx, ebp | ||
| 615 | mov ebp, DWORD PTR 52[esp] | ||
| 616 | xor edx, ebp | ||
| 617 | mov ebp, esi | ||
| 618 | rol edx, 1 | ||
| 619 | xor ebp, eax | ||
| 620 | mov DWORD PTR [esp],edx | ||
| 621 | xor ebp, ebx | ||
| 622 | lea edx, DWORD PTR 1859775393[ecx*1+edx] | ||
| 623 | mov ecx, edi | ||
| 624 | rol ecx, 5 | ||
| 625 | ror esi, 1 | ||
| 626 | add ecx, ebp | ||
| 627 | ror esi, 1 | ||
| 628 | add edx, ecx | ||
| 629 | ; 20_39 33 | ||
| 630 | mov ecx, DWORD PTR 4[esp] | ||
| 631 | mov ebp, DWORD PTR 12[esp] | ||
| 632 | xor ecx, ebp | ||
| 633 | mov ebp, DWORD PTR 36[esp] | ||
| 634 | xor ecx, ebp | ||
| 635 | mov ebp, DWORD PTR 56[esp] | ||
| 636 | xor ecx, ebp | ||
| 637 | mov ebp, edi | ||
| 638 | rol ecx, 1 | ||
| 639 | xor ebp, esi | ||
| 640 | mov DWORD PTR 4[esp],ecx | ||
| 641 | xor ebp, eax | ||
| 642 | lea ecx, DWORD PTR 1859775393[ebx*1+ecx] | ||
| 643 | mov ebx, edx | ||
| 644 | rol ebx, 5 | ||
| 645 | ror edi, 1 | ||
| 646 | add ebx, ebp | ||
| 647 | ror edi, 1 | ||
| 648 | add ecx, ebx | ||
| 649 | ; 20_39 34 | ||
| 650 | mov ebx, DWORD PTR 8[esp] | ||
| 651 | mov ebp, DWORD PTR 16[esp] | ||
| 652 | xor ebx, ebp | ||
| 653 | mov ebp, DWORD PTR 40[esp] | ||
| 654 | xor ebx, ebp | ||
| 655 | mov ebp, DWORD PTR 60[esp] | ||
| 656 | xor ebx, ebp | ||
| 657 | mov ebp, edx | ||
| 658 | rol ebx, 1 | ||
| 659 | xor ebp, edi | ||
| 660 | mov DWORD PTR 8[esp],ebx | ||
| 661 | xor ebp, esi | ||
| 662 | lea ebx, DWORD PTR 1859775393[eax*1+ebx] | ||
| 663 | mov eax, ecx | ||
| 664 | rol eax, 5 | ||
| 665 | ror edx, 1 | ||
| 666 | add eax, ebp | ||
| 667 | ror edx, 1 | ||
| 668 | add ebx, eax | ||
| 669 | ; 20_39 35 | ||
| 670 | mov eax, DWORD PTR 12[esp] | ||
| 671 | mov ebp, DWORD PTR 20[esp] | ||
| 672 | xor eax, ebp | ||
| 673 | mov ebp, DWORD PTR 44[esp] | ||
| 674 | xor eax, ebp | ||
| 675 | mov ebp, DWORD PTR [esp] | ||
| 676 | xor eax, ebp | ||
| 677 | mov ebp, ecx | ||
| 678 | rol eax, 1 | ||
| 679 | xor ebp, edx | ||
| 680 | mov DWORD PTR 12[esp],eax | ||
| 681 | xor ebp, edi | ||
| 682 | lea eax, DWORD PTR 1859775393[esi*1+eax] | ||
| 683 | mov esi, ebx | ||
| 684 | rol esi, 5 | ||
| 685 | ror ecx, 1 | ||
| 686 | add esi, ebp | ||
| 687 | ror ecx, 1 | ||
| 688 | add eax, esi | ||
| 689 | ; 20_39 36 | ||
| 690 | mov esi, DWORD PTR 16[esp] | ||
| 691 | mov ebp, DWORD PTR 24[esp] | ||
| 692 | xor esi, ebp | ||
| 693 | mov ebp, DWORD PTR 48[esp] | ||
| 694 | xor esi, ebp | ||
| 695 | mov ebp, DWORD PTR 4[esp] | ||
| 696 | xor esi, ebp | ||
| 697 | mov ebp, ebx | ||
| 698 | rol esi, 1 | ||
| 699 | xor ebp, ecx | ||
| 700 | mov DWORD PTR 16[esp],esi | ||
| 701 | xor ebp, edx | ||
| 702 | lea esi, DWORD PTR 1859775393[edi*1+esi] | ||
| 703 | mov edi, eax | ||
| 704 | rol edi, 5 | ||
| 705 | ror ebx, 1 | ||
| 706 | add edi, ebp | ||
| 707 | ror ebx, 1 | ||
| 708 | add esi, edi | ||
| 709 | ; 20_39 37 | ||
| 710 | mov edi, DWORD PTR 20[esp] | ||
| 711 | mov ebp, DWORD PTR 28[esp] | ||
| 712 | xor edi, ebp | ||
| 713 | mov ebp, DWORD PTR 52[esp] | ||
| 714 | xor edi, ebp | ||
| 715 | mov ebp, DWORD PTR 8[esp] | ||
| 716 | xor edi, ebp | ||
| 717 | mov ebp, eax | ||
| 718 | rol edi, 1 | ||
| 719 | xor ebp, ebx | ||
| 720 | mov DWORD PTR 20[esp],edi | ||
| 721 | xor ebp, ecx | ||
| 722 | lea edi, DWORD PTR 1859775393[edx*1+edi] | ||
| 723 | mov edx, esi | ||
| 724 | rol edx, 5 | ||
| 725 | ror eax, 1 | ||
| 726 | add edx, ebp | ||
| 727 | ror eax, 1 | ||
| 728 | add edi, edx | ||
| 729 | ; 20_39 38 | ||
| 730 | mov edx, DWORD PTR 24[esp] | ||
| 731 | mov ebp, DWORD PTR 32[esp] | ||
| 732 | xor edx, ebp | ||
| 733 | mov ebp, DWORD PTR 56[esp] | ||
| 734 | xor edx, ebp | ||
| 735 | mov ebp, DWORD PTR 12[esp] | ||
| 736 | xor edx, ebp | ||
| 737 | mov ebp, esi | ||
| 738 | rol edx, 1 | ||
| 739 | xor ebp, eax | ||
| 740 | mov DWORD PTR 24[esp],edx | ||
| 741 | xor ebp, ebx | ||
| 742 | lea edx, DWORD PTR 1859775393[ecx*1+edx] | ||
| 743 | mov ecx, edi | ||
| 744 | rol ecx, 5 | ||
| 745 | ror esi, 1 | ||
| 746 | add ecx, ebp | ||
| 747 | ror esi, 1 | ||
| 748 | add edx, ecx | ||
| 749 | ; 20_39 39 | ||
| 750 | mov ecx, DWORD PTR 28[esp] | ||
| 751 | mov ebp, DWORD PTR 36[esp] | ||
| 752 | xor ecx, ebp | ||
| 753 | mov ebp, DWORD PTR 60[esp] | ||
| 754 | xor ecx, ebp | ||
| 755 | mov ebp, DWORD PTR 16[esp] | ||
| 756 | xor ecx, ebp | ||
| 757 | mov ebp, edi | ||
| 758 | rol ecx, 1 | ||
| 759 | xor ebp, esi | ||
| 760 | mov DWORD PTR 28[esp],ecx | ||
| 761 | xor ebp, eax | ||
| 762 | lea ecx, DWORD PTR 1859775393[ebx*1+ecx] | ||
| 763 | mov ebx, edx | ||
| 764 | rol ebx, 5 | ||
| 765 | ror edi, 1 | ||
| 766 | add ebx, ebp | ||
| 767 | ror edi, 1 | ||
| 768 | add ecx, ebx | ||
| 769 | ; 40_59 40 | ||
| 770 | mov ebx, DWORD PTR 32[esp] | ||
| 771 | mov ebp, DWORD PTR 40[esp] | ||
| 772 | xor ebx, ebp | ||
| 773 | mov ebp, DWORD PTR [esp] | ||
| 774 | xor ebx, ebp | ||
| 775 | mov ebp, DWORD PTR 20[esp] | ||
| 776 | xor ebx, ebp | ||
| 777 | mov ebp, edx | ||
| 778 | rol ebx, 1 | ||
| 779 | or ebp, edi | ||
| 780 | mov DWORD PTR 32[esp],ebx | ||
| 781 | and ebp, esi | ||
| 782 | lea ebx, DWORD PTR 2400959708[eax*1+ebx] | ||
| 783 | mov eax, edx | ||
| 784 | ror edx, 1 | ||
| 785 | and eax, edi | ||
| 786 | or ebp, eax | ||
| 787 | mov eax, ecx | ||
| 788 | rol eax, 5 | ||
| 789 | add ebp, eax | ||
| 790 | mov eax, DWORD PTR 36[esp] | ||
| 791 | add ebx, ebp | ||
| 792 | mov ebp, DWORD PTR 44[esp] | ||
| 793 | xor eax, ebp | ||
| 794 | mov ebp, DWORD PTR 4[esp] | ||
| 795 | xor eax, ebp | ||
| 796 | mov ebp, DWORD PTR 24[esp] | ||
| 797 | ror edx, 1 | ||
| 798 | xor eax, ebp | ||
| 799 | rol eax, 1 | ||
| 800 | mov ebp, ecx | ||
| 801 | mov DWORD PTR 36[esp],eax | ||
| 802 | or ebp, edx | ||
| 803 | lea eax, DWORD PTR 2400959708[esi*1+eax] | ||
| 804 | mov esi, ecx | ||
| 805 | and ebp, edi | ||
| 806 | and esi, edx | ||
| 807 | or ebp, esi | ||
| 808 | mov esi, ebx | ||
| 809 | rol esi, 5 | ||
| 810 | ror ecx, 1 | ||
| 811 | add ebp, esi | ||
| 812 | ror ecx, 1 | ||
| 813 | add eax, ebp | ||
| 814 | ; 40_59 41 | ||
| 815 | ; 40_59 42 | ||
| 816 | mov esi, DWORD PTR 40[esp] | ||
| 817 | mov ebp, DWORD PTR 48[esp] | ||
| 818 | xor esi, ebp | ||
| 819 | mov ebp, DWORD PTR 8[esp] | ||
| 820 | xor esi, ebp | ||
| 821 | mov ebp, DWORD PTR 28[esp] | ||
| 822 | xor esi, ebp | ||
| 823 | mov ebp, ebx | ||
| 824 | rol esi, 1 | ||
| 825 | or ebp, ecx | ||
| 826 | mov DWORD PTR 40[esp],esi | ||
| 827 | and ebp, edx | ||
| 828 | lea esi, DWORD PTR 2400959708[edi*1+esi] | ||
| 829 | mov edi, ebx | ||
| 830 | ror ebx, 1 | ||
| 831 | and edi, ecx | ||
| 832 | or ebp, edi | ||
| 833 | mov edi, eax | ||
| 834 | rol edi, 5 | ||
| 835 | add ebp, edi | ||
| 836 | mov edi, DWORD PTR 44[esp] | ||
| 837 | add esi, ebp | ||
| 838 | mov ebp, DWORD PTR 52[esp] | ||
| 839 | xor edi, ebp | ||
| 840 | mov ebp, DWORD PTR 12[esp] | ||
| 841 | xor edi, ebp | ||
| 842 | mov ebp, DWORD PTR 32[esp] | ||
| 843 | ror ebx, 1 | ||
| 844 | xor edi, ebp | ||
| 845 | rol edi, 1 | ||
| 846 | mov ebp, eax | ||
| 847 | mov DWORD PTR 44[esp],edi | ||
| 848 | or ebp, ebx | ||
| 849 | lea edi, DWORD PTR 2400959708[edx*1+edi] | ||
| 850 | mov edx, eax | ||
| 851 | and ebp, ecx | ||
| 852 | and edx, ebx | ||
| 853 | or ebp, edx | ||
| 854 | mov edx, esi | ||
| 855 | rol edx, 5 | ||
| 856 | ror eax, 1 | ||
| 857 | add ebp, edx | ||
| 858 | ror eax, 1 | ||
| 859 | add edi, ebp | ||
| 860 | ; 40_59 43 | ||
| 861 | ; 40_59 44 | ||
| 862 | mov edx, DWORD PTR 48[esp] | ||
| 863 | mov ebp, DWORD PTR 56[esp] | ||
| 864 | xor edx, ebp | ||
| 865 | mov ebp, DWORD PTR 16[esp] | ||
| 866 | xor edx, ebp | ||
| 867 | mov ebp, DWORD PTR 36[esp] | ||
| 868 | xor edx, ebp | ||
| 869 | mov ebp, esi | ||
| 870 | rol edx, 1 | ||
| 871 | or ebp, eax | ||
| 872 | mov DWORD PTR 48[esp],edx | ||
| 873 | and ebp, ebx | ||
| 874 | lea edx, DWORD PTR 2400959708[ecx*1+edx] | ||
| 875 | mov ecx, esi | ||
| 876 | ror esi, 1 | ||
| 877 | and ecx, eax | ||
| 878 | or ebp, ecx | ||
| 879 | mov ecx, edi | ||
| 880 | rol ecx, 5 | ||
| 881 | add ebp, ecx | ||
| 882 | mov ecx, DWORD PTR 52[esp] | ||
| 883 | add edx, ebp | ||
| 884 | mov ebp, DWORD PTR 60[esp] | ||
| 885 | xor ecx, ebp | ||
| 886 | mov ebp, DWORD PTR 20[esp] | ||
| 887 | xor ecx, ebp | ||
| 888 | mov ebp, DWORD PTR 40[esp] | ||
| 889 | ror esi, 1 | ||
| 890 | xor ecx, ebp | ||
| 891 | rol ecx, 1 | ||
| 892 | mov ebp, edi | ||
| 893 | mov DWORD PTR 52[esp],ecx | ||
| 894 | or ebp, esi | ||
| 895 | lea ecx, DWORD PTR 2400959708[ebx*1+ecx] | ||
| 896 | mov ebx, edi | ||
| 897 | and ebp, eax | ||
| 898 | and ebx, esi | ||
| 899 | or ebp, ebx | ||
| 900 | mov ebx, edx | ||
| 901 | rol ebx, 5 | ||
| 902 | ror edi, 1 | ||
| 903 | add ebp, ebx | ||
| 904 | ror edi, 1 | ||
| 905 | add ecx, ebp | ||
| 906 | ; 40_59 45 | ||
| 907 | ; 40_59 46 | ||
| 908 | mov ebx, DWORD PTR 56[esp] | ||
| 909 | mov ebp, DWORD PTR [esp] | ||
| 910 | xor ebx, ebp | ||
| 911 | mov ebp, DWORD PTR 24[esp] | ||
| 912 | xor ebx, ebp | ||
| 913 | mov ebp, DWORD PTR 44[esp] | ||
| 914 | xor ebx, ebp | ||
| 915 | mov ebp, edx | ||
| 916 | rol ebx, 1 | ||
| 917 | or ebp, edi | ||
| 918 | mov DWORD PTR 56[esp],ebx | ||
| 919 | and ebp, esi | ||
| 920 | lea ebx, DWORD PTR 2400959708[eax*1+ebx] | ||
| 921 | mov eax, edx | ||
| 922 | ror edx, 1 | ||
| 923 | and eax, edi | ||
| 924 | or ebp, eax | ||
| 925 | mov eax, ecx | ||
| 926 | rol eax, 5 | ||
| 927 | add ebp, eax | ||
| 928 | mov eax, DWORD PTR 60[esp] | ||
| 929 | add ebx, ebp | ||
| 930 | mov ebp, DWORD PTR 4[esp] | ||
| 931 | xor eax, ebp | ||
| 932 | mov ebp, DWORD PTR 28[esp] | ||
| 933 | xor eax, ebp | ||
| 934 | mov ebp, DWORD PTR 48[esp] | ||
| 935 | ror edx, 1 | ||
| 936 | xor eax, ebp | ||
| 937 | rol eax, 1 | ||
| 938 | mov ebp, ecx | ||
| 939 | mov DWORD PTR 60[esp],eax | ||
| 940 | or ebp, edx | ||
| 941 | lea eax, DWORD PTR 2400959708[esi*1+eax] | ||
| 942 | mov esi, ecx | ||
| 943 | and ebp, edi | ||
| 944 | and esi, edx | ||
| 945 | or ebp, esi | ||
| 946 | mov esi, ebx | ||
| 947 | rol esi, 5 | ||
| 948 | ror ecx, 1 | ||
| 949 | add ebp, esi | ||
| 950 | ror ecx, 1 | ||
| 951 | add eax, ebp | ||
| 952 | ; 40_59 47 | ||
| 953 | ; 40_59 48 | ||
| 954 | mov esi, DWORD PTR [esp] | ||
| 955 | mov ebp, DWORD PTR 8[esp] | ||
| 956 | xor esi, ebp | ||
| 957 | mov ebp, DWORD PTR 32[esp] | ||
| 958 | xor esi, ebp | ||
| 959 | mov ebp, DWORD PTR 52[esp] | ||
| 960 | xor esi, ebp | ||
| 961 | mov ebp, ebx | ||
| 962 | rol esi, 1 | ||
| 963 | or ebp, ecx | ||
| 964 | mov DWORD PTR [esp],esi | ||
| 965 | and ebp, edx | ||
| 966 | lea esi, DWORD PTR 2400959708[edi*1+esi] | ||
| 967 | mov edi, ebx | ||
| 968 | ror ebx, 1 | ||
| 969 | and edi, ecx | ||
| 970 | or ebp, edi | ||
| 971 | mov edi, eax | ||
| 972 | rol edi, 5 | ||
| 973 | add ebp, edi | ||
| 974 | mov edi, DWORD PTR 4[esp] | ||
| 975 | add esi, ebp | ||
| 976 | mov ebp, DWORD PTR 12[esp] | ||
| 977 | xor edi, ebp | ||
| 978 | mov ebp, DWORD PTR 36[esp] | ||
| 979 | xor edi, ebp | ||
| 980 | mov ebp, DWORD PTR 56[esp] | ||
| 981 | ror ebx, 1 | ||
| 982 | xor edi, ebp | ||
| 983 | rol edi, 1 | ||
| 984 | mov ebp, eax | ||
| 985 | mov DWORD PTR 4[esp],edi | ||
| 986 | or ebp, ebx | ||
| 987 | lea edi, DWORD PTR 2400959708[edx*1+edi] | ||
| 988 | mov edx, eax | ||
| 989 | and ebp, ecx | ||
| 990 | and edx, ebx | ||
| 991 | or ebp, edx | ||
| 992 | mov edx, esi | ||
| 993 | rol edx, 5 | ||
| 994 | ror eax, 1 | ||
| 995 | add ebp, edx | ||
| 996 | ror eax, 1 | ||
| 997 | add edi, ebp | ||
| 998 | ; 40_59 49 | ||
| 999 | ; 40_59 50 | ||
| 1000 | mov edx, DWORD PTR 8[esp] | ||
| 1001 | mov ebp, DWORD PTR 16[esp] | ||
| 1002 | xor edx, ebp | ||
| 1003 | mov ebp, DWORD PTR 40[esp] | ||
| 1004 | xor edx, ebp | ||
| 1005 | mov ebp, DWORD PTR 60[esp] | ||
| 1006 | xor edx, ebp | ||
| 1007 | mov ebp, esi | ||
| 1008 | rol edx, 1 | ||
| 1009 | or ebp, eax | ||
| 1010 | mov DWORD PTR 8[esp],edx | ||
| 1011 | and ebp, ebx | ||
| 1012 | lea edx, DWORD PTR 2400959708[ecx*1+edx] | ||
| 1013 | mov ecx, esi | ||
| 1014 | ror esi, 1 | ||
| 1015 | and ecx, eax | ||
| 1016 | or ebp, ecx | ||
| 1017 | mov ecx, edi | ||
| 1018 | rol ecx, 5 | ||
| 1019 | add ebp, ecx | ||
| 1020 | mov ecx, DWORD PTR 12[esp] | ||
| 1021 | add edx, ebp | ||
| 1022 | mov ebp, DWORD PTR 20[esp] | ||
| 1023 | xor ecx, ebp | ||
| 1024 | mov ebp, DWORD PTR 44[esp] | ||
| 1025 | xor ecx, ebp | ||
| 1026 | mov ebp, DWORD PTR [esp] | ||
| 1027 | ror esi, 1 | ||
| 1028 | xor ecx, ebp | ||
| 1029 | rol ecx, 1 | ||
| 1030 | mov ebp, edi | ||
| 1031 | mov DWORD PTR 12[esp],ecx | ||
| 1032 | or ebp, esi | ||
| 1033 | lea ecx, DWORD PTR 2400959708[ebx*1+ecx] | ||
| 1034 | mov ebx, edi | ||
| 1035 | and ebp, eax | ||
| 1036 | and ebx, esi | ||
| 1037 | or ebp, ebx | ||
| 1038 | mov ebx, edx | ||
| 1039 | rol ebx, 5 | ||
| 1040 | ror edi, 1 | ||
| 1041 | add ebp, ebx | ||
| 1042 | ror edi, 1 | ||
| 1043 | add ecx, ebp | ||
| 1044 | ; 40_59 51 | ||
| 1045 | ; 40_59 52 | ||
| 1046 | mov ebx, DWORD PTR 16[esp] | ||
| 1047 | mov ebp, DWORD PTR 24[esp] | ||
| 1048 | xor ebx, ebp | ||
| 1049 | mov ebp, DWORD PTR 48[esp] | ||
| 1050 | xor ebx, ebp | ||
| 1051 | mov ebp, DWORD PTR 4[esp] | ||
| 1052 | xor ebx, ebp | ||
| 1053 | mov ebp, edx | ||
| 1054 | rol ebx, 1 | ||
| 1055 | or ebp, edi | ||
| 1056 | mov DWORD PTR 16[esp],ebx | ||
| 1057 | and ebp, esi | ||
| 1058 | lea ebx, DWORD PTR 2400959708[eax*1+ebx] | ||
| 1059 | mov eax, edx | ||
| 1060 | ror edx, 1 | ||
| 1061 | and eax, edi | ||
| 1062 | or ebp, eax | ||
| 1063 | mov eax, ecx | ||
| 1064 | rol eax, 5 | ||
| 1065 | add ebp, eax | ||
| 1066 | mov eax, DWORD PTR 20[esp] | ||
| 1067 | add ebx, ebp | ||
| 1068 | mov ebp, DWORD PTR 28[esp] | ||
| 1069 | xor eax, ebp | ||
| 1070 | mov ebp, DWORD PTR 52[esp] | ||
| 1071 | xor eax, ebp | ||
| 1072 | mov ebp, DWORD PTR 8[esp] | ||
| 1073 | ror edx, 1 | ||
| 1074 | xor eax, ebp | ||
| 1075 | rol eax, 1 | ||
| 1076 | mov ebp, ecx | ||
| 1077 | mov DWORD PTR 20[esp],eax | ||
| 1078 | or ebp, edx | ||
| 1079 | lea eax, DWORD PTR 2400959708[esi*1+eax] | ||
| 1080 | mov esi, ecx | ||
| 1081 | and ebp, edi | ||
| 1082 | and esi, edx | ||
| 1083 | or ebp, esi | ||
| 1084 | mov esi, ebx | ||
| 1085 | rol esi, 5 | ||
| 1086 | ror ecx, 1 | ||
| 1087 | add ebp, esi | ||
| 1088 | ror ecx, 1 | ||
| 1089 | add eax, ebp | ||
| 1090 | ; 40_59 53 | ||
| 1091 | ; 40_59 54 | ||
| 1092 | mov esi, DWORD PTR 24[esp] | ||
| 1093 | mov ebp, DWORD PTR 32[esp] | ||
| 1094 | xor esi, ebp | ||
| 1095 | mov ebp, DWORD PTR 56[esp] | ||
| 1096 | xor esi, ebp | ||
| 1097 | mov ebp, DWORD PTR 12[esp] | ||
| 1098 | xor esi, ebp | ||
| 1099 | mov ebp, ebx | ||
| 1100 | rol esi, 1 | ||
| 1101 | or ebp, ecx | ||
| 1102 | mov DWORD PTR 24[esp],esi | ||
| 1103 | and ebp, edx | ||
| 1104 | lea esi, DWORD PTR 2400959708[edi*1+esi] | ||
| 1105 | mov edi, ebx | ||
| 1106 | ror ebx, 1 | ||
| 1107 | and edi, ecx | ||
| 1108 | or ebp, edi | ||
| 1109 | mov edi, eax | ||
| 1110 | rol edi, 5 | ||
| 1111 | add ebp, edi | ||
| 1112 | mov edi, DWORD PTR 28[esp] | ||
| 1113 | add esi, ebp | ||
| 1114 | mov ebp, DWORD PTR 36[esp] | ||
| 1115 | xor edi, ebp | ||
| 1116 | mov ebp, DWORD PTR 60[esp] | ||
| 1117 | xor edi, ebp | ||
| 1118 | mov ebp, DWORD PTR 16[esp] | ||
| 1119 | ror ebx, 1 | ||
| 1120 | xor edi, ebp | ||
| 1121 | rol edi, 1 | ||
| 1122 | mov ebp, eax | ||
| 1123 | mov DWORD PTR 28[esp],edi | ||
| 1124 | or ebp, ebx | ||
| 1125 | lea edi, DWORD PTR 2400959708[edx*1+edi] | ||
| 1126 | mov edx, eax | ||
| 1127 | and ebp, ecx | ||
| 1128 | and edx, ebx | ||
| 1129 | or ebp, edx | ||
| 1130 | mov edx, esi | ||
| 1131 | rol edx, 5 | ||
| 1132 | ror eax, 1 | ||
| 1133 | add ebp, edx | ||
| 1134 | ror eax, 1 | ||
| 1135 | add edi, ebp | ||
| 1136 | ; 40_59 55 | ||
| 1137 | ; 40_59 56 | ||
| 1138 | mov edx, DWORD PTR 32[esp] | ||
| 1139 | mov ebp, DWORD PTR 40[esp] | ||
| 1140 | xor edx, ebp | ||
| 1141 | mov ebp, DWORD PTR [esp] | ||
| 1142 | xor edx, ebp | ||
| 1143 | mov ebp, DWORD PTR 20[esp] | ||
| 1144 | xor edx, ebp | ||
| 1145 | mov ebp, esi | ||
| 1146 | rol edx, 1 | ||
| 1147 | or ebp, eax | ||
| 1148 | mov DWORD PTR 32[esp],edx | ||
| 1149 | and ebp, ebx | ||
| 1150 | lea edx, DWORD PTR 2400959708[ecx*1+edx] | ||
| 1151 | mov ecx, esi | ||
| 1152 | ror esi, 1 | ||
| 1153 | and ecx, eax | ||
| 1154 | or ebp, ecx | ||
| 1155 | mov ecx, edi | ||
| 1156 | rol ecx, 5 | ||
| 1157 | add ebp, ecx | ||
| 1158 | mov ecx, DWORD PTR 36[esp] | ||
| 1159 | add edx, ebp | ||
| 1160 | mov ebp, DWORD PTR 44[esp] | ||
| 1161 | xor ecx, ebp | ||
| 1162 | mov ebp, DWORD PTR 4[esp] | ||
| 1163 | xor ecx, ebp | ||
| 1164 | mov ebp, DWORD PTR 24[esp] | ||
| 1165 | ror esi, 1 | ||
| 1166 | xor ecx, ebp | ||
| 1167 | rol ecx, 1 | ||
| 1168 | mov ebp, edi | ||
| 1169 | mov DWORD PTR 36[esp],ecx | ||
| 1170 | or ebp, esi | ||
| 1171 | lea ecx, DWORD PTR 2400959708[ebx*1+ecx] | ||
| 1172 | mov ebx, edi | ||
| 1173 | and ebp, eax | ||
| 1174 | and ebx, esi | ||
| 1175 | or ebp, ebx | ||
| 1176 | mov ebx, edx | ||
| 1177 | rol ebx, 5 | ||
| 1178 | ror edi, 1 | ||
| 1179 | add ebp, ebx | ||
| 1180 | ror edi, 1 | ||
| 1181 | add ecx, ebp | ||
| 1182 | ; 40_59 57 | ||
| 1183 | ; 40_59 58 | ||
| 1184 | mov ebx, DWORD PTR 40[esp] | ||
| 1185 | mov ebp, DWORD PTR 48[esp] | ||
| 1186 | xor ebx, ebp | ||
| 1187 | mov ebp, DWORD PTR 8[esp] | ||
| 1188 | xor ebx, ebp | ||
| 1189 | mov ebp, DWORD PTR 28[esp] | ||
| 1190 | xor ebx, ebp | ||
| 1191 | mov ebp, edx | ||
| 1192 | rol ebx, 1 | ||
| 1193 | or ebp, edi | ||
| 1194 | mov DWORD PTR 40[esp],ebx | ||
| 1195 | and ebp, esi | ||
| 1196 | lea ebx, DWORD PTR 2400959708[eax*1+ebx] | ||
| 1197 | mov eax, edx | ||
| 1198 | ror edx, 1 | ||
| 1199 | and eax, edi | ||
| 1200 | or ebp, eax | ||
| 1201 | mov eax, ecx | ||
| 1202 | rol eax, 5 | ||
| 1203 | add ebp, eax | ||
| 1204 | mov eax, DWORD PTR 44[esp] | ||
| 1205 | add ebx, ebp | ||
| 1206 | mov ebp, DWORD PTR 52[esp] | ||
| 1207 | xor eax, ebp | ||
| 1208 | mov ebp, DWORD PTR 12[esp] | ||
| 1209 | xor eax, ebp | ||
| 1210 | mov ebp, DWORD PTR 32[esp] | ||
| 1211 | ror edx, 1 | ||
| 1212 | xor eax, ebp | ||
| 1213 | rol eax, 1 | ||
| 1214 | mov ebp, ecx | ||
| 1215 | mov DWORD PTR 44[esp],eax | ||
| 1216 | or ebp, edx | ||
| 1217 | lea eax, DWORD PTR 2400959708[esi*1+eax] | ||
| 1218 | mov esi, ecx | ||
| 1219 | and ebp, edi | ||
| 1220 | and esi, edx | ||
| 1221 | or ebp, esi | ||
| 1222 | mov esi, ebx | ||
| 1223 | rol esi, 5 | ||
| 1224 | ror ecx, 1 | ||
| 1225 | add ebp, esi | ||
| 1226 | ror ecx, 1 | ||
| 1227 | add eax, ebp | ||
| 1228 | ; 40_59 59 | ||
| 1229 | ; 20_39 60 | ||
| 1230 | mov esi, DWORD PTR 48[esp] | ||
| 1231 | mov ebp, DWORD PTR 56[esp] | ||
| 1232 | xor esi, ebp | ||
| 1233 | mov ebp, DWORD PTR 16[esp] | ||
| 1234 | xor esi, ebp | ||
| 1235 | mov ebp, DWORD PTR 36[esp] | ||
| 1236 | xor esi, ebp | ||
| 1237 | mov ebp, ebx | ||
| 1238 | rol esi, 1 | ||
| 1239 | xor ebp, ecx | ||
| 1240 | mov DWORD PTR 48[esp],esi | ||
| 1241 | xor ebp, edx | ||
| 1242 | lea esi, DWORD PTR 3395469782[edi*1+esi] | ||
| 1243 | mov edi, eax | ||
| 1244 | rol edi, 5 | ||
| 1245 | ror ebx, 1 | ||
| 1246 | add edi, ebp | ||
| 1247 | ror ebx, 1 | ||
| 1248 | add esi, edi | ||
| 1249 | ; 20_39 61 | ||
| 1250 | mov edi, DWORD PTR 52[esp] | ||
| 1251 | mov ebp, DWORD PTR 60[esp] | ||
| 1252 | xor edi, ebp | ||
| 1253 | mov ebp, DWORD PTR 20[esp] | ||
| 1254 | xor edi, ebp | ||
| 1255 | mov ebp, DWORD PTR 40[esp] | ||
| 1256 | xor edi, ebp | ||
| 1257 | mov ebp, eax | ||
| 1258 | rol edi, 1 | ||
| 1259 | xor ebp, ebx | ||
| 1260 | mov DWORD PTR 52[esp],edi | ||
| 1261 | xor ebp, ecx | ||
| 1262 | lea edi, DWORD PTR 3395469782[edx*1+edi] | ||
| 1263 | mov edx, esi | ||
| 1264 | rol edx, 5 | ||
| 1265 | ror eax, 1 | ||
| 1266 | add edx, ebp | ||
| 1267 | ror eax, 1 | ||
| 1268 | add edi, edx | ||
| 1269 | ; 20_39 62 | ||
| 1270 | mov edx, DWORD PTR 56[esp] | ||
| 1271 | mov ebp, DWORD PTR [esp] | ||
| 1272 | xor edx, ebp | ||
| 1273 | mov ebp, DWORD PTR 24[esp] | ||
| 1274 | xor edx, ebp | ||
| 1275 | mov ebp, DWORD PTR 44[esp] | ||
| 1276 | xor edx, ebp | ||
| 1277 | mov ebp, esi | ||
| 1278 | rol edx, 1 | ||
| 1279 | xor ebp, eax | ||
| 1280 | mov DWORD PTR 56[esp],edx | ||
| 1281 | xor ebp, ebx | ||
| 1282 | lea edx, DWORD PTR 3395469782[ecx*1+edx] | ||
| 1283 | mov ecx, edi | ||
| 1284 | rol ecx, 5 | ||
| 1285 | ror esi, 1 | ||
| 1286 | add ecx, ebp | ||
| 1287 | ror esi, 1 | ||
| 1288 | add edx, ecx | ||
| 1289 | ; 20_39 63 | ||
| 1290 | mov ecx, DWORD PTR 60[esp] | ||
| 1291 | mov ebp, DWORD PTR 4[esp] | ||
| 1292 | xor ecx, ebp | ||
| 1293 | mov ebp, DWORD PTR 28[esp] | ||
| 1294 | xor ecx, ebp | ||
| 1295 | mov ebp, DWORD PTR 48[esp] | ||
| 1296 | xor ecx, ebp | ||
| 1297 | mov ebp, edi | ||
| 1298 | rol ecx, 1 | ||
| 1299 | xor ebp, esi | ||
| 1300 | mov DWORD PTR 60[esp],ecx | ||
| 1301 | xor ebp, eax | ||
| 1302 | lea ecx, DWORD PTR 3395469782[ebx*1+ecx] | ||
| 1303 | mov ebx, edx | ||
| 1304 | rol ebx, 5 | ||
| 1305 | ror edi, 1 | ||
| 1306 | add ebx, ebp | ||
| 1307 | ror edi, 1 | ||
| 1308 | add ecx, ebx | ||
| 1309 | ; 20_39 64 | ||
| 1310 | mov ebx, DWORD PTR [esp] | ||
| 1311 | mov ebp, DWORD PTR 8[esp] | ||
| 1312 | xor ebx, ebp | ||
| 1313 | mov ebp, DWORD PTR 32[esp] | ||
| 1314 | xor ebx, ebp | ||
| 1315 | mov ebp, DWORD PTR 52[esp] | ||
| 1316 | xor ebx, ebp | ||
| 1317 | mov ebp, edx | ||
| 1318 | rol ebx, 1 | ||
| 1319 | xor ebp, edi | ||
| 1320 | mov DWORD PTR [esp],ebx | ||
| 1321 | xor ebp, esi | ||
| 1322 | lea ebx, DWORD PTR 3395469782[eax*1+ebx] | ||
| 1323 | mov eax, ecx | ||
| 1324 | rol eax, 5 | ||
| 1325 | ror edx, 1 | ||
| 1326 | add eax, ebp | ||
| 1327 | ror edx, 1 | ||
| 1328 | add ebx, eax | ||
| 1329 | ; 20_39 65 | ||
| 1330 | mov eax, DWORD PTR 4[esp] | ||
| 1331 | mov ebp, DWORD PTR 12[esp] | ||
| 1332 | xor eax, ebp | ||
| 1333 | mov ebp, DWORD PTR 36[esp] | ||
| 1334 | xor eax, ebp | ||
| 1335 | mov ebp, DWORD PTR 56[esp] | ||
| 1336 | xor eax, ebp | ||
| 1337 | mov ebp, ecx | ||
| 1338 | rol eax, 1 | ||
| 1339 | xor ebp, edx | ||
| 1340 | mov DWORD PTR 4[esp],eax | ||
| 1341 | xor ebp, edi | ||
| 1342 | lea eax, DWORD PTR 3395469782[esi*1+eax] | ||
| 1343 | mov esi, ebx | ||
| 1344 | rol esi, 5 | ||
| 1345 | ror ecx, 1 | ||
| 1346 | add esi, ebp | ||
| 1347 | ror ecx, 1 | ||
| 1348 | add eax, esi | ||
| 1349 | ; 20_39 66 | ||
| 1350 | mov esi, DWORD PTR 8[esp] | ||
| 1351 | mov ebp, DWORD PTR 16[esp] | ||
| 1352 | xor esi, ebp | ||
| 1353 | mov ebp, DWORD PTR 40[esp] | ||
| 1354 | xor esi, ebp | ||
| 1355 | mov ebp, DWORD PTR 60[esp] | ||
| 1356 | xor esi, ebp | ||
| 1357 | mov ebp, ebx | ||
| 1358 | rol esi, 1 | ||
| 1359 | xor ebp, ecx | ||
| 1360 | mov DWORD PTR 8[esp],esi | ||
| 1361 | xor ebp, edx | ||
| 1362 | lea esi, DWORD PTR 3395469782[edi*1+esi] | ||
| 1363 | mov edi, eax | ||
| 1364 | rol edi, 5 | ||
| 1365 | ror ebx, 1 | ||
| 1366 | add edi, ebp | ||
| 1367 | ror ebx, 1 | ||
| 1368 | add esi, edi | ||
| 1369 | ; 20_39 67 | ||
| 1370 | mov edi, DWORD PTR 12[esp] | ||
| 1371 | mov ebp, DWORD PTR 20[esp] | ||
| 1372 | xor edi, ebp | ||
| 1373 | mov ebp, DWORD PTR 44[esp] | ||
| 1374 | xor edi, ebp | ||
| 1375 | mov ebp, DWORD PTR [esp] | ||
| 1376 | xor edi, ebp | ||
| 1377 | mov ebp, eax | ||
| 1378 | rol edi, 1 | ||
| 1379 | xor ebp, ebx | ||
| 1380 | mov DWORD PTR 12[esp],edi | ||
| 1381 | xor ebp, ecx | ||
| 1382 | lea edi, DWORD PTR 3395469782[edx*1+edi] | ||
| 1383 | mov edx, esi | ||
| 1384 | rol edx, 5 | ||
| 1385 | ror eax, 1 | ||
| 1386 | add edx, ebp | ||
| 1387 | ror eax, 1 | ||
| 1388 | add edi, edx | ||
| 1389 | ; 20_39 68 | ||
| 1390 | mov edx, DWORD PTR 16[esp] | ||
| 1391 | mov ebp, DWORD PTR 24[esp] | ||
| 1392 | xor edx, ebp | ||
| 1393 | mov ebp, DWORD PTR 48[esp] | ||
| 1394 | xor edx, ebp | ||
| 1395 | mov ebp, DWORD PTR 4[esp] | ||
| 1396 | xor edx, ebp | ||
| 1397 | mov ebp, esi | ||
| 1398 | rol edx, 1 | ||
| 1399 | xor ebp, eax | ||
| 1400 | mov DWORD PTR 16[esp],edx | ||
| 1401 | xor ebp, ebx | ||
| 1402 | lea edx, DWORD PTR 3395469782[ecx*1+edx] | ||
| 1403 | mov ecx, edi | ||
| 1404 | rol ecx, 5 | ||
| 1405 | ror esi, 1 | ||
| 1406 | add ecx, ebp | ||
| 1407 | ror esi, 1 | ||
| 1408 | add edx, ecx | ||
| 1409 | ; 20_39 69 | ||
| 1410 | mov ecx, DWORD PTR 20[esp] | ||
| 1411 | mov ebp, DWORD PTR 28[esp] | ||
| 1412 | xor ecx, ebp | ||
| 1413 | mov ebp, DWORD PTR 52[esp] | ||
| 1414 | xor ecx, ebp | ||
| 1415 | mov ebp, DWORD PTR 8[esp] | ||
| 1416 | xor ecx, ebp | ||
| 1417 | mov ebp, edi | ||
| 1418 | rol ecx, 1 | ||
| 1419 | xor ebp, esi | ||
| 1420 | mov DWORD PTR 20[esp],ecx | ||
| 1421 | xor ebp, eax | ||
| 1422 | lea ecx, DWORD PTR 3395469782[ebx*1+ecx] | ||
| 1423 | mov ebx, edx | ||
| 1424 | rol ebx, 5 | ||
| 1425 | ror edi, 1 | ||
| 1426 | add ebx, ebp | ||
| 1427 | ror edi, 1 | ||
| 1428 | add ecx, ebx | ||
| 1429 | ; 20_39 70 | ||
| 1430 | mov ebx, DWORD PTR 24[esp] | ||
| 1431 | mov ebp, DWORD PTR 32[esp] | ||
| 1432 | xor ebx, ebp | ||
| 1433 | mov ebp, DWORD PTR 56[esp] | ||
| 1434 | xor ebx, ebp | ||
| 1435 | mov ebp, DWORD PTR 12[esp] | ||
| 1436 | xor ebx, ebp | ||
| 1437 | mov ebp, edx | ||
| 1438 | rol ebx, 1 | ||
| 1439 | xor ebp, edi | ||
| 1440 | mov DWORD PTR 24[esp],ebx | ||
| 1441 | xor ebp, esi | ||
| 1442 | lea ebx, DWORD PTR 3395469782[eax*1+ebx] | ||
| 1443 | mov eax, ecx | ||
| 1444 | rol eax, 5 | ||
| 1445 | ror edx, 1 | ||
| 1446 | add eax, ebp | ||
| 1447 | ror edx, 1 | ||
| 1448 | add ebx, eax | ||
| 1449 | ; 20_39 71 | ||
| 1450 | mov eax, DWORD PTR 28[esp] | ||
| 1451 | mov ebp, DWORD PTR 36[esp] | ||
| 1452 | xor eax, ebp | ||
| 1453 | mov ebp, DWORD PTR 60[esp] | ||
| 1454 | xor eax, ebp | ||
| 1455 | mov ebp, DWORD PTR 16[esp] | ||
| 1456 | xor eax, ebp | ||
| 1457 | mov ebp, ecx | ||
| 1458 | rol eax, 1 | ||
| 1459 | xor ebp, edx | ||
| 1460 | mov DWORD PTR 28[esp],eax | ||
| 1461 | xor ebp, edi | ||
| 1462 | lea eax, DWORD PTR 3395469782[esi*1+eax] | ||
| 1463 | mov esi, ebx | ||
| 1464 | rol esi, 5 | ||
| 1465 | ror ecx, 1 | ||
| 1466 | add esi, ebp | ||
| 1467 | ror ecx, 1 | ||
| 1468 | add eax, esi | ||
| 1469 | ; 20_39 72 | ||
| 1470 | mov esi, DWORD PTR 32[esp] | ||
| 1471 | mov ebp, DWORD PTR 40[esp] | ||
| 1472 | xor esi, ebp | ||
| 1473 | mov ebp, DWORD PTR [esp] | ||
| 1474 | xor esi, ebp | ||
| 1475 | mov ebp, DWORD PTR 20[esp] | ||
| 1476 | xor esi, ebp | ||
| 1477 | mov ebp, ebx | ||
| 1478 | rol esi, 1 | ||
| 1479 | xor ebp, ecx | ||
| 1480 | mov DWORD PTR 32[esp],esi | ||
| 1481 | xor ebp, edx | ||
| 1482 | lea esi, DWORD PTR 3395469782[edi*1+esi] | ||
| 1483 | mov edi, eax | ||
| 1484 | rol edi, 5 | ||
| 1485 | ror ebx, 1 | ||
| 1486 | add edi, ebp | ||
| 1487 | ror ebx, 1 | ||
| 1488 | add esi, edi | ||
| 1489 | ; 20_39 73 | ||
| 1490 | mov edi, DWORD PTR 36[esp] | ||
| 1491 | mov ebp, DWORD PTR 44[esp] | ||
| 1492 | xor edi, ebp | ||
| 1493 | mov ebp, DWORD PTR 4[esp] | ||
| 1494 | xor edi, ebp | ||
| 1495 | mov ebp, DWORD PTR 24[esp] | ||
| 1496 | xor edi, ebp | ||
| 1497 | mov ebp, eax | ||
| 1498 | rol edi, 1 | ||
| 1499 | xor ebp, ebx | ||
| 1500 | mov DWORD PTR 36[esp],edi | ||
| 1501 | xor ebp, ecx | ||
| 1502 | lea edi, DWORD PTR 3395469782[edx*1+edi] | ||
| 1503 | mov edx, esi | ||
| 1504 | rol edx, 5 | ||
| 1505 | ror eax, 1 | ||
| 1506 | add edx, ebp | ||
| 1507 | ror eax, 1 | ||
| 1508 | add edi, edx | ||
| 1509 | ; 20_39 74 | ||
| 1510 | mov edx, DWORD PTR 40[esp] | ||
| 1511 | mov ebp, DWORD PTR 48[esp] | ||
| 1512 | xor edx, ebp | ||
| 1513 | mov ebp, DWORD PTR 8[esp] | ||
| 1514 | xor edx, ebp | ||
| 1515 | mov ebp, DWORD PTR 28[esp] | ||
| 1516 | xor edx, ebp | ||
| 1517 | mov ebp, esi | ||
| 1518 | rol edx, 1 | ||
| 1519 | xor ebp, eax | ||
| 1520 | mov DWORD PTR 40[esp],edx | ||
| 1521 | xor ebp, ebx | ||
| 1522 | lea edx, DWORD PTR 3395469782[ecx*1+edx] | ||
| 1523 | mov ecx, edi | ||
| 1524 | rol ecx, 5 | ||
| 1525 | ror esi, 1 | ||
| 1526 | add ecx, ebp | ||
| 1527 | ror esi, 1 | ||
| 1528 | add edx, ecx | ||
| 1529 | ; 20_39 75 | ||
| 1530 | mov ecx, DWORD PTR 44[esp] | ||
| 1531 | mov ebp, DWORD PTR 52[esp] | ||
| 1532 | xor ecx, ebp | ||
| 1533 | mov ebp, DWORD PTR 12[esp] | ||
| 1534 | xor ecx, ebp | ||
| 1535 | mov ebp, DWORD PTR 32[esp] | ||
| 1536 | xor ecx, ebp | ||
| 1537 | mov ebp, edi | ||
| 1538 | rol ecx, 1 | ||
| 1539 | xor ebp, esi | ||
| 1540 | mov DWORD PTR 44[esp],ecx | ||
| 1541 | xor ebp, eax | ||
| 1542 | lea ecx, DWORD PTR 3395469782[ebx*1+ecx] | ||
| 1543 | mov ebx, edx | ||
| 1544 | rol ebx, 5 | ||
| 1545 | ror edi, 1 | ||
| 1546 | add ebx, ebp | ||
| 1547 | ror edi, 1 | ||
| 1548 | add ecx, ebx | ||
| 1549 | ; 20_39 76 | ||
| 1550 | mov ebx, DWORD PTR 48[esp] | ||
| 1551 | mov ebp, DWORD PTR 56[esp] | ||
| 1552 | xor ebx, ebp | ||
| 1553 | mov ebp, DWORD PTR 16[esp] | ||
| 1554 | xor ebx, ebp | ||
| 1555 | mov ebp, DWORD PTR 36[esp] | ||
| 1556 | xor ebx, ebp | ||
| 1557 | mov ebp, edx | ||
| 1558 | rol ebx, 1 | ||
| 1559 | xor ebp, edi | ||
| 1560 | mov DWORD PTR 48[esp],ebx | ||
| 1561 | xor ebp, esi | ||
| 1562 | lea ebx, DWORD PTR 3395469782[eax*1+ebx] | ||
| 1563 | mov eax, ecx | ||
| 1564 | rol eax, 5 | ||
| 1565 | ror edx, 1 | ||
| 1566 | add eax, ebp | ||
| 1567 | ror edx, 1 | ||
| 1568 | add ebx, eax | ||
| 1569 | ; 20_39 77 | ||
| 1570 | mov eax, DWORD PTR 52[esp] | ||
| 1571 | mov ebp, DWORD PTR 60[esp] | ||
| 1572 | xor eax, ebp | ||
| 1573 | mov ebp, DWORD PTR 20[esp] | ||
| 1574 | xor eax, ebp | ||
| 1575 | mov ebp, DWORD PTR 40[esp] | ||
| 1576 | xor eax, ebp | ||
| 1577 | mov ebp, ecx | ||
| 1578 | rol eax, 1 | ||
| 1579 | xor ebp, edx | ||
| 1580 | mov DWORD PTR 52[esp],eax | ||
| 1581 | xor ebp, edi | ||
| 1582 | lea eax, DWORD PTR 3395469782[esi*1+eax] | ||
| 1583 | mov esi, ebx | ||
| 1584 | rol esi, 5 | ||
| 1585 | ror ecx, 1 | ||
| 1586 | add esi, ebp | ||
| 1587 | ror ecx, 1 | ||
| 1588 | add eax, esi | ||
| 1589 | ; 20_39 78 | ||
| 1590 | mov esi, DWORD PTR 56[esp] | ||
| 1591 | mov ebp, DWORD PTR [esp] | ||
| 1592 | xor esi, ebp | ||
| 1593 | mov ebp, DWORD PTR 24[esp] | ||
| 1594 | xor esi, ebp | ||
| 1595 | mov ebp, DWORD PTR 44[esp] | ||
| 1596 | xor esi, ebp | ||
| 1597 | mov ebp, ebx | ||
| 1598 | rol esi, 1 | ||
| 1599 | xor ebp, ecx | ||
| 1600 | mov DWORD PTR 56[esp],esi | ||
| 1601 | xor ebp, edx | ||
| 1602 | lea esi, DWORD PTR 3395469782[edi*1+esi] | ||
| 1603 | mov edi, eax | ||
| 1604 | rol edi, 5 | ||
| 1605 | ror ebx, 1 | ||
| 1606 | add edi, ebp | ||
| 1607 | ror ebx, 1 | ||
| 1608 | add esi, edi | ||
| 1609 | ; 20_39 79 | ||
| 1610 | mov edi, DWORD PTR 60[esp] | ||
| 1611 | mov ebp, DWORD PTR 4[esp] | ||
| 1612 | xor edi, ebp | ||
| 1613 | mov ebp, DWORD PTR 28[esp] | ||
| 1614 | xor edi, ebp | ||
| 1615 | mov ebp, DWORD PTR 48[esp] | ||
| 1616 | xor edi, ebp | ||
| 1617 | mov ebp, eax | ||
| 1618 | rol edi, 1 | ||
| 1619 | xor ebp, ebx | ||
| 1620 | mov DWORD PTR 60[esp],edi | ||
| 1621 | xor ebp, ecx | ||
| 1622 | lea edi, DWORD PTR 3395469782[edx*1+edi] | ||
| 1623 | mov edx, esi | ||
| 1624 | rol edx, 5 | ||
| 1625 | add edx, ebp | ||
| 1626 | mov ebp, DWORD PTR 92[esp] | ||
| 1627 | ror eax, 1 | ||
| 1628 | add edi, edx | ||
| 1629 | ror eax, 1 | ||
| 1630 | ; End processing | ||
| 1631 | ; | ||
| 1632 | mov edx, DWORD PTR 12[ebp] | ||
| 1633 | add edx, ebx | ||
| 1634 | mov ebx, DWORD PTR 4[ebp] | ||
| 1635 | add ebx, esi | ||
| 1636 | mov esi, eax | ||
| 1637 | mov eax, DWORD PTR [ebp] | ||
| 1638 | mov DWORD PTR 12[ebp],edx | ||
| 1639 | add eax, edi | ||
| 1640 | mov edi, DWORD PTR 16[ebp] | ||
| 1641 | add edi, ecx | ||
| 1642 | mov ecx, DWORD PTR 8[ebp] | ||
| 1643 | add ecx, esi | ||
| 1644 | mov DWORD PTR [ebp],eax | ||
| 1645 | mov esi, DWORD PTR 64[esp] | ||
| 1646 | mov DWORD PTR 8[ebp],ecx | ||
| 1647 | add esi, 64 | ||
| 1648 | mov eax, DWORD PTR 68[esp] | ||
| 1649 | mov DWORD PTR 16[ebp],edi | ||
| 1650 | cmp eax, esi | ||
| 1651 | mov DWORD PTR 4[ebp],ebx | ||
| 1652 | jl $L001end | ||
| 1653 | mov eax, DWORD PTR [esi] | ||
| 1654 | jmp L000start | ||
| 1655 | $L001end: | ||
| 1656 | add esp, 72 | ||
| 1657 | pop edi | ||
| 1658 | pop ebx | ||
| 1659 | pop ebp | ||
| 1660 | pop esi | ||
| 1661 | ret | ||
| 1662 | _sha1_block_x86 ENDP | ||
| 1663 | _TEXT ENDS | ||
| 1664 | END | ||
diff --git a/src/lib/libssl/src/crypto/sha/asm/sx86unix.cpp b/src/lib/libssl/src/crypto/sha/asm/sx86unix.cpp new file mode 100644 index 0000000000..8366664a39 --- /dev/null +++ b/src/lib/libssl/src/crypto/sha/asm/sx86unix.cpp | |||
| @@ -0,0 +1,1948 @@ | |||
| 1 | /* Run the C pre-processor over this file with one of the following defined | ||
| 2 | * ELF - elf object files, | ||
| 3 | * OUT - a.out object files, | ||
| 4 | * BSDI - BSDI style a.out object files | ||
| 5 | * SOL - Solaris style elf | ||
| 6 | */ | ||
| 7 | |||
| 8 | #define TYPE(a,b) .type a,b | ||
| 9 | #define SIZE(a,b) .size a,b | ||
| 10 | |||
| 11 | #if defined(OUT) || defined(BSDI) | ||
| 12 | #define sha1_block_x86 _sha1_block_x86 | ||
| 13 | |||
| 14 | #endif | ||
| 15 | |||
| 16 | #ifdef OUT | ||
| 17 | #define OK 1 | ||
| 18 | #define ALIGN 4 | ||
| 19 | #endif | ||
| 20 | |||
| 21 | #ifdef BSDI | ||
| 22 | #define OK 1 | ||
| 23 | #define ALIGN 4 | ||
| 24 | #undef SIZE | ||
| 25 | #undef TYPE | ||
| 26 | #define SIZE(a,b) | ||
| 27 | #define TYPE(a,b) | ||
| 28 | #endif | ||
| 29 | |||
| 30 | #if defined(ELF) || defined(SOL) | ||
| 31 | #define OK 1 | ||
| 32 | #define ALIGN 16 | ||
| 33 | #endif | ||
| 34 | |||
| 35 | #ifndef OK | ||
| 36 | You need to define one of | ||
| 37 | ELF - elf systems - linux-elf, NetBSD and DG-UX | ||
| 38 | OUT - a.out systems - linux-a.out and FreeBSD | ||
| 39 | SOL - solaris systems, which are elf with strange comment lines | ||
| 40 | BSDI - a.out with a very primative version of as. | ||
| 41 | #endif | ||
| 42 | |||
| 43 | /* Let the Assembler begin :-) */ | ||
| 44 | /* Don't even think of reading this code */ | ||
| 45 | /* It was automatically generated by sha1-586.pl */ | ||
| 46 | /* Which is a perl program used to generate the x86 assember for */ | ||
| 47 | /* any of elf, a.out, BSDI,Win32, or Solaris */ | ||
| 48 | /* eric <eay@cryptsoft.com> */ | ||
| 49 | |||
| 50 | .file "sha1-586.s" | ||
| 51 | .version "01.01" | ||
| 52 | gcc2_compiled.: | ||
| 53 | .text | ||
| 54 | .align ALIGN | ||
| 55 | .globl sha1_block_x86 | ||
| 56 | TYPE(sha1_block_x86,@function) | ||
| 57 | sha1_block_x86: | ||
| 58 | pushl %esi | ||
| 59 | pushl %ebp | ||
| 60 | movl 20(%esp), %eax | ||
| 61 | movl 16(%esp), %esi | ||
| 62 | addl %esi, %eax | ||
| 63 | movl 12(%esp), %ebp | ||
| 64 | pushl %ebx | ||
| 65 | subl $64, %eax | ||
| 66 | pushl %edi | ||
| 67 | movl 4(%ebp), %ebx | ||
| 68 | subl $72, %esp | ||
| 69 | movl 12(%ebp), %edx | ||
| 70 | movl 16(%ebp), %edi | ||
| 71 | movl 8(%ebp), %ecx | ||
| 72 | movl %eax, 68(%esp) | ||
| 73 | /* First we need to setup the X array */ | ||
| 74 | movl (%esi), %eax | ||
| 75 | .L000start: | ||
| 76 | /* First, load the words onto the stack in network byte order */ | ||
| 77 | .byte 15 | ||
| 78 | .byte 200 /* bswapl %eax */ | ||
| 79 | movl %eax, (%esp) | ||
| 80 | movl 4(%esi), %eax | ||
| 81 | .byte 15 | ||
| 82 | .byte 200 /* bswapl %eax */ | ||
| 83 | movl %eax, 4(%esp) | ||
| 84 | movl 8(%esi), %eax | ||
| 85 | .byte 15 | ||
| 86 | .byte 200 /* bswapl %eax */ | ||
| 87 | movl %eax, 8(%esp) | ||
| 88 | movl 12(%esi), %eax | ||
| 89 | .byte 15 | ||
| 90 | .byte 200 /* bswapl %eax */ | ||
| 91 | movl %eax, 12(%esp) | ||
| 92 | movl 16(%esi), %eax | ||
| 93 | .byte 15 | ||
| 94 | .byte 200 /* bswapl %eax */ | ||
| 95 | movl %eax, 16(%esp) | ||
| 96 | movl 20(%esi), %eax | ||
| 97 | .byte 15 | ||
| 98 | .byte 200 /* bswapl %eax */ | ||
| 99 | movl %eax, 20(%esp) | ||
| 100 | movl 24(%esi), %eax | ||
| 101 | .byte 15 | ||
| 102 | .byte 200 /* bswapl %eax */ | ||
| 103 | movl %eax, 24(%esp) | ||
| 104 | movl 28(%esi), %eax | ||
| 105 | .byte 15 | ||
| 106 | .byte 200 /* bswapl %eax */ | ||
| 107 | movl %eax, 28(%esp) | ||
| 108 | movl 32(%esi), %eax | ||
| 109 | .byte 15 | ||
| 110 | .byte 200 /* bswapl %eax */ | ||
| 111 | movl %eax, 32(%esp) | ||
| 112 | movl 36(%esi), %eax | ||
| 113 | .byte 15 | ||
| 114 | .byte 200 /* bswapl %eax */ | ||
| 115 | movl %eax, 36(%esp) | ||
| 116 | movl 40(%esi), %eax | ||
| 117 | .byte 15 | ||
| 118 | .byte 200 /* bswapl %eax */ | ||
| 119 | movl %eax, 40(%esp) | ||
| 120 | movl 44(%esi), %eax | ||
| 121 | .byte 15 | ||
| 122 | .byte 200 /* bswapl %eax */ | ||
| 123 | movl %eax, 44(%esp) | ||
| 124 | movl 48(%esi), %eax | ||
| 125 | .byte 15 | ||
| 126 | .byte 200 /* bswapl %eax */ | ||
| 127 | movl %eax, 48(%esp) | ||
| 128 | movl 52(%esi), %eax | ||
| 129 | .byte 15 | ||
| 130 | .byte 200 /* bswapl %eax */ | ||
| 131 | movl %eax, 52(%esp) | ||
| 132 | movl 56(%esi), %eax | ||
| 133 | .byte 15 | ||
| 134 | .byte 200 /* bswapl %eax */ | ||
| 135 | movl %eax, 56(%esp) | ||
| 136 | movl 60(%esi), %eax | ||
| 137 | .byte 15 | ||
| 138 | .byte 200 /* bswapl %eax */ | ||
| 139 | movl %eax, 60(%esp) | ||
| 140 | /* We now have the X array on the stack */ | ||
| 141 | /* starting at sp-4 */ | ||
| 142 | movl %esi, 64(%esp) | ||
| 143 | |||
| 144 | /* Start processing */ | ||
| 145 | movl (%ebp), %eax | ||
| 146 | /* 00_15 0 */ | ||
| 147 | movl %ecx, %esi | ||
| 148 | movl %eax, %ebp | ||
| 149 | xorl %edx, %esi | ||
| 150 | roll $5, %ebp | ||
| 151 | andl %ebx, %esi | ||
| 152 | addl %edi, %ebp | ||
| 153 | .byte 209 | ||
| 154 | .byte 203 /* rorl $1 %ebx */ | ||
| 155 | movl (%esp), %edi | ||
| 156 | .byte 209 | ||
| 157 | .byte 203 /* rorl $1 %ebx */ | ||
| 158 | xorl %edx, %esi | ||
| 159 | leal 1518500249(%ebp,%edi,1),%ebp | ||
| 160 | movl %ebx, %edi | ||
| 161 | addl %ebp, %esi | ||
| 162 | xorl %ecx, %edi | ||
| 163 | movl %esi, %ebp | ||
| 164 | andl %eax, %edi | ||
| 165 | roll $5, %ebp | ||
| 166 | addl %edx, %ebp | ||
| 167 | movl 4(%esp), %edx | ||
| 168 | .byte 209 | ||
| 169 | .byte 200 /* rorl $1 %eax */ | ||
| 170 | xorl %ecx, %edi | ||
| 171 | .byte 209 | ||
| 172 | .byte 200 /* rorl $1 %eax */ | ||
| 173 | leal 1518500249(%ebp,%edx,1),%ebp | ||
| 174 | addl %ebp, %edi | ||
| 175 | /* 00_15 2 */ | ||
| 176 | movl %eax, %edx | ||
| 177 | movl %edi, %ebp | ||
| 178 | xorl %ebx, %edx | ||
| 179 | roll $5, %ebp | ||
| 180 | andl %esi, %edx | ||
| 181 | addl %ecx, %ebp | ||
| 182 | .byte 209 | ||
| 183 | .byte 206 /* rorl $1 %esi */ | ||
| 184 | movl 8(%esp), %ecx | ||
| 185 | .byte 209 | ||
| 186 | .byte 206 /* rorl $1 %esi */ | ||
| 187 | xorl %ebx, %edx | ||
| 188 | leal 1518500249(%ebp,%ecx,1),%ebp | ||
| 189 | movl %esi, %ecx | ||
| 190 | addl %ebp, %edx | ||
| 191 | xorl %eax, %ecx | ||
| 192 | movl %edx, %ebp | ||
| 193 | andl %edi, %ecx | ||
| 194 | roll $5, %ebp | ||
| 195 | addl %ebx, %ebp | ||
| 196 | movl 12(%esp), %ebx | ||
| 197 | .byte 209 | ||
| 198 | .byte 207 /* rorl $1 %edi */ | ||
| 199 | xorl %eax, %ecx | ||
| 200 | .byte 209 | ||
| 201 | .byte 207 /* rorl $1 %edi */ | ||
| 202 | leal 1518500249(%ebp,%ebx,1),%ebp | ||
| 203 | addl %ebp, %ecx | ||
| 204 | /* 00_15 4 */ | ||
| 205 | movl %edi, %ebx | ||
| 206 | movl %ecx, %ebp | ||
| 207 | xorl %esi, %ebx | ||
| 208 | roll $5, %ebp | ||
| 209 | andl %edx, %ebx | ||
| 210 | addl %eax, %ebp | ||
| 211 | .byte 209 | ||
| 212 | .byte 202 /* rorl $1 %edx */ | ||
| 213 | movl 16(%esp), %eax | ||
| 214 | .byte 209 | ||
| 215 | .byte 202 /* rorl $1 %edx */ | ||
| 216 | xorl %esi, %ebx | ||
| 217 | leal 1518500249(%ebp,%eax,1),%ebp | ||
| 218 | movl %edx, %eax | ||
| 219 | addl %ebp, %ebx | ||
| 220 | xorl %edi, %eax | ||
| 221 | movl %ebx, %ebp | ||
| 222 | andl %ecx, %eax | ||
| 223 | roll $5, %ebp | ||
| 224 | addl %esi, %ebp | ||
| 225 | movl 20(%esp), %esi | ||
| 226 | .byte 209 | ||
| 227 | .byte 201 /* rorl $1 %ecx */ | ||
| 228 | xorl %edi, %eax | ||
| 229 | .byte 209 | ||
| 230 | .byte 201 /* rorl $1 %ecx */ | ||
| 231 | leal 1518500249(%ebp,%esi,1),%ebp | ||
| 232 | addl %ebp, %eax | ||
| 233 | /* 00_15 6 */ | ||
| 234 | movl %ecx, %esi | ||
| 235 | movl %eax, %ebp | ||
| 236 | xorl %edx, %esi | ||
| 237 | roll $5, %ebp | ||
| 238 | andl %ebx, %esi | ||
| 239 | addl %edi, %ebp | ||
| 240 | .byte 209 | ||
| 241 | .byte 203 /* rorl $1 %ebx */ | ||
| 242 | movl 24(%esp), %edi | ||
| 243 | .byte 209 | ||
| 244 | .byte 203 /* rorl $1 %ebx */ | ||
| 245 | xorl %edx, %esi | ||
| 246 | leal 1518500249(%ebp,%edi,1),%ebp | ||
| 247 | movl %ebx, %edi | ||
| 248 | addl %ebp, %esi | ||
| 249 | xorl %ecx, %edi | ||
| 250 | movl %esi, %ebp | ||
| 251 | andl %eax, %edi | ||
| 252 | roll $5, %ebp | ||
| 253 | addl %edx, %ebp | ||
| 254 | movl 28(%esp), %edx | ||
| 255 | .byte 209 | ||
| 256 | .byte 200 /* rorl $1 %eax */ | ||
| 257 | xorl %ecx, %edi | ||
| 258 | .byte 209 | ||
| 259 | .byte 200 /* rorl $1 %eax */ | ||
| 260 | leal 1518500249(%ebp,%edx,1),%ebp | ||
| 261 | addl %ebp, %edi | ||
| 262 | /* 00_15 8 */ | ||
| 263 | movl %eax, %edx | ||
| 264 | movl %edi, %ebp | ||
| 265 | xorl %ebx, %edx | ||
| 266 | roll $5, %ebp | ||
| 267 | andl %esi, %edx | ||
| 268 | addl %ecx, %ebp | ||
| 269 | .byte 209 | ||
| 270 | .byte 206 /* rorl $1 %esi */ | ||
| 271 | movl 32(%esp), %ecx | ||
| 272 | .byte 209 | ||
| 273 | .byte 206 /* rorl $1 %esi */ | ||
| 274 | xorl %ebx, %edx | ||
| 275 | leal 1518500249(%ebp,%ecx,1),%ebp | ||
| 276 | movl %esi, %ecx | ||
| 277 | addl %ebp, %edx | ||
| 278 | xorl %eax, %ecx | ||
| 279 | movl %edx, %ebp | ||
| 280 | andl %edi, %ecx | ||
| 281 | roll $5, %ebp | ||
| 282 | addl %ebx, %ebp | ||
| 283 | movl 36(%esp), %ebx | ||
| 284 | .byte 209 | ||
| 285 | .byte 207 /* rorl $1 %edi */ | ||
| 286 | xorl %eax, %ecx | ||
| 287 | .byte 209 | ||
| 288 | .byte 207 /* rorl $1 %edi */ | ||
| 289 | leal 1518500249(%ebp,%ebx,1),%ebp | ||
| 290 | addl %ebp, %ecx | ||
| 291 | /* 00_15 10 */ | ||
| 292 | movl %edi, %ebx | ||
| 293 | movl %ecx, %ebp | ||
| 294 | xorl %esi, %ebx | ||
| 295 | roll $5, %ebp | ||
| 296 | andl %edx, %ebx | ||
| 297 | addl %eax, %ebp | ||
| 298 | .byte 209 | ||
| 299 | .byte 202 /* rorl $1 %edx */ | ||
| 300 | movl 40(%esp), %eax | ||
| 301 | .byte 209 | ||
| 302 | .byte 202 /* rorl $1 %edx */ | ||
| 303 | xorl %esi, %ebx | ||
| 304 | leal 1518500249(%ebp,%eax,1),%ebp | ||
| 305 | movl %edx, %eax | ||
| 306 | addl %ebp, %ebx | ||
| 307 | xorl %edi, %eax | ||
| 308 | movl %ebx, %ebp | ||
| 309 | andl %ecx, %eax | ||
| 310 | roll $5, %ebp | ||
| 311 | addl %esi, %ebp | ||
| 312 | movl 44(%esp), %esi | ||
| 313 | .byte 209 | ||
| 314 | .byte 201 /* rorl $1 %ecx */ | ||
| 315 | xorl %edi, %eax | ||
| 316 | .byte 209 | ||
| 317 | .byte 201 /* rorl $1 %ecx */ | ||
| 318 | leal 1518500249(%ebp,%esi,1),%ebp | ||
| 319 | addl %ebp, %eax | ||
| 320 | /* 00_15 12 */ | ||
| 321 | movl %ecx, %esi | ||
| 322 | movl %eax, %ebp | ||
| 323 | xorl %edx, %esi | ||
| 324 | roll $5, %ebp | ||
| 325 | andl %ebx, %esi | ||
| 326 | addl %edi, %ebp | ||
| 327 | .byte 209 | ||
| 328 | .byte 203 /* rorl $1 %ebx */ | ||
| 329 | movl 48(%esp), %edi | ||
| 330 | .byte 209 | ||
| 331 | .byte 203 /* rorl $1 %ebx */ | ||
| 332 | xorl %edx, %esi | ||
| 333 | leal 1518500249(%ebp,%edi,1),%ebp | ||
| 334 | movl %ebx, %edi | ||
| 335 | addl %ebp, %esi | ||
| 336 | xorl %ecx, %edi | ||
| 337 | movl %esi, %ebp | ||
| 338 | andl %eax, %edi | ||
| 339 | roll $5, %ebp | ||
| 340 | addl %edx, %ebp | ||
| 341 | movl 52(%esp), %edx | ||
| 342 | .byte 209 | ||
| 343 | .byte 200 /* rorl $1 %eax */ | ||
| 344 | xorl %ecx, %edi | ||
| 345 | .byte 209 | ||
| 346 | .byte 200 /* rorl $1 %eax */ | ||
| 347 | leal 1518500249(%ebp,%edx,1),%ebp | ||
| 348 | addl %ebp, %edi | ||
| 349 | /* 00_15 14 */ | ||
| 350 | movl %eax, %edx | ||
| 351 | movl %edi, %ebp | ||
| 352 | xorl %ebx, %edx | ||
| 353 | roll $5, %ebp | ||
| 354 | andl %esi, %edx | ||
| 355 | addl %ecx, %ebp | ||
| 356 | .byte 209 | ||
| 357 | .byte 206 /* rorl $1 %esi */ | ||
| 358 | movl 56(%esp), %ecx | ||
| 359 | .byte 209 | ||
| 360 | .byte 206 /* rorl $1 %esi */ | ||
| 361 | xorl %ebx, %edx | ||
| 362 | leal 1518500249(%ebp,%ecx,1),%ebp | ||
| 363 | movl %esi, %ecx | ||
| 364 | addl %ebp, %edx | ||
| 365 | xorl %eax, %ecx | ||
| 366 | movl %edx, %ebp | ||
| 367 | andl %edi, %ecx | ||
| 368 | roll $5, %ebp | ||
| 369 | addl %ebx, %ebp | ||
| 370 | movl 60(%esp), %ebx | ||
| 371 | .byte 209 | ||
| 372 | .byte 207 /* rorl $1 %edi */ | ||
| 373 | xorl %eax, %ecx | ||
| 374 | .byte 209 | ||
| 375 | .byte 207 /* rorl $1 %edi */ | ||
| 376 | leal 1518500249(%ebp,%ebx,1),%ebp | ||
| 377 | addl %ebp, %ecx | ||
| 378 | /* 16_19 16 */ | ||
| 379 | nop | ||
| 380 | movl (%esp), %ebp | ||
| 381 | movl 8(%esp), %ebx | ||
| 382 | xorl %ebp, %ebx | ||
| 383 | movl 32(%esp), %ebp | ||
| 384 | xorl %ebp, %ebx | ||
| 385 | movl 52(%esp), %ebp | ||
| 386 | xorl %ebp, %ebx | ||
| 387 | movl %edi, %ebp | ||
| 388 | .byte 209 | ||
| 389 | .byte 195 /* roll $1 %ebx */ | ||
| 390 | xorl %esi, %ebp | ||
| 391 | movl %ebx, (%esp) | ||
| 392 | andl %edx, %ebp | ||
| 393 | leal 1518500249(%ebx,%eax,1),%ebx | ||
| 394 | xorl %esi, %ebp | ||
| 395 | movl %ecx, %eax | ||
| 396 | addl %ebp, %ebx | ||
| 397 | roll $5, %eax | ||
| 398 | .byte 209 | ||
| 399 | .byte 202 /* rorl $1 %edx */ | ||
| 400 | addl %eax, %ebx | ||
| 401 | movl 4(%esp), %eax | ||
| 402 | movl 12(%esp), %ebp | ||
| 403 | xorl %ebp, %eax | ||
| 404 | movl 36(%esp), %ebp | ||
| 405 | xorl %ebp, %eax | ||
| 406 | movl 56(%esp), %ebp | ||
| 407 | .byte 209 | ||
| 408 | .byte 202 /* rorl $1 %edx */ | ||
| 409 | xorl %ebp, %eax | ||
| 410 | .byte 209 | ||
| 411 | .byte 192 /* roll $1 %eax */ | ||
| 412 | movl %edx, %ebp | ||
| 413 | xorl %edi, %ebp | ||
| 414 | movl %eax, 4(%esp) | ||
| 415 | andl %ecx, %ebp | ||
| 416 | leal 1518500249(%eax,%esi,1),%eax | ||
| 417 | xorl %edi, %ebp | ||
| 418 | movl %ebx, %esi | ||
| 419 | roll $5, %esi | ||
| 420 | .byte 209 | ||
| 421 | .byte 201 /* rorl $1 %ecx */ | ||
| 422 | addl %esi, %eax | ||
| 423 | .byte 209 | ||
| 424 | .byte 201 /* rorl $1 %ecx */ | ||
| 425 | addl %ebp, %eax | ||
| 426 | /* 16_19 18 */ | ||
| 427 | movl 8(%esp), %ebp | ||
| 428 | movl 16(%esp), %esi | ||
| 429 | xorl %ebp, %esi | ||
| 430 | movl 40(%esp), %ebp | ||
| 431 | xorl %ebp, %esi | ||
| 432 | movl 60(%esp), %ebp | ||
| 433 | xorl %ebp, %esi | ||
| 434 | movl %ecx, %ebp | ||
| 435 | .byte 209 | ||
| 436 | .byte 198 /* roll $1 %esi */ | ||
| 437 | xorl %edx, %ebp | ||
| 438 | movl %esi, 8(%esp) | ||
| 439 | andl %ebx, %ebp | ||
| 440 | leal 1518500249(%esi,%edi,1),%esi | ||
| 441 | xorl %edx, %ebp | ||
| 442 | movl %eax, %edi | ||
| 443 | addl %ebp, %esi | ||
| 444 | roll $5, %edi | ||
| 445 | .byte 209 | ||
| 446 | .byte 203 /* rorl $1 %ebx */ | ||
| 447 | addl %edi, %esi | ||
| 448 | movl 12(%esp), %edi | ||
| 449 | movl 20(%esp), %ebp | ||
| 450 | xorl %ebp, %edi | ||
| 451 | movl 44(%esp), %ebp | ||
| 452 | xorl %ebp, %edi | ||
| 453 | movl (%esp), %ebp | ||
| 454 | .byte 209 | ||
| 455 | .byte 203 /* rorl $1 %ebx */ | ||
| 456 | xorl %ebp, %edi | ||
| 457 | .byte 209 | ||
| 458 | .byte 199 /* roll $1 %edi */ | ||
| 459 | movl %ebx, %ebp | ||
| 460 | xorl %ecx, %ebp | ||
| 461 | movl %edi, 12(%esp) | ||
| 462 | andl %eax, %ebp | ||
| 463 | leal 1518500249(%edi,%edx,1),%edi | ||
| 464 | xorl %ecx, %ebp | ||
| 465 | movl %esi, %edx | ||
| 466 | roll $5, %edx | ||
| 467 | .byte 209 | ||
| 468 | .byte 200 /* rorl $1 %eax */ | ||
| 469 | addl %edx, %edi | ||
| 470 | .byte 209 | ||
| 471 | .byte 200 /* rorl $1 %eax */ | ||
| 472 | addl %ebp, %edi | ||
| 473 | /* 20_39 20 */ | ||
| 474 | movl 16(%esp), %edx | ||
| 475 | movl 24(%esp), %ebp | ||
| 476 | xorl %ebp, %edx | ||
| 477 | movl 48(%esp), %ebp | ||
| 478 | xorl %ebp, %edx | ||
| 479 | movl 4(%esp), %ebp | ||
| 480 | xorl %ebp, %edx | ||
| 481 | movl %esi, %ebp | ||
| 482 | .byte 209 | ||
| 483 | .byte 194 /* roll $1 %edx */ | ||
| 484 | xorl %eax, %ebp | ||
| 485 | movl %edx, 16(%esp) | ||
| 486 | xorl %ebx, %ebp | ||
| 487 | leal 1859775393(%edx,%ecx,1),%edx | ||
| 488 | movl %edi, %ecx | ||
| 489 | roll $5, %ecx | ||
| 490 | .byte 209 | ||
| 491 | .byte 206 /* rorl $1 %esi */ | ||
| 492 | addl %ebp, %ecx | ||
| 493 | .byte 209 | ||
| 494 | .byte 206 /* rorl $1 %esi */ | ||
| 495 | addl %ecx, %edx | ||
| 496 | /* 20_39 21 */ | ||
| 497 | movl 20(%esp), %ecx | ||
| 498 | movl 28(%esp), %ebp | ||
| 499 | xorl %ebp, %ecx | ||
| 500 | movl 52(%esp), %ebp | ||
| 501 | xorl %ebp, %ecx | ||
| 502 | movl 8(%esp), %ebp | ||
| 503 | xorl %ebp, %ecx | ||
| 504 | movl %edi, %ebp | ||
| 505 | .byte 209 | ||
| 506 | .byte 193 /* roll $1 %ecx */ | ||
| 507 | xorl %esi, %ebp | ||
| 508 | movl %ecx, 20(%esp) | ||
| 509 | xorl %eax, %ebp | ||
| 510 | leal 1859775393(%ecx,%ebx,1),%ecx | ||
| 511 | movl %edx, %ebx | ||
| 512 | roll $5, %ebx | ||
| 513 | .byte 209 | ||
| 514 | .byte 207 /* rorl $1 %edi */ | ||
| 515 | addl %ebp, %ebx | ||
| 516 | .byte 209 | ||
| 517 | .byte 207 /* rorl $1 %edi */ | ||
| 518 | addl %ebx, %ecx | ||
| 519 | /* 20_39 22 */ | ||
| 520 | movl 24(%esp), %ebx | ||
| 521 | movl 32(%esp), %ebp | ||
| 522 | xorl %ebp, %ebx | ||
| 523 | movl 56(%esp), %ebp | ||
| 524 | xorl %ebp, %ebx | ||
| 525 | movl 12(%esp), %ebp | ||
| 526 | xorl %ebp, %ebx | ||
| 527 | movl %edx, %ebp | ||
| 528 | .byte 209 | ||
| 529 | .byte 195 /* roll $1 %ebx */ | ||
| 530 | xorl %edi, %ebp | ||
| 531 | movl %ebx, 24(%esp) | ||
| 532 | xorl %esi, %ebp | ||
| 533 | leal 1859775393(%ebx,%eax,1),%ebx | ||
| 534 | movl %ecx, %eax | ||
| 535 | roll $5, %eax | ||
| 536 | .byte 209 | ||
| 537 | .byte 202 /* rorl $1 %edx */ | ||
| 538 | addl %ebp, %eax | ||
| 539 | .byte 209 | ||
| 540 | .byte 202 /* rorl $1 %edx */ | ||
| 541 | addl %eax, %ebx | ||
| 542 | /* 20_39 23 */ | ||
| 543 | movl 28(%esp), %eax | ||
| 544 | movl 36(%esp), %ebp | ||
| 545 | xorl %ebp, %eax | ||
| 546 | movl 60(%esp), %ebp | ||
| 547 | xorl %ebp, %eax | ||
| 548 | movl 16(%esp), %ebp | ||
| 549 | xorl %ebp, %eax | ||
| 550 | movl %ecx, %ebp | ||
| 551 | .byte 209 | ||
| 552 | .byte 192 /* roll $1 %eax */ | ||
| 553 | xorl %edx, %ebp | ||
| 554 | movl %eax, 28(%esp) | ||
| 555 | xorl %edi, %ebp | ||
| 556 | leal 1859775393(%eax,%esi,1),%eax | ||
| 557 | movl %ebx, %esi | ||
| 558 | roll $5, %esi | ||
| 559 | .byte 209 | ||
| 560 | .byte 201 /* rorl $1 %ecx */ | ||
| 561 | addl %ebp, %esi | ||
| 562 | .byte 209 | ||
| 563 | .byte 201 /* rorl $1 %ecx */ | ||
| 564 | addl %esi, %eax | ||
| 565 | /* 20_39 24 */ | ||
| 566 | movl 32(%esp), %esi | ||
| 567 | movl 40(%esp), %ebp | ||
| 568 | xorl %ebp, %esi | ||
| 569 | movl (%esp), %ebp | ||
| 570 | xorl %ebp, %esi | ||
| 571 | movl 20(%esp), %ebp | ||
| 572 | xorl %ebp, %esi | ||
| 573 | movl %ebx, %ebp | ||
| 574 | .byte 209 | ||
| 575 | .byte 198 /* roll $1 %esi */ | ||
| 576 | xorl %ecx, %ebp | ||
| 577 | movl %esi, 32(%esp) | ||
| 578 | xorl %edx, %ebp | ||
| 579 | leal 1859775393(%esi,%edi,1),%esi | ||
| 580 | movl %eax, %edi | ||
| 581 | roll $5, %edi | ||
| 582 | .byte 209 | ||
| 583 | .byte 203 /* rorl $1 %ebx */ | ||
| 584 | addl %ebp, %edi | ||
| 585 | .byte 209 | ||
| 586 | .byte 203 /* rorl $1 %ebx */ | ||
| 587 | addl %edi, %esi | ||
| 588 | /* 20_39 25 */ | ||
| 589 | movl 36(%esp), %edi | ||
| 590 | movl 44(%esp), %ebp | ||
| 591 | xorl %ebp, %edi | ||
| 592 | movl 4(%esp), %ebp | ||
| 593 | xorl %ebp, %edi | ||
| 594 | movl 24(%esp), %ebp | ||
| 595 | xorl %ebp, %edi | ||
| 596 | movl %eax, %ebp | ||
| 597 | .byte 209 | ||
| 598 | .byte 199 /* roll $1 %edi */ | ||
| 599 | xorl %ebx, %ebp | ||
| 600 | movl %edi, 36(%esp) | ||
| 601 | xorl %ecx, %ebp | ||
| 602 | leal 1859775393(%edi,%edx,1),%edi | ||
| 603 | movl %esi, %edx | ||
| 604 | roll $5, %edx | ||
| 605 | .byte 209 | ||
| 606 | .byte 200 /* rorl $1 %eax */ | ||
| 607 | addl %ebp, %edx | ||
| 608 | .byte 209 | ||
| 609 | .byte 200 /* rorl $1 %eax */ | ||
| 610 | addl %edx, %edi | ||
| 611 | /* 20_39 26 */ | ||
| 612 | movl 40(%esp), %edx | ||
| 613 | movl 48(%esp), %ebp | ||
| 614 | xorl %ebp, %edx | ||
| 615 | movl 8(%esp), %ebp | ||
| 616 | xorl %ebp, %edx | ||
| 617 | movl 28(%esp), %ebp | ||
| 618 | xorl %ebp, %edx | ||
| 619 | movl %esi, %ebp | ||
| 620 | .byte 209 | ||
| 621 | .byte 194 /* roll $1 %edx */ | ||
| 622 | xorl %eax, %ebp | ||
| 623 | movl %edx, 40(%esp) | ||
| 624 | xorl %ebx, %ebp | ||
| 625 | leal 1859775393(%edx,%ecx,1),%edx | ||
| 626 | movl %edi, %ecx | ||
| 627 | roll $5, %ecx | ||
| 628 | .byte 209 | ||
| 629 | .byte 206 /* rorl $1 %esi */ | ||
| 630 | addl %ebp, %ecx | ||
| 631 | .byte 209 | ||
| 632 | .byte 206 /* rorl $1 %esi */ | ||
| 633 | addl %ecx, %edx | ||
| 634 | /* 20_39 27 */ | ||
| 635 | movl 44(%esp), %ecx | ||
| 636 | movl 52(%esp), %ebp | ||
| 637 | xorl %ebp, %ecx | ||
| 638 | movl 12(%esp), %ebp | ||
| 639 | xorl %ebp, %ecx | ||
| 640 | movl 32(%esp), %ebp | ||
| 641 | xorl %ebp, %ecx | ||
| 642 | movl %edi, %ebp | ||
| 643 | .byte 209 | ||
| 644 | .byte 193 /* roll $1 %ecx */ | ||
| 645 | xorl %esi, %ebp | ||
| 646 | movl %ecx, 44(%esp) | ||
| 647 | xorl %eax, %ebp | ||
| 648 | leal 1859775393(%ecx,%ebx,1),%ecx | ||
| 649 | movl %edx, %ebx | ||
| 650 | roll $5, %ebx | ||
| 651 | .byte 209 | ||
| 652 | .byte 207 /* rorl $1 %edi */ | ||
| 653 | addl %ebp, %ebx | ||
| 654 | .byte 209 | ||
| 655 | .byte 207 /* rorl $1 %edi */ | ||
| 656 | addl %ebx, %ecx | ||
| 657 | /* 20_39 28 */ | ||
| 658 | movl 48(%esp), %ebx | ||
| 659 | movl 56(%esp), %ebp | ||
| 660 | xorl %ebp, %ebx | ||
| 661 | movl 16(%esp), %ebp | ||
| 662 | xorl %ebp, %ebx | ||
| 663 | movl 36(%esp), %ebp | ||
| 664 | xorl %ebp, %ebx | ||
| 665 | movl %edx, %ebp | ||
| 666 | .byte 209 | ||
| 667 | .byte 195 /* roll $1 %ebx */ | ||
| 668 | xorl %edi, %ebp | ||
| 669 | movl %ebx, 48(%esp) | ||
| 670 | xorl %esi, %ebp | ||
| 671 | leal 1859775393(%ebx,%eax,1),%ebx | ||
| 672 | movl %ecx, %eax | ||
| 673 | roll $5, %eax | ||
| 674 | .byte 209 | ||
| 675 | .byte 202 /* rorl $1 %edx */ | ||
| 676 | addl %ebp, %eax | ||
| 677 | .byte 209 | ||
| 678 | .byte 202 /* rorl $1 %edx */ | ||
| 679 | addl %eax, %ebx | ||
| 680 | /* 20_39 29 */ | ||
| 681 | movl 52(%esp), %eax | ||
| 682 | movl 60(%esp), %ebp | ||
| 683 | xorl %ebp, %eax | ||
| 684 | movl 20(%esp), %ebp | ||
| 685 | xorl %ebp, %eax | ||
| 686 | movl 40(%esp), %ebp | ||
| 687 | xorl %ebp, %eax | ||
| 688 | movl %ecx, %ebp | ||
| 689 | .byte 209 | ||
| 690 | .byte 192 /* roll $1 %eax */ | ||
| 691 | xorl %edx, %ebp | ||
| 692 | movl %eax, 52(%esp) | ||
| 693 | xorl %edi, %ebp | ||
| 694 | leal 1859775393(%eax,%esi,1),%eax | ||
| 695 | movl %ebx, %esi | ||
| 696 | roll $5, %esi | ||
| 697 | .byte 209 | ||
| 698 | .byte 201 /* rorl $1 %ecx */ | ||
| 699 | addl %ebp, %esi | ||
| 700 | .byte 209 | ||
| 701 | .byte 201 /* rorl $1 %ecx */ | ||
| 702 | addl %esi, %eax | ||
| 703 | /* 20_39 30 */ | ||
| 704 | movl 56(%esp), %esi | ||
| 705 | movl (%esp), %ebp | ||
| 706 | xorl %ebp, %esi | ||
| 707 | movl 24(%esp), %ebp | ||
| 708 | xorl %ebp, %esi | ||
| 709 | movl 44(%esp), %ebp | ||
| 710 | xorl %ebp, %esi | ||
| 711 | movl %ebx, %ebp | ||
| 712 | .byte 209 | ||
| 713 | .byte 198 /* roll $1 %esi */ | ||
| 714 | xorl %ecx, %ebp | ||
| 715 | movl %esi, 56(%esp) | ||
| 716 | xorl %edx, %ebp | ||
| 717 | leal 1859775393(%esi,%edi,1),%esi | ||
| 718 | movl %eax, %edi | ||
| 719 | roll $5, %edi | ||
| 720 | .byte 209 | ||
| 721 | .byte 203 /* rorl $1 %ebx */ | ||
| 722 | addl %ebp, %edi | ||
| 723 | .byte 209 | ||
| 724 | .byte 203 /* rorl $1 %ebx */ | ||
| 725 | addl %edi, %esi | ||
| 726 | /* 20_39 31 */ | ||
| 727 | movl 60(%esp), %edi | ||
| 728 | movl 4(%esp), %ebp | ||
| 729 | xorl %ebp, %edi | ||
| 730 | movl 28(%esp), %ebp | ||
| 731 | xorl %ebp, %edi | ||
| 732 | movl 48(%esp), %ebp | ||
| 733 | xorl %ebp, %edi | ||
| 734 | movl %eax, %ebp | ||
| 735 | .byte 209 | ||
| 736 | .byte 199 /* roll $1 %edi */ | ||
| 737 | xorl %ebx, %ebp | ||
| 738 | movl %edi, 60(%esp) | ||
| 739 | xorl %ecx, %ebp | ||
| 740 | leal 1859775393(%edi,%edx,1),%edi | ||
| 741 | movl %esi, %edx | ||
| 742 | roll $5, %edx | ||
| 743 | .byte 209 | ||
| 744 | .byte 200 /* rorl $1 %eax */ | ||
| 745 | addl %ebp, %edx | ||
| 746 | .byte 209 | ||
| 747 | .byte 200 /* rorl $1 %eax */ | ||
| 748 | addl %edx, %edi | ||
| 749 | /* 20_39 32 */ | ||
| 750 | movl (%esp), %edx | ||
| 751 | movl 8(%esp), %ebp | ||
| 752 | xorl %ebp, %edx | ||
| 753 | movl 32(%esp), %ebp | ||
| 754 | xorl %ebp, %edx | ||
| 755 | movl 52(%esp), %ebp | ||
| 756 | xorl %ebp, %edx | ||
| 757 | movl %esi, %ebp | ||
| 758 | .byte 209 | ||
| 759 | .byte 194 /* roll $1 %edx */ | ||
| 760 | xorl %eax, %ebp | ||
| 761 | movl %edx, (%esp) | ||
| 762 | xorl %ebx, %ebp | ||
| 763 | leal 1859775393(%edx,%ecx,1),%edx | ||
| 764 | movl %edi, %ecx | ||
| 765 | roll $5, %ecx | ||
| 766 | .byte 209 | ||
| 767 | .byte 206 /* rorl $1 %esi */ | ||
| 768 | addl %ebp, %ecx | ||
| 769 | .byte 209 | ||
| 770 | .byte 206 /* rorl $1 %esi */ | ||
| 771 | addl %ecx, %edx | ||
| 772 | /* 20_39 33 */ | ||
| 773 | movl 4(%esp), %ecx | ||
| 774 | movl 12(%esp), %ebp | ||
| 775 | xorl %ebp, %ecx | ||
| 776 | movl 36(%esp), %ebp | ||
| 777 | xorl %ebp, %ecx | ||
| 778 | movl 56(%esp), %ebp | ||
| 779 | xorl %ebp, %ecx | ||
| 780 | movl %edi, %ebp | ||
| 781 | .byte 209 | ||
| 782 | .byte 193 /* roll $1 %ecx */ | ||
| 783 | xorl %esi, %ebp | ||
| 784 | movl %ecx, 4(%esp) | ||
| 785 | xorl %eax, %ebp | ||
| 786 | leal 1859775393(%ecx,%ebx,1),%ecx | ||
| 787 | movl %edx, %ebx | ||
| 788 | roll $5, %ebx | ||
| 789 | .byte 209 | ||
| 790 | .byte 207 /* rorl $1 %edi */ | ||
| 791 | addl %ebp, %ebx | ||
| 792 | .byte 209 | ||
| 793 | .byte 207 /* rorl $1 %edi */ | ||
| 794 | addl %ebx, %ecx | ||
| 795 | /* 20_39 34 */ | ||
| 796 | movl 8(%esp), %ebx | ||
| 797 | movl 16(%esp), %ebp | ||
| 798 | xorl %ebp, %ebx | ||
| 799 | movl 40(%esp), %ebp | ||
| 800 | xorl %ebp, %ebx | ||
| 801 | movl 60(%esp), %ebp | ||
| 802 | xorl %ebp, %ebx | ||
| 803 | movl %edx, %ebp | ||
| 804 | .byte 209 | ||
| 805 | .byte 195 /* roll $1 %ebx */ | ||
| 806 | xorl %edi, %ebp | ||
| 807 | movl %ebx, 8(%esp) | ||
| 808 | xorl %esi, %ebp | ||
| 809 | leal 1859775393(%ebx,%eax,1),%ebx | ||
| 810 | movl %ecx, %eax | ||
| 811 | roll $5, %eax | ||
| 812 | .byte 209 | ||
| 813 | .byte 202 /* rorl $1 %edx */ | ||
| 814 | addl %ebp, %eax | ||
| 815 | .byte 209 | ||
| 816 | .byte 202 /* rorl $1 %edx */ | ||
| 817 | addl %eax, %ebx | ||
| 818 | /* 20_39 35 */ | ||
| 819 | movl 12(%esp), %eax | ||
| 820 | movl 20(%esp), %ebp | ||
| 821 | xorl %ebp, %eax | ||
| 822 | movl 44(%esp), %ebp | ||
| 823 | xorl %ebp, %eax | ||
| 824 | movl (%esp), %ebp | ||
| 825 | xorl %ebp, %eax | ||
| 826 | movl %ecx, %ebp | ||
| 827 | .byte 209 | ||
| 828 | .byte 192 /* roll $1 %eax */ | ||
| 829 | xorl %edx, %ebp | ||
| 830 | movl %eax, 12(%esp) | ||
| 831 | xorl %edi, %ebp | ||
| 832 | leal 1859775393(%eax,%esi,1),%eax | ||
| 833 | movl %ebx, %esi | ||
| 834 | roll $5, %esi | ||
| 835 | .byte 209 | ||
| 836 | .byte 201 /* rorl $1 %ecx */ | ||
| 837 | addl %ebp, %esi | ||
| 838 | .byte 209 | ||
| 839 | .byte 201 /* rorl $1 %ecx */ | ||
| 840 | addl %esi, %eax | ||
| 841 | /* 20_39 36 */ | ||
| 842 | movl 16(%esp), %esi | ||
| 843 | movl 24(%esp), %ebp | ||
| 844 | xorl %ebp, %esi | ||
| 845 | movl 48(%esp), %ebp | ||
| 846 | xorl %ebp, %esi | ||
| 847 | movl 4(%esp), %ebp | ||
| 848 | xorl %ebp, %esi | ||
| 849 | movl %ebx, %ebp | ||
| 850 | .byte 209 | ||
| 851 | .byte 198 /* roll $1 %esi */ | ||
| 852 | xorl %ecx, %ebp | ||
| 853 | movl %esi, 16(%esp) | ||
| 854 | xorl %edx, %ebp | ||
| 855 | leal 1859775393(%esi,%edi,1),%esi | ||
| 856 | movl %eax, %edi | ||
| 857 | roll $5, %edi | ||
| 858 | .byte 209 | ||
| 859 | .byte 203 /* rorl $1 %ebx */ | ||
| 860 | addl %ebp, %edi | ||
| 861 | .byte 209 | ||
| 862 | .byte 203 /* rorl $1 %ebx */ | ||
| 863 | addl %edi, %esi | ||
| 864 | /* 20_39 37 */ | ||
| 865 | movl 20(%esp), %edi | ||
| 866 | movl 28(%esp), %ebp | ||
| 867 | xorl %ebp, %edi | ||
| 868 | movl 52(%esp), %ebp | ||
| 869 | xorl %ebp, %edi | ||
| 870 | movl 8(%esp), %ebp | ||
| 871 | xorl %ebp, %edi | ||
| 872 | movl %eax, %ebp | ||
| 873 | .byte 209 | ||
| 874 | .byte 199 /* roll $1 %edi */ | ||
| 875 | xorl %ebx, %ebp | ||
| 876 | movl %edi, 20(%esp) | ||
| 877 | xorl %ecx, %ebp | ||
| 878 | leal 1859775393(%edi,%edx,1),%edi | ||
| 879 | movl %esi, %edx | ||
| 880 | roll $5, %edx | ||
| 881 | .byte 209 | ||
| 882 | .byte 200 /* rorl $1 %eax */ | ||
| 883 | addl %ebp, %edx | ||
| 884 | .byte 209 | ||
| 885 | .byte 200 /* rorl $1 %eax */ | ||
| 886 | addl %edx, %edi | ||
| 887 | /* 20_39 38 */ | ||
| 888 | movl 24(%esp), %edx | ||
| 889 | movl 32(%esp), %ebp | ||
| 890 | xorl %ebp, %edx | ||
| 891 | movl 56(%esp), %ebp | ||
| 892 | xorl %ebp, %edx | ||
| 893 | movl 12(%esp), %ebp | ||
| 894 | xorl %ebp, %edx | ||
| 895 | movl %esi, %ebp | ||
| 896 | .byte 209 | ||
| 897 | .byte 194 /* roll $1 %edx */ | ||
| 898 | xorl %eax, %ebp | ||
| 899 | movl %edx, 24(%esp) | ||
| 900 | xorl %ebx, %ebp | ||
| 901 | leal 1859775393(%edx,%ecx,1),%edx | ||
| 902 | movl %edi, %ecx | ||
| 903 | roll $5, %ecx | ||
| 904 | .byte 209 | ||
| 905 | .byte 206 /* rorl $1 %esi */ | ||
| 906 | addl %ebp, %ecx | ||
| 907 | .byte 209 | ||
| 908 | .byte 206 /* rorl $1 %esi */ | ||
| 909 | addl %ecx, %edx | ||
| 910 | /* 20_39 39 */ | ||
| 911 | movl 28(%esp), %ecx | ||
| 912 | movl 36(%esp), %ebp | ||
| 913 | xorl %ebp, %ecx | ||
| 914 | movl 60(%esp), %ebp | ||
| 915 | xorl %ebp, %ecx | ||
| 916 | movl 16(%esp), %ebp | ||
| 917 | xorl %ebp, %ecx | ||
| 918 | movl %edi, %ebp | ||
| 919 | .byte 209 | ||
| 920 | .byte 193 /* roll $1 %ecx */ | ||
| 921 | xorl %esi, %ebp | ||
| 922 | movl %ecx, 28(%esp) | ||
| 923 | xorl %eax, %ebp | ||
| 924 | leal 1859775393(%ecx,%ebx,1),%ecx | ||
| 925 | movl %edx, %ebx | ||
| 926 | roll $5, %ebx | ||
| 927 | .byte 209 | ||
| 928 | .byte 207 /* rorl $1 %edi */ | ||
| 929 | addl %ebp, %ebx | ||
| 930 | .byte 209 | ||
| 931 | .byte 207 /* rorl $1 %edi */ | ||
| 932 | addl %ebx, %ecx | ||
| 933 | /* 40_59 40 */ | ||
| 934 | movl 32(%esp), %ebx | ||
| 935 | movl 40(%esp), %ebp | ||
| 936 | xorl %ebp, %ebx | ||
| 937 | movl (%esp), %ebp | ||
| 938 | xorl %ebp, %ebx | ||
| 939 | movl 20(%esp), %ebp | ||
| 940 | xorl %ebp, %ebx | ||
| 941 | movl %edx, %ebp | ||
| 942 | .byte 209 | ||
| 943 | .byte 195 /* roll $1 %ebx */ | ||
| 944 | orl %edi, %ebp | ||
| 945 | movl %ebx, 32(%esp) | ||
| 946 | andl %esi, %ebp | ||
| 947 | leal 2400959708(%ebx,%eax,1),%ebx | ||
| 948 | movl %edx, %eax | ||
| 949 | .byte 209 | ||
| 950 | .byte 202 /* rorl $1 %edx */ | ||
| 951 | andl %edi, %eax | ||
| 952 | orl %eax, %ebp | ||
| 953 | movl %ecx, %eax | ||
| 954 | roll $5, %eax | ||
| 955 | addl %eax, %ebp | ||
| 956 | movl 36(%esp), %eax | ||
| 957 | addl %ebp, %ebx | ||
| 958 | movl 44(%esp), %ebp | ||
| 959 | xorl %ebp, %eax | ||
| 960 | movl 4(%esp), %ebp | ||
| 961 | xorl %ebp, %eax | ||
| 962 | movl 24(%esp), %ebp | ||
| 963 | .byte 209 | ||
| 964 | .byte 202 /* rorl $1 %edx */ | ||
| 965 | xorl %ebp, %eax | ||
| 966 | .byte 209 | ||
| 967 | .byte 192 /* roll $1 %eax */ | ||
| 968 | movl %ecx, %ebp | ||
| 969 | movl %eax, 36(%esp) | ||
| 970 | orl %edx, %ebp | ||
| 971 | leal 2400959708(%eax,%esi,1),%eax | ||
| 972 | movl %ecx, %esi | ||
| 973 | andl %edi, %ebp | ||
| 974 | andl %edx, %esi | ||
| 975 | orl %esi, %ebp | ||
| 976 | movl %ebx, %esi | ||
| 977 | roll $5, %esi | ||
| 978 | .byte 209 | ||
| 979 | .byte 201 /* rorl $1 %ecx */ | ||
| 980 | addl %esi, %ebp | ||
| 981 | .byte 209 | ||
| 982 | .byte 201 /* rorl $1 %ecx */ | ||
| 983 | addl %ebp, %eax | ||
| 984 | /* 40_59 41 */ | ||
| 985 | /* 40_59 42 */ | ||
| 986 | movl 40(%esp), %esi | ||
| 987 | movl 48(%esp), %ebp | ||
| 988 | xorl %ebp, %esi | ||
| 989 | movl 8(%esp), %ebp | ||
| 990 | xorl %ebp, %esi | ||
| 991 | movl 28(%esp), %ebp | ||
| 992 | xorl %ebp, %esi | ||
| 993 | movl %ebx, %ebp | ||
| 994 | .byte 209 | ||
| 995 | .byte 198 /* roll $1 %esi */ | ||
| 996 | orl %ecx, %ebp | ||
| 997 | movl %esi, 40(%esp) | ||
| 998 | andl %edx, %ebp | ||
| 999 | leal 2400959708(%esi,%edi,1),%esi | ||
| 1000 | movl %ebx, %edi | ||
| 1001 | .byte 209 | ||
| 1002 | .byte 203 /* rorl $1 %ebx */ | ||
| 1003 | andl %ecx, %edi | ||
| 1004 | orl %edi, %ebp | ||
| 1005 | movl %eax, %edi | ||
| 1006 | roll $5, %edi | ||
| 1007 | addl %edi, %ebp | ||
| 1008 | movl 44(%esp), %edi | ||
| 1009 | addl %ebp, %esi | ||
| 1010 | movl 52(%esp), %ebp | ||
| 1011 | xorl %ebp, %edi | ||
| 1012 | movl 12(%esp), %ebp | ||
| 1013 | xorl %ebp, %edi | ||
| 1014 | movl 32(%esp), %ebp | ||
| 1015 | .byte 209 | ||
| 1016 | .byte 203 /* rorl $1 %ebx */ | ||
| 1017 | xorl %ebp, %edi | ||
| 1018 | .byte 209 | ||
| 1019 | .byte 199 /* roll $1 %edi */ | ||
| 1020 | movl %eax, %ebp | ||
| 1021 | movl %edi, 44(%esp) | ||
| 1022 | orl %ebx, %ebp | ||
| 1023 | leal 2400959708(%edi,%edx,1),%edi | ||
| 1024 | movl %eax, %edx | ||
| 1025 | andl %ecx, %ebp | ||
| 1026 | andl %ebx, %edx | ||
| 1027 | orl %edx, %ebp | ||
| 1028 | movl %esi, %edx | ||
| 1029 | roll $5, %edx | ||
| 1030 | .byte 209 | ||
| 1031 | .byte 200 /* rorl $1 %eax */ | ||
| 1032 | addl %edx, %ebp | ||
| 1033 | .byte 209 | ||
| 1034 | .byte 200 /* rorl $1 %eax */ | ||
| 1035 | addl %ebp, %edi | ||
| 1036 | /* 40_59 43 */ | ||
| 1037 | /* 40_59 44 */ | ||
| 1038 | movl 48(%esp), %edx | ||
| 1039 | movl 56(%esp), %ebp | ||
| 1040 | xorl %ebp, %edx | ||
| 1041 | movl 16(%esp), %ebp | ||
| 1042 | xorl %ebp, %edx | ||
| 1043 | movl 36(%esp), %ebp | ||
| 1044 | xorl %ebp, %edx | ||
| 1045 | movl %esi, %ebp | ||
| 1046 | .byte 209 | ||
| 1047 | .byte 194 /* roll $1 %edx */ | ||
| 1048 | orl %eax, %ebp | ||
| 1049 | movl %edx, 48(%esp) | ||
| 1050 | andl %ebx, %ebp | ||
| 1051 | leal 2400959708(%edx,%ecx,1),%edx | ||
| 1052 | movl %esi, %ecx | ||
| 1053 | .byte 209 | ||
| 1054 | .byte 206 /* rorl $1 %esi */ | ||
| 1055 | andl %eax, %ecx | ||
| 1056 | orl %ecx, %ebp | ||
| 1057 | movl %edi, %ecx | ||
| 1058 | roll $5, %ecx | ||
| 1059 | addl %ecx, %ebp | ||
| 1060 | movl 52(%esp), %ecx | ||
| 1061 | addl %ebp, %edx | ||
| 1062 | movl 60(%esp), %ebp | ||
| 1063 | xorl %ebp, %ecx | ||
| 1064 | movl 20(%esp), %ebp | ||
| 1065 | xorl %ebp, %ecx | ||
| 1066 | movl 40(%esp), %ebp | ||
| 1067 | .byte 209 | ||
| 1068 | .byte 206 /* rorl $1 %esi */ | ||
| 1069 | xorl %ebp, %ecx | ||
| 1070 | .byte 209 | ||
| 1071 | .byte 193 /* roll $1 %ecx */ | ||
| 1072 | movl %edi, %ebp | ||
| 1073 | movl %ecx, 52(%esp) | ||
| 1074 | orl %esi, %ebp | ||
| 1075 | leal 2400959708(%ecx,%ebx,1),%ecx | ||
| 1076 | movl %edi, %ebx | ||
| 1077 | andl %eax, %ebp | ||
| 1078 | andl %esi, %ebx | ||
| 1079 | orl %ebx, %ebp | ||
| 1080 | movl %edx, %ebx | ||
| 1081 | roll $5, %ebx | ||
| 1082 | .byte 209 | ||
| 1083 | .byte 207 /* rorl $1 %edi */ | ||
| 1084 | addl %ebx, %ebp | ||
| 1085 | .byte 209 | ||
| 1086 | .byte 207 /* rorl $1 %edi */ | ||
| 1087 | addl %ebp, %ecx | ||
| 1088 | /* 40_59 45 */ | ||
| 1089 | /* 40_59 46 */ | ||
| 1090 | movl 56(%esp), %ebx | ||
| 1091 | movl (%esp), %ebp | ||
| 1092 | xorl %ebp, %ebx | ||
| 1093 | movl 24(%esp), %ebp | ||
| 1094 | xorl %ebp, %ebx | ||
| 1095 | movl 44(%esp), %ebp | ||
| 1096 | xorl %ebp, %ebx | ||
| 1097 | movl %edx, %ebp | ||
| 1098 | .byte 209 | ||
| 1099 | .byte 195 /* roll $1 %ebx */ | ||
| 1100 | orl %edi, %ebp | ||
| 1101 | movl %ebx, 56(%esp) | ||
| 1102 | andl %esi, %ebp | ||
| 1103 | leal 2400959708(%ebx,%eax,1),%ebx | ||
| 1104 | movl %edx, %eax | ||
| 1105 | .byte 209 | ||
| 1106 | .byte 202 /* rorl $1 %edx */ | ||
| 1107 | andl %edi, %eax | ||
| 1108 | orl %eax, %ebp | ||
| 1109 | movl %ecx, %eax | ||
| 1110 | roll $5, %eax | ||
| 1111 | addl %eax, %ebp | ||
| 1112 | movl 60(%esp), %eax | ||
| 1113 | addl %ebp, %ebx | ||
| 1114 | movl 4(%esp), %ebp | ||
| 1115 | xorl %ebp, %eax | ||
| 1116 | movl 28(%esp), %ebp | ||
| 1117 | xorl %ebp, %eax | ||
| 1118 | movl 48(%esp), %ebp | ||
| 1119 | .byte 209 | ||
| 1120 | .byte 202 /* rorl $1 %edx */ | ||
| 1121 | xorl %ebp, %eax | ||
| 1122 | .byte 209 | ||
| 1123 | .byte 192 /* roll $1 %eax */ | ||
| 1124 | movl %ecx, %ebp | ||
| 1125 | movl %eax, 60(%esp) | ||
| 1126 | orl %edx, %ebp | ||
| 1127 | leal 2400959708(%eax,%esi,1),%eax | ||
| 1128 | movl %ecx, %esi | ||
| 1129 | andl %edi, %ebp | ||
| 1130 | andl %edx, %esi | ||
| 1131 | orl %esi, %ebp | ||
| 1132 | movl %ebx, %esi | ||
| 1133 | roll $5, %esi | ||
| 1134 | .byte 209 | ||
| 1135 | .byte 201 /* rorl $1 %ecx */ | ||
| 1136 | addl %esi, %ebp | ||
| 1137 | .byte 209 | ||
| 1138 | .byte 201 /* rorl $1 %ecx */ | ||
| 1139 | addl %ebp, %eax | ||
| 1140 | /* 40_59 47 */ | ||
| 1141 | /* 40_59 48 */ | ||
| 1142 | movl (%esp), %esi | ||
| 1143 | movl 8(%esp), %ebp | ||
| 1144 | xorl %ebp, %esi | ||
| 1145 | movl 32(%esp), %ebp | ||
| 1146 | xorl %ebp, %esi | ||
| 1147 | movl 52(%esp), %ebp | ||
| 1148 | xorl %ebp, %esi | ||
| 1149 | movl %ebx, %ebp | ||
| 1150 | .byte 209 | ||
| 1151 | .byte 198 /* roll $1 %esi */ | ||
| 1152 | orl %ecx, %ebp | ||
| 1153 | movl %esi, (%esp) | ||
| 1154 | andl %edx, %ebp | ||
| 1155 | leal 2400959708(%esi,%edi,1),%esi | ||
| 1156 | movl %ebx, %edi | ||
| 1157 | .byte 209 | ||
| 1158 | .byte 203 /* rorl $1 %ebx */ | ||
| 1159 | andl %ecx, %edi | ||
| 1160 | orl %edi, %ebp | ||
| 1161 | movl %eax, %edi | ||
| 1162 | roll $5, %edi | ||
| 1163 | addl %edi, %ebp | ||
| 1164 | movl 4(%esp), %edi | ||
| 1165 | addl %ebp, %esi | ||
| 1166 | movl 12(%esp), %ebp | ||
| 1167 | xorl %ebp, %edi | ||
| 1168 | movl 36(%esp), %ebp | ||
| 1169 | xorl %ebp, %edi | ||
| 1170 | movl 56(%esp), %ebp | ||
| 1171 | .byte 209 | ||
| 1172 | .byte 203 /* rorl $1 %ebx */ | ||
| 1173 | xorl %ebp, %edi | ||
| 1174 | .byte 209 | ||
| 1175 | .byte 199 /* roll $1 %edi */ | ||
| 1176 | movl %eax, %ebp | ||
| 1177 | movl %edi, 4(%esp) | ||
| 1178 | orl %ebx, %ebp | ||
| 1179 | leal 2400959708(%edi,%edx,1),%edi | ||
| 1180 | movl %eax, %edx | ||
| 1181 | andl %ecx, %ebp | ||
| 1182 | andl %ebx, %edx | ||
| 1183 | orl %edx, %ebp | ||
| 1184 | movl %esi, %edx | ||
| 1185 | roll $5, %edx | ||
| 1186 | .byte 209 | ||
| 1187 | .byte 200 /* rorl $1 %eax */ | ||
| 1188 | addl %edx, %ebp | ||
| 1189 | .byte 209 | ||
| 1190 | .byte 200 /* rorl $1 %eax */ | ||
| 1191 | addl %ebp, %edi | ||
| 1192 | /* 40_59 49 */ | ||
| 1193 | /* 40_59 50 */ | ||
| 1194 | movl 8(%esp), %edx | ||
| 1195 | movl 16(%esp), %ebp | ||
| 1196 | xorl %ebp, %edx | ||
| 1197 | movl 40(%esp), %ebp | ||
| 1198 | xorl %ebp, %edx | ||
| 1199 | movl 60(%esp), %ebp | ||
| 1200 | xorl %ebp, %edx | ||
| 1201 | movl %esi, %ebp | ||
| 1202 | .byte 209 | ||
| 1203 | .byte 194 /* roll $1 %edx */ | ||
| 1204 | orl %eax, %ebp | ||
| 1205 | movl %edx, 8(%esp) | ||
| 1206 | andl %ebx, %ebp | ||
| 1207 | leal 2400959708(%edx,%ecx,1),%edx | ||
| 1208 | movl %esi, %ecx | ||
| 1209 | .byte 209 | ||
| 1210 | .byte 206 /* rorl $1 %esi */ | ||
| 1211 | andl %eax, %ecx | ||
| 1212 | orl %ecx, %ebp | ||
| 1213 | movl %edi, %ecx | ||
| 1214 | roll $5, %ecx | ||
| 1215 | addl %ecx, %ebp | ||
| 1216 | movl 12(%esp), %ecx | ||
| 1217 | addl %ebp, %edx | ||
| 1218 | movl 20(%esp), %ebp | ||
| 1219 | xorl %ebp, %ecx | ||
| 1220 | movl 44(%esp), %ebp | ||
| 1221 | xorl %ebp, %ecx | ||
| 1222 | movl (%esp), %ebp | ||
| 1223 | .byte 209 | ||
| 1224 | .byte 206 /* rorl $1 %esi */ | ||
| 1225 | xorl %ebp, %ecx | ||
| 1226 | .byte 209 | ||
| 1227 | .byte 193 /* roll $1 %ecx */ | ||
| 1228 | movl %edi, %ebp | ||
| 1229 | movl %ecx, 12(%esp) | ||
| 1230 | orl %esi, %ebp | ||
| 1231 | leal 2400959708(%ecx,%ebx,1),%ecx | ||
| 1232 | movl %edi, %ebx | ||
| 1233 | andl %eax, %ebp | ||
| 1234 | andl %esi, %ebx | ||
| 1235 | orl %ebx, %ebp | ||
| 1236 | movl %edx, %ebx | ||
| 1237 | roll $5, %ebx | ||
| 1238 | .byte 209 | ||
| 1239 | .byte 207 /* rorl $1 %edi */ | ||
| 1240 | addl %ebx, %ebp | ||
| 1241 | .byte 209 | ||
| 1242 | .byte 207 /* rorl $1 %edi */ | ||
| 1243 | addl %ebp, %ecx | ||
| 1244 | /* 40_59 51 */ | ||
| 1245 | /* 40_59 52 */ | ||
| 1246 | movl 16(%esp), %ebx | ||
| 1247 | movl 24(%esp), %ebp | ||
| 1248 | xorl %ebp, %ebx | ||
| 1249 | movl 48(%esp), %ebp | ||
| 1250 | xorl %ebp, %ebx | ||
| 1251 | movl 4(%esp), %ebp | ||
| 1252 | xorl %ebp, %ebx | ||
| 1253 | movl %edx, %ebp | ||
| 1254 | .byte 209 | ||
| 1255 | .byte 195 /* roll $1 %ebx */ | ||
| 1256 | orl %edi, %ebp | ||
| 1257 | movl %ebx, 16(%esp) | ||
| 1258 | andl %esi, %ebp | ||
| 1259 | leal 2400959708(%ebx,%eax,1),%ebx | ||
| 1260 | movl %edx, %eax | ||
| 1261 | .byte 209 | ||
| 1262 | .byte 202 /* rorl $1 %edx */ | ||
| 1263 | andl %edi, %eax | ||
| 1264 | orl %eax, %ebp | ||
| 1265 | movl %ecx, %eax | ||
| 1266 | roll $5, %eax | ||
| 1267 | addl %eax, %ebp | ||
| 1268 | movl 20(%esp), %eax | ||
| 1269 | addl %ebp, %ebx | ||
| 1270 | movl 28(%esp), %ebp | ||
| 1271 | xorl %ebp, %eax | ||
| 1272 | movl 52(%esp), %ebp | ||
| 1273 | xorl %ebp, %eax | ||
| 1274 | movl 8(%esp), %ebp | ||
| 1275 | .byte 209 | ||
| 1276 | .byte 202 /* rorl $1 %edx */ | ||
| 1277 | xorl %ebp, %eax | ||
| 1278 | .byte 209 | ||
| 1279 | .byte 192 /* roll $1 %eax */ | ||
| 1280 | movl %ecx, %ebp | ||
| 1281 | movl %eax, 20(%esp) | ||
| 1282 | orl %edx, %ebp | ||
| 1283 | leal 2400959708(%eax,%esi,1),%eax | ||
| 1284 | movl %ecx, %esi | ||
| 1285 | andl %edi, %ebp | ||
| 1286 | andl %edx, %esi | ||
| 1287 | orl %esi, %ebp | ||
| 1288 | movl %ebx, %esi | ||
| 1289 | roll $5, %esi | ||
| 1290 | .byte 209 | ||
| 1291 | .byte 201 /* rorl $1 %ecx */ | ||
| 1292 | addl %esi, %ebp | ||
| 1293 | .byte 209 | ||
| 1294 | .byte 201 /* rorl $1 %ecx */ | ||
| 1295 | addl %ebp, %eax | ||
| 1296 | /* 40_59 53 */ | ||
| 1297 | /* 40_59 54 */ | ||
| 1298 | movl 24(%esp), %esi | ||
| 1299 | movl 32(%esp), %ebp | ||
| 1300 | xorl %ebp, %esi | ||
| 1301 | movl 56(%esp), %ebp | ||
| 1302 | xorl %ebp, %esi | ||
| 1303 | movl 12(%esp), %ebp | ||
| 1304 | xorl %ebp, %esi | ||
| 1305 | movl %ebx, %ebp | ||
| 1306 | .byte 209 | ||
| 1307 | .byte 198 /* roll $1 %esi */ | ||
| 1308 | orl %ecx, %ebp | ||
| 1309 | movl %esi, 24(%esp) | ||
| 1310 | andl %edx, %ebp | ||
| 1311 | leal 2400959708(%esi,%edi,1),%esi | ||
| 1312 | movl %ebx, %edi | ||
| 1313 | .byte 209 | ||
| 1314 | .byte 203 /* rorl $1 %ebx */ | ||
| 1315 | andl %ecx, %edi | ||
| 1316 | orl %edi, %ebp | ||
| 1317 | movl %eax, %edi | ||
| 1318 | roll $5, %edi | ||
| 1319 | addl %edi, %ebp | ||
| 1320 | movl 28(%esp), %edi | ||
| 1321 | addl %ebp, %esi | ||
| 1322 | movl 36(%esp), %ebp | ||
| 1323 | xorl %ebp, %edi | ||
| 1324 | movl 60(%esp), %ebp | ||
| 1325 | xorl %ebp, %edi | ||
| 1326 | movl 16(%esp), %ebp | ||
| 1327 | .byte 209 | ||
| 1328 | .byte 203 /* rorl $1 %ebx */ | ||
| 1329 | xorl %ebp, %edi | ||
| 1330 | .byte 209 | ||
| 1331 | .byte 199 /* roll $1 %edi */ | ||
| 1332 | movl %eax, %ebp | ||
| 1333 | movl %edi, 28(%esp) | ||
| 1334 | orl %ebx, %ebp | ||
| 1335 | leal 2400959708(%edi,%edx,1),%edi | ||
| 1336 | movl %eax, %edx | ||
| 1337 | andl %ecx, %ebp | ||
| 1338 | andl %ebx, %edx | ||
| 1339 | orl %edx, %ebp | ||
| 1340 | movl %esi, %edx | ||
| 1341 | roll $5, %edx | ||
| 1342 | .byte 209 | ||
| 1343 | .byte 200 /* rorl $1 %eax */ | ||
| 1344 | addl %edx, %ebp | ||
| 1345 | .byte 209 | ||
| 1346 | .byte 200 /* rorl $1 %eax */ | ||
| 1347 | addl %ebp, %edi | ||
| 1348 | /* 40_59 55 */ | ||
| 1349 | /* 40_59 56 */ | ||
| 1350 | movl 32(%esp), %edx | ||
| 1351 | movl 40(%esp), %ebp | ||
| 1352 | xorl %ebp, %edx | ||
| 1353 | movl (%esp), %ebp | ||
| 1354 | xorl %ebp, %edx | ||
| 1355 | movl 20(%esp), %ebp | ||
| 1356 | xorl %ebp, %edx | ||
| 1357 | movl %esi, %ebp | ||
| 1358 | .byte 209 | ||
| 1359 | .byte 194 /* roll $1 %edx */ | ||
| 1360 | orl %eax, %ebp | ||
| 1361 | movl %edx, 32(%esp) | ||
| 1362 | andl %ebx, %ebp | ||
| 1363 | leal 2400959708(%edx,%ecx,1),%edx | ||
| 1364 | movl %esi, %ecx | ||
| 1365 | .byte 209 | ||
| 1366 | .byte 206 /* rorl $1 %esi */ | ||
| 1367 | andl %eax, %ecx | ||
| 1368 | orl %ecx, %ebp | ||
| 1369 | movl %edi, %ecx | ||
| 1370 | roll $5, %ecx | ||
| 1371 | addl %ecx, %ebp | ||
| 1372 | movl 36(%esp), %ecx | ||
| 1373 | addl %ebp, %edx | ||
| 1374 | movl 44(%esp), %ebp | ||
| 1375 | xorl %ebp, %ecx | ||
| 1376 | movl 4(%esp), %ebp | ||
| 1377 | xorl %ebp, %ecx | ||
| 1378 | movl 24(%esp), %ebp | ||
| 1379 | .byte 209 | ||
| 1380 | .byte 206 /* rorl $1 %esi */ | ||
| 1381 | xorl %ebp, %ecx | ||
| 1382 | .byte 209 | ||
| 1383 | .byte 193 /* roll $1 %ecx */ | ||
| 1384 | movl %edi, %ebp | ||
| 1385 | movl %ecx, 36(%esp) | ||
| 1386 | orl %esi, %ebp | ||
| 1387 | leal 2400959708(%ecx,%ebx,1),%ecx | ||
| 1388 | movl %edi, %ebx | ||
| 1389 | andl %eax, %ebp | ||
| 1390 | andl %esi, %ebx | ||
| 1391 | orl %ebx, %ebp | ||
| 1392 | movl %edx, %ebx | ||
| 1393 | roll $5, %ebx | ||
| 1394 | .byte 209 | ||
| 1395 | .byte 207 /* rorl $1 %edi */ | ||
| 1396 | addl %ebx, %ebp | ||
| 1397 | .byte 209 | ||
| 1398 | .byte 207 /* rorl $1 %edi */ | ||
| 1399 | addl %ebp, %ecx | ||
| 1400 | /* 40_59 57 */ | ||
| 1401 | /* 40_59 58 */ | ||
| 1402 | movl 40(%esp), %ebx | ||
| 1403 | movl 48(%esp), %ebp | ||
| 1404 | xorl %ebp, %ebx | ||
| 1405 | movl 8(%esp), %ebp | ||
| 1406 | xorl %ebp, %ebx | ||
| 1407 | movl 28(%esp), %ebp | ||
| 1408 | xorl %ebp, %ebx | ||
| 1409 | movl %edx, %ebp | ||
| 1410 | .byte 209 | ||
| 1411 | .byte 195 /* roll $1 %ebx */ | ||
| 1412 | orl %edi, %ebp | ||
| 1413 | movl %ebx, 40(%esp) | ||
| 1414 | andl %esi, %ebp | ||
| 1415 | leal 2400959708(%ebx,%eax,1),%ebx | ||
| 1416 | movl %edx, %eax | ||
| 1417 | .byte 209 | ||
| 1418 | .byte 202 /* rorl $1 %edx */ | ||
| 1419 | andl %edi, %eax | ||
| 1420 | orl %eax, %ebp | ||
| 1421 | movl %ecx, %eax | ||
| 1422 | roll $5, %eax | ||
| 1423 | addl %eax, %ebp | ||
| 1424 | movl 44(%esp), %eax | ||
| 1425 | addl %ebp, %ebx | ||
| 1426 | movl 52(%esp), %ebp | ||
| 1427 | xorl %ebp, %eax | ||
| 1428 | movl 12(%esp), %ebp | ||
| 1429 | xorl %ebp, %eax | ||
| 1430 | movl 32(%esp), %ebp | ||
| 1431 | .byte 209 | ||
| 1432 | .byte 202 /* rorl $1 %edx */ | ||
| 1433 | xorl %ebp, %eax | ||
| 1434 | .byte 209 | ||
| 1435 | .byte 192 /* roll $1 %eax */ | ||
| 1436 | movl %ecx, %ebp | ||
| 1437 | movl %eax, 44(%esp) | ||
| 1438 | orl %edx, %ebp | ||
| 1439 | leal 2400959708(%eax,%esi,1),%eax | ||
| 1440 | movl %ecx, %esi | ||
| 1441 | andl %edi, %ebp | ||
| 1442 | andl %edx, %esi | ||
| 1443 | orl %esi, %ebp | ||
| 1444 | movl %ebx, %esi | ||
| 1445 | roll $5, %esi | ||
| 1446 | .byte 209 | ||
| 1447 | .byte 201 /* rorl $1 %ecx */ | ||
| 1448 | addl %esi, %ebp | ||
| 1449 | .byte 209 | ||
| 1450 | .byte 201 /* rorl $1 %ecx */ | ||
| 1451 | addl %ebp, %eax | ||
| 1452 | /* 40_59 59 */ | ||
| 1453 | /* 20_39 60 */ | ||
| 1454 | movl 48(%esp), %esi | ||
| 1455 | movl 56(%esp), %ebp | ||
| 1456 | xorl %ebp, %esi | ||
| 1457 | movl 16(%esp), %ebp | ||
| 1458 | xorl %ebp, %esi | ||
| 1459 | movl 36(%esp), %ebp | ||
| 1460 | xorl %ebp, %esi | ||
| 1461 | movl %ebx, %ebp | ||
| 1462 | .byte 209 | ||
| 1463 | .byte 198 /* roll $1 %esi */ | ||
| 1464 | xorl %ecx, %ebp | ||
| 1465 | movl %esi, 48(%esp) | ||
| 1466 | xorl %edx, %ebp | ||
| 1467 | leal 3395469782(%esi,%edi,1),%esi | ||
| 1468 | movl %eax, %edi | ||
| 1469 | roll $5, %edi | ||
| 1470 | .byte 209 | ||
| 1471 | .byte 203 /* rorl $1 %ebx */ | ||
| 1472 | addl %ebp, %edi | ||
| 1473 | .byte 209 | ||
| 1474 | .byte 203 /* rorl $1 %ebx */ | ||
| 1475 | addl %edi, %esi | ||
| 1476 | /* 20_39 61 */ | ||
| 1477 | movl 52(%esp), %edi | ||
| 1478 | movl 60(%esp), %ebp | ||
| 1479 | xorl %ebp, %edi | ||
| 1480 | movl 20(%esp), %ebp | ||
| 1481 | xorl %ebp, %edi | ||
| 1482 | movl 40(%esp), %ebp | ||
| 1483 | xorl %ebp, %edi | ||
| 1484 | movl %eax, %ebp | ||
| 1485 | .byte 209 | ||
| 1486 | .byte 199 /* roll $1 %edi */ | ||
| 1487 | xorl %ebx, %ebp | ||
| 1488 | movl %edi, 52(%esp) | ||
| 1489 | xorl %ecx, %ebp | ||
| 1490 | leal 3395469782(%edi,%edx,1),%edi | ||
| 1491 | movl %esi, %edx | ||
| 1492 | roll $5, %edx | ||
| 1493 | .byte 209 | ||
| 1494 | .byte 200 /* rorl $1 %eax */ | ||
| 1495 | addl %ebp, %edx | ||
| 1496 | .byte 209 | ||
| 1497 | .byte 200 /* rorl $1 %eax */ | ||
| 1498 | addl %edx, %edi | ||
| 1499 | /* 20_39 62 */ | ||
| 1500 | movl 56(%esp), %edx | ||
| 1501 | movl (%esp), %ebp | ||
| 1502 | xorl %ebp, %edx | ||
| 1503 | movl 24(%esp), %ebp | ||
| 1504 | xorl %ebp, %edx | ||
| 1505 | movl 44(%esp), %ebp | ||
| 1506 | xorl %ebp, %edx | ||
| 1507 | movl %esi, %ebp | ||
| 1508 | .byte 209 | ||
| 1509 | .byte 194 /* roll $1 %edx */ | ||
| 1510 | xorl %eax, %ebp | ||
| 1511 | movl %edx, 56(%esp) | ||
| 1512 | xorl %ebx, %ebp | ||
| 1513 | leal 3395469782(%edx,%ecx,1),%edx | ||
| 1514 | movl %edi, %ecx | ||
| 1515 | roll $5, %ecx | ||
| 1516 | .byte 209 | ||
| 1517 | .byte 206 /* rorl $1 %esi */ | ||
| 1518 | addl %ebp, %ecx | ||
| 1519 | .byte 209 | ||
| 1520 | .byte 206 /* rorl $1 %esi */ | ||
| 1521 | addl %ecx, %edx | ||
| 1522 | /* 20_39 63 */ | ||
| 1523 | movl 60(%esp), %ecx | ||
| 1524 | movl 4(%esp), %ebp | ||
| 1525 | xorl %ebp, %ecx | ||
| 1526 | movl 28(%esp), %ebp | ||
| 1527 | xorl %ebp, %ecx | ||
| 1528 | movl 48(%esp), %ebp | ||
| 1529 | xorl %ebp, %ecx | ||
| 1530 | movl %edi, %ebp | ||
| 1531 | .byte 209 | ||
| 1532 | .byte 193 /* roll $1 %ecx */ | ||
| 1533 | xorl %esi, %ebp | ||
| 1534 | movl %ecx, 60(%esp) | ||
| 1535 | xorl %eax, %ebp | ||
| 1536 | leal 3395469782(%ecx,%ebx,1),%ecx | ||
| 1537 | movl %edx, %ebx | ||
| 1538 | roll $5, %ebx | ||
| 1539 | .byte 209 | ||
| 1540 | .byte 207 /* rorl $1 %edi */ | ||
| 1541 | addl %ebp, %ebx | ||
| 1542 | .byte 209 | ||
| 1543 | .byte 207 /* rorl $1 %edi */ | ||
| 1544 | addl %ebx, %ecx | ||
| 1545 | /* 20_39 64 */ | ||
| 1546 | movl (%esp), %ebx | ||
| 1547 | movl 8(%esp), %ebp | ||
| 1548 | xorl %ebp, %ebx | ||
| 1549 | movl 32(%esp), %ebp | ||
| 1550 | xorl %ebp, %ebx | ||
| 1551 | movl 52(%esp), %ebp | ||
| 1552 | xorl %ebp, %ebx | ||
| 1553 | movl %edx, %ebp | ||
| 1554 | .byte 209 | ||
| 1555 | .byte 195 /* roll $1 %ebx */ | ||
| 1556 | xorl %edi, %ebp | ||
| 1557 | movl %ebx, (%esp) | ||
| 1558 | xorl %esi, %ebp | ||
| 1559 | leal 3395469782(%ebx,%eax,1),%ebx | ||
| 1560 | movl %ecx, %eax | ||
| 1561 | roll $5, %eax | ||
| 1562 | .byte 209 | ||
| 1563 | .byte 202 /* rorl $1 %edx */ | ||
| 1564 | addl %ebp, %eax | ||
| 1565 | .byte 209 | ||
| 1566 | .byte 202 /* rorl $1 %edx */ | ||
| 1567 | addl %eax, %ebx | ||
| 1568 | /* 20_39 65 */ | ||
| 1569 | movl 4(%esp), %eax | ||
| 1570 | movl 12(%esp), %ebp | ||
| 1571 | xorl %ebp, %eax | ||
| 1572 | movl 36(%esp), %ebp | ||
| 1573 | xorl %ebp, %eax | ||
| 1574 | movl 56(%esp), %ebp | ||
| 1575 | xorl %ebp, %eax | ||
| 1576 | movl %ecx, %ebp | ||
| 1577 | .byte 209 | ||
| 1578 | .byte 192 /* roll $1 %eax */ | ||
| 1579 | xorl %edx, %ebp | ||
| 1580 | movl %eax, 4(%esp) | ||
| 1581 | xorl %edi, %ebp | ||
| 1582 | leal 3395469782(%eax,%esi,1),%eax | ||
| 1583 | movl %ebx, %esi | ||
| 1584 | roll $5, %esi | ||
| 1585 | .byte 209 | ||
| 1586 | .byte 201 /* rorl $1 %ecx */ | ||
| 1587 | addl %ebp, %esi | ||
| 1588 | .byte 209 | ||
| 1589 | .byte 201 /* rorl $1 %ecx */ | ||
| 1590 | addl %esi, %eax | ||
| 1591 | /* 20_39 66 */ | ||
| 1592 | movl 8(%esp), %esi | ||
| 1593 | movl 16(%esp), %ebp | ||
| 1594 | xorl %ebp, %esi | ||
| 1595 | movl 40(%esp), %ebp | ||
| 1596 | xorl %ebp, %esi | ||
| 1597 | movl 60(%esp), %ebp | ||
| 1598 | xorl %ebp, %esi | ||
| 1599 | movl %ebx, %ebp | ||
| 1600 | .byte 209 | ||
| 1601 | .byte 198 /* roll $1 %esi */ | ||
| 1602 | xorl %ecx, %ebp | ||
| 1603 | movl %esi, 8(%esp) | ||
| 1604 | xorl %edx, %ebp | ||
| 1605 | leal 3395469782(%esi,%edi,1),%esi | ||
| 1606 | movl %eax, %edi | ||
| 1607 | roll $5, %edi | ||
| 1608 | .byte 209 | ||
| 1609 | .byte 203 /* rorl $1 %ebx */ | ||
| 1610 | addl %ebp, %edi | ||
| 1611 | .byte 209 | ||
| 1612 | .byte 203 /* rorl $1 %ebx */ | ||
| 1613 | addl %edi, %esi | ||
| 1614 | /* 20_39 67 */ | ||
| 1615 | movl 12(%esp), %edi | ||
| 1616 | movl 20(%esp), %ebp | ||
| 1617 | xorl %ebp, %edi | ||
| 1618 | movl 44(%esp), %ebp | ||
| 1619 | xorl %ebp, %edi | ||
| 1620 | movl (%esp), %ebp | ||
| 1621 | xorl %ebp, %edi | ||
| 1622 | movl %eax, %ebp | ||
| 1623 | .byte 209 | ||
| 1624 | .byte 199 /* roll $1 %edi */ | ||
| 1625 | xorl %ebx, %ebp | ||
| 1626 | movl %edi, 12(%esp) | ||
| 1627 | xorl %ecx, %ebp | ||
| 1628 | leal 3395469782(%edi,%edx,1),%edi | ||
| 1629 | movl %esi, %edx | ||
| 1630 | roll $5, %edx | ||
| 1631 | .byte 209 | ||
| 1632 | .byte 200 /* rorl $1 %eax */ | ||
| 1633 | addl %ebp, %edx | ||
| 1634 | .byte 209 | ||
| 1635 | .byte 200 /* rorl $1 %eax */ | ||
| 1636 | addl %edx, %edi | ||
| 1637 | /* 20_39 68 */ | ||
| 1638 | movl 16(%esp), %edx | ||
| 1639 | movl 24(%esp), %ebp | ||
| 1640 | xorl %ebp, %edx | ||
| 1641 | movl 48(%esp), %ebp | ||
| 1642 | xorl %ebp, %edx | ||
| 1643 | movl 4(%esp), %ebp | ||
| 1644 | xorl %ebp, %edx | ||
| 1645 | movl %esi, %ebp | ||
| 1646 | .byte 209 | ||
| 1647 | .byte 194 /* roll $1 %edx */ | ||
| 1648 | xorl %eax, %ebp | ||
| 1649 | movl %edx, 16(%esp) | ||
| 1650 | xorl %ebx, %ebp | ||
| 1651 | leal 3395469782(%edx,%ecx,1),%edx | ||
| 1652 | movl %edi, %ecx | ||
| 1653 | roll $5, %ecx | ||
| 1654 | .byte 209 | ||
| 1655 | .byte 206 /* rorl $1 %esi */ | ||
| 1656 | addl %ebp, %ecx | ||
| 1657 | .byte 209 | ||
| 1658 | .byte 206 /* rorl $1 %esi */ | ||
| 1659 | addl %ecx, %edx | ||
| 1660 | /* 20_39 69 */ | ||
| 1661 | movl 20(%esp), %ecx | ||
| 1662 | movl 28(%esp), %ebp | ||
| 1663 | xorl %ebp, %ecx | ||
| 1664 | movl 52(%esp), %ebp | ||
| 1665 | xorl %ebp, %ecx | ||
| 1666 | movl 8(%esp), %ebp | ||
| 1667 | xorl %ebp, %ecx | ||
| 1668 | movl %edi, %ebp | ||
| 1669 | .byte 209 | ||
| 1670 | .byte 193 /* roll $1 %ecx */ | ||
| 1671 | xorl %esi, %ebp | ||
| 1672 | movl %ecx, 20(%esp) | ||
| 1673 | xorl %eax, %ebp | ||
| 1674 | leal 3395469782(%ecx,%ebx,1),%ecx | ||
| 1675 | movl %edx, %ebx | ||
| 1676 | roll $5, %ebx | ||
| 1677 | .byte 209 | ||
| 1678 | .byte 207 /* rorl $1 %edi */ | ||
| 1679 | addl %ebp, %ebx | ||
| 1680 | .byte 209 | ||
| 1681 | .byte 207 /* rorl $1 %edi */ | ||
| 1682 | addl %ebx, %ecx | ||
| 1683 | /* 20_39 70 */ | ||
| 1684 | movl 24(%esp), %ebx | ||
| 1685 | movl 32(%esp), %ebp | ||
| 1686 | xorl %ebp, %ebx | ||
| 1687 | movl 56(%esp), %ebp | ||
| 1688 | xorl %ebp, %ebx | ||
| 1689 | movl 12(%esp), %ebp | ||
| 1690 | xorl %ebp, %ebx | ||
| 1691 | movl %edx, %ebp | ||
| 1692 | .byte 209 | ||
| 1693 | .byte 195 /* roll $1 %ebx */ | ||
| 1694 | xorl %edi, %ebp | ||
| 1695 | movl %ebx, 24(%esp) | ||
| 1696 | xorl %esi, %ebp | ||
| 1697 | leal 3395469782(%ebx,%eax,1),%ebx | ||
| 1698 | movl %ecx, %eax | ||
| 1699 | roll $5, %eax | ||
| 1700 | .byte 209 | ||
| 1701 | .byte 202 /* rorl $1 %edx */ | ||
| 1702 | addl %ebp, %eax | ||
| 1703 | .byte 209 | ||
| 1704 | .byte 202 /* rorl $1 %edx */ | ||
| 1705 | addl %eax, %ebx | ||
| 1706 | /* 20_39 71 */ | ||
| 1707 | movl 28(%esp), %eax | ||
| 1708 | movl 36(%esp), %ebp | ||
| 1709 | xorl %ebp, %eax | ||
| 1710 | movl 60(%esp), %ebp | ||
| 1711 | xorl %ebp, %eax | ||
| 1712 | movl 16(%esp), %ebp | ||
| 1713 | xorl %ebp, %eax | ||
| 1714 | movl %ecx, %ebp | ||
| 1715 | .byte 209 | ||
| 1716 | .byte 192 /* roll $1 %eax */ | ||
| 1717 | xorl %edx, %ebp | ||
| 1718 | movl %eax, 28(%esp) | ||
| 1719 | xorl %edi, %ebp | ||
| 1720 | leal 3395469782(%eax,%esi,1),%eax | ||
| 1721 | movl %ebx, %esi | ||
| 1722 | roll $5, %esi | ||
| 1723 | .byte 209 | ||
| 1724 | .byte 201 /* rorl $1 %ecx */ | ||
| 1725 | addl %ebp, %esi | ||
| 1726 | .byte 209 | ||
| 1727 | .byte 201 /* rorl $1 %ecx */ | ||
| 1728 | addl %esi, %eax | ||
| 1729 | /* 20_39 72 */ | ||
| 1730 | movl 32(%esp), %esi | ||
| 1731 | movl 40(%esp), %ebp | ||
| 1732 | xorl %ebp, %esi | ||
| 1733 | movl (%esp), %ebp | ||
| 1734 | xorl %ebp, %esi | ||
| 1735 | movl 20(%esp), %ebp | ||
| 1736 | xorl %ebp, %esi | ||
| 1737 | movl %ebx, %ebp | ||
| 1738 | .byte 209 | ||
| 1739 | .byte 198 /* roll $1 %esi */ | ||
| 1740 | xorl %ecx, %ebp | ||
| 1741 | movl %esi, 32(%esp) | ||
| 1742 | xorl %edx, %ebp | ||
| 1743 | leal 3395469782(%esi,%edi,1),%esi | ||
| 1744 | movl %eax, %edi | ||
| 1745 | roll $5, %edi | ||
| 1746 | .byte 209 | ||
| 1747 | .byte 203 /* rorl $1 %ebx */ | ||
| 1748 | addl %ebp, %edi | ||
| 1749 | .byte 209 | ||
| 1750 | .byte 203 /* rorl $1 %ebx */ | ||
| 1751 | addl %edi, %esi | ||
| 1752 | /* 20_39 73 */ | ||
| 1753 | movl 36(%esp), %edi | ||
| 1754 | movl 44(%esp), %ebp | ||
| 1755 | xorl %ebp, %edi | ||
| 1756 | movl 4(%esp), %ebp | ||
| 1757 | xorl %ebp, %edi | ||
| 1758 | movl 24(%esp), %ebp | ||
| 1759 | xorl %ebp, %edi | ||
| 1760 | movl %eax, %ebp | ||
| 1761 | .byte 209 | ||
| 1762 | .byte 199 /* roll $1 %edi */ | ||
| 1763 | xorl %ebx, %ebp | ||
| 1764 | movl %edi, 36(%esp) | ||
| 1765 | xorl %ecx, %ebp | ||
| 1766 | leal 3395469782(%edi,%edx,1),%edi | ||
| 1767 | movl %esi, %edx | ||
| 1768 | roll $5, %edx | ||
| 1769 | .byte 209 | ||
| 1770 | .byte 200 /* rorl $1 %eax */ | ||
| 1771 | addl %ebp, %edx | ||
| 1772 | .byte 209 | ||
| 1773 | .byte 200 /* rorl $1 %eax */ | ||
| 1774 | addl %edx, %edi | ||
| 1775 | /* 20_39 74 */ | ||
| 1776 | movl 40(%esp), %edx | ||
| 1777 | movl 48(%esp), %ebp | ||
| 1778 | xorl %ebp, %edx | ||
| 1779 | movl 8(%esp), %ebp | ||
| 1780 | xorl %ebp, %edx | ||
| 1781 | movl 28(%esp), %ebp | ||
| 1782 | xorl %ebp, %edx | ||
| 1783 | movl %esi, %ebp | ||
| 1784 | .byte 209 | ||
| 1785 | .byte 194 /* roll $1 %edx */ | ||
| 1786 | xorl %eax, %ebp | ||
| 1787 | movl %edx, 40(%esp) | ||
| 1788 | xorl %ebx, %ebp | ||
| 1789 | leal 3395469782(%edx,%ecx,1),%edx | ||
| 1790 | movl %edi, %ecx | ||
| 1791 | roll $5, %ecx | ||
| 1792 | .byte 209 | ||
| 1793 | .byte 206 /* rorl $1 %esi */ | ||
| 1794 | addl %ebp, %ecx | ||
| 1795 | .byte 209 | ||
| 1796 | .byte 206 /* rorl $1 %esi */ | ||
| 1797 | addl %ecx, %edx | ||
| 1798 | /* 20_39 75 */ | ||
| 1799 | movl 44(%esp), %ecx | ||
| 1800 | movl 52(%esp), %ebp | ||
| 1801 | xorl %ebp, %ecx | ||
| 1802 | movl 12(%esp), %ebp | ||
| 1803 | xorl %ebp, %ecx | ||
| 1804 | movl 32(%esp), %ebp | ||
| 1805 | xorl %ebp, %ecx | ||
| 1806 | movl %edi, %ebp | ||
| 1807 | .byte 209 | ||
| 1808 | .byte 193 /* roll $1 %ecx */ | ||
| 1809 | xorl %esi, %ebp | ||
| 1810 | movl %ecx, 44(%esp) | ||
| 1811 | xorl %eax, %ebp | ||
| 1812 | leal 3395469782(%ecx,%ebx,1),%ecx | ||
| 1813 | movl %edx, %ebx | ||
| 1814 | roll $5, %ebx | ||
| 1815 | .byte 209 | ||
| 1816 | .byte 207 /* rorl $1 %edi */ | ||
| 1817 | addl %ebp, %ebx | ||
| 1818 | .byte 209 | ||
| 1819 | .byte 207 /* rorl $1 %edi */ | ||
| 1820 | addl %ebx, %ecx | ||
| 1821 | /* 20_39 76 */ | ||
| 1822 | movl 48(%esp), %ebx | ||
| 1823 | movl 56(%esp), %ebp | ||
| 1824 | xorl %ebp, %ebx | ||
| 1825 | movl 16(%esp), %ebp | ||
| 1826 | xorl %ebp, %ebx | ||
| 1827 | movl 36(%esp), %ebp | ||
| 1828 | xorl %ebp, %ebx | ||
| 1829 | movl %edx, %ebp | ||
| 1830 | .byte 209 | ||
| 1831 | .byte 195 /* roll $1 %ebx */ | ||
| 1832 | xorl %edi, %ebp | ||
| 1833 | movl %ebx, 48(%esp) | ||
| 1834 | xorl %esi, %ebp | ||
| 1835 | leal 3395469782(%ebx,%eax,1),%ebx | ||
| 1836 | movl %ecx, %eax | ||
| 1837 | roll $5, %eax | ||
| 1838 | .byte 209 | ||
| 1839 | .byte 202 /* rorl $1 %edx */ | ||
| 1840 | addl %ebp, %eax | ||
| 1841 | .byte 209 | ||
| 1842 | .byte 202 /* rorl $1 %edx */ | ||
| 1843 | addl %eax, %ebx | ||
| 1844 | /* 20_39 77 */ | ||
| 1845 | movl 52(%esp), %eax | ||
| 1846 | movl 60(%esp), %ebp | ||
| 1847 | xorl %ebp, %eax | ||
| 1848 | movl 20(%esp), %ebp | ||
| 1849 | xorl %ebp, %eax | ||
| 1850 | movl 40(%esp), %ebp | ||
| 1851 | xorl %ebp, %eax | ||
| 1852 | movl %ecx, %ebp | ||
| 1853 | .byte 209 | ||
| 1854 | .byte 192 /* roll $1 %eax */ | ||
| 1855 | xorl %edx, %ebp | ||
| 1856 | movl %eax, 52(%esp) | ||
| 1857 | xorl %edi, %ebp | ||
| 1858 | leal 3395469782(%eax,%esi,1),%eax | ||
| 1859 | movl %ebx, %esi | ||
| 1860 | roll $5, %esi | ||
| 1861 | .byte 209 | ||
| 1862 | .byte 201 /* rorl $1 %ecx */ | ||
| 1863 | addl %ebp, %esi | ||
| 1864 | .byte 209 | ||
| 1865 | .byte 201 /* rorl $1 %ecx */ | ||
| 1866 | addl %esi, %eax | ||
| 1867 | /* 20_39 78 */ | ||
| 1868 | movl 56(%esp), %esi | ||
| 1869 | movl (%esp), %ebp | ||
| 1870 | xorl %ebp, %esi | ||
| 1871 | movl 24(%esp), %ebp | ||
| 1872 | xorl %ebp, %esi | ||
| 1873 | movl 44(%esp), %ebp | ||
| 1874 | xorl %ebp, %esi | ||
| 1875 | movl %ebx, %ebp | ||
| 1876 | .byte 209 | ||
| 1877 | .byte 198 /* roll $1 %esi */ | ||
| 1878 | xorl %ecx, %ebp | ||
| 1879 | movl %esi, 56(%esp) | ||
| 1880 | xorl %edx, %ebp | ||
| 1881 | leal 3395469782(%esi,%edi,1),%esi | ||
| 1882 | movl %eax, %edi | ||
| 1883 | roll $5, %edi | ||
| 1884 | .byte 209 | ||
| 1885 | .byte 203 /* rorl $1 %ebx */ | ||
| 1886 | addl %ebp, %edi | ||
| 1887 | .byte 209 | ||
| 1888 | .byte 203 /* rorl $1 %ebx */ | ||
| 1889 | addl %edi, %esi | ||
| 1890 | /* 20_39 79 */ | ||
| 1891 | movl 60(%esp), %edi | ||
| 1892 | movl 4(%esp), %ebp | ||
| 1893 | xorl %ebp, %edi | ||
| 1894 | movl 28(%esp), %ebp | ||
| 1895 | xorl %ebp, %edi | ||
| 1896 | movl 48(%esp), %ebp | ||
| 1897 | xorl %ebp, %edi | ||
| 1898 | movl %eax, %ebp | ||
| 1899 | .byte 209 | ||
| 1900 | .byte 199 /* roll $1 %edi */ | ||
| 1901 | xorl %ebx, %ebp | ||
| 1902 | movl %edi, 60(%esp) | ||
| 1903 | xorl %ecx, %ebp | ||
| 1904 | leal 3395469782(%edi,%edx,1),%edi | ||
| 1905 | movl %esi, %edx | ||
| 1906 | roll $5, %edx | ||
| 1907 | addl %ebp, %edx | ||
| 1908 | movl 92(%esp), %ebp | ||
| 1909 | .byte 209 | ||
| 1910 | .byte 200 /* rorl $1 %eax */ | ||
| 1911 | addl %edx, %edi | ||
| 1912 | .byte 209 | ||
| 1913 | .byte 200 /* rorl $1 %eax */ | ||
| 1914 | /* End processing */ | ||
| 1915 | |||
| 1916 | movl 12(%ebp), %edx | ||
| 1917 | addl %ebx, %edx | ||
| 1918 | movl 4(%ebp), %ebx | ||
| 1919 | addl %esi, %ebx | ||
| 1920 | movl %eax, %esi | ||
| 1921 | movl (%ebp), %eax | ||
| 1922 | movl %edx, 12(%ebp) | ||
| 1923 | addl %edi, %eax | ||
| 1924 | movl 16(%ebp), %edi | ||
| 1925 | addl %ecx, %edi | ||
| 1926 | movl 8(%ebp), %ecx | ||
| 1927 | addl %esi, %ecx | ||
| 1928 | movl %eax, (%ebp) | ||
| 1929 | movl 64(%esp), %esi | ||
| 1930 | movl %ecx, 8(%ebp) | ||
| 1931 | addl $64, %esi | ||
| 1932 | movl 68(%esp), %eax | ||
| 1933 | movl %edi, 16(%ebp) | ||
| 1934 | cmpl %esi, %eax | ||
| 1935 | movl %ebx, 4(%ebp) | ||
| 1936 | jl .L001end | ||
| 1937 | movl (%esi), %eax | ||
| 1938 | jmp .L000start | ||
| 1939 | .L001end: | ||
| 1940 | addl $72, %esp | ||
| 1941 | popl %edi | ||
| 1942 | popl %ebx | ||
| 1943 | popl %ebp | ||
| 1944 | popl %esi | ||
| 1945 | ret | ||
| 1946 | .sha1_block_x86_end: | ||
| 1947 | SIZE(sha1_block_x86,.sha1_block_x86_end-sha1_block_x86) | ||
| 1948 | .ident "desasm.pl" | ||
diff --git a/src/lib/libssl/src/crypto/sha/sha_sgst.c b/src/lib/libssl/src/crypto/sha/sha_sgst.c new file mode 100644 index 0000000000..8a16801328 --- /dev/null +++ b/src/lib/libssl/src/crypto/sha/sha_sgst.c | |||
| @@ -0,0 +1,246 @@ | |||
| 1 | /* crypto/sha/sha_sgst.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 <stdlib.h> | ||
| 60 | #include <string.h> | ||
| 61 | |||
| 62 | #ifdef undef | ||
| 63 | /* one or the other needs to be defined */ | ||
| 64 | #ifndef SHA_1 /* FIPE 180-1 */ | ||
| 65 | #define SHA_0 /* FIPS 180 */ | ||
| 66 | #endif | ||
| 67 | #endif | ||
| 68 | |||
| 69 | #define ULONG unsigned long | ||
| 70 | #define UCHAR unsigned char | ||
| 71 | #define UINT unsigned int | ||
| 72 | |||
| 73 | #ifdef NOCONST | ||
| 74 | #define const | ||
| 75 | #endif | ||
| 76 | |||
| 77 | #undef c2nl | ||
| 78 | #define c2nl(c,l) (l =(((unsigned long)(*((c)++)))<<24), \ | ||
| 79 | l|=(((unsigned long)(*((c)++)))<<16), \ | ||
| 80 | l|=(((unsigned long)(*((c)++)))<< 8), \ | ||
| 81 | l|=(((unsigned long)(*((c)++))) )) | ||
| 82 | |||
| 83 | #undef p_c2nl | ||
| 84 | #define p_c2nl(c,l,n) { \ | ||
| 85 | switch (n) { \ | ||
| 86 | case 0: l =((unsigned long)(*((c)++)))<<24; \ | ||
| 87 | case 1: l|=((unsigned long)(*((c)++)))<<16; \ | ||
| 88 | case 2: l|=((unsigned long)(*((c)++)))<< 8; \ | ||
| 89 | case 3: l|=((unsigned long)(*((c)++))); \ | ||
| 90 | } \ | ||
| 91 | } | ||
| 92 | |||
| 93 | #undef c2nl_p | ||
| 94 | /* NOTE the pointer is not incremented at the end of this */ | ||
| 95 | #define c2nl_p(c,l,n) { \ | ||
| 96 | l=0; \ | ||
| 97 | (c)+=n; \ | ||
| 98 | switch (n) { \ | ||
| 99 | case 3: l =((unsigned long)(*(--(c))))<< 8; \ | ||
| 100 | case 2: l|=((unsigned long)(*(--(c))))<<16; \ | ||
| 101 | case 1: l|=((unsigned long)(*(--(c))))<<24; \ | ||
| 102 | } \ | ||
| 103 | } | ||
| 104 | |||
| 105 | #undef p_c2nl_p | ||
| 106 | #define p_c2nl_p(c,l,sc,len) { \ | ||
| 107 | switch (sc) \ | ||
| 108 | { \ | ||
| 109 | case 0: l =((unsigned long)(*((c)++)))<<24; \ | ||
| 110 | if (--len == 0) break; \ | ||
| 111 | case 1: l|=((unsigned long)(*((c)++)))<<16; \ | ||
| 112 | if (--len == 0) break; \ | ||
| 113 | case 2: l|=((unsigned long)(*((c)++)))<< 8; \ | ||
| 114 | } \ | ||
| 115 | } | ||
| 116 | |||
| 117 | #undef nl2c | ||
| 118 | #define nl2c(l,c) (*((c)++)=(unsigned char)(((l)>>24)&0xff), \ | ||
| 119 | *((c)++)=(unsigned char)(((l)>>16)&0xff), \ | ||
| 120 | *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ | ||
| 121 | *((c)++)=(unsigned char)(((l) )&0xff)) | ||
| 122 | |||
| 123 | #undef c2l | ||
| 124 | #define c2l(c,l) (l =(((unsigned long)(*((c)++))) ), \ | ||
| 125 | l|=(((unsigned long)(*((c)++)))<< 8), \ | ||
| 126 | l|=(((unsigned long)(*((c)++)))<<16), \ | ||
| 127 | l|=(((unsigned long)(*((c)++)))<<24)) | ||
| 128 | |||
| 129 | #undef p_c2l | ||
| 130 | #define p_c2l(c,l,n) { \ | ||
| 131 | switch (n) { \ | ||
| 132 | case 0: l =((unsigned long)(*((c)++))); \ | ||
| 133 | case 1: l|=((unsigned long)(*((c)++)))<< 8; \ | ||
| 134 | case 2: l|=((unsigned long)(*((c)++)))<<16; \ | ||
| 135 | case 3: l|=((unsigned long)(*((c)++)))<<24; \ | ||
| 136 | } \ | ||
| 137 | } | ||
| 138 | |||
| 139 | #undef c2l_p | ||
| 140 | /* NOTE the pointer is not incremented at the end of this */ | ||
| 141 | #define c2l_p(c,l,n) { \ | ||
| 142 | l=0; \ | ||
| 143 | (c)+=n; \ | ||
| 144 | switch (n) { \ | ||
| 145 | case 3: l =((unsigned long)(*(--(c))))<<16; \ | ||
| 146 | case 2: l|=((unsigned long)(*(--(c))))<< 8; \ | ||
| 147 | case 1: l|=((unsigned long)(*(--(c)))); \ | ||
| 148 | } \ | ||
| 149 | } | ||
| 150 | |||
| 151 | #undef p_c2l_p | ||
| 152 | #define p_c2l_p(c,l,sc,len) { \ | ||
| 153 | switch (sc) \ | ||
| 154 | { \ | ||
| 155 | case 0: l =((unsigned long)(*((c)++))); \ | ||
| 156 | if (--len == 0) break; \ | ||
| 157 | case 1: l|=((unsigned long)(*((c)++)))<< 8; \ | ||
| 158 | if (--len == 0) break; \ | ||
| 159 | case 2: l|=((unsigned long)(*((c)++)))<<16; \ | ||
| 160 | } \ | ||
| 161 | } | ||
| 162 | |||
| 163 | #undef l2c | ||
| 164 | #define l2c(l,c) (*((c)++)=(unsigned char)(((l) )&0xff), \ | ||
| 165 | *((c)++)=(unsigned char)(((l)>> 8)&0xff), \ | ||
| 166 | *((c)++)=(unsigned char)(((l)>>16)&0xff), \ | ||
| 167 | *((c)++)=(unsigned char)(((l)>>24)&0xff)) | ||
| 168 | |||
| 169 | #undef ROTATE | ||
| 170 | #if defined(WIN32) | ||
| 171 | #define ROTATE(a,n) _lrotl(a,n) | ||
| 172 | #else | ||
| 173 | #define ROTATE(a,n) (((a)<<(n))|(((a)&0xffffffff)>>(32-(n)))) | ||
| 174 | #endif | ||
| 175 | |||
| 176 | /* A nice byte order reversal from Wei Dai <weidai@eskimo.com> */ | ||
| 177 | #if defined(WIN32) | ||
| 178 | /* 5 instructions with rotate instruction, else 9 */ | ||
| 179 | #define Endian_Reverse32(a) \ | ||
| 180 | { \ | ||
| 181 | unsigned long l=(a); \ | ||
| 182 | (a)=((ROTATE(l,8)&0x00FF00FF)|(ROTATE(l,24)&0xFF00FF00)); \ | ||
| 183 | } | ||
| 184 | #else | ||
| 185 | /* 6 instructions with rotate instruction, else 8 */ | ||
| 186 | #define Endian_Reverse32(a) \ | ||
| 187 | { \ | ||
| 188 | unsigned long l=(a); \ | ||
| 189 | l=(((l&0xFF00FF00)>>8L)|((l&0x00FF00FF)<<8L)); \ | ||
| 190 | (a)=ROTATE(l,16L); \ | ||
| 191 | } | ||
| 192 | #endif | ||
| 193 | |||
| 194 | /* As pointed out by Wei Dai <weidai@eskimo.com>, F() below can be | ||
| 195 | * simplified to the code in F_00_19. Wei attributes these optimisations | ||
| 196 | * to Peter Gutmann's SHS code, and he attributes it to Rich Schroeppel. | ||
| 197 | * #define F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) | ||
| 198 | * I've just become aware of another tweak to be made, again from Wei Dai, | ||
| 199 | * in F_40_59, (x&a)|(y&a) -> (x|y)&a | ||
| 200 | */ | ||
| 201 | #define F_00_19(b,c,d) ((((c) ^ (d)) & (b)) ^ (d)) | ||
| 202 | #define F_20_39(b,c,d) ((b) ^ (c) ^ (d)) | ||
| 203 | #define F_40_59(b,c,d) (((b) & (c)) | (((b)|(c)) & (d))) | ||
| 204 | #define F_60_79(b,c,d) F_20_39(b,c,d) | ||
| 205 | |||
| 206 | #ifdef SHA_0 | ||
| 207 | #undef Xupdate | ||
| 208 | #define Xupdate(a,i,ia,ib,ic,id) X[(i)&0x0f]=(a)=\ | ||
| 209 | (ia[(i)&0x0f]^ib[((i)+2)&0x0f]^ic[((i)+8)&0x0f]^id[((i)+13)&0x0f]); | ||
| 210 | #endif | ||
| 211 | #ifdef SHA_1 | ||
| 212 | #undef Xupdate | ||
| 213 | #define Xupdate(a,i,ia,ib,ic,id) (a)=\ | ||
| 214 | (ia[(i)&0x0f]^ib[((i)+2)&0x0f]^ic[((i)+8)&0x0f]^id[((i)+13)&0x0f]);\ | ||
| 215 | X[(i)&0x0f]=(a)=ROTATE((a),1); | ||
| 216 | #endif | ||
| 217 | |||
| 218 | #define BODY_00_15(i,a,b,c,d,e,f,xa) \ | ||
| 219 | (f)=xa[i]+(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \ | ||
| 220 | (b)=ROTATE((b),30); | ||
| 221 | |||
| 222 | #define BODY_16_19(i,a,b,c,d,e,f,xa,xb,xc,xd) \ | ||
| 223 | Xupdate(f,i,xa,xb,xc,xd); \ | ||
| 224 | (f)+=(e)+K_00_19+ROTATE((a),5)+F_00_19((b),(c),(d)); \ | ||
| 225 | (b)=ROTATE((b),30); | ||
| 226 | |||
| 227 | #define BODY_20_31(i,a,b,c,d,e,f,xa,xb,xc,xd) \ | ||
| 228 | Xupdate(f,i,xa,xb,xc,xd); \ | ||
| 229 | (f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \ | ||
| 230 | (b)=ROTATE((b),30); | ||
| 231 | |||
| 232 | #define BODY_32_39(i,a,b,c,d,e,f,xa) \ | ||
| 233 | Xupdate(f,i,xa,xa,xa,xa); \ | ||
| 234 | (f)+=(e)+K_20_39+ROTATE((a),5)+F_20_39((b),(c),(d)); \ | ||
| 235 | (b)=ROTATE((b),30); | ||
| 236 | |||
| 237 | #define BODY_40_59(i,a,b,c,d,e,f,xa) \ | ||
| 238 | Xupdate(f,i,xa,xa,xa,xa); \ | ||
| 239 | (f)+=(e)+K_40_59+ROTATE((a),5)+F_40_59((b),(c),(d)); \ | ||
| 240 | (b)=ROTATE((b),30); | ||
| 241 | |||
| 242 | #define BODY_60_79(i,a,b,c,d,e,f,xa) \ | ||
| 243 | Xupdate(f,i,xa,xa,xa,xa); \ | ||
| 244 | (f)=X[(i)&0x0f]+(e)+K_60_79+ROTATE((a),5)+F_60_79((b),(c),(d)); \ | ||
| 245 | (b)=ROTATE((b),30); | ||
| 246 | |||
diff --git a/src/lib/libssl/src/crypto/stack/Makefile.ssl b/src/lib/libssl/src/crypto/stack/Makefile.ssl new file mode 100644 index 0000000000..0d232c08cf --- /dev/null +++ b/src/lib/libssl/src/crypto/stack/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/stack/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= stack | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST= | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=stack.c | ||
| 24 | LIBOBJ=stack.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= stack.h | ||
| 29 | HEADER= $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/txt_db/Makefile.ssl b/src/lib/libssl/src/crypto/txt_db/Makefile.ssl new file mode 100644 index 0000000000..76e511534f --- /dev/null +++ b/src/lib/libssl/src/crypto/txt_db/Makefile.ssl | |||
| @@ -0,0 +1,80 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/txt_db/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= txt_db | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | GENERAL=Makefile | ||
| 19 | TEST= | ||
| 20 | APPS= | ||
| 21 | |||
| 22 | LIB=$(TOP)/libcrypto.a | ||
| 23 | LIBSRC=txt_db.c | ||
| 24 | LIBOBJ=txt_db.o | ||
| 25 | |||
| 26 | SRC= $(LIBSRC) | ||
| 27 | |||
| 28 | EXHEADER= txt_db.h | ||
| 29 | HEADER= $(EXHEADER) | ||
| 30 | |||
| 31 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 32 | |||
| 33 | top: | ||
| 34 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 35 | |||
| 36 | all: lib | ||
| 37 | |||
| 38 | lib: $(LIBOBJ) | ||
| 39 | $(AR) $(LIB) $(LIBOBJ) | ||
| 40 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 41 | @touch lib | ||
| 42 | |||
| 43 | files: | ||
| 44 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 45 | |||
| 46 | links: | ||
| 47 | /bin/rm -f Makefile | ||
| 48 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 49 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 50 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 51 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 52 | |||
| 53 | install: | ||
| 54 | @for i in $(EXHEADER) ; \ | ||
| 55 | do \ | ||
| 56 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 57 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 58 | done; | ||
| 59 | |||
| 60 | tags: | ||
| 61 | ctags $(SRC) | ||
| 62 | |||
| 63 | tests: | ||
| 64 | |||
| 65 | lint: | ||
| 66 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 67 | |||
| 68 | depend: | ||
| 69 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 70 | |||
| 71 | dclean: | ||
| 72 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 73 | mv -f Makefile.new $(MAKEFILE) | ||
| 74 | |||
| 75 | clean: | ||
| 76 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 77 | |||
| 78 | errors: | ||
| 79 | |||
| 80 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/x509/Makefile.ssl b/src/lib/libssl/src/crypto/x509/Makefile.ssl new file mode 100644 index 0000000000..1c1ca2ffa0 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/Makefile.ssl | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/crypto/x509/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= x509 | ||
| 6 | TOP= ../.. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=x509 | ||
| 19 | ERRC=x509_err | ||
| 20 | GENERAL=Makefile README | ||
| 21 | TEST= | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libcrypto.a | ||
| 25 | LIBSRC= x509_def.c x509_d2.c x509_r2x.c x509_cmp.c \ | ||
| 26 | x509_obj.c x509_req.c x509_vfy.c \ | ||
| 27 | x509_set.c x509rset.c $(ERRC).c \ | ||
| 28 | x509name.c x509_v3.c x509_ext.c x509pack.c \ | ||
| 29 | x509type.c x509_lu.c x_all.c x509_txt.c \ | ||
| 30 | by_file.c by_dir.c \ | ||
| 31 | v3_net.c v3_x509.c | ||
| 32 | LIBOBJ= x509_def.o x509_d2.o x509_r2x.o x509_cmp.o \ | ||
| 33 | x509_obj.o x509_req.o x509_vfy.o \ | ||
| 34 | x509_set.o x509rset.o $(ERRC).o \ | ||
| 35 | x509name.o x509_v3.o x509_ext.o x509pack.o \ | ||
| 36 | x509type.o x509_lu.o x_all.o x509_txt.o \ | ||
| 37 | by_file.o by_dir.o \ | ||
| 38 | v3_net.o v3_x509.o | ||
| 39 | |||
| 40 | SRC= $(LIBSRC) | ||
| 41 | |||
| 42 | EXHEADER= x509.h x509_vfy.h | ||
| 43 | HEADER= $(EXHEADER) | ||
| 44 | |||
| 45 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 46 | |||
| 47 | top: | ||
| 48 | (cd ../..; $(MAKE) DIRS=crypto SDIRS=$(DIR) sub_all) | ||
| 49 | |||
| 50 | all: lib | ||
| 51 | |||
| 52 | lib: $(LIBOBJ) | ||
| 53 | $(AR) $(LIB) $(LIBOBJ) | ||
| 54 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 55 | @touch lib | ||
| 56 | |||
| 57 | files: | ||
| 58 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 59 | |||
| 60 | links: | ||
| 61 | /bin/rm -f Makefile | ||
| 62 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 63 | $(TOP)/util/mklink.sh ../../include $(EXHEADER) | ||
| 64 | $(TOP)/util/mklink.sh ../../test $(TEST) | ||
| 65 | $(TOP)/util/mklink.sh ../../apps $(APPS) | ||
| 66 | |||
| 67 | install: | ||
| 68 | @for i in $(EXHEADER) ; \ | ||
| 69 | do \ | ||
| 70 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 71 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 72 | done; | ||
| 73 | |||
| 74 | tags: | ||
| 75 | ctags $(SRC) | ||
| 76 | |||
| 77 | tests: | ||
| 78 | |||
| 79 | lint: | ||
| 80 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 81 | |||
| 82 | depend: | ||
| 83 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 84 | |||
| 85 | dclean: | ||
| 86 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 87 | mv -f Makefile.new $(MAKEFILE) | ||
| 88 | |||
| 89 | clean: | ||
| 90 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 91 | |||
| 92 | errors: | ||
| 93 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 94 | perl ../err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 95 | |||
| 96 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/crypto/x509/attrib b/src/lib/libssl/src/crypto/x509/attrib new file mode 100644 index 0000000000..37f6cd755f --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/attrib | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | |||
| 2 | PKCS7 | ||
| 3 | STACK of X509_ATTRIBUTES | ||
| 4 | ASN1_OBJECT | ||
| 5 | STACK of ASN1_TYPE | ||
| 6 | |||
| 7 | So it is | ||
| 8 | |||
| 9 | p7.xa[].obj | ||
| 10 | p7.xa[].data[] | ||
| 11 | |||
| 12 | get_obj_by_nid(STACK , nid) | ||
| 13 | get_num_by_nid(STACK , nid) | ||
| 14 | get_data_by_nid(STACK , nid, index) | ||
| 15 | |||
| 16 | X509_ATTRIBUTE *X509_ATTRIBUTE_new(void ); | ||
| 17 | void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a); | ||
| 18 | |||
| 19 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_NID(X509_ATTRIBUTE **ex, | ||
| 20 | int nid, STACK *value); | ||
| 21 | |||
| 22 | X509_ATTRIBUTE *X509_ATTRIBUTE_create_by_OBJ(X509_ATTRIBUTE **ex, | ||
| 23 | int nid, STACK *value); | ||
| 24 | |||
| 25 | int X509_ATTRIBUTE_set_object(X509_ATTRIBUTE *ex,ASN1_OBJECT *obj); | ||
| 26 | int X509_ATTRIBUTE_add_data(X509_ATTRIBUTE *ex, int index, | ||
| 27 | ASN1_TYPE *value); | ||
| 28 | |||
| 29 | ASN1_OBJECT * X509_ATTRIBUTE_get_object(X509_ATTRIBUTE *ex); | ||
| 30 | int X509_ATTRIBUTE_get_num(X509_ATTRIBUTE *ne); | ||
| 31 | ASN1_TYPE * X509_ATTRIBUTE_get_data(X509_ATTRIBUTE *ne,int index); | ||
| 32 | |||
| 33 | ASN1_TYPE * X509_ATTRIBUTE_get_data_by_NID(X509_ATTRIBUTE *ne, | ||
| 34 | ASN1_OBJECT *obj); | ||
| 35 | |||
| 36 | X509_ATTRUBUTE *PKCS7_get_s_att_by_NID(PKCS7 *p7,int nid); | ||
| 37 | X509_ATTRUBUTE *PKCS7_get_u_att_by_NID(PKCS7 *p7,int nid); | ||
| 38 | |||
diff --git a/src/lib/libssl/src/crypto/x509/v3_net.c b/src/lib/libssl/src/crypto/x509/v3_net.c new file mode 100644 index 0000000000..0c2d276d13 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/v3_net.c | |||
| @@ -0,0 +1,87 @@ | |||
| 1 | /* crypto/x509/v3_net.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 "stack.h" | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include "asn1.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "x509.h" | ||
| 65 | |||
| 66 | #define NETSCAPE_X509_EXT_NUM 8 | ||
| 67 | |||
| 68 | static X509_EXTENSION_METHOD netscape_x509_ext[NETSCAPE_X509_EXT_NUM]={ | ||
| 69 | {NID_netscape_ca_policy_url, V_ASN1_IA5STRING,X509_EXT_PACK_STRING}, | ||
| 70 | {NID_netscape_ssl_server_name, V_ASN1_IA5STRING,X509_EXT_PACK_STRING}, | ||
| 71 | {NID_netscape_revocation_url, V_ASN1_IA5STRING,X509_EXT_PACK_STRING}, | ||
| 72 | {NID_netscape_base_url,V_ASN1_IA5STRING,X509_EXT_PACK_STRING}, | ||
| 73 | {NID_netscape_cert_type,V_ASN1_BIT_STRING,X509_EXT_PACK_STRING}, | ||
| 74 | {NID_netscape_ca_revocation_url,V_ASN1_IA5STRING,X509_EXT_PACK_STRING}, | ||
| 75 | {NID_netscape_renewal_url,V_ASN1_IA5STRING,X509_EXT_PACK_STRING}, | ||
| 76 | {NID_netscape_comment,V_ASN1_IA5STRING,X509_EXT_PACK_STRING}, | ||
| 77 | }; | ||
| 78 | |||
| 79 | int X509v3_add_netscape_extensions() | ||
| 80 | { | ||
| 81 | int i; | ||
| 82 | |||
| 83 | for (i=0; i<NETSCAPE_X509_EXT_NUM; i++) | ||
| 84 | if (!X509v3_add_extension(&(netscape_x509_ext[i]))) | ||
| 85 | return(0); | ||
| 86 | return(1); | ||
| 87 | } | ||
diff --git a/src/lib/libssl/src/crypto/x509/v3_x509.c b/src/lib/libssl/src/crypto/x509/v3_x509.c new file mode 100644 index 0000000000..f685aa4c71 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/v3_x509.c | |||
| @@ -0,0 +1,253 @@ | |||
| 1 | /* crypto/x509/v3_x509.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 <ctype.h> | ||
| 61 | #include "stack.h" | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "bio.h" | ||
| 64 | #include "asn1.h" | ||
| 65 | #include "objects.h" | ||
| 66 | #include "x509.h" | ||
| 67 | |||
| 68 | #if 0 | ||
| 69 | static int i2a_key_usage(BIO *bp, X509 *x); | ||
| 70 | static int a2i_key_usage(X509 *x, char *str, int len); | ||
| 71 | #endif | ||
| 72 | |||
| 73 | int X509v3_get_key_usage(X509 *x); | ||
| 74 | int X509v3_set_key_usage(X509 *x,unsigned int use); | ||
| 75 | int i2a_X509v3_key_usage(BIO *bp, unsigned int use); | ||
| 76 | unsigned int a2i_X509v3_key_usage(char *p); | ||
| 77 | |||
| 78 | #define STD_X509_EXT_NUM 9 | ||
| 79 | |||
| 80 | #if 0 | ||
| 81 | static X509_OBJECTS std_x509_ext[STD_X509_EXT_NUM]={ | ||
| 82 | {NID_subject_key_identifier, NULL,NULL}, | ||
| 83 | {NID_key_usage, a2i_key_usage,i2a_key_usage}, /**/ | ||
| 84 | {NID_private_key_usage_period, NULL,NULL}, | ||
| 85 | {NID_subject_alt_name, NULL,NULL}, | ||
| 86 | {NID_issuer_alt_name, NULL,NULL}, | ||
| 87 | {NID_basic_constraints, NULL,NULL}, | ||
| 88 | {NID_crl_number, NULL,NULL}, | ||
| 89 | {NID_certificate_policies, NULL,NULL}, | ||
| 90 | {NID_authority_key_identifier, NULL,NULL}, | ||
| 91 | }; | ||
| 92 | #endif | ||
| 93 | |||
| 94 | int X509v3_add_standard_extensions() | ||
| 95 | { | ||
| 96 | |||
| 97 | #if 0 | ||
| 98 | for (i=0; i<STD_X509_EXT_NUM; i++) | ||
| 99 | if (!X509v3_add_extension(&(std_x509_ext[i]))) | ||
| 100 | return(0); | ||
| 101 | #endif | ||
| 102 | return(1); | ||
| 103 | } | ||
| 104 | |||
| 105 | int X509v3_get_key_usage(x) | ||
| 106 | X509 *x; | ||
| 107 | { | ||
| 108 | X509_EXTENSION *ext; | ||
| 109 | ASN1_STRING *st; | ||
| 110 | char *p; | ||
| 111 | int i; | ||
| 112 | |||
| 113 | i=X509_get_ext_by_NID(x,NID_key_usage,-1); | ||
| 114 | if (i < 0) return(X509v3_KU_UNDEF); | ||
| 115 | ext=X509_get_ext(x,i); | ||
| 116 | st=X509v3_unpack_string(NULL,V_ASN1_BIT_STRING, | ||
| 117 | X509_EXTENSION_get_data(X509_get_ext(x,i))); | ||
| 118 | |||
| 119 | p=(char *)ASN1_STRING_data(st); | ||
| 120 | if (ASN1_STRING_length(st) == 1) | ||
| 121 | i=p[0]; | ||
| 122 | else if (ASN1_STRING_length(st) == 2) | ||
| 123 | i=p[0]|(p[1]<<8); | ||
| 124 | else | ||
| 125 | i=0; | ||
| 126 | return(i); | ||
| 127 | } | ||
| 128 | |||
| 129 | static struct | ||
| 130 | { | ||
| 131 | char *name; | ||
| 132 | unsigned int value; | ||
| 133 | } key_usage_data[] ={ | ||
| 134 | {"digitalSignature", X509v3_KU_DIGITAL_SIGNATURE}, | ||
| 135 | {"nonRepudiation", X509v3_KU_NON_REPUDIATION}, | ||
| 136 | {"keyEncipherment", X509v3_KU_KEY_ENCIPHERMENT}, | ||
| 137 | {"dataEncipherment", X509v3_KU_DATA_ENCIPHERMENT}, | ||
| 138 | {"keyAgreement", X509v3_KU_KEY_AGREEMENT}, | ||
| 139 | {"keyCertSign", X509v3_KU_KEY_CERT_SIGN}, | ||
| 140 | {"cRLSign", X509v3_KU_CRL_SIGN}, | ||
| 141 | {"encipherOnly", X509v3_KU_ENCIPHER_ONLY}, | ||
| 142 | {"decipherOnly", X509v3_KU_DECIPHER_ONLY}, | ||
| 143 | {NULL,0}, | ||
| 144 | }; | ||
| 145 | |||
| 146 | #if 0 | ||
| 147 | static int a2i_key_usage(x,str,len) | ||
| 148 | X509 *x; | ||
| 149 | char *str; | ||
| 150 | int len; | ||
| 151 | { | ||
| 152 | return(X509v3_set_key_usage(x,a2i_X509v3_key_usage(str))); | ||
| 153 | } | ||
| 154 | |||
| 155 | static int i2a_key_usage(bp,x) | ||
| 156 | BIO *bp; | ||
| 157 | X509 *x; | ||
| 158 | { | ||
| 159 | return(i2a_X509v3_key_usage(bp,X509v3_get_key_usage(x))); | ||
| 160 | } | ||
| 161 | #endif | ||
| 162 | |||
| 163 | int i2a_X509v3_key_usage(bp,use) | ||
| 164 | BIO *bp; | ||
| 165 | unsigned int use; | ||
| 166 | { | ||
| 167 | int i=0,first=1; | ||
| 168 | |||
| 169 | for (;;) | ||
| 170 | { | ||
| 171 | if (use | key_usage_data[i].value) | ||
| 172 | { | ||
| 173 | BIO_printf(bp,"%s%s",((first)?"":" "), | ||
| 174 | key_usage_data[i].name); | ||
| 175 | first=0; | ||
| 176 | } | ||
| 177 | } | ||
| 178 | return(1); | ||
| 179 | } | ||
| 180 | |||
| 181 | unsigned int a2i_X509v3_key_usage(p) | ||
| 182 | char *p; | ||
| 183 | { | ||
| 184 | unsigned int ret=0; | ||
| 185 | char *q,*s; | ||
| 186 | int i,n; | ||
| 187 | |||
| 188 | q=p; | ||
| 189 | for (;;) | ||
| 190 | { | ||
| 191 | while ((*q != '\0') && isalnum(*q)) | ||
| 192 | q++; | ||
| 193 | if (*q == '\0') break; | ||
| 194 | s=q++; | ||
| 195 | while (isalnum(*q)) | ||
| 196 | q++; | ||
| 197 | n=q-s; | ||
| 198 | i=0; | ||
| 199 | for (;;) | ||
| 200 | { | ||
| 201 | if (strncmp(key_usage_data[i].name,s,n) == 0) | ||
| 202 | { | ||
| 203 | ret|=key_usage_data[i].value; | ||
| 204 | break; | ||
| 205 | } | ||
| 206 | i++; | ||
| 207 | if (key_usage_data[i].name == NULL) | ||
| 208 | return(X509v3_KU_UNDEF); | ||
| 209 | } | ||
| 210 | } | ||
| 211 | return(ret); | ||
| 212 | } | ||
| 213 | |||
| 214 | int X509v3_set_key_usage(x,use) | ||
| 215 | X509 *x; | ||
| 216 | unsigned int use; | ||
| 217 | { | ||
| 218 | ASN1_OCTET_STRING *os; | ||
| 219 | X509_EXTENSION *ext; | ||
| 220 | int i; | ||
| 221 | unsigned char data[4]; | ||
| 222 | |||
| 223 | i=X509_get_ext_by_NID(x,NID_key_usage,-1); | ||
| 224 | if (i < 0) | ||
| 225 | { | ||
| 226 | i=X509_get_ext_count(x)+1; | ||
| 227 | if ((ext=X509_EXTENSION_new()) == NULL) return(0); | ||
| 228 | if (!X509_add_ext(x,ext,i)) | ||
| 229 | { | ||
| 230 | X509_EXTENSION_free(ext); | ||
| 231 | return(0); | ||
| 232 | } | ||
| 233 | } | ||
| 234 | else | ||
| 235 | ext=X509_get_ext(x,i); | ||
| 236 | |||
| 237 | /* fill in 'ext' */ | ||
| 238 | os=X509_EXTENSION_get_data(ext); | ||
| 239 | |||
| 240 | i=0; | ||
| 241 | if (use > 0) | ||
| 242 | { | ||
| 243 | i=1; | ||
| 244 | data[0]=use&0xff; | ||
| 245 | } | ||
| 246 | if (use > 0xff) | ||
| 247 | { | ||
| 248 | i=2; | ||
| 249 | data[1]=(use>>8)&0xff; | ||
| 250 | } | ||
| 251 | return((X509v3_pack_string(&os,V_ASN1_BIT_STRING,data,i) == NULL)?0:1); | ||
| 252 | } | ||
| 253 | |||
diff --git a/src/lib/libssl/src/crypto/x509/x509.doc b/src/lib/libssl/src/crypto/x509/x509.doc new file mode 100644 index 0000000000..73cfc9f034 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/x509.doc | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | X509_verify() | ||
| 2 | X509_sign() | ||
| 3 | |||
| 4 | X509_get_version() | ||
| 5 | X509_get_serialNumber() | ||
| 6 | X509_get_issuer() | ||
| 7 | X509_get_subject() | ||
| 8 | X509_get_notBefore() | ||
| 9 | X509_get_notAfter() | ||
| 10 | X509_get_pubkey() | ||
| 11 | |||
| 12 | X509_set_version() | ||
| 13 | X509_set_serialNumber() | ||
| 14 | X509_set_issuer() | ||
| 15 | X509_set_subject() | ||
| 16 | X509_set_notBefore() | ||
| 17 | X509_set_notAfter() | ||
| 18 | X509_set_pubkey() | ||
| 19 | |||
| 20 | X509_get_extensions() | ||
| 21 | X509_set_extensions() | ||
| 22 | |||
| 23 | X509_EXTENSIONS_clear() | ||
| 24 | X509_EXTENSIONS_retrieve() | ||
| 25 | X509_EXTENSIONS_add() | ||
| 26 | X509_EXTENSIONS_delete() | ||
| 27 | |||
diff --git a/src/lib/libssl/src/crypto/x509/x509.err b/src/lib/libssl/src/crypto/x509/x509.err new file mode 100644 index 0000000000..8d0862d7d1 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/x509.err | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | /* Error codes for the X509 functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define X509_F_ADD_CERT_DIR 100 | ||
| 5 | #define X509_F_BY_FILE_CTRL 101 | ||
| 6 | #define X509_F_DIR_CTRL 102 | ||
| 7 | #define X509_F_GET_CERT_BY_SUBJECT 103 | ||
| 8 | #define X509_F_X509V3_ADD_EXT 104 | ||
| 9 | #define X509_F_X509V3_ADD_EXTENSION 105 | ||
| 10 | #define X509_F_X509V3_PACK_STRING 106 | ||
| 11 | #define X509_F_X509V3_UNPACK_STRING 107 | ||
| 12 | #define X509_F_X509_EXTENSION_CREATE_BY_NID 108 | ||
| 13 | #define X509_F_X509_EXTENSION_CREATE_BY_OBJ 109 | ||
| 14 | #define X509_F_X509_GET_PUBKEY_PARAMETERS 110 | ||
| 15 | #define X509_F_X509_LOAD_CERT_FILE 111 | ||
| 16 | #define X509_F_X509_LOAD_CRL_FILE 112 | ||
| 17 | #define X509_F_X509_NAME_ADD_ENTRY 113 | ||
| 18 | #define X509_F_X509_NAME_ENTRY_CREATE_BY_NID 114 | ||
| 19 | #define X509_F_X509_NAME_ENTRY_SET_OBJECT 115 | ||
| 20 | #define X509_F_X509_NAME_ONELINE 116 | ||
| 21 | #define X509_F_X509_NAME_PRINT 117 | ||
| 22 | #define X509_F_X509_PRINT_FP 118 | ||
| 23 | #define X509_F_X509_PUBKEY_GET 119 | ||
| 24 | #define X509_F_X509_PUBKEY_SET 120 | ||
| 25 | #define X509_F_X509_REQ_PRINT 121 | ||
| 26 | #define X509_F_X509_REQ_PRINT_FP 122 | ||
| 27 | #define X509_F_X509_REQ_TO_X509 123 | ||
| 28 | #define X509_F_X509_STORE_ADD_CERT 124 | ||
| 29 | #define X509_F_X509_STORE_ADD_CRL 125 | ||
| 30 | #define X509_F_X509_TO_X509_REQ 126 | ||
| 31 | #define X509_F_X509_VERIFY_CERT 127 | ||
| 32 | |||
| 33 | /* Reason codes. */ | ||
| 34 | #define X509_R_BAD_X509_FILETYPE 100 | ||
| 35 | #define X509_R_CERT_ALREADY_IN_HASH_TABLE 101 | ||
| 36 | #define X509_R_ERR_ASN1_LIB 102 | ||
| 37 | #define X509_R_LOADING_CERT_DIR 103 | ||
| 38 | #define X509_R_LOADING_DEFAULTS 104 | ||
| 39 | #define X509_R_NO_CERT_SET_FOR_US_TO_VERIFY 105 | ||
| 40 | #define X509_R_SHOULD_RETRY 106 | ||
| 41 | #define X509_R_UNABLE_TO_FIND_PARAMETERS_IN_CHAIN 107 | ||
| 42 | #define X509_R_UNABLE_TO_GET_CERTS_PUBLIC_KEY 108 | ||
| 43 | #define X509_R_UNKNOWN_NID 109 | ||
| 44 | #define X509_R_UNKNOWN_STRING_TYPE 110 | ||
| 45 | #define X509_R_UNSUPPORTED_ALGORITHM 111 | ||
| 46 | #define X509_R_WRONG_LOOKUP_TYPE 112 | ||
diff --git a/src/lib/libssl/src/crypto/x509/x509pack.c b/src/lib/libssl/src/crypto/x509/x509pack.c new file mode 100644 index 0000000000..846f125859 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/x509pack.c | |||
| @@ -0,0 +1,157 @@ | |||
| 1 | /* crypto/x509/x509pack.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 "stack.h" | ||
| 61 | #include "cryptlib.h" | ||
| 62 | #include "asn1.h" | ||
| 63 | #include "objects.h" | ||
| 64 | #include "evp.h" | ||
| 65 | #include "x509.h" | ||
| 66 | |||
| 67 | ASN1_OCTET_STRING *X509v3_pack_string(ex,type,bytes,len) | ||
| 68 | ASN1_OCTET_STRING **ex; | ||
| 69 | int type; | ||
| 70 | unsigned char *bytes; | ||
| 71 | int len; | ||
| 72 | { | ||
| 73 | ASN1_OCTET_STRING *os; | ||
| 74 | ASN1_STRING str; | ||
| 75 | unsigned char *p; | ||
| 76 | int i; | ||
| 77 | |||
| 78 | if ((ex == NULL) || (*ex == NULL)) | ||
| 79 | os=ASN1_OCTET_STRING_new(); | ||
| 80 | else | ||
| 81 | os= *ex; | ||
| 82 | |||
| 83 | if (len < 0) len=strlen((char *)bytes); | ||
| 84 | str.length=len; | ||
| 85 | str.type=type; | ||
| 86 | str.data=bytes; | ||
| 87 | |||
| 88 | /* str now holds the data, we just have to copy it into ->value */ | ||
| 89 | |||
| 90 | switch (type) | ||
| 91 | { | ||
| 92 | case V_ASN1_BIT_STRING: | ||
| 93 | i=i2d_ASN1_BIT_STRING((ASN1_BIT_STRING *)&str,NULL); | ||
| 94 | if (!ASN1_STRING_set((ASN1_STRING *)os,NULL,i)) | ||
| 95 | goto err; | ||
| 96 | p=(unsigned char *)os->data; | ||
| 97 | i2d_ASN1_BIT_STRING((ASN1_BIT_STRING *)&str,&p); | ||
| 98 | break; | ||
| 99 | case V_ASN1_OCTET_STRING: | ||
| 100 | i=i2d_ASN1_OCTET_STRING((ASN1_OCTET_STRING *)&str,NULL); | ||
| 101 | if (!ASN1_STRING_set((ASN1_STRING *)os,NULL,i)) | ||
| 102 | goto err; | ||
| 103 | p=(unsigned char *)os->data; | ||
| 104 | i2d_ASN1_OCTET_STRING((ASN1_OCTET_STRING *)&str,&p); | ||
| 105 | break; | ||
| 106 | case V_ASN1_IA5STRING: | ||
| 107 | case V_ASN1_PRINTABLESTRING: | ||
| 108 | case V_ASN1_T61STRING: | ||
| 109 | i=i2d_ASN1_bytes(&str,NULL,type,V_ASN1_UNIVERSAL); | ||
| 110 | if (!ASN1_STRING_set((ASN1_STRING *)os,NULL,i)) | ||
| 111 | goto err; | ||
| 112 | p=(unsigned char *)os->data; | ||
| 113 | i=i2d_ASN1_bytes(&str,&p,type,V_ASN1_UNIVERSAL); | ||
| 114 | break; | ||
| 115 | default: | ||
| 116 | X509err(X509_F_X509V3_PACK_STRING,X509_R_UNKNOWN_STRING_TYPE); | ||
| 117 | goto err; | ||
| 118 | } | ||
| 119 | os->length=i; | ||
| 120 | |||
| 121 | if ((ex != NULL) && (os != *ex)) | ||
| 122 | *ex=os; | ||
| 123 | return(os); | ||
| 124 | err: | ||
| 125 | return(NULL); | ||
| 126 | } | ||
| 127 | |||
| 128 | ASN1_STRING *X509v3_unpack_string(ex,type,os) | ||
| 129 | ASN1_STRING **ex; | ||
| 130 | int type; | ||
| 131 | ASN1_OCTET_STRING *os; | ||
| 132 | { | ||
| 133 | unsigned char *p; | ||
| 134 | ASN1_STRING *ret=NULL; | ||
| 135 | |||
| 136 | p=os->data; | ||
| 137 | switch (type) | ||
| 138 | { | ||
| 139 | case V_ASN1_BIT_STRING: | ||
| 140 | ret=(ASN1_STRING *)d2i_ASN1_BIT_STRING( | ||
| 141 | (ASN1_BIT_STRING **)ex,&p,os->length); | ||
| 142 | break; | ||
| 143 | case V_ASN1_OCTET_STRING: | ||
| 144 | ret=(ASN1_STRING *)d2i_ASN1_OCTET_STRING( | ||
| 145 | (ASN1_BIT_STRING **)ex,&p,os->length); | ||
| 146 | break; | ||
| 147 | case V_ASN1_IA5STRING: | ||
| 148 | case V_ASN1_PRINTABLESTRING: | ||
| 149 | case V_ASN1_T61STRING: | ||
| 150 | ret=(ASN1_STRING *)d2i_ASN1_PRINTABLE(ex,&p,os->length); | ||
| 151 | break; | ||
| 152 | default: | ||
| 153 | X509err(X509_F_X509V3_UNPACK_STRING,X509_R_UNKNOWN_STRING_TYPE); | ||
| 154 | } | ||
| 155 | return(ret); | ||
| 156 | } | ||
| 157 | |||
diff --git a/src/lib/libssl/src/crypto/x509/x509v3.doc b/src/lib/libssl/src/crypto/x509/x509v3.doc new file mode 100644 index 0000000000..1e760a9469 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509/x509v3.doc | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | The 'new' system. | ||
| 2 | |||
| 3 | The X509_EXTENSION_METHOD includes extensions and attributes and/or names. | ||
| 4 | Basically everthing that can be added to an X509 with an OID identifying it. | ||
| 5 | |||
| 6 | It operates via 2 methods per object id. | ||
| 7 | int a2i_XXX(X509 *x,char *str,int len); | ||
| 8 | int i2a_XXX(BIO *bp,X509 *x); | ||
| 9 | |||
| 10 | The a2i_XXX function will add the object with a value converted from the | ||
| 11 | string into the X509. Len can be -1 in which case the length is calculated | ||
| 12 | via strlen(str). Applications can always use direct knowledge to load and | ||
| 13 | unload the relevent objects themselves. | ||
| 14 | |||
| 15 | i2a_XXX will print to the passed BIO, a text representation of the | ||
| 16 | relevet object. Use a memory BIO if you want it printed to a buffer :-). | ||
| 17 | |||
| 18 | X509_add_by_NID(X509 *x,int nid,char *str,int len); | ||
| 19 | X509_add_by_OBJ(X509 *x,ASN1_OBJECT *obj,char *str,int len); | ||
| 20 | |||
| 21 | X509_print_by_name(BIO *bp,X509 *x); | ||
| 22 | X509_print_by_NID(BIO *bp,X509 *x); | ||
| 23 | X509_print_by_OBJ(BIO *bp,X509 *x); | ||
| 24 | |||
diff --git a/src/lib/libssl/src/crypto/x509v3/format b/src/lib/libssl/src/crypto/x509v3/format new file mode 100644 index 0000000000..3307978121 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509v3/format | |||
| @@ -0,0 +1,92 @@ | |||
| 1 | AuthorityKeyIdentifier | ||
| 2 | { | ||
| 3 | keyIdentifier [0] OCTET_STRING OPTIONAL | ||
| 4 | authorityCertIssuer [1] GeneralNames OPTIONAL | ||
| 5 | authorityCertSerialNumber [2] CertificateSerialNumber OPTIONAL | ||
| 6 | } | ||
| 7 | |||
| 8 | SubjectKeyIdentifier OCTET_STRING | ||
| 9 | |||
| 10 | KeyUsage | ||
| 11 | { | ||
| 12 | BIT_STRING | ||
| 13 | digitalSignature 0 | ||
| 14 | nonRepudiation 1 | ||
| 15 | keyEncipherment 2 | ||
| 16 | dataEncipherment 3 | ||
| 17 | keyAgreement 4 | ||
| 18 | keyCertSign 5 | ||
| 19 | cRLSign 6 | ||
| 20 | encipherOnly 7 | ||
| 21 | decipherOnly 8 | ||
| 22 | } | ||
| 23 | |||
| 24 | extKeyUsage | ||
| 25 | { | ||
| 26 | SEQUENCE of OBJECT_IDENTIFIER | ||
| 27 | } | ||
| 28 | |||
| 29 | privateKeyUsagePeriod | ||
| 30 | { | ||
| 31 | notBefore [0] GeneralizedTime OPTIONAL | ||
| 32 | notAfter [1] GeneralizedTime OPTIONAL | ||
| 33 | } | ||
| 34 | |||
| 35 | certificatePoliciesSyntax | ||
| 36 | SEQUENCE of PoliciesInformation | ||
| 37 | |||
| 38 | PoliciesInformation XXX | ||
| 39 | policyMappings XXX | ||
| 40 | supportedAlgorithms XXX | ||
| 41 | |||
| 42 | subjectAltName | ||
| 43 | GeneralNames sequence of GeneralName | ||
| 44 | |||
| 45 | GeneralName | ||
| 46 | { | ||
| 47 | otherName [0] INSTANCE OF OTHER-NAME | ||
| 48 | rfc882Name [1] IA5String | ||
| 49 | dNSName [2] IA5String | ||
| 50 | x400Address [3] ORAddress | ||
| 51 | directoryName [4] Name | ||
| 52 | ediPartyName [5] | ||
| 53 | { | ||
| 54 | nameAssigner [0] DirectoryString OPTIONAL | ||
| 55 | partyName [1] DirectoryString | ||
| 56 | } | ||
| 57 | uniformResourceIdentifier [6] IA5String | ||
| 58 | iPAddress [7] OCTET_STRING | ||
| 59 | registeredID [8] OBJECT_IDENTIFIER | ||
| 60 | } | ||
| 61 | |||
| 62 | issuerAltName | ||
| 63 | GeneralNames sequence of GeneralName | ||
| 64 | |||
| 65 | subjectDirectoryAttribute SEQUENCE of Attribute | ||
| 66 | |||
| 67 | basicConstraints | ||
| 68 | { | ||
| 69 | cA BOOLEAN default FALSE | ||
| 70 | pathLenConstraint INTEGER OPTIONAL | ||
| 71 | } | ||
| 72 | |||
| 73 | nameConstraints | ||
| 74 | { | ||
| 75 | permittedSubtrees [0] sequence of GeneralSubtree OPTIONAL | ||
| 76 | excludedSubtrees [1] sequence of GeneralSubtree OPTIONAL | ||
| 77 | } | ||
| 78 | |||
| 79 | GeneralSubtree | ||
| 80 | { | ||
| 81 | base GeneralName | ||
| 82 | minimum [0] BaseDistance DEFAULT 0 | ||
| 83 | maximum [1] BaseDistance OPTIONAL | ||
| 84 | } | ||
| 85 | |||
| 86 | PolicyConstraints | ||
| 87 | { | ||
| 88 | requiredExplicitPolicy [0] SkipCerts OPTIONAL | ||
| 89 | inhibitPolicyMapping [1] SkipCerts OPTIONAL | ||
| 90 | } | ||
| 91 | SkipCerts == INTEGER | ||
| 92 | |||
diff --git a/src/lib/libssl/src/crypto/x509v3/header b/src/lib/libssl/src/crypto/x509v3/header new file mode 100644 index 0000000000..3d791ca3dd --- /dev/null +++ b/src/lib/libssl/src/crypto/x509v3/header | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | int a2i_ASN1_INTEGER(BIO *bp,ASN1_INTEGER *bs,char *buf,int size) | ||
| 2 | int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a) | ||
| 3 | int i2d_ASN1_INTEGER(ASN1_INTEGER *a,unsigned char **pp) | ||
| 4 | ASN1_INTEGER * d2i_ASN1_INTEGER(ASN1_INTEGER **a,unsigned char **pp,long length) | ||
| 5 | |||
| 6 | |||
diff --git a/src/lib/libssl/src/crypto/x509v3/v3_ku.c b/src/lib/libssl/src/crypto/x509v3/v3_ku.c new file mode 100644 index 0000000000..87c7402f43 --- /dev/null +++ b/src/lib/libssl/src/crypto/x509v3/v3_ku.c | |||
| @@ -0,0 +1,318 @@ | |||
| 1 | /* crypto/x509v3/v3_ku.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 <ctype.h> | ||
| 61 | #include "stack.h" | ||
| 62 | #include "cryptlib.h" | ||
| 63 | #include "bio.h" | ||
| 64 | #include "asn1.h" | ||
| 65 | #include "objects.h" | ||
| 66 | #include "x509.h" | ||
| 67 | |||
| 68 | X509_EXTENSION_METHOD X509v3_key_usage_method= | ||
| 69 | { | ||
| 70 | NID_key_usage, | ||
| 71 | ku_clear, | ||
| 72 | ex_get_bool, | ||
| 73 | ex_set_bool, | ||
| 74 | NULL, | ||
| 75 | NULL, | ||
| 76 | NULL, | ||
| 77 | NULL, | ||
| 78 | ku_a2i, | ||
| 79 | ku_i2a, | ||
| 80 | }; | ||
| 81 | |||
| 82 | static void ku_clear(a) | ||
| 83 | X509_EXTENSION *a; | ||
| 84 | { | ||
| 85 | } | ||
| 86 | |||
| 87 | static int ku_expand(a) | ||
| 88 | X509_EXTENSION *a; | ||
| 89 | { | ||
| 90 | ASN1_BIT_STRING *bs; | ||
| 91 | |||
| 92 | if (a->argp == NULL) | ||
| 93 | { | ||
| 94 | bs=X509v3_unpack_string(NULL,V_ASN1_BIT_STRING,value); | ||
| 95 | if (bs == NULL) return(0); | ||
| 96 | a->argp=(char *)bs; | ||
| 97 | a->ex_free=ASN1_STRING_free; | ||
| 98 | } | ||
| 99 | return(1); | ||
| 100 | } | ||
| 101 | |||
| 102 | static int ku_get_bool(a,num) | ||
| 103 | X509_EXTENSION *a; | ||
| 104 | int num; | ||
| 105 | { | ||
| 106 | int ret; | ||
| 107 | ASN1_BIT_STRING *bs; | ||
| 108 | |||
| 109 | if ((a->argp == NULL) && !ku_expand(a)) | ||
| 110 | return(-1); | ||
| 111 | bs=(ASN1_BIT_STRING *)a->argp; | ||
| 112 | ret=ASN1_BIT_STRING_get_bit(bs,num); | ||
| 113 | return(ret); | ||
| 114 | } | ||
| 115 | |||
| 116 | static int ku_set_bool(a,num,value) | ||
| 117 | X509_EXTENSION *a; | ||
| 118 | int num; | ||
| 119 | int value; | ||
| 120 | { | ||
| 121 | ASN1_BIT_STRING *a; | ||
| 122 | |||
| 123 | if ((a->argp == NULL) && !ku_expand(a)) | ||
| 124 | return(0); | ||
| 125 | bs=(ASN1_BIT_STRING *)a->argp; | ||
| 126 | ret=ASN1_BIT_STRING_set_bit(bs,num,value); | ||
| 127 | } | ||
| 128 | |||
| 129 | static int ku_a2i(bio,a,buf,len) | ||
| 130 | BIO *bio; | ||
| 131 | X509_EXTENSION *a; | ||
| 132 | char *buf; | ||
| 133 | int len; | ||
| 134 | { | ||
| 135 | get token | ||
| 136 | } | ||
| 137 | |||
| 138 | static char ku_names[X509v3_N_KU_NUM]={ | ||
| 139 | X509v3_S_KU_digitalSignature, | ||
| 140 | X509v3_S_KU_nonRepudiation, | ||
| 141 | X509v3_S_KU_keyEncipherment, | ||
| 142 | X509v3_S_KU_dataEncipherment, | ||
| 143 | X509v3_S_KU_keyAgreement, | ||
| 144 | X509v3_S_KU_keyCertSign, | ||
| 145 | X509v3_S_KU_cRLSign, | ||
| 146 | X509v3_S_KU_encipherOnly, | ||
| 147 | X509v3_S_KU_decipherOnly, | ||
| 148 | }; | ||
| 149 | |||
| 150 | static int ku_i2a(bio,a); | ||
| 151 | BIO *bio; | ||
| 152 | X509_EXTENSION *a; | ||
| 153 | { | ||
| 154 | int i,first=1; | ||
| 155 | char *c; | ||
| 156 | |||
| 157 | for (i=0; i<X509v3_N_KU_NUM; i++) | ||
| 158 | { | ||
| 159 | if (ku_get_bool(a,i) > 0) | ||
| 160 | { | ||
| 161 | BIO_printf(bio,"%s%s",((first)?"":" "),ku_names[i]); | ||
| 162 | first=0; | ||
| 163 | } | ||
| 164 | } | ||
| 165 | } | ||
| 166 | |||
| 167 | /***********************/ | ||
| 168 | |||
| 169 | int X509v3_get_key_usage(x,ret) | ||
| 170 | STACK *x; | ||
| 171 | unsigned long *ret; | ||
| 172 | { | ||
| 173 | X509_EXTENSION *ext; | ||
| 174 | ASN1_STRING *st; | ||
| 175 | char *p; | ||
| 176 | int i; | ||
| 177 | |||
| 178 | i=X509_get_ext_by_NID(x,NID_key_usage,-1); | ||
| 179 | if (i < 0) return(X509v3_KU_UNDEF); | ||
| 180 | ext=X509_get_ext(x,i); | ||
| 181 | st=X509v3_unpack_string(NULL,V_ASN1_BIT_STRING, | ||
| 182 | X509_EXTENSION_get_data(X509_get_ext(x,i))); | ||
| 183 | |||
| 184 | p=ASN1_STRING_data(st); | ||
| 185 | if (ASN1_STRING_length(st) == 1) | ||
| 186 | i=p[0]; | ||
| 187 | else if (ASN1_STRING_length(st) == 2) | ||
| 188 | i=p[0]|(p[1]<<8); | ||
| 189 | else | ||
| 190 | i=0; | ||
| 191 | return(i); | ||
| 192 | } | ||
| 193 | |||
| 194 | static struct | ||
| 195 | { | ||
| 196 | char *name; | ||
| 197 | unsigned int value; | ||
| 198 | } key_usage_data[] ={ | ||
| 199 | {"digitalSignature", X509v3_KU_DIGITAL_SIGNATURE}, | ||
| 200 | {"nonRepudiation", X509v3_KU_NON_REPUDIATION}, | ||
| 201 | {"keyEncipherment", X509v3_KU_KEY_ENCIPHERMENT}, | ||
| 202 | {"dataEncipherment", X509v3_KU_DATA_ENCIPHERMENT}, | ||
| 203 | {"keyAgreement", X509v3_KU_KEY_AGREEMENT}, | ||
| 204 | {"keyCertSign", X509v3_KU_KEY_CERT_SIGN}, | ||
| 205 | {"cRLSign", X509v3_KU_CRL_SIGN}, | ||
| 206 | {"encipherOnly", X509v3_KU_ENCIPHER_ONLY}, | ||
| 207 | {"decipherOnly", X509v3_KU_DECIPHER_ONLY}, | ||
| 208 | {NULL,0}, | ||
| 209 | }; | ||
| 210 | |||
| 211 | #if 0 | ||
| 212 | static int a2i_key_usage(x,str,len) | ||
| 213 | X509 *x; | ||
| 214 | char *str; | ||
| 215 | int len; | ||
| 216 | { | ||
| 217 | return(X509v3_set_key_usage(x,a2i_X509v3_key_usage(str))); | ||
| 218 | } | ||
| 219 | |||
| 220 | static int i2a_key_usage(bp,x) | ||
| 221 | BIO *bp; | ||
| 222 | X509 *x; | ||
| 223 | { | ||
| 224 | return(i2a_X509v3_key_usage(bp,X509v3_get_key_usage(x))); | ||
| 225 | } | ||
| 226 | #endif | ||
| 227 | |||
| 228 | int i2a_X509v3_key_usage(bp,use) | ||
| 229 | BIO *bp; | ||
| 230 | unsigned int use; | ||
| 231 | { | ||
| 232 | int i=0,first=1; | ||
| 233 | |||
| 234 | for (;;) | ||
| 235 | { | ||
| 236 | if (use | key_usage_data[i].value) | ||
| 237 | { | ||
| 238 | BIO_printf(bp,"%s%s",((first)?"":" "), | ||
| 239 | key_usage_data[i].name); | ||
| 240 | first=0; | ||
| 241 | } | ||
| 242 | } | ||
| 243 | return(1); | ||
| 244 | } | ||
| 245 | |||
| 246 | unsigned int a2i_X509v3_key_usage(p) | ||
| 247 | char *p; | ||
| 248 | { | ||
| 249 | unsigned int ret=0; | ||
| 250 | char *q,*s; | ||
| 251 | int i,n; | ||
| 252 | |||
| 253 | q=p; | ||
| 254 | for (;;) | ||
| 255 | { | ||
| 256 | while ((*q != '\0') && isalnum(*q)) | ||
| 257 | q++; | ||
| 258 | if (*q == '\0') break; | ||
| 259 | s=q++; | ||
| 260 | while (isalnum(*q)) | ||
| 261 | q++; | ||
| 262 | n=q-s; | ||
| 263 | i=0; | ||
| 264 | for (;;) | ||
| 265 | { | ||
| 266 | if (strncmp(key_usage_data[i].name,s,n) == 0) | ||
| 267 | { | ||
| 268 | ret|=key_usage_data[i].value; | ||
| 269 | break; | ||
| 270 | } | ||
| 271 | i++; | ||
| 272 | if (key_usage_data[i].name == NULL) | ||
| 273 | return(X509v3_KU_UNDEF); | ||
| 274 | } | ||
| 275 | } | ||
| 276 | return(ret); | ||
| 277 | } | ||
| 278 | |||
| 279 | int X509v3_set_key_usage(x,use) | ||
| 280 | X509 *x; | ||
| 281 | unsigned int use; | ||
| 282 | { | ||
| 283 | ASN1_OCTET_STRING *os; | ||
| 284 | X509_EXTENSION *ext; | ||
| 285 | int i; | ||
| 286 | unsigned char data[4]; | ||
| 287 | |||
| 288 | i=X509_get_ext_by_NID(x,NID_key_usage,-1); | ||
| 289 | if (i < 0) | ||
| 290 | { | ||
| 291 | i=X509_get_ext_count(x)+1; | ||
| 292 | if ((ext=X509_EXTENSION_new()) == NULL) return(0); | ||
| 293 | if (!X509_add_ext(x,ext,i)) | ||
| 294 | { | ||
| 295 | X509_EXTENSION_free(ext); | ||
| 296 | return(0); | ||
| 297 | } | ||
| 298 | } | ||
| 299 | else | ||
| 300 | ext=X509_get_ext(x,i); | ||
| 301 | |||
| 302 | /* fill in 'ext' */ | ||
| 303 | os=X509_EXTENSION_get_data(ext); | ||
| 304 | |||
| 305 | i=0; | ||
| 306 | if (use > 0) | ||
| 307 | { | ||
| 308 | i=1; | ||
| 309 | data[0]=use&0xff; | ||
| 310 | } | ||
| 311 | if (use > 0xff) | ||
| 312 | { | ||
| 313 | i=2; | ||
| 314 | data[1]=(use>>8)&0xff; | ||
| 315 | } | ||
| 316 | return((X509v3_pack_string(&os,V_ASN1_BIT_STRING,data,i) == NULL)?0:1); | ||
| 317 | } | ||
| 318 | |||
diff --git a/src/lib/libssl/src/dep/crypto.txt b/src/lib/libssl/src/dep/crypto.txt new file mode 100644 index 0000000000..9e5144fec6 --- /dev/null +++ b/src/lib/libssl/src/dep/crypto.txt | |||
| @@ -0,0 +1,1043 @@ | |||
| 1 | ASN1_BIT_STRING_asn1_meth | ||
| 2 | ASN1_BIT_STRING_get_bit | ||
| 3 | ASN1_BIT_STRING_set_bit | ||
| 4 | ASN1_HEADER_free | ||
| 5 | ASN1_HEADER_new | ||
| 6 | ASN1_IA5STRING_asn1_meth | ||
| 7 | ASN1_INTEGER_get | ||
| 8 | ASN1_INTEGER_set | ||
| 9 | ASN1_INTEGER_to_BN | ||
| 10 | ASN1_OBJECT_create | ||
| 11 | ASN1_OBJECT_free | ||
| 12 | ASN1_OBJECT_new | ||
| 13 | ASN1_PRINTABLE_type | ||
| 14 | ASN1_STRING_cmp | ||
| 15 | ASN1_STRING_dup | ||
| 16 | ASN1_STRING_free | ||
| 17 | ASN1_STRING_new | ||
| 18 | ASN1_STRING_print | ||
| 19 | ASN1_STRING_set | ||
| 20 | ASN1_STRING_type_new | ||
| 21 | ASN1_TYPE_free | ||
| 22 | ASN1_TYPE_get | ||
| 23 | ASN1_TYPE_new | ||
| 24 | ASN1_TYPE_set | ||
| 25 | ASN1_UNIVERSALSTRING_to_string | ||
| 26 | ASN1_UTCTIME_check | ||
| 27 | ASN1_UTCTIME_print | ||
| 28 | ASN1_UTCTIME_set | ||
| 29 | ASN1_check_infinite_end | ||
| 30 | ASN1_d2i_bio | ||
| 31 | ASN1_d2i_fp | ||
| 32 | ASN1_digest | ||
| 33 | ASN1_dup | ||
| 34 | ASN1_get_object | ||
| 35 | ASN1_i2d_bio | ||
| 36 | ASN1_i2d_fp | ||
| 37 | ASN1_object_size | ||
| 38 | ASN1_parse | ||
| 39 | ASN1_put_object | ||
| 40 | ASN1_sign | ||
| 41 | ASN1_verify | ||
| 42 | BF_cbc_encrypt | ||
| 43 | BF_cfb64_encrypt | ||
| 44 | BF_decrypt | ||
| 45 | BF_ecb_encrypt | ||
| 46 | BF_encrypt | ||
| 47 | BF_ofb64_encrypt | ||
| 48 | BF_options | ||
| 49 | BF_set_key | ||
| 50 | BIO_ACCEPT_free | ||
| 51 | BIO_ACCEPT_new | ||
| 52 | BIO_CONNECT_free | ||
| 53 | BIO_CONNECT_new | ||
| 54 | BIO_accept | ||
| 55 | BIO_copy_next_retry | ||
| 56 | BIO_ctrl | ||
| 57 | BIO_ctrl_int | ||
| 58 | BIO_debug_callback | ||
| 59 | BIO_dump | ||
| 60 | BIO_dup_chain | ||
| 61 | BIO_f_base64 | ||
| 62 | BIO_f_buffer | ||
| 63 | BIO_f_cipher | ||
| 64 | BIO_f_md | ||
| 65 | BIO_f_nbio_test | ||
| 66 | BIO_f_null | ||
| 67 | BIO_f_proxy_server | ||
| 68 | BIO_fd_non_fatal_error | ||
| 69 | BIO_fd_should_retry | ||
| 70 | BIO_find_type | ||
| 71 | BIO_free | ||
| 72 | BIO_free_all | ||
| 73 | BIO_get_accept_socket | ||
| 74 | BIO_get_ex_data | ||
| 75 | BIO_get_ex_new_index | ||
| 76 | BIO_get_filter_bio | ||
| 77 | BIO_get_host_ip | ||
| 78 | BIO_get_port | ||
| 79 | BIO_get_retry_BIO | ||
| 80 | BIO_get_retry_reason | ||
| 81 | BIO_gethostbyname | ||
| 82 | BIO_gets | ||
| 83 | BIO_ghbn_ctrl | ||
| 84 | BIO_new | ||
| 85 | BIO_new_accept | ||
| 86 | BIO_new_connect | ||
| 87 | BIO_new_fd | ||
| 88 | BIO_new_file | ||
| 89 | BIO_new_fp | ||
| 90 | BIO_new_socket | ||
| 91 | BIO_pop | ||
| 92 | BIO_printf | ||
| 93 | BIO_ptr_ctrl | ||
| 94 | BIO_push | ||
| 95 | BIO_puts | ||
| 96 | BIO_read | ||
| 97 | BIO_s_accept | ||
| 98 | BIO_s_connect | ||
| 99 | BIO_s_fd | ||
| 100 | BIO_s_file | ||
| 101 | BIO_s_mem | ||
| 102 | BIO_s_null | ||
| 103 | BIO_s_proxy_client | ||
| 104 | BIO_s_socket | ||
| 105 | BIO_set | ||
| 106 | BIO_set_cipher | ||
| 107 | BIO_set_ex_data | ||
| 108 | BIO_set_tcp_ndelay | ||
| 109 | BIO_sock_cleanup | ||
| 110 | BIO_sock_error | ||
| 111 | BIO_sock_init | ||
| 112 | BIO_sock_non_fatal_error | ||
| 113 | BIO_sock_should_retry | ||
| 114 | BIO_socket_ioctl | ||
| 115 | BIO_write | ||
| 116 | BN_BLINDING_convert | ||
| 117 | BN_BLINDING_free | ||
| 118 | BN_BLINDING_invert | ||
| 119 | BN_BLINDING_new | ||
| 120 | BN_BLINDING_update | ||
| 121 | BN_CTX_free | ||
| 122 | BN_CTX_new | ||
| 123 | BN_MONT_CTX_free | ||
| 124 | BN_MONT_CTX_new | ||
| 125 | BN_MONT_CTX_set | ||
| 126 | BN_add | ||
| 127 | BN_add_word | ||
| 128 | BN_bin2bn | ||
| 129 | BN_bn2bin | ||
| 130 | BN_bn2dec | ||
| 131 | BN_bn2hex | ||
| 132 | BN_bn2mpi | ||
| 133 | BN_clear | ||
| 134 | BN_clear_bit | ||
| 135 | BN_clear_free | ||
| 136 | BN_cmp | ||
| 137 | BN_copy | ||
| 138 | BN_dec2bn | ||
| 139 | BN_div | ||
| 140 | BN_div_word | ||
| 141 | BN_dup | ||
| 142 | BN_exp | ||
| 143 | BN_free | ||
| 144 | BN_from_montgomery | ||
| 145 | BN_gcd | ||
| 146 | BN_generate_prime | ||
| 147 | BN_get_word | ||
| 148 | BN_hex2bn | ||
| 149 | BN_is_bit_set | ||
| 150 | BN_is_prime | ||
| 151 | BN_lshift | ||
| 152 | BN_lshift1 | ||
| 153 | BN_mask_bits | ||
| 154 | BN_mod | ||
| 155 | BN_mod_exp | ||
| 156 | BN_mod_exp_mont | ||
| 157 | BN_mod_exp_recp | ||
| 158 | BN_mod_exp_simple | ||
| 159 | BN_mod_inverse | ||
| 160 | BN_mod_mul | ||
| 161 | BN_mod_mul_montgomery | ||
| 162 | BN_mod_mul_reciprocal | ||
| 163 | BN_mod_word | ||
| 164 | BN_mpi2bn | ||
| 165 | BN_mul | ||
| 166 | BN_mul_word | ||
| 167 | BN_new | ||
| 168 | BN_num_bits | ||
| 169 | BN_num_bits_word | ||
| 170 | BN_options | ||
| 171 | BN_print | ||
| 172 | BN_print_fp | ||
| 173 | BN_rand | ||
| 174 | BN_reciprocal | ||
| 175 | BN_rshift | ||
| 176 | BN_rshift1 | ||
| 177 | BN_set_bit | ||
| 178 | BN_set_word | ||
| 179 | BN_sqr | ||
| 180 | BN_sub | ||
| 181 | BN_sub_word | ||
| 182 | BN_to_ASN1_INTEGER | ||
| 183 | BN_ucmp | ||
| 184 | BN_value_one | ||
| 185 | BUF_MEM_free | ||
| 186 | BUF_MEM_grow | ||
| 187 | BUF_MEM_new | ||
| 188 | BUF_strdup | ||
| 189 | CAST_cbc_encrypt | ||
| 190 | CAST_cfb64_encrypt | ||
| 191 | CAST_decrypt | ||
| 192 | CAST_ecb_encrypt | ||
| 193 | CAST_encrypt | ||
| 194 | CAST_ofb64_encrypt | ||
| 195 | CAST_set_key | ||
| 196 | CONF_free | ||
| 197 | CONF_get_number | ||
| 198 | CONF_get_section | ||
| 199 | CONF_get_string | ||
| 200 | CONF_load | ||
| 201 | CRYPTO_add_lock | ||
| 202 | CRYPTO_dbg_free | ||
| 203 | CRYPTO_dbg_malloc | ||
| 204 | CRYPTO_dbg_realloc | ||
| 205 | CRYPTO_dbg_remalloc | ||
| 206 | CRYPTO_dup_ex_data | ||
| 207 | CRYPTO_free | ||
| 208 | CRYPTO_free_ex_data | ||
| 209 | CRYPTO_get_add_lock_callback | ||
| 210 | CRYPTO_get_ex_data | ||
| 211 | CRYPTO_get_ex_new_index | ||
| 212 | CRYPTO_get_id_callback | ||
| 213 | CRYPTO_get_lock_name | ||
| 214 | CRYPTO_get_locking_callback | ||
| 215 | CRYPTO_get_mem_functions | ||
| 216 | CRYPTO_get_new_lockid | ||
| 217 | CRYPTO_lock | ||
| 218 | CRYPTO_malloc | ||
| 219 | CRYPTO_mem_ctrl | ||
| 220 | CRYPTO_mem_leaks | ||
| 221 | CRYPTO_mem_leaks_cb | ||
| 222 | CRYPTO_mem_leaks_fp | ||
| 223 | CRYPTO_new_ex_data | ||
| 224 | CRYPTO_realloc | ||
| 225 | CRYPTO_remalloc | ||
| 226 | CRYPTO_set_add_lock_callback | ||
| 227 | CRYPTO_set_ex_data | ||
| 228 | CRYPTO_set_id_callback | ||
| 229 | CRYPTO_set_locking_callback | ||
| 230 | CRYPTO_set_mem_functions | ||
| 231 | CRYPTO_thread_id | ||
| 232 | DH_check | ||
| 233 | DH_compute_key | ||
| 234 | DH_free | ||
| 235 | DH_generate_key | ||
| 236 | DH_generate_parameters | ||
| 237 | DH_new | ||
| 238 | DH_size | ||
| 239 | DHparams_print | ||
| 240 | DHparams_print_fp | ||
| 241 | DSA_free | ||
| 242 | DSA_generate_key | ||
| 243 | DSA_generate_parameters | ||
| 244 | DSA_is_prime | ||
| 245 | DSA_new | ||
| 246 | DSA_print | ||
| 247 | DSA_print_fp | ||
| 248 | DSA_sign | ||
| 249 | DSA_sign_setup | ||
| 250 | DSA_size | ||
| 251 | DSA_verify | ||
| 252 | DSAparams_print | ||
| 253 | DSAparams_print_fp | ||
| 254 | ERR_clear_error | ||
| 255 | ERR_error_string | ||
| 256 | ERR_free_strings | ||
| 257 | ERR_func_error_string | ||
| 258 | ERR_get_err_state_table | ||
| 259 | ERR_get_error | ||
| 260 | ERR_get_error_line | ||
| 261 | ERR_get_next_error_library | ||
| 262 | ERR_get_state | ||
| 263 | ERR_get_string_table | ||
| 264 | ERR_lib_error_string | ||
| 265 | ERR_load_ASN1_strings | ||
| 266 | ERR_load_BIO_strings | ||
| 267 | ERR_load_BN_strings | ||
| 268 | ERR_load_BUF_strings | ||
| 269 | ERR_load_CONF_strings | ||
| 270 | ERR_load_CRYPTO_strings | ||
| 271 | ERR_load_DH_strings | ||
| 272 | ERR_load_DSA_strings | ||
| 273 | ERR_load_ERR_strings | ||
| 274 | ERR_load_EVP_strings | ||
| 275 | ERR_load_OBJ_strings | ||
| 276 | ERR_load_PEM_strings | ||
| 277 | ERR_load_PKCS7_strings | ||
| 278 | ERR_load_PROXY_strings | ||
| 279 | ERR_load_RSA_strings | ||
| 280 | ERR_load_X509_strings | ||
| 281 | ERR_load_crypto_strings | ||
| 282 | ERR_load_strings | ||
| 283 | ERR_peek_error | ||
| 284 | ERR_peek_error_line | ||
| 285 | ERR_print_errors | ||
| 286 | ERR_print_errors_fp | ||
| 287 | ERR_put_error | ||
| 288 | ERR_reason_error_string | ||
| 289 | ERR_remove_state | ||
| 290 | EVP_BytesToKey | ||
| 291 | EVP_CIPHER_CTX_cleanup | ||
| 292 | EVP_CIPHER_CTX_init | ||
| 293 | EVP_CipherFinal | ||
| 294 | EVP_CipherInit | ||
| 295 | EVP_CipherUpdate | ||
| 296 | EVP_DecodeBlock | ||
| 297 | EVP_DecodeFinal | ||
| 298 | EVP_DecodeInit | ||
| 299 | EVP_DecodeUpdate | ||
| 300 | EVP_DecryptFinal | ||
| 301 | EVP_DecryptInit | ||
| 302 | EVP_DecryptUpdate | ||
| 303 | EVP_DigestFinal | ||
| 304 | EVP_DigestInit | ||
| 305 | EVP_DigestUpdate | ||
| 306 | EVP_EncodeBlock | ||
| 307 | EVP_EncodeFinal | ||
| 308 | EVP_EncodeInit | ||
| 309 | EVP_EncodeUpdate | ||
| 310 | EVP_EncryptFinal | ||
| 311 | EVP_EncryptInit | ||
| 312 | EVP_EncryptUpdate | ||
| 313 | EVP_OpenFinal | ||
| 314 | EVP_OpenInit | ||
| 315 | EVP_PKEY_assign | ||
| 316 | EVP_PKEY_bits | ||
| 317 | EVP_PKEY_cmp_parameters | ||
| 318 | EVP_PKEY_copy_parameters | ||
| 319 | EVP_PKEY_free | ||
| 320 | EVP_PKEY_missing_parameters | ||
| 321 | EVP_PKEY_new | ||
| 322 | EVP_PKEY_save_parameters | ||
| 323 | EVP_PKEY_size | ||
| 324 | EVP_PKEY_type | ||
| 325 | EVP_SealFinal | ||
| 326 | EVP_SealInit | ||
| 327 | EVP_SignFinal | ||
| 328 | EVP_VerifyFinal | ||
| 329 | EVP_add_alias | ||
| 330 | EVP_add_cipher | ||
| 331 | EVP_add_digest | ||
| 332 | EVP_bf_cbc | ||
| 333 | EVP_bf_cfb | ||
| 334 | EVP_bf_ecb | ||
| 335 | EVP_bf_ofb | ||
| 336 | EVP_cast5_cbc | ||
| 337 | EVP_cast5_cfb | ||
| 338 | EVP_cast5_ecb | ||
| 339 | EVP_cast5_ofb | ||
| 340 | EVP_cleanup | ||
| 341 | EVP_delete_alias | ||
| 342 | EVP_des_cbc | ||
| 343 | EVP_des_cfb | ||
| 344 | EVP_des_ecb | ||
| 345 | EVP_des_ede | ||
| 346 | EVP_des_ede3 | ||
| 347 | EVP_des_ede3_cbc | ||
| 348 | EVP_des_ede3_cfb | ||
| 349 | EVP_des_ede3_ofb | ||
| 350 | EVP_des_ede_cbc | ||
| 351 | EVP_des_ede_cfb | ||
| 352 | EVP_des_ede_ofb | ||
| 353 | EVP_des_ofb | ||
| 354 | EVP_desx_cbc | ||
| 355 | EVP_dss | ||
| 356 | EVP_dss1 | ||
| 357 | EVP_enc_null | ||
| 358 | EVP_get_cipherbyname | ||
| 359 | EVP_get_digestbyname | ||
| 360 | EVP_get_pw_prompt | ||
| 361 | EVP_idea_cbc | ||
| 362 | EVP_idea_cfb | ||
| 363 | EVP_idea_ecb | ||
| 364 | EVP_idea_ofb | ||
| 365 | EVP_md2 | ||
| 366 | EVP_md5 | ||
| 367 | EVP_md_null | ||
| 368 | EVP_mdc2 | ||
| 369 | EVP_rc2_40_cbc | ||
| 370 | EVP_rc2_cbc | ||
| 371 | EVP_rc2_cfb | ||
| 372 | EVP_rc2_ecb | ||
| 373 | EVP_rc2_ofb | ||
| 374 | EVP_rc4 | ||
| 375 | EVP_rc4_40 | ||
| 376 | EVP_read_pw_string | ||
| 377 | EVP_set_pw_prompt | ||
| 378 | EVP_sha | ||
| 379 | EVP_sha1 | ||
| 380 | HMAC | ||
| 381 | HMAC_Final | ||
| 382 | HMAC_Init | ||
| 383 | HMAC_Update | ||
| 384 | HMAC_cleanup | ||
| 385 | MD2 | ||
| 386 | MD2_Final | ||
| 387 | MD2_Init | ||
| 388 | MD2_Update | ||
| 389 | MD2_options | ||
| 390 | MD5 | ||
| 391 | MD5_Final | ||
| 392 | MD5_Init | ||
| 393 | MD5_Transform | ||
| 394 | MD5_Update | ||
| 395 | MDC2 | ||
| 396 | MDC2_Final | ||
| 397 | MDC2_Init | ||
| 398 | MDC2_Update | ||
| 399 | NETSCAPE_SPKAC_free | ||
| 400 | NETSCAPE_SPKAC_new | ||
| 401 | NETSCAPE_SPKI_free | ||
| 402 | NETSCAPE_SPKI_new | ||
| 403 | NETSCAPE_SPKI_sign | ||
| 404 | NETSCAPE_SPKI_verify | ||
| 405 | OBJ_add_object | ||
| 406 | OBJ_bsearch | ||
| 407 | OBJ_cleanup | ||
| 408 | OBJ_cmp | ||
| 409 | OBJ_create | ||
| 410 | OBJ_create_objects | ||
| 411 | OBJ_dup | ||
| 412 | OBJ_ln2nid | ||
| 413 | OBJ_new_nid | ||
| 414 | OBJ_nid2ln | ||
| 415 | OBJ_nid2obj | ||
| 416 | OBJ_nid2sn | ||
| 417 | OBJ_obj2nid | ||
| 418 | OBJ_sn2nid | ||
| 419 | OBJ_txt2nid | ||
| 420 | PEM_ASN1_read | ||
| 421 | PEM_ASN1_read_bio | ||
| 422 | PEM_ASN1_write | ||
| 423 | PEM_ASN1_write_bio | ||
| 424 | PEM_SealFinal | ||
| 425 | PEM_SealInit | ||
| 426 | PEM_SealUpdate | ||
| 427 | PEM_SignFinal | ||
| 428 | PEM_SignInit | ||
| 429 | PEM_SignUpdate | ||
| 430 | PEM_X509_INFO_read | ||
| 431 | PEM_X509_INFO_read_bio | ||
| 432 | PEM_X509_INFO_write_bio | ||
| 433 | PEM_dek_info | ||
| 434 | PEM_do_header | ||
| 435 | PEM_get_EVP_CIPHER_INFO | ||
| 436 | PEM_proc_type | ||
| 437 | PEM_read | ||
| 438 | PEM_read_DHparams | ||
| 439 | PEM_read_DSAPrivateKey | ||
| 440 | PEM_read_DSAparams | ||
| 441 | PEM_read_PKCS7 | ||
| 442 | PEM_read_PrivateKey | ||
| 443 | PEM_read_RSAPrivateKey | ||
| 444 | PEM_read_RSAPublicKey | ||
| 445 | PEM_read_X509 | ||
| 446 | PEM_read_X509_CRL | ||
| 447 | PEM_read_X509_REQ | ||
| 448 | PEM_read_bio | ||
| 449 | PEM_read_bio_DHparams | ||
| 450 | PEM_read_bio_DSAPrivateKey | ||
| 451 | PEM_read_bio_DSAparams | ||
| 452 | PEM_read_bio_PKCS7 | ||
| 453 | PEM_read_bio_PrivateKey | ||
| 454 | PEM_read_bio_RSAPrivateKey | ||
| 455 | PEM_read_bio_RSAPublicKey | ||
| 456 | PEM_read_bio_X509 | ||
| 457 | PEM_read_bio_X509_CRL | ||
| 458 | PEM_read_bio_X509_REQ | ||
| 459 | PEM_write | ||
| 460 | PEM_write_DHparams | ||
| 461 | PEM_write_DSAPrivateKey | ||
| 462 | PEM_write_DSAparams | ||
| 463 | PEM_write_PKCS7 | ||
| 464 | PEM_write_PrivateKey | ||
| 465 | PEM_write_RSAPrivateKey | ||
| 466 | PEM_write_RSAPublicKey | ||
| 467 | PEM_write_X509 | ||
| 468 | PEM_write_X509_CRL | ||
| 469 | PEM_write_X509_REQ | ||
| 470 | PEM_write_bio | ||
| 471 | PEM_write_bio_DHparams | ||
| 472 | PEM_write_bio_DSAPrivateKey | ||
| 473 | PEM_write_bio_DSAparams | ||
| 474 | PEM_write_bio_PKCS7 | ||
| 475 | PEM_write_bio_PrivateKey | ||
| 476 | PEM_write_bio_RSAPrivateKey | ||
| 477 | PEM_write_bio_RSAPublicKey | ||
| 478 | PEM_write_bio_X509 | ||
| 479 | PEM_write_bio_X509_CRL | ||
| 480 | PEM_write_bio_X509_REQ | ||
| 481 | PKCS7_DIGEST_free | ||
| 482 | PKCS7_DIGEST_new | ||
| 483 | PKCS7_ENCRYPT_free | ||
| 484 | PKCS7_ENCRYPT_new | ||
| 485 | PKCS7_ENC_CONTENT_free | ||
| 486 | PKCS7_ENC_CONTENT_new | ||
| 487 | PKCS7_ENVELOPE_free | ||
| 488 | PKCS7_ENVELOPE_new | ||
| 489 | PKCS7_ISSUER_AND_SERIAL_digest | ||
| 490 | PKCS7_ISSUER_AND_SERIAL_free | ||
| 491 | PKCS7_ISSUER_AND_SERIAL_new | ||
| 492 | PKCS7_RECIP_INFO_free | ||
| 493 | PKCS7_RECIP_INFO_new | ||
| 494 | PKCS7_SIGNED_free | ||
| 495 | PKCS7_SIGNED_new | ||
| 496 | PKCS7_SIGNER_INFO_free | ||
| 497 | PKCS7_SIGNER_INFO_new | ||
| 498 | PKCS7_SIGNER_INFO_set | ||
| 499 | PKCS7_SIGN_ENVELOPE_free | ||
| 500 | PKCS7_SIGN_ENVELOPE_new | ||
| 501 | PKCS7_add_certificate | ||
| 502 | PKCS7_add_crl | ||
| 503 | PKCS7_add_signature | ||
| 504 | PKCS7_add_signer | ||
| 505 | PKCS7_cert_from_signer_info | ||
| 506 | PKCS7_content_free | ||
| 507 | PKCS7_content_new | ||
| 508 | PKCS7_ctrl | ||
| 509 | PKCS7_dataInit | ||
| 510 | PKCS7_dataSign | ||
| 511 | PKCS7_dataVerify | ||
| 512 | PKCS7_dup | ||
| 513 | PKCS7_free | ||
| 514 | PKCS7_get_signer_info | ||
| 515 | PKCS7_new | ||
| 516 | PKCS7_set_content | ||
| 517 | PKCS7_set_type | ||
| 518 | PROXY_ENTRY_add_noproxy | ||
| 519 | PROXY_ENTRY_clear_noproxy | ||
| 520 | PROXY_ENTRY_free | ||
| 521 | PROXY_ENTRY_get_noproxy | ||
| 522 | PROXY_ENTRY_new | ||
| 523 | PROXY_ENTRY_set_server | ||
| 524 | PROXY_add_noproxy | ||
| 525 | PROXY_add_server | ||
| 526 | PROXY_check_by_host | ||
| 527 | PROXY_check_url | ||
| 528 | PROXY_clear_noproxy | ||
| 529 | PROXY_free | ||
| 530 | PROXY_get_noproxy | ||
| 531 | PROXY_get_proxies | ||
| 532 | PROXY_get_proxy_entry | ||
| 533 | PROXY_load_conf | ||
| 534 | PROXY_new | ||
| 535 | PROXY_print | ||
| 536 | RAND_bytes | ||
| 537 | RAND_cleanup | ||
| 538 | RAND_file_name | ||
| 539 | RAND_load_file | ||
| 540 | RAND_seed | ||
| 541 | RAND_write_file | ||
| 542 | RC2_cbc_encrypt | ||
| 543 | RC2_cfb64_encrypt | ||
| 544 | RC2_decrypt | ||
| 545 | RC2_ecb_encrypt | ||
| 546 | RC2_encrypt | ||
| 547 | RC2_ofb64_encrypt | ||
| 548 | RC2_set_key | ||
| 549 | RC4 | ||
| 550 | RC4_options | ||
| 551 | RC4_set_key | ||
| 552 | RC5_32_cbc_encrypt | ||
| 553 | RC5_32_cfb64_encrypt | ||
| 554 | RC5_32_decrypt | ||
| 555 | RC5_32_ecb_encrypt | ||
| 556 | RC5_32_encrypt | ||
| 557 | RC5_32_ofb64_encrypt | ||
| 558 | RC5_32_set_key | ||
| 559 | RIPEMD160 | ||
| 560 | RIPEMD160_Final | ||
| 561 | RIPEMD160_Init | ||
| 562 | RIPEMD160_Transform | ||
| 563 | RIPEMD160_Update | ||
| 564 | RSAPrivateKey_asn1_meth | ||
| 565 | RSAPrivateKey_dup | ||
| 566 | RSAPublicKey_dup | ||
| 567 | RSA_PKCS1_SSLeay | ||
| 568 | RSA_blinding_off | ||
| 569 | RSA_blinding_on | ||
| 570 | RSA_flags | ||
| 571 | RSA_free | ||
| 572 | RSA_generate_key | ||
| 573 | RSA_get_ex_data | ||
| 574 | RSA_get_ex_new_index | ||
| 575 | RSA_new | ||
| 576 | RSA_new_method | ||
| 577 | RSA_padding_add_PKCS1_type_1 | ||
| 578 | RSA_padding_add_PKCS1_type_2 | ||
| 579 | RSA_padding_add_SSLv23 | ||
| 580 | RSA_padding_add_none | ||
| 581 | RSA_padding_check_PKCS1_type_1 | ||
| 582 | RSA_padding_check_PKCS1_type_2 | ||
| 583 | RSA_padding_check_SSLv23 | ||
| 584 | RSA_padding_check_none | ||
| 585 | RSA_print | ||
| 586 | RSA_print_fp | ||
| 587 | RSA_private_decrypt | ||
| 588 | RSA_private_encrypt | ||
| 589 | RSA_public_decrypt | ||
| 590 | RSA_public_encrypt | ||
| 591 | RSA_set_default_method | ||
| 592 | RSA_set_ex_data | ||
| 593 | RSA_sign | ||
| 594 | RSA_sign_ASN1_OCTET_STRING | ||
| 595 | RSA_size | ||
| 596 | RSA_verify | ||
| 597 | RSA_verify_ASN1_OCTET_STRING | ||
| 598 | SHA | ||
| 599 | SHA1 | ||
| 600 | SHA1_Final | ||
| 601 | SHA1_Init | ||
| 602 | SHA1_Transform | ||
| 603 | SHA1_Update | ||
| 604 | SHA_Final | ||
| 605 | SHA_Init | ||
| 606 | SHA_Transform | ||
| 607 | SHA_Update | ||
| 608 | SSLeay | ||
| 609 | SSLeay_add_all_algorithms | ||
| 610 | SSLeay_add_all_ciphers | ||
| 611 | SSLeay_add_all_digests | ||
| 612 | SSLeay_version | ||
| 613 | TXT_DB_create_index | ||
| 614 | TXT_DB_free | ||
| 615 | TXT_DB_get_by_index | ||
| 616 | TXT_DB_insert | ||
| 617 | TXT_DB_read | ||
| 618 | TXT_DB_write | ||
| 619 | X509_ALGOR_free | ||
| 620 | X509_ALGOR_new | ||
| 621 | X509_ATTRIBUTE_free | ||
| 622 | X509_ATTRIBUTE_new | ||
| 623 | X509_CINF_free | ||
| 624 | X509_CINF_new | ||
| 625 | X509_CRL_INFO_free | ||
| 626 | X509_CRL_INFO_new | ||
| 627 | X509_CRL_add_ext | ||
| 628 | X509_CRL_cmp | ||
| 629 | X509_CRL_delete_ext | ||
| 630 | X509_CRL_dup | ||
| 631 | X509_CRL_free | ||
| 632 | X509_CRL_get_ext | ||
| 633 | X509_CRL_get_ext_by_NID | ||
| 634 | X509_CRL_get_ext_by_OBJ | ||
| 635 | X509_CRL_get_ext_by_critical | ||
| 636 | X509_CRL_get_ext_count | ||
| 637 | X509_CRL_new | ||
| 638 | X509_CRL_sign | ||
| 639 | X509_CRL_verify | ||
| 640 | X509_EXTENSION_create_by_NID | ||
| 641 | X509_EXTENSION_create_by_OBJ | ||
| 642 | X509_EXTENSION_dup | ||
| 643 | X509_EXTENSION_free | ||
| 644 | X509_EXTENSION_get_critical | ||
| 645 | X509_EXTENSION_get_data | ||
| 646 | X509_EXTENSION_get_object | ||
| 647 | X509_EXTENSION_new | ||
| 648 | X509_EXTENSION_set_critical | ||
| 649 | X509_EXTENSION_set_data | ||
| 650 | X509_EXTENSION_set_object | ||
| 651 | X509_INFO_free | ||
| 652 | X509_INFO_new | ||
| 653 | X509_LOOKUP_by_alias | ||
| 654 | X509_LOOKUP_by_fingerprint | ||
| 655 | X509_LOOKUP_by_issuer_serial | ||
| 656 | X509_LOOKUP_by_subject | ||
| 657 | X509_LOOKUP_ctrl | ||
| 658 | X509_LOOKUP_file | ||
| 659 | X509_LOOKUP_free | ||
| 660 | X509_LOOKUP_hash_dir | ||
| 661 | X509_LOOKUP_init | ||
| 662 | X509_LOOKUP_new | ||
| 663 | X509_LOOKUP_shutdown | ||
| 664 | X509_NAME_ENTRY_create_by_NID | ||
| 665 | X509_NAME_ENTRY_create_by_OBJ | ||
| 666 | X509_NAME_ENTRY_dup | ||
| 667 | X509_NAME_ENTRY_free | ||
| 668 | X509_NAME_ENTRY_get_data | ||
| 669 | X509_NAME_ENTRY_get_object | ||
| 670 | X509_NAME_ENTRY_new | ||
| 671 | X509_NAME_ENTRY_set_data | ||
| 672 | X509_NAME_ENTRY_set_object | ||
| 673 | X509_NAME_add_entry | ||
| 674 | X509_NAME_cmp | ||
| 675 | X509_NAME_delete_entry | ||
| 676 | X509_NAME_digest | ||
| 677 | X509_NAME_dup | ||
| 678 | X509_NAME_entry_count | ||
| 679 | X509_NAME_free | ||
| 680 | X509_NAME_get_entry | ||
| 681 | X509_NAME_get_index_by_NID | ||
| 682 | X509_NAME_get_index_by_OBJ | ||
| 683 | X509_NAME_get_text_by_NID | ||
| 684 | X509_NAME_get_text_by_OBJ | ||
| 685 | X509_NAME_hash | ||
| 686 | X509_NAME_new | ||
| 687 | X509_NAME_oneline | ||
| 688 | X509_NAME_print | ||
| 689 | X509_NAME_set | ||
| 690 | X509_OBJECT_free_contents | ||
| 691 | X509_OBJECT_retrive_by_subject | ||
| 692 | X509_OBJECT_up_ref_count | ||
| 693 | X509_PKEY_free | ||
| 694 | X509_PKEY_new | ||
| 695 | X509_PUBKEY_free | ||
| 696 | X509_PUBKEY_get | ||
| 697 | X509_PUBKEY_new | ||
| 698 | X509_PUBKEY_set | ||
| 699 | X509_REQ_INFO_free | ||
| 700 | X509_REQ_INFO_new | ||
| 701 | X509_REQ_dup | ||
| 702 | X509_REQ_free | ||
| 703 | X509_REQ_get_pubkey | ||
| 704 | X509_REQ_new | ||
| 705 | X509_REQ_print | ||
| 706 | X509_REQ_print_fp | ||
| 707 | X509_REQ_set_pubkey | ||
| 708 | X509_REQ_set_subject_name | ||
| 709 | X509_REQ_set_version | ||
| 710 | X509_REQ_sign | ||
| 711 | X509_REQ_to_X509 | ||
| 712 | X509_REQ_verify | ||
| 713 | X509_REVOKED_add_ext | ||
| 714 | X509_REVOKED_delete_ext | ||
| 715 | X509_REVOKED_free | ||
| 716 | X509_REVOKED_get_ext | ||
| 717 | X509_REVOKED_get_ext_by_NID | ||
| 718 | X509_REVOKED_get_ext_by_OBJ | ||
| 719 | X509_REVOKED_get_ext_by_critical | ||
| 720 | X509_REVOKED_get_ext_count | ||
| 721 | X509_REVOKED_new | ||
| 722 | X509_SIG_free | ||
| 723 | X509_SIG_new | ||
| 724 | X509_STORE_CTX_cleanup | ||
| 725 | X509_STORE_CTX_get_chain | ||
| 726 | X509_STORE_CTX_get_current_cert | ||
| 727 | X509_STORE_CTX_get_error | ||
| 728 | X509_STORE_CTX_get_error_depth | ||
| 729 | X509_STORE_CTX_get_ex_data | ||
| 730 | X509_STORE_CTX_get_ex_new_index | ||
| 731 | X509_STORE_CTX_init | ||
| 732 | X509_STORE_CTX_set_cert | ||
| 733 | X509_STORE_CTX_set_chain | ||
| 734 | X509_STORE_CTX_set_error | ||
| 735 | X509_STORE_CTX_set_ex_data | ||
| 736 | X509_STORE_add_cert | ||
| 737 | X509_STORE_add_crl | ||
| 738 | X509_STORE_add_lookup | ||
| 739 | X509_STORE_free | ||
| 740 | X509_STORE_get_by_subject | ||
| 741 | X509_STORE_load_locations | ||
| 742 | X509_STORE_new | ||
| 743 | X509_STORE_set_default_paths | ||
| 744 | X509_VAL_free | ||
| 745 | X509_VAL_new | ||
| 746 | X509_add_ext | ||
| 747 | X509_asn1_meth | ||
| 748 | X509_certificate_type | ||
| 749 | X509_check_private_key | ||
| 750 | X509_cmp_current_time | ||
| 751 | X509_delete_ext | ||
| 752 | X509_digest | ||
| 753 | X509_dup | ||
| 754 | X509_find_by_issuer_and_serial | ||
| 755 | X509_find_by_subject | ||
| 756 | X509_free | ||
| 757 | X509_get_default_cert_area | ||
| 758 | X509_get_default_cert_dir | ||
| 759 | X509_get_default_cert_dir_env | ||
| 760 | X509_get_default_cert_file | ||
| 761 | X509_get_default_cert_file_env | ||
| 762 | X509_get_default_private_dir | ||
| 763 | X509_get_ext | ||
| 764 | X509_get_ext_by_NID | ||
| 765 | X509_get_ext_by_OBJ | ||
| 766 | X509_get_ext_by_critical | ||
| 767 | X509_get_ext_count | ||
| 768 | X509_get_issuer_name | ||
| 769 | X509_get_pubkey | ||
| 770 | X509_get_pubkey_parameters | ||
| 771 | X509_get_serialNumber | ||
| 772 | X509_get_subject_name | ||
| 773 | X509_gmtime_adj | ||
| 774 | X509_issuer_and_serial_cmp | ||
| 775 | X509_issuer_and_serial_hash | ||
| 776 | X509_issuer_name_cmp | ||
| 777 | X509_issuer_name_hash | ||
| 778 | X509_load_cert_file | ||
| 779 | X509_load_crl_file | ||
| 780 | X509_new | ||
| 781 | X509_print | ||
| 782 | X509_print_fp | ||
| 783 | X509_set_issuer_name | ||
| 784 | X509_set_notAfter | ||
| 785 | X509_set_notBefore | ||
| 786 | X509_set_pubkey | ||
| 787 | X509_set_serialNumber | ||
| 788 | X509_set_subject_name | ||
| 789 | X509_set_version | ||
| 790 | X509_sign | ||
| 791 | X509_subject_name_cmp | ||
| 792 | X509_subject_name_hash | ||
| 793 | X509_to_X509_REQ | ||
| 794 | X509_verify | ||
| 795 | X509_verify_cert | ||
| 796 | X509_verify_cert_error_string | ||
| 797 | X509v3_add_ext | ||
| 798 | X509v3_add_extension | ||
| 799 | X509v3_add_netscape_extensions | ||
| 800 | X509v3_add_standard_extensions | ||
| 801 | X509v3_cleanup_extensions | ||
| 802 | X509v3_data_type_by_NID | ||
| 803 | X509v3_data_type_by_OBJ | ||
| 804 | X509v3_delete_ext | ||
| 805 | X509v3_get_ext | ||
| 806 | X509v3_get_ext_by_NID | ||
| 807 | X509v3_get_ext_by_OBJ | ||
| 808 | X509v3_get_ext_by_critical | ||
| 809 | X509v3_get_ext_count | ||
| 810 | X509v3_get_key_usage | ||
| 811 | X509v3_pack_string | ||
| 812 | X509v3_pack_type_by_NID | ||
| 813 | X509v3_pack_type_by_OBJ | ||
| 814 | X509v3_set_key_usage | ||
| 815 | X509v3_unpack_string | ||
| 816 | _des_crypt | ||
| 817 | a2d_ASN1_OBJECT | ||
| 818 | a2i_ASN1_INTEGER | ||
| 819 | a2i_ASN1_STRING | ||
| 820 | a2i_X509v3_key_usage | ||
| 821 | asn1_Finish | ||
| 822 | asn1_GetSequence | ||
| 823 | bn_add_words | ||
| 824 | bn_div64 | ||
| 825 | bn_expand2 | ||
| 826 | bn_mul_add_words | ||
| 827 | bn_mul_words | ||
| 828 | bn_qadd | ||
| 829 | bn_qsub | ||
| 830 | bn_sqr_words | ||
| 831 | crypt | ||
| 832 | d2i_ASN1_BIT_STRING | ||
| 833 | d2i_ASN1_BOOLEAN | ||
| 834 | d2i_ASN1_HEADER | ||
| 835 | d2i_ASN1_IA5STRING | ||
| 836 | d2i_ASN1_INTEGER | ||
| 837 | d2i_ASN1_OBJECT | ||
| 838 | d2i_ASN1_OCTET_STRING | ||
| 839 | d2i_ASN1_PRINTABLE | ||
| 840 | d2i_ASN1_PRINTABLESTRING | ||
| 841 | d2i_ASN1_SET | ||
| 842 | d2i_ASN1_T61STRING | ||
| 843 | d2i_ASN1_TYPE | ||
| 844 | d2i_ASN1_UTCTIME | ||
| 845 | d2i_ASN1_bytes | ||
| 846 | d2i_ASN1_type_bytes | ||
| 847 | d2i_DHparams | ||
| 848 | d2i_DSAPrivateKey | ||
| 849 | d2i_DSAPrivateKey_bio | ||
| 850 | d2i_DSAPrivateKey_fp | ||
| 851 | d2i_DSAPublicKey | ||
| 852 | d2i_DSAparams | ||
| 853 | d2i_NETSCAPE_SPKAC | ||
| 854 | d2i_NETSCAPE_SPKI | ||
| 855 | d2i_Netscape_RSA | ||
| 856 | d2i_Netscape_RSA_2 | ||
| 857 | d2i_PKCS7 | ||
| 858 | d2i_PKCS7_DIGEST | ||
| 859 | d2i_PKCS7_ENCRYPT | ||
| 860 | d2i_PKCS7_ENC_CONTENT | ||
| 861 | d2i_PKCS7_ENVELOPE | ||
| 862 | d2i_PKCS7_ISSUER_AND_SERIAL | ||
| 863 | d2i_PKCS7_RECIP_INFO | ||
| 864 | d2i_PKCS7_SIGNED | ||
| 865 | d2i_PKCS7_SIGNER_INFO | ||
| 866 | d2i_PKCS7_SIGN_ENVELOPE | ||
| 867 | d2i_PKCS7_bio | ||
| 868 | d2i_PKCS7_fp | ||
| 869 | d2i_PrivateKey | ||
| 870 | d2i_PublicKey | ||
| 871 | d2i_RSAPrivateKey | ||
| 872 | d2i_RSAPrivateKey_bio | ||
| 873 | d2i_RSAPrivateKey_fp | ||
| 874 | d2i_RSAPublicKey | ||
| 875 | d2i_RSAPublicKey_bio | ||
| 876 | d2i_RSAPublicKey_fp | ||
| 877 | d2i_X509 | ||
| 878 | d2i_X509_ALGOR | ||
| 879 | d2i_X509_ATTRIBUTE | ||
| 880 | d2i_X509_CINF | ||
| 881 | d2i_X509_CRL | ||
| 882 | d2i_X509_CRL_INFO | ||
| 883 | d2i_X509_CRL_bio | ||
| 884 | d2i_X509_CRL_fp | ||
| 885 | d2i_X509_EXTENSION | ||
| 886 | d2i_X509_NAME | ||
| 887 | d2i_X509_NAME_ENTRY | ||
| 888 | d2i_X509_PKEY | ||
| 889 | d2i_X509_PUBKEY | ||
| 890 | d2i_X509_REQ | ||
| 891 | d2i_X509_REQ_INFO | ||
| 892 | d2i_X509_REQ_bio | ||
| 893 | d2i_X509_REQ_fp | ||
| 894 | d2i_X509_REVOKED | ||
| 895 | d2i_X509_SIG | ||
| 896 | d2i_X509_VAL | ||
| 897 | d2i_X509_bio | ||
| 898 | d2i_X509_fp | ||
| 899 | des_cbc_cksum | ||
| 900 | des_cbc_encrypt | ||
| 901 | des_cblock_print_file | ||
| 902 | des_cfb64_encrypt | ||
| 903 | des_cfb_encrypt | ||
| 904 | des_decrypt3 | ||
| 905 | des_ecb3_encrypt | ||
| 906 | des_ecb_encrypt | ||
| 907 | des_ede3_cbc_encrypt | ||
| 908 | des_ede3_cfb64_encrypt | ||
| 909 | des_ede3_ofb64_encrypt | ||
| 910 | des_enc_read | ||
| 911 | des_enc_write | ||
| 912 | des_encrypt | ||
| 913 | des_encrypt2 | ||
| 914 | des_encrypt3 | ||
| 915 | des_fcrypt | ||
| 916 | des_is_weak_key | ||
| 917 | des_key_sched | ||
| 918 | des_ncbc_encrypt | ||
| 919 | des_ofb64_encrypt | ||
| 920 | des_ofb_encrypt | ||
| 921 | des_options | ||
| 922 | des_pcbc_encrypt | ||
| 923 | des_quad_cksum | ||
| 924 | des_random_key | ||
| 925 | des_random_seed | ||
| 926 | des_read_2passwords | ||
| 927 | des_read_password | ||
| 928 | des_read_pw | ||
| 929 | des_read_pw_string | ||
| 930 | des_set_key | ||
| 931 | des_set_odd_parity | ||
| 932 | des_string_to_2keys | ||
| 933 | des_string_to_key | ||
| 934 | des_xcbc_encrypt | ||
| 935 | des_xwhite_in2out | ||
| 936 | fcrypt_body | ||
| 937 | i2a_ASN1_INTEGER | ||
| 938 | i2a_ASN1_OBJECT | ||
| 939 | i2a_ASN1_STRING | ||
| 940 | i2a_X509v3_key_usage | ||
| 941 | i2d_ASN1_BIT_STRING | ||
| 942 | i2d_ASN1_BOOLEAN | ||
| 943 | i2d_ASN1_HEADER | ||
| 944 | i2d_ASN1_IA5STRING | ||
| 945 | i2d_ASN1_INTEGER | ||
| 946 | i2d_ASN1_OBJECT | ||
| 947 | i2d_ASN1_OCTET_STRING | ||
| 948 | i2d_ASN1_PRINTABLE | ||
| 949 | i2d_ASN1_SET | ||
| 950 | i2d_ASN1_TYPE | ||
| 951 | i2d_ASN1_UTCTIME | ||
| 952 | i2d_ASN1_bytes | ||
| 953 | i2d_DHparams | ||
| 954 | i2d_DSAPrivateKey | ||
| 955 | i2d_DSAPrivateKey_bio | ||
| 956 | i2d_DSAPrivateKey_fp | ||
| 957 | i2d_DSAPublicKey | ||
| 958 | i2d_DSAparams | ||
| 959 | i2d_NETSCAPE_SPKAC | ||
| 960 | i2d_NETSCAPE_SPKI | ||
| 961 | i2d_Netscape_RSA | ||
| 962 | i2d_PKCS7 | ||
| 963 | i2d_PKCS7_DIGEST | ||
| 964 | i2d_PKCS7_ENCRYPT | ||
| 965 | i2d_PKCS7_ENC_CONTENT | ||
| 966 | i2d_PKCS7_ENVELOPE | ||
| 967 | i2d_PKCS7_ISSUER_AND_SERIAL | ||
| 968 | i2d_PKCS7_RECIP_INFO | ||
| 969 | i2d_PKCS7_SIGNED | ||
| 970 | i2d_PKCS7_SIGNER_INFO | ||
| 971 | i2d_PKCS7_SIGN_ENVELOPE | ||
| 972 | i2d_PKCS7_bio | ||
| 973 | i2d_PKCS7_fp | ||
| 974 | i2d_PrivateKey | ||
| 975 | i2d_PublicKey | ||
| 976 | i2d_RSAPrivateKey | ||
| 977 | i2d_RSAPrivateKey_bio | ||
| 978 | i2d_RSAPrivateKey_fp | ||
| 979 | i2d_RSAPublicKey | ||
| 980 | i2d_RSAPublicKey_bio | ||
| 981 | i2d_RSAPublicKey_fp | ||
| 982 | i2d_X509 | ||
| 983 | i2d_X509_ALGOR | ||
| 984 | i2d_X509_ATTRIBUTE | ||
| 985 | i2d_X509_CINF | ||
| 986 | i2d_X509_CRL | ||
| 987 | i2d_X509_CRL_INFO | ||
| 988 | i2d_X509_CRL_bio | ||
| 989 | i2d_X509_CRL_fp | ||
| 990 | i2d_X509_EXTENSION | ||
| 991 | i2d_X509_NAME | ||
| 992 | i2d_X509_NAME_ENTRY | ||
| 993 | i2d_X509_PKEY | ||
| 994 | i2d_X509_PUBKEY | ||
| 995 | i2d_X509_REQ | ||
| 996 | i2d_X509_REQ_INFO | ||
| 997 | i2d_X509_REQ_bio | ||
| 998 | i2d_X509_REQ_fp | ||
| 999 | i2d_X509_REVOKED | ||
| 1000 | i2d_X509_SIG | ||
| 1001 | i2d_X509_VAL | ||
| 1002 | i2d_X509_bio | ||
| 1003 | i2d_X509_fp | ||
| 1004 | i2t_ASN1_OBJECT | ||
| 1005 | idea_cbc_encrypt | ||
| 1006 | idea_cfb64_encrypt | ||
| 1007 | idea_ecb_encrypt | ||
| 1008 | idea_encrypt | ||
| 1009 | idea_ofb64_encrypt | ||
| 1010 | idea_options | ||
| 1011 | idea_set_decrypt_key | ||
| 1012 | idea_set_encrypt_key | ||
| 1013 | lh_delete | ||
| 1014 | lh_doall | ||
| 1015 | lh_doall_arg | ||
| 1016 | lh_free | ||
| 1017 | lh_insert | ||
| 1018 | lh_new | ||
| 1019 | lh_node_stats | ||
| 1020 | lh_node_stats_bio | ||
| 1021 | lh_node_usage_stats | ||
| 1022 | lh_node_usage_stats_bio | ||
| 1023 | lh_retrieve | ||
| 1024 | lh_stats | ||
| 1025 | lh_stats_bio | ||
| 1026 | lh_strhash | ||
| 1027 | ripemd160_block | ||
| 1028 | sha1_block | ||
| 1029 | sha_block | ||
| 1030 | sk_delete | ||
| 1031 | sk_delete_ptr | ||
| 1032 | sk_dup | ||
| 1033 | sk_find | ||
| 1034 | sk_free | ||
| 1035 | sk_insert | ||
| 1036 | sk_new | ||
| 1037 | sk_pop | ||
| 1038 | sk_pop_free | ||
| 1039 | sk_push | ||
| 1040 | sk_set_cmp_func | ||
| 1041 | sk_shift | ||
| 1042 | sk_unshift | ||
| 1043 | sk_zero | ||
diff --git a/src/lib/libssl/src/dep/files b/src/lib/libssl/src/dep/files new file mode 100644 index 0000000000..8c5550c37c --- /dev/null +++ b/src/lib/libssl/src/dep/files | |||
| @@ -0,0 +1,574 @@ | |||
| 1 | ./e_os.h | ||
| 2 | |||
| 3 | ./crypto/cryptall.h CRYPTO | ||
| 4 | ./crypto/cryptlib.h CRYPTO | ||
| 5 | ./crypto/crypto.c CRYPTO | ||
| 6 | ./crypto/cversion.c CRYPTO | ||
| 7 | ./crypto/date.h CRYPTO | ||
| 8 | ./crypto/mem.c CRYPTO | ||
| 9 | ./crypto/cpt_err.c CRYPTO | ||
| 10 | ./crypto/ex_data.c CRYPTO | ||
| 11 | ./crypto/crypto.h CRYPTO | ||
| 12 | ./crypto/cryptlib.c CRYPTO | ||
| 13 | ./crypto/tmdiff.c CRYPTO | ||
| 14 | |||
| 15 | ./crypto/asn1/asn1.h ASN1 | ||
| 16 | ./crypto/asn1/asn1_mac.h ASN1 | ||
| 17 | ./crypto/asn1/asn1_err.c ASN1 | ||
| 18 | ./crypto/asn1/asn1_lib.c ASN1 | ||
| 19 | ./crypto/asn1/asn1_par.c ASN1 | ||
| 20 | ./crypto/asn1/a_bitstr.c ASN1 | ||
| 21 | ./crypto/asn1/a_bmp.c ASN1 | ||
| 22 | ./crypto/asn1/a_bool.c ASN1 | ||
| 23 | ./crypto/asn1/a_bytes.c ASN1 | ||
| 24 | ./crypto/asn1/a_d2i_fp.c ASN1 | ||
| 25 | ./crypto/asn1/a_digest.c ASN1 | ||
| 26 | ./crypto/asn1/a_dup.c ASN1 | ||
| 27 | ./crypto/asn1/a_hdr.c ASN1 | ||
| 28 | ./crypto/asn1/a_i2d_fp.c ASN1 | ||
| 29 | ./crypto/asn1/a_int.c ASN1 | ||
| 30 | ./crypto/asn1/a_meth.c ASN1 | ||
| 31 | ./crypto/asn1/a_object.c ASN1 | ||
| 32 | ./crypto/asn1/a_octet.c ASN1 | ||
| 33 | ./crypto/asn1/a_print.c ASN1 | ||
| 34 | ./crypto/asn1/a_set.c ASN1 | ||
| 35 | ./crypto/asn1/a_sign.c ASN1 | ||
| 36 | ./crypto/asn1/a_type.c ASN1 | ||
| 37 | ./crypto/asn1/a_utctm.c ASN1 | ||
| 38 | ./crypto/asn1/a_verify.c ASN1 | ||
| 39 | ./crypto/asn1/d2i_dhp.c ASN1 | ||
| 40 | ./crypto/asn1/d2i_dsap.c ASN1 | ||
| 41 | ./crypto/asn1/d2i_pr.c ASN1 | ||
| 42 | ./crypto/asn1/d2i_pu.c ASN1 | ||
| 43 | ./crypto/asn1/d2i_r_pr.c ASN1 | ||
| 44 | ./crypto/asn1/d2i_r_pu.c ASN1 | ||
| 45 | ./crypto/asn1/d2i_s_pr.c ASN1 | ||
| 46 | ./crypto/asn1/d2i_s_pu.c ASN1 | ||
| 47 | ./crypto/asn1/f_int.c ASN1 | ||
| 48 | ./crypto/asn1/f_string.c ASN1 | ||
| 49 | ./crypto/asn1/i2d_dhp.c ASN1 | ||
| 50 | ./crypto/asn1/i2d_dsap.c ASN1 | ||
| 51 | ./crypto/asn1/i2d_pr.c ASN1 | ||
| 52 | ./crypto/asn1/i2d_pu.c ASN1 | ||
| 53 | ./crypto/asn1/i2d_r_pr.c ASN1 | ||
| 54 | ./crypto/asn1/i2d_r_pu.c ASN1 | ||
| 55 | ./crypto/asn1/i2d_s_pr.c ASN1 | ||
| 56 | ./crypto/asn1/i2d_s_pu.c ASN1 | ||
| 57 | ./crypto/asn1/n_pkey.c ASN1 | ||
| 58 | ./crypto/asn1/p7_dgst.c ASN1 | ||
| 59 | ./crypto/asn1/p7_enc.c ASN1 | ||
| 60 | ./crypto/asn1/p7_enc_c.c ASN1 | ||
| 61 | ./crypto/asn1/p7_evp.c ASN1 | ||
| 62 | ./crypto/asn1/p7_i_s.c ASN1 | ||
| 63 | ./crypto/asn1/p7_lib.c ASN1 | ||
| 64 | ./crypto/asn1/p7_recip.c ASN1 | ||
| 65 | ./crypto/asn1/p7_signd.c ASN1 | ||
| 66 | ./crypto/asn1/p7_signi.c ASN1 | ||
| 67 | ./crypto/asn1/p7_s_e.c ASN1 | ||
| 68 | ./crypto/asn1/pk.c ASN1 | ||
| 69 | ./crypto/asn1/pkcs8.c ASN1 | ||
| 70 | ./crypto/asn1/t_pkey.c ASN1 | ||
| 71 | ./crypto/asn1/t_req.c ASN1 | ||
| 72 | ./crypto/asn1/t_x509.c ASN1 | ||
| 73 | ./crypto/asn1/x_algor.c ASN1 | ||
| 74 | ./crypto/asn1/x_attrib.c ASN1 | ||
| 75 | ./crypto/asn1/x_cinf.c ASN1 | ||
| 76 | ./crypto/asn1/x_crl.c ASN1 | ||
| 77 | ./crypto/asn1/x_exten.c ASN1 | ||
| 78 | ./crypto/asn1/x_info.c ASN1 | ||
| 79 | ./crypto/asn1/x_name.c ASN1 | ||
| 80 | ./crypto/asn1/x_pkey.c ASN1 | ||
| 81 | ./crypto/asn1/x_pubkey.c ASN1 | ||
| 82 | ./crypto/asn1/x_req.c ASN1 | ||
| 83 | ./crypto/asn1/x_sig.c ASN1 | ||
| 84 | ./crypto/asn1/x_spki.c ASN1 | ||
| 85 | ./crypto/asn1/x_val.c ASN1 | ||
| 86 | ./crypto/asn1/x_x509.c ASN1 | ||
| 87 | |||
| 88 | ./crypto/bf/blowfish.h BF | ||
| 89 | ./crypto/bf/bf_pi.h BF | ||
| 90 | ./crypto/bf/bf_locl.h BF | ||
| 91 | ./crypto/bf/bfspeed.c BF | ||
| 92 | ./crypto/bf/bftest.c BF | ||
| 93 | ./crypto/bf/bf_cbc.c BF | ||
| 94 | ./crypto/bf/bf_cfb64.c BF | ||
| 95 | ./crypto/bf/bf_ecb.c BF | ||
| 96 | ./crypto/bf/bf_enc.c BF | ||
| 97 | ./crypto/bf/bf_ofb64.c BF | ||
| 98 | ./crypto/bf/bf_opts.c BF | ||
| 99 | ./crypto/bf/bf_skey.c BF | ||
| 100 | |||
| 101 | ./crypto/bio/bio.h BIO | ||
| 102 | ./crypto/bio/bf_buff.c BIO | ||
| 103 | ./crypto/bio/bf_nbio.c BIO | ||
| 104 | ./crypto/bio/bf_null.c BIO | ||
| 105 | ./crypto/bio/bio_cb.c BIO | ||
| 106 | ./crypto/bio/bio_err.c BIO | ||
| 107 | ./crypto/bio/bio_lib.c BIO | ||
| 108 | ./crypto/bio/bss_acpt.c BIO | ||
| 109 | ./crypto/bio/bss_conn.c BIO | ||
| 110 | ./crypto/bio/bss_fd.c BIO | ||
| 111 | ./crypto/bio/bss_file.c BIO | ||
| 112 | ./crypto/bio/bss_mem.c BIO | ||
| 113 | ./crypto/bio/bss_null.c BIO | ||
| 114 | ./crypto/bio/bss_rtcp.c BIO | ||
| 115 | ./crypto/bio/bss_sock.c BIO | ||
| 116 | ./crypto/bio/b_dump.c BIO | ||
| 117 | ./crypto/bio/b_print.c BIO | ||
| 118 | ./crypto/bio/b_sock.c BIO | ||
| 119 | |||
| 120 | ./crypto/bn/bn.h BN | ||
| 121 | ./crypto/bn/bn_lcl.h BN | ||
| 122 | ./crypto/bn/bn_prime.h BN | ||
| 123 | ./crypto/bn/bnspeed.c BN | ||
| 124 | ./crypto/bn/bntest.c BN | ||
| 125 | ./crypto/bn/bn_add.c BN | ||
| 126 | ./crypto/bn/bn_bld.c BN | ||
| 127 | ./crypto/bn/bn_blind.c BN | ||
| 128 | ./crypto/bn/bn_div.c BN | ||
| 129 | ./crypto/bn/bn_err.c BN | ||
| 130 | ./crypto/bn/bn_exp.c BN | ||
| 131 | ./crypto/bn/bn_gcd.c BN | ||
| 132 | ./crypto/bn/bn_lib.c BN | ||
| 133 | ./crypto/bn/bn_mod.c BN | ||
| 134 | ./crypto/bn/bn_mont.c BN | ||
| 135 | ./crypto/bn/bn_mul.c BN | ||
| 136 | ./crypto/bn/bn_mulw.c BN | ||
| 137 | ./crypto/bn/bn_prime.c BN | ||
| 138 | ./crypto/bn/bn_print.c BN | ||
| 139 | ./crypto/bn/bn_rand.c BN | ||
| 140 | ./crypto/bn/bn_recp.c BN | ||
| 141 | ./crypto/bn/bn_shift.c BN | ||
| 142 | ./crypto/bn/bn_sqr.c BN | ||
| 143 | ./crypto/bn/bn_sub.c BN | ||
| 144 | ./crypto/bn/bn_word.c BN | ||
| 145 | ./crypto/bn/bn_m.c BN | ||
| 146 | ./crypto/bn/m.c BN | ||
| 147 | ./crypto/bn/expspeed.c BN | ||
| 148 | ./crypto/bn/bn_mpi.c BN | ||
| 149 | ./crypto/bn/exptest.c BN | ||
| 150 | |||
| 151 | ./crypto/buffer/buffer.c BUFF | ||
| 152 | ./crypto/buffer/buffer.h BUFF | ||
| 153 | ./crypto/buffer/buf_err.c BUFF | ||
| 154 | |||
| 155 | ./crypto/cast/cast.h CAST | ||
| 156 | ./crypto/cast/castopts.c CAST | ||
| 157 | ./crypto/cast/casttest.c CAST | ||
| 158 | ./crypto/cast/cast_lcl.h CAST | ||
| 159 | ./crypto/cast/cast_s.h CAST | ||
| 160 | ./crypto/cast/cast_spd.c CAST | ||
| 161 | ./crypto/cast/c_cfb64.c CAST | ||
| 162 | ./crypto/cast/c_ecb.c CAST | ||
| 163 | ./crypto/cast/c_enc.c CAST | ||
| 164 | ./crypto/cast/c_ofb64.c CAST | ||
| 165 | ./crypto/cast/c_skey.c CAST | ||
| 166 | |||
| 167 | ./crypto/conf/conf_lcl.h CONF | ||
| 168 | ./crypto/conf/cnf_save.c CONF | ||
| 169 | ./crypto/conf/conf.c CONF | ||
| 170 | ./crypto/conf/conf.h CONF | ||
| 171 | ./crypto/conf/conf_err.c CONF | ||
| 172 | |||
| 173 | ./crypto/des/des.h DES | ||
| 174 | ./crypto/des/des_locl.h DES | ||
| 175 | ./crypto/des/spr.h DES | ||
| 176 | ./crypto/des/podd.h DES | ||
| 177 | ./crypto/des/sk.h DES | ||
| 178 | ./crypto/des/cbc3_enc.c DES | ||
| 179 | ./crypto/des/cbc_cksm.c DES | ||
| 180 | ./crypto/des/cbc_enc.c DES | ||
| 181 | ./crypto/des/cfb64ede.c DES | ||
| 182 | ./crypto/des/cfb64enc.c DES | ||
| 183 | ./crypto/des/cfb_enc.c DES | ||
| 184 | ./crypto/des/des.c DES | ||
| 185 | ./crypto/des/destest.c DES | ||
| 186 | ./crypto/des/des_enc.c DES | ||
| 187 | ./crypto/des/des_opts.c DES | ||
| 188 | ./crypto/des/des_ver.h DES | ||
| 189 | ./crypto/des/ecb3_enc.c DES | ||
| 190 | ./crypto/des/ecb_enc.c DES | ||
| 191 | ./crypto/des/ede_enc.c DES | ||
| 192 | ./crypto/des/enc_read.c DES | ||
| 193 | ./crypto/des/enc_writ.c DES | ||
| 194 | ./crypto/des/fcrypt.c DES | ||
| 195 | ./crypto/des/fcrypt_b.c DES | ||
| 196 | ./crypto/des/ncbc_enc.c DES | ||
| 197 | ./crypto/des/ofb64ede.c DES | ||
| 198 | ./crypto/des/ofb64enc.c DES | ||
| 199 | ./crypto/des/ofb_enc.c DES | ||
| 200 | ./crypto/des/pcbc_enc.c DES | ||
| 201 | ./crypto/des/qud_cksm.c DES | ||
| 202 | ./crypto/des/rand_key.c DES | ||
| 203 | ./crypto/des/read2pwd.c DES | ||
| 204 | ./crypto/des/read_pwd.c DES | ||
| 205 | ./crypto/des/rpc_des.h DES | ||
| 206 | ./crypto/des/rpc_enc.c DES | ||
| 207 | ./crypto/des/rpw.c DES | ||
| 208 | ./crypto/des/set_key.c DES | ||
| 209 | ./crypto/des/str2key.c DES | ||
| 210 | ./crypto/des/supp.c DES | ||
| 211 | ./crypto/des/xcbc_enc.c DES | ||
| 212 | |||
| 213 | ./crypto/dh/dh.h DH | ||
| 214 | ./crypto/dh/dh_check.c DH | ||
| 215 | ./crypto/dh/dh_err.c DH | ||
| 216 | ./crypto/dh/dh_gen.c DH | ||
| 217 | ./crypto/dh/dh_key.c DH | ||
| 218 | ./crypto/dh/dh_lib.c DH | ||
| 219 | ./crypto/dh/p1024.c DH | ||
| 220 | ./crypto/dh/p192.c DH | ||
| 221 | ./crypto/dh/p512.c DH | ||
| 222 | ./crypto/dh/dhtest.c DH | ||
| 223 | |||
| 224 | ./crypto/dsa/dsa.h DSA | ||
| 225 | ./crypto/dsa/dsagen.c DSA | ||
| 226 | ./crypto/dsa/dsa_err.c DSA | ||
| 227 | ./crypto/dsa/dsa_gen.c DSA | ||
| 228 | ./crypto/dsa/dsa_key.c DSA | ||
| 229 | ./crypto/dsa/dsa_lib.c DSA | ||
| 230 | ./crypto/dsa/dsa_sign.c DSA | ||
| 231 | ./crypto/dsa/dsa_vrf.c DSA | ||
| 232 | ./crypto/dsa/dsatest.c DSA | ||
| 233 | |||
| 234 | ./crypto/err/err.c ERR | ||
| 235 | ./crypto/err/err.h ERR | ||
| 236 | ./crypto/err/err_all.c ERR | ||
| 237 | ./crypto/err/err_prn.c ERR | ||
| 238 | |||
| 239 | ./crypto/evp/evp.h EVP | ||
| 240 | ./crypto/evp/bio_b64.c EVP | ||
| 241 | ./crypto/evp/bio_enc.c EVP | ||
| 242 | ./crypto/evp/bio_md.c EVP | ||
| 243 | ./crypto/evp/c_all.c EVP | ||
| 244 | ./crypto/evp/digest.c EVP | ||
| 245 | ./crypto/evp/encode.c EVP | ||
| 246 | ./crypto/evp/evp_enc.c EVP | ||
| 247 | ./crypto/evp/evp_err.c EVP | ||
| 248 | ./crypto/evp/evp_key.c EVP | ||
| 249 | ./crypto/evp/e_cbc_3d.c EVP | ||
| 250 | ./crypto/evp/e_cbc_bf.c EVP | ||
| 251 | ./crypto/evp/e_cbc_c.c EVP | ||
| 252 | ./crypto/evp/e_cbc_d.c EVP | ||
| 253 | ./crypto/evp/e_cbc_i.c EVP | ||
| 254 | ./crypto/evp/e_cbc_r2.c EVP | ||
| 255 | ./crypto/evp/e_cfb_3d.c EVP | ||
| 256 | ./crypto/evp/e_cfb_bf.c EVP | ||
| 257 | ./crypto/evp/e_cfb_c.c EVP | ||
| 258 | ./crypto/evp/e_cfb_d.c EVP | ||
| 259 | ./crypto/evp/e_cfb_i.c EVP | ||
| 260 | ./crypto/evp/e_cfb_r2.c EVP | ||
| 261 | ./crypto/evp/e_dsa.c EVP | ||
| 262 | ./crypto/evp/e_ecb_3d.c EVP | ||
| 263 | ./crypto/evp/e_ecb_bf.c EVP | ||
| 264 | ./crypto/evp/e_ecb_c.c EVP | ||
| 265 | ./crypto/evp/e_ecb_d.c EVP | ||
| 266 | ./crypto/evp/e_ecb_i.c EVP | ||
| 267 | ./crypto/evp/e_ecb_r2.c EVP | ||
| 268 | ./crypto/evp/e_null.c EVP | ||
| 269 | ./crypto/evp/e_ofb_3d.c EVP | ||
| 270 | ./crypto/evp/e_ofb_bf.c EVP | ||
| 271 | ./crypto/evp/e_ofb_c.c EVP | ||
| 272 | ./crypto/evp/e_ofb_d.c EVP | ||
| 273 | ./crypto/evp/e_ofb_i.c EVP | ||
| 274 | ./crypto/evp/e_ofb_r2.c EVP | ||
| 275 | ./crypto/evp/e_rc4.c EVP | ||
| 276 | ./crypto/evp/e_xcbc_d.c EVP | ||
| 277 | ./crypto/evp/m_dss.c EVP | ||
| 278 | ./crypto/evp/m_dss1.c EVP | ||
| 279 | ./crypto/evp/m_md2.c EVP | ||
| 280 | ./crypto/evp/m_md5.c EVP | ||
| 281 | ./crypto/evp/m_mdc2.c EVP | ||
| 282 | ./crypto/evp/m_null.c EVP | ||
| 283 | ./crypto/evp/m_sha.c EVP | ||
| 284 | ./crypto/evp/m_sha1.c EVP | ||
| 285 | ./crypto/evp/names.c EVP | ||
| 286 | ./crypto/evp/p_lib.c EVP | ||
| 287 | ./crypto/evp/p_open.c EVP | ||
| 288 | ./crypto/evp/p_seal.c EVP | ||
| 289 | ./crypto/evp/p_sign.c EVP | ||
| 290 | ./crypto/evp/p_verify.c EVP | ||
| 291 | |||
| 292 | ./crypto/hmac/hmac.c HMAC | ||
| 293 | ./crypto/hmac/hmac.h HMAC | ||
| 294 | ./crypto/hmac/hmactest.c HMAC | ||
| 295 | |||
| 296 | ./crypto/idea/ideatest.c IDEA | ||
| 297 | ./crypto/idea/idea_lcl.h IDEA | ||
| 298 | ./crypto/idea/idea_spd.c IDEA | ||
| 299 | ./crypto/idea/i_cbc.c IDEA | ||
| 300 | ./crypto/idea/i_cfb64.c IDEA | ||
| 301 | ./crypto/idea/i_ecb.c IDEA | ||
| 302 | ./crypto/idea/i_ofb64.c IDEA | ||
| 303 | ./crypto/idea/i_skey.c IDEA | ||
| 304 | ./crypto/idea/idea.h IDEA | ||
| 305 | |||
| 306 | ./crypto/lhash/lhash.c LHASH | ||
| 307 | ./crypto/lhash/lhash.h LHASH | ||
| 308 | ./crypto/lhash/lh_stats.c LHASH | ||
| 309 | ./crypto/lhash/lh_test.c LHASH | ||
| 310 | |||
| 311 | ./crypto/md2/md2.c MD2 | ||
| 312 | ./crypto/md2/md2test.c MD2 | ||
| 313 | ./crypto/md2/md2_dgst.c MD2 | ||
| 314 | ./crypto/md2/md2_one.c MD2 | ||
| 315 | ./crypto/md2/md2.h MD2 | ||
| 316 | |||
| 317 | ./crypto/md5/md5.c MD5 | ||
| 318 | ./crypto/md5/md5.h MD5 | ||
| 319 | ./crypto/md5/md5test.c MD5 | ||
| 320 | ./crypto/md5/md5_dgst.c MD5 | ||
| 321 | ./crypto/md5/md5_locl.h MD5 | ||
| 322 | ./crypto/md5/md5_one.c MD5 | ||
| 323 | |||
| 324 | ./crypto/mdc2/mdc2.h MDC2 | ||
| 325 | ./crypto/mdc2/mdc2dgst.c MDC2 | ||
| 326 | ./crypto/mdc2/mdc2test.c MDC2 | ||
| 327 | ./crypto/mdc2/mdc2_one.c MDC2 | ||
| 328 | |||
| 329 | ./crypto/objects/objects.h OBJ | ||
| 330 | ./crypto/objects/obj_dat.c OBJ | ||
| 331 | ./crypto/objects/obj_dat.h OBJ | ||
| 332 | ./crypto/objects/obj_err.c OBJ | ||
| 333 | ./crypto/objects/obj_lib.c OBJ | ||
| 334 | |||
| 335 | ./crypto/pem/ctx_size.c PEM | ||
| 336 | ./crypto/pem/pem.h PEM | ||
| 337 | ./crypto/pem/pem_all.c PEM | ||
| 338 | ./crypto/pem/pem_err.c PEM | ||
| 339 | ./crypto/pem/pem_info.c PEM | ||
| 340 | ./crypto/pem/pem_lib.c PEM | ||
| 341 | ./crypto/pem/pem_seal.c PEM | ||
| 342 | ./crypto/pem/pem_sign.c PEM | ||
| 343 | |||
| 344 | ./crypto/pkcs7/pk7_dgst.c PKCS7 | ||
| 345 | ./crypto/pkcs7/pk7_doit.c PKCS7 | ||
| 346 | ./crypto/pkcs7/pk7_enc.c PKCS7 | ||
| 347 | ./crypto/pkcs7/pk7_lib.c PKCS7 | ||
| 348 | ./crypto/pkcs7/pkcs7.h PKCS7 | ||
| 349 | ./crypto/pkcs7/pkcs7err.c PKCS7 | ||
| 350 | ./crypto/pkcs7/sign.c PKCS7 | ||
| 351 | |||
| 352 | ./crypto/proxy/bf_proxy.c PROXY | ||
| 353 | ./crypto/proxy/p2test.c PROXY | ||
| 354 | ./crypto/proxy/p3test.c PROXY | ||
| 355 | ./crypto/proxy/paccept.c PROXY | ||
| 356 | ./crypto/proxy/proxy.c PROXY | ||
| 357 | ./crypto/proxy/proxy.h PROXY | ||
| 358 | ./crypto/proxy/ptest.c PROXY | ||
| 359 | ./crypto/proxy/pxy_conf.c PROXY | ||
| 360 | ./crypto/proxy/pxy_err.c PROXY | ||
| 361 | ./crypto/proxy/pxy_txt.c PROXY | ||
| 362 | |||
| 363 | ./crypto/rand/md_rand.c RAND | ||
| 364 | ./crypto/rand/rand.h RAND | ||
| 365 | ./crypto/rand/randfile.c RAND | ||
| 366 | ./crypto/rand/randtest.c RAND | ||
| 367 | |||
| 368 | ./crypto/rc2/rc2cfb64.c RC2 | ||
| 369 | ./crypto/rc2/rc2ofb64.c RC2 | ||
| 370 | ./crypto/rc2/rc2speed.c RC2 | ||
| 371 | ./crypto/rc2/rc2test.c RC2 | ||
| 372 | ./crypto/rc2/rc2_cbc.c RC2 | ||
| 373 | ./crypto/rc2/rc2_ecb.c RC2 | ||
| 374 | ./crypto/rc2/rc2_locl.h RC2 | ||
| 375 | ./crypto/rc2/rc2_skey.c RC2 | ||
| 376 | ./crypto/rc2/rc2.h RC2 | ||
| 377 | |||
| 378 | ./crypto/rc4/rc4.c RC4 | ||
| 379 | ./crypto/rc4/rc4speed.c RC4 | ||
| 380 | ./crypto/rc4/rc4test.c RC4 | ||
| 381 | ./crypto/rc4/rc4_enc.c RC4 | ||
| 382 | ./crypto/rc4/rc4_skey.c RC4 | ||
| 383 | ./crypto/rc4/rc4.h RC4 | ||
| 384 | ./crypto/rc4/rc4_locl.h RC4 | ||
| 385 | |||
| 386 | ./crypto/rsa/rsa.h RSA | ||
| 387 | ./crypto/rsa/rsa_eay.c RSA | ||
| 388 | ./crypto/rsa/rsa_err.c RSA | ||
| 389 | ./crypto/rsa/rsa_gen.c RSA | ||
| 390 | ./crypto/rsa/rsa_lib.c RSA | ||
| 391 | ./crypto/rsa/rsa_saos.c RSA | ||
| 392 | ./crypto/rsa/rsa_sign.c RSA | ||
| 393 | ./crypto/rsa/rsa_ssl.c RSA | ||
| 394 | ./crypto/rsa/rsa_pk1.c RSA | ||
| 395 | ./crypto/rsa/rsa_none.c RSA | ||
| 396 | |||
| 397 | ./crypto/sha/sha.h SHA | ||
| 398 | ./crypto/sha/sha_locl.h SHA | ||
| 399 | ./crypto/sha/sha.c SHA0 | ||
| 400 | ./crypto/sha/sha_dgst.c SHA0 | ||
| 401 | ./crypto/sha/sha_one.c SHA0 | ||
| 402 | ./crypto/sha/sha_sgst.c SHA0 | ||
| 403 | ./crypto/sha/shatest.c SHA0 | ||
| 404 | ./crypto/sha/sha1.c SHA1 | ||
| 405 | ./crypto/sha/sha1dgst.c SHA1 | ||
| 406 | ./crypto/sha/sha1_one.c SHA1 | ||
| 407 | ./crypto/sha/sha1test.c SHA1 | ||
| 408 | |||
| 409 | ./crypto/stack/stack.c STACK | ||
| 410 | ./crypto/stack/stack.h STACK | ||
| 411 | |||
| 412 | ./crypto/txt_db/txt_db.c TXTDB | ||
| 413 | ./crypto/txt_db/txt_db.h TXTDB | ||
| 414 | |||
| 415 | ./crypto/x509/by_dir.c X509 | ||
| 416 | ./crypto/x509/by_file.c X509 | ||
| 417 | ./crypto/x509/v3_net.c X509 | ||
| 418 | ./crypto/x509/v3_x509.c X509 | ||
| 419 | ./crypto/x509/x509.h X509 | ||
| 420 | ./crypto/x509/x509name.c X509 | ||
| 421 | ./crypto/x509/x509pack.c X509 | ||
| 422 | ./crypto/x509/x509rset.c X509 | ||
| 423 | ./crypto/x509/x509type.c X509 | ||
| 424 | ./crypto/x509/x509_cmp.c X509 | ||
| 425 | ./crypto/x509/x509_d2.c X509 | ||
| 426 | ./crypto/x509/x509_def.c X509 | ||
| 427 | ./crypto/x509/x509_err.c X509 | ||
| 428 | ./crypto/x509/x509_ext.c X509 | ||
| 429 | ./crypto/x509/x509_lu.c X509 | ||
| 430 | ./crypto/x509/x509_obj.c X509 | ||
| 431 | ./crypto/x509/x509_r2x.c X509 | ||
| 432 | ./crypto/x509/x509_req.c X509 | ||
| 433 | ./crypto/x509/x509_set.c X509 | ||
| 434 | ./crypto/x509/x509_txt.c X509 | ||
| 435 | ./crypto/x509/x509_v3.c X509 | ||
| 436 | ./crypto/x509/x509_vfy.c X509 | ||
| 437 | ./crypto/x509/x_all.c X509 | ||
| 438 | ./crypto/x509/x509_vfy.h X509 | ||
| 439 | ./crypto/x509v3/v3_ku.c X509 | ||
| 440 | ./crypto/x509v3/x509v3.h X509 | ||
| 441 | |||
| 442 | ./crypto/threads/mttest.c THREADS | ||
| 443 | ./crypto/threads/th-lock.c THREADS | ||
| 444 | |||
| 445 | ./crypto/ripemd/rmdtest.c RMD160 | ||
| 446 | ./crypto/ripemd/ripemd.h RMD160 | ||
| 447 | ./crypto/ripemd/rmdconst.h RMD160 | ||
| 448 | ./crypto/ripemd/rmd_locl.h RMD160 | ||
| 449 | ./crypto/ripemd/rmd_one.c RMD160 | ||
| 450 | ./crypto/ripemd/rmd160.c RMD160 | ||
| 451 | ./crypto/ripemd/rmd_dgst.c RMD160 | ||
| 452 | |||
| 453 | ./crypto/rc5/rc5_ecb.c RC5 | ||
| 454 | ./crypto/rc5/rc5cfb64.c RC5 | ||
| 455 | ./crypto/rc5/rc5ofb64.c RC5 | ||
| 456 | ./crypto/rc5/rc5speed.c RC5 | ||
| 457 | ./crypto/rc5/rc5test.c RC5 | ||
| 458 | ./crypto/rc5/rc5_enc.c RC5 | ||
| 459 | ./crypto/rc5/rc5.h RC5 | ||
| 460 | ./crypto/rc5/rc5_locl.h RC5 | ||
| 461 | ./crypto/rc5/rc5_skey.c RC5 | ||
| 462 | |||
| 463 | ./ssl/bio_ssl.c SSL | ||
| 464 | ./ssl/pxy_ssl.c SSL | ||
| 465 | ./ssl/s23_clnt.c SSL | ||
| 466 | ./ssl/s23_lib.c SSL | ||
| 467 | ./ssl/s23_meth.c SSL | ||
| 468 | ./ssl/s23_pkt.c SSL | ||
| 469 | ./ssl/s23_srvr.c SSL | ||
| 470 | ./ssl/s2_clnt.c SSL | ||
| 471 | ./ssl/s2_enc.c SSL | ||
| 472 | ./ssl/s2_lib.c SSL | ||
| 473 | ./ssl/s2_meth.c SSL | ||
| 474 | ./ssl/s2_pkt.c SSL | ||
| 475 | ./ssl/s2_srvr.c SSL | ||
| 476 | ./ssl/s3_both.c SSL | ||
| 477 | ./ssl/s3_clnt.c SSL | ||
| 478 | ./ssl/s3_enc.c SSL | ||
| 479 | ./ssl/s3_lib.c SSL | ||
| 480 | ./ssl/s3_meth.c SSL | ||
| 481 | ./ssl/s3_pkt.c SSL | ||
| 482 | ./ssl/s3_srvr.c SSL | ||
| 483 | ./ssl/ssl.c SSL | ||
| 484 | ./ssl/ssl2.h SSL | ||
| 485 | ./ssl/ssl23.h SSL | ||
| 486 | ./ssl/ssl3.h SSL | ||
| 487 | ./ssl/ssl_algs.c SSL | ||
| 488 | ./ssl/ssl_asn1.c SSL | ||
| 489 | ./ssl/ssl_cert.c SSL | ||
| 490 | ./ssl/ssl_ciph.c SSL | ||
| 491 | ./ssl/ssl_err.c SSL | ||
| 492 | ./ssl/ssl_err2.c SSL | ||
| 493 | ./ssl/ssl_lib.c SSL | ||
| 494 | ./ssl/ssl_locl.h SSL | ||
| 495 | ./ssl/ssl_rsa.c SSL | ||
| 496 | ./ssl/ssl_sess.c SSL | ||
| 497 | ./ssl/ssl_stat.c SSL | ||
| 498 | ./ssl/ssl_task.c SSL | ||
| 499 | ./ssl/ssl_txt.c SSL | ||
| 500 | ./ssl/tls1.h SSL | ||
| 501 | ./ssl/t1_lib.c SSL | ||
| 502 | ./ssl/t1_enc.c SSL | ||
| 503 | ./ssl/t1_meth.c SSL | ||
| 504 | ./ssl/t1_srvr.c SSL | ||
| 505 | ./ssl/t1_clnt.c SSL | ||
| 506 | ./ssl/ssl.h SSL | ||
| 507 | ./ssl/ssltest.c SSL | ||
| 508 | |||
| 509 | ./rsaref/rsaref.c RSAREF | ||
| 510 | ./rsaref/rsaref.h RSAREF | ||
| 511 | ./rsaref/rsar_err.c RSAREF | ||
| 512 | |||
| 513 | ./apps/apps.c APPS | ||
| 514 | ./apps/apps.h APPS | ||
| 515 | ./apps/asn1pars.c APPS | ||
| 516 | ./apps/bf_perm.c APPS | ||
| 517 | ./apps/bf_perm.h APPS | ||
| 518 | ./apps/ca.c APPS | ||
| 519 | ./apps/ciphers.c APPS | ||
| 520 | ./apps/crl.c APPS | ||
| 521 | ./apps/crl2p7.c APPS | ||
| 522 | ./apps/dgst.c APPS | ||
| 523 | ./apps/dh.c APPS | ||
| 524 | ./apps/dsa.c APPS | ||
| 525 | ./apps/dsaparam.c APPS | ||
| 526 | ./apps/eay.c APPS | ||
| 527 | ./apps/enc.c APPS | ||
| 528 | ./apps/errstr.c APPS | ||
| 529 | ./apps/speed.c APPS | ||
| 530 | ./apps/gendh.c APPS | ||
| 531 | ./apps/gendsa.c APPS | ||
| 532 | ./apps/genrsa.c APPS | ||
| 533 | ./apps/mybio_cb.c APPS | ||
| 534 | ./apps/pem_mail.c APPS | ||
| 535 | ./apps/pkcs7.c APPS | ||
| 536 | ./apps/progs.h APPS | ||
| 537 | ./apps/req.c APPS | ||
| 538 | ./apps/rsa.c APPS | ||
| 539 | ./apps/sess_id.c APPS | ||
| 540 | ./apps/s_apps.h APPS | ||
| 541 | ./apps/s_args.c APPS | ||
| 542 | ./apps/s_cache.c APPS | ||
| 543 | ./apps/s_cb.c APPS | ||
| 544 | ./apps/s_client.c APPS | ||
| 545 | ./apps/s_eio.c APPS | ||
| 546 | ./apps/s_eio.h APPS | ||
| 547 | ./apps/s_filter.c APPS | ||
| 548 | ./apps/s_filter.h APPS | ||
| 549 | ./apps/s_server.c APPS | ||
| 550 | ./apps/s_socket.c APPS | ||
| 551 | ./apps/s_state.c APPS | ||
| 552 | ./apps/s_state.h APPS | ||
| 553 | ./apps/s_time.c APPS | ||
| 554 | ./apps/testdsa.h APPS | ||
| 555 | ./apps/testrsa.h APPS | ||
| 556 | ./apps/verify.c APPS | ||
| 557 | ./apps/version.c APPS | ||
| 558 | ./apps/x509.c APPS | ||
| 559 | ./apps/ssleay.c APPS | ||
| 560 | ./apps/sp.c APPS | ||
| 561 | |||
| 562 | ./demos/b64.c DEMO | ||
| 563 | ./demos/bio/saccept.c DEMO | ||
| 564 | ./demos/bio/sconnect.c DEMO | ||
| 565 | ./demos/maurice/example1.c DEMO | ||
| 566 | ./demos/maurice/example2.c DEMO | ||
| 567 | ./demos/maurice/example3.c DEMO | ||
| 568 | ./demos/maurice/example4.c DEMO | ||
| 569 | ./demos/maurice/loadkeys.c DEMO | ||
| 570 | ./demos/maurice/loadkeys.h DEMO | ||
| 571 | ./demos/prime/prime.c DEMO | ||
| 572 | ./demos/selfsign.c DEMO | ||
| 573 | ./demos/spkigen.c DEMO | ||
| 574 | |||
diff --git a/src/lib/libssl/src/dep/gen.pl b/src/lib/libssl/src/dep/gen.pl new file mode 100644 index 0000000000..35490f2794 --- /dev/null +++ b/src/lib/libssl/src/dep/gen.pl | |||
| @@ -0,0 +1,113 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | require 'getopts.pl'; | ||
| 4 | |||
| 5 | $files="files"; | ||
| 6 | %have=(); | ||
| 7 | %missing=(); | ||
| 8 | %name=(); | ||
| 9 | %func=(); | ||
| 10 | |||
| 11 | &Getopts('Ff:'); | ||
| 12 | |||
| 13 | &load_file("files"); | ||
| 14 | foreach $file (@ARGV) | ||
| 15 | { &do_nm($file); } | ||
| 16 | |||
| 17 | if (defined($opt_f)) | ||
| 18 | { | ||
| 19 | %a=(); | ||
| 20 | $r=&list_files($opt_f,"",*a); | ||
| 21 | if ($opt_F) | ||
| 22 | { | ||
| 23 | foreach (sort split(/\n/,$r)) | ||
| 24 | { print "$_\n"; } | ||
| 25 | } | ||
| 26 | else | ||
| 27 | { print $r; } | ||
| 28 | } | ||
| 29 | else | ||
| 30 | { | ||
| 31 | for (sort keys %have) | ||
| 32 | { | ||
| 33 | print "$_:$have{$_}\n"; | ||
| 34 | } | ||
| 35 | } | ||
| 36 | |||
| 37 | sub list_files | ||
| 38 | { | ||
| 39 | local($f,$o,*done)=@_; | ||
| 40 | local($a,$_,$ff,$ret); | ||
| 41 | |||
| 42 | return if $f =~ /^\s*$/; | ||
| 43 | |||
| 44 | $done{$f}=1; | ||
| 45 | $ret.=$f."\n" if $opt_F; | ||
| 46 | foreach (split(/ /,$have{$f})) | ||
| 47 | { | ||
| 48 | $ret.="$o$f:$_\n" unless $opt_F; | ||
| 49 | } | ||
| 50 | |||
| 51 | foreach (split(/ /,$missing{$f})) | ||
| 52 | { | ||
| 53 | $ff=$func{$_}; | ||
| 54 | next if defined($done{$ff}); | ||
| 55 | $ret.=&list_files($ff,$o." "); | ||
| 56 | } | ||
| 57 | $ret; | ||
| 58 | } | ||
| 59 | |||
| 60 | sub do_nm | ||
| 61 | { | ||
| 62 | local($file)=@_; | ||
| 63 | local($fname)=""; | ||
| 64 | |||
| 65 | open(IN,"nm $file|") || die "unable to run 'nm $file|':$!\n"; | ||
| 66 | while (<IN>) | ||
| 67 | { | ||
| 68 | chop; | ||
| 69 | next if /^\s*$/; | ||
| 70 | if (/^(.*)\.o:\s*$/) | ||
| 71 | { | ||
| 72 | $fname="$1.c"; | ||
| 73 | next; | ||
| 74 | } | ||
| 75 | ($type,$name)=/^.{8} (.) (.+)/; | ||
| 76 | # print "$fname $type $name\n"; | ||
| 77 | |||
| 78 | if ($type eq "T") | ||
| 79 | { | ||
| 80 | $have{$fname}.="$name "; | ||
| 81 | $func{$name}=$fname; | ||
| 82 | } | ||
| 83 | elsif ($type eq "U") | ||
| 84 | { | ||
| 85 | $missing{$fname}.="$name "; | ||
| 86 | } | ||
| 87 | } | ||
| 88 | close(IN); | ||
| 89 | } | ||
| 90 | |||
| 91 | sub load_file | ||
| 92 | { | ||
| 93 | local($file)=@_; | ||
| 94 | |||
| 95 | open(IN,"<$files") || die "unable to open $files:$!\n"; | ||
| 96 | |||
| 97 | while (<IN>) | ||
| 98 | { | ||
| 99 | chop; | ||
| 100 | next if /^\s*$/; | ||
| 101 | ($n)=/\/([^\/\s]+)\s+/; | ||
| 102 | ($fn)=/^(\S+)\s/; | ||
| 103 | # print "$n - $fn\n"; | ||
| 104 | if (defined($name{$n})) | ||
| 105 | { print "$n already exists\n"; } | ||
| 106 | else | ||
| 107 | { $name{$n}=$fn; } | ||
| 108 | } | ||
| 109 | close(IN); | ||
| 110 | @name=%name; | ||
| 111 | } | ||
| 112 | |||
| 113 | |||
diff --git a/src/lib/libssl/src/dep/ssl.txt b/src/lib/libssl/src/dep/ssl.txt new file mode 100644 index 0000000000..7cd125a0d1 --- /dev/null +++ b/src/lib/libssl/src/dep/ssl.txt | |||
| @@ -0,0 +1,156 @@ | |||
| 1 | BIO_f_ssl | ||
| 2 | BIO_new_buffer_ssl_connect | ||
| 3 | BIO_new_ssl | ||
| 4 | BIO_new_ssl_connect | ||
| 5 | BIO_proxy_ssl_copy_session_id | ||
| 6 | BIO_ssl_copy_session_id | ||
| 7 | BIO_ssl_shutdown | ||
| 8 | ERR_load_SSL_strings | ||
| 9 | SSL_CIPHER_description | ||
| 10 | SSL_CIPHER_get_bits | ||
| 11 | SSL_CIPHER_get_name | ||
| 12 | SSL_CIPHER_get_version | ||
| 13 | SSL_CTX_add_client_CA | ||
| 14 | SSL_CTX_add_session | ||
| 15 | SSL_CTX_check_private_key | ||
| 16 | SSL_CTX_ctrl | ||
| 17 | SSL_CTX_flush_sessions | ||
| 18 | SSL_CTX_free | ||
| 19 | SSL_CTX_get_client_CA_list | ||
| 20 | SSL_CTX_get_ex_data | ||
| 21 | SSL_CTX_get_ex_new_index | ||
| 22 | SSL_CTX_get_quiet_shutdown | ||
| 23 | SSL_CTX_get_verify_callback | ||
| 24 | SSL_CTX_get_verify_mode | ||
| 25 | SSL_CTX_load_verify_locations | ||
| 26 | SSL_CTX_new | ||
| 27 | SSL_CTX_remove_session | ||
| 28 | SSL_CTX_set_cert_verify_cb | ||
| 29 | SSL_CTX_set_cipher_list | ||
| 30 | SSL_CTX_set_client_CA_list | ||
| 31 | SSL_CTX_set_default_passwd_cb | ||
| 32 | SSL_CTX_set_default_verify_paths | ||
| 33 | SSL_CTX_set_ex_data | ||
| 34 | SSL_CTX_set_quiet_shutdown | ||
| 35 | SSL_CTX_set_ssl_version | ||
| 36 | SSL_CTX_set_verify | ||
| 37 | SSL_CTX_use_PrivateKey | ||
| 38 | SSL_CTX_use_PrivateKey_ASN1 | ||
| 39 | SSL_CTX_use_PrivateKey_file | ||
| 40 | SSL_CTX_use_RSAPrivateKey | ||
| 41 | SSL_CTX_use_RSAPrivateKey_ASN1 | ||
| 42 | SSL_CTX_use_RSAPrivateKey_file | ||
| 43 | SSL_CTX_use_certificate | ||
| 44 | SSL_CTX_use_certificate_ASN1 | ||
| 45 | SSL_CTX_use_certificate_file | ||
| 46 | SSL_SESSION_cmp | ||
| 47 | SSL_SESSION_free | ||
| 48 | SSL_SESSION_get_ex_data | ||
| 49 | SSL_SESSION_get_ex_new_index | ||
| 50 | SSL_SESSION_get_time | ||
| 51 | SSL_SESSION_get_timeout | ||
| 52 | SSL_SESSION_hash | ||
| 53 | SSL_SESSION_new | ||
| 54 | SSL_SESSION_print | ||
| 55 | SSL_SESSION_print_fp | ||
| 56 | SSL_SESSION_set_ex_data | ||
| 57 | SSL_SESSION_set_time | ||
| 58 | SSL_SESSION_set_timeout | ||
| 59 | SSL_accept | ||
| 60 | SSL_add_client_CA | ||
| 61 | SSL_alert_desc_string | ||
| 62 | SSL_alert_desc_string_long | ||
| 63 | SSL_alert_type_string | ||
| 64 | SSL_alert_type_string_long | ||
| 65 | SSL_check_private_key | ||
| 66 | SSL_clear | ||
| 67 | SSL_connect | ||
| 68 | SSL_copy_session_id | ||
| 69 | SSL_ctrl | ||
| 70 | SSL_do_handshake | ||
| 71 | SSL_dup | ||
| 72 | SSL_dup_CA_list | ||
| 73 | SSL_free | ||
| 74 | SSL_get_SSL_CTX | ||
| 75 | SSL_get_certificate | ||
| 76 | SSL_get_cipher_list | ||
| 77 | SSL_get_ciphers | ||
| 78 | SSL_get_client_CA_list | ||
| 79 | SSL_get_current_cipher | ||
| 80 | SSL_get_default_timeout | ||
| 81 | SSL_get_error | ||
| 82 | SSL_get_ex_data | ||
| 83 | SSL_get_ex_new_index | ||
| 84 | SSL_get_fd | ||
| 85 | SSL_get_info_callback | ||
| 86 | SSL_get_peer_cert_chain | ||
| 87 | SSL_get_peer_certificate | ||
| 88 | SSL_get_privatekey | ||
| 89 | SSL_get_quiet_shutdown | ||
| 90 | SSL_get_rbio | ||
| 91 | SSL_get_read_ahead | ||
| 92 | SSL_get_session | ||
| 93 | SSL_get_shared_ciphers | ||
| 94 | SSL_get_shutdown | ||
| 95 | SSL_get_ssl_method | ||
| 96 | SSL_get_verify_callback | ||
| 97 | SSL_get_verify_mode | ||
| 98 | SSL_get_verify_result | ||
| 99 | SSL_get_version | ||
| 100 | SSL_get_wbio | ||
| 101 | SSL_load_client_CA_file | ||
| 102 | SSL_load_error_strings | ||
| 103 | SSL_new | ||
| 104 | SSL_peek | ||
| 105 | SSL_pending | ||
| 106 | SSL_read | ||
| 107 | SSL_renegotiate | ||
| 108 | SSL_rstate_string | ||
| 109 | SSL_rstate_string_long | ||
| 110 | SSL_set_accept_state | ||
| 111 | SSL_set_bio | ||
| 112 | SSL_set_cipher_list | ||
| 113 | SSL_set_client_CA_list | ||
| 114 | SSL_set_connect_state | ||
| 115 | SSL_set_ex_data | ||
| 116 | SSL_set_fd | ||
| 117 | SSL_set_info_callback | ||
| 118 | SSL_set_quiet_shutdown | ||
| 119 | SSL_set_read_ahead | ||
| 120 | SSL_set_rfd | ||
| 121 | SSL_set_session | ||
| 122 | SSL_set_shutdown | ||
| 123 | SSL_set_ssl_method | ||
| 124 | SSL_set_verify | ||
| 125 | SSL_set_verify_result | ||
| 126 | SSL_set_wfd | ||
| 127 | SSL_shutdown | ||
| 128 | SSL_state | ||
| 129 | SSL_state_string | ||
| 130 | SSL_state_string_long | ||
| 131 | SSL_use_PrivateKey | ||
| 132 | SSL_use_PrivateKey_ASN1 | ||
| 133 | SSL_use_PrivateKey_file | ||
| 134 | SSL_use_RSAPrivateKey | ||
| 135 | SSL_use_RSAPrivateKey_ASN1 | ||
| 136 | SSL_use_RSAPrivateKey_file | ||
| 137 | SSL_use_certificate | ||
| 138 | SSL_use_certificate_ASN1 | ||
| 139 | SSL_use_certificate_file | ||
| 140 | SSL_version | ||
| 141 | SSL_write | ||
| 142 | SSLeay_add_ssl_algorithms | ||
| 143 | SSLv23_client_method | ||
| 144 | SSLv23_method | ||
| 145 | SSLv23_server_method | ||
| 146 | SSLv2_client_method | ||
| 147 | SSLv2_method | ||
| 148 | SSLv2_server_method | ||
| 149 | SSLv3_client_method | ||
| 150 | SSLv3_method | ||
| 151 | SSLv3_server_method | ||
| 152 | TLSv1_client_method | ||
| 153 | TLSv1_method | ||
| 154 | TLSv1_server_method | ||
| 155 | d2i_SSL_SESSION | ||
| 156 | i2d_SSL_SESSION | ||
diff --git a/src/lib/libssl/src/doc/API.doc b/src/lib/libssl/src/doc/API.doc new file mode 100644 index 0000000000..fe2820259a --- /dev/null +++ b/src/lib/libssl/src/doc/API.doc | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | SSL - SSLv2/v3/v23 etc. | ||
| 2 | |||
| 3 | BIO - methods and how they plug together | ||
| 4 | |||
| 5 | MEM - memory allocation callback | ||
| 6 | |||
| 7 | CRYPTO - locking for threads | ||
| 8 | |||
| 9 | EVP - Ciphers/Digests/signatures | ||
| 10 | |||
| 11 | RSA - methods | ||
| 12 | |||
| 13 | X509 - certificate retrieval | ||
| 14 | |||
| 15 | X509 - validation | ||
| 16 | |||
| 17 | X509 - X509v3 extensions | ||
| 18 | |||
| 19 | Objects - adding object identifiers | ||
| 20 | |||
| 21 | ASN.1 - parsing | ||
| 22 | |||
| 23 | PEM - parsing | ||
| 24 | |||
diff --git a/src/lib/libssl/src/doc/a_verify.doc b/src/lib/libssl/src/doc/a_verify.doc new file mode 100644 index 0000000000..06eec17c2b --- /dev/null +++ b/src/lib/libssl/src/doc/a_verify.doc | |||
| @@ -0,0 +1,85 @@ | |||
| 1 | From eay@mincom.com Fri Oct 4 18:29:06 1996 | ||
| 2 | Received: by orb.mincom.oz.au id AA29080 | ||
| 3 | (5.65c/IDA-1.4.4 for eay); Fri, 4 Oct 1996 08:29:07 +1000 | ||
| 4 | Date: Fri, 4 Oct 1996 08:29:06 +1000 (EST) | ||
| 5 | From: Eric Young <eay@mincom.oz.au> | ||
| 6 | X-Sender: eay@orb | ||
| 7 | To: wplatzer <wplatzer@iaik.tu-graz.ac.at> | ||
| 8 | Cc: Eric Young <eay@mincom.oz.au>, SSL Mailing List <ssl-users@mincom.com> | ||
| 9 | Subject: Re: Netscape's Public Key | ||
| 10 | In-Reply-To: <19961003134837.NTM0049@iaik.tu-graz.ac.at> | ||
| 11 | Message-Id: <Pine.SOL.3.91.961004081346.8018K-100000@orb> | ||
| 12 | Mime-Version: 1.0 | ||
| 13 | Content-Type: TEXT/PLAIN; charset=US-ASCII | ||
| 14 | Status: RO | ||
| 15 | X-Status: | ||
| 16 | |||
| 17 | On Thu, 3 Oct 1996, wplatzer wrote: | ||
| 18 | > I get Public Key from Netscape (Gold 3.0b4), but cannot do anything | ||
| 19 | > with it... It looks like (asn1parse): | ||
| 20 | > | ||
| 21 | > 0:d=0 hl=3 l=180 cons: SEQUENCE | ||
| 22 | > 3:d=1 hl=2 l= 96 cons: SEQUENCE | ||
| 23 | > 5:d=2 hl=2 l= 92 cons: SEQUENCE | ||
| 24 | > 7:d=3 hl=2 l= 13 cons: SEQUENCE | ||
| 25 | > 9:d=4 hl=2 l= 9 prim: OBJECT :rsaEncryption | ||
| 26 | > 20:d=4 hl=2 l= 0 prim: NULL | ||
| 27 | > 22:d=3 hl=2 l= 75 prim: BIT STRING | ||
| 28 | > 99:d=2 hl=2 l= 0 prim: IA5STRING : | ||
| 29 | > 101:d=1 hl=2 l= 13 cons: SEQUENCE | ||
| 30 | > 103:d=2 hl=2 l= 9 prim: OBJECT :md5withRSAEncryption | ||
| 31 | > 114:d=2 hl=2 l= 0 prim: NULL | ||
| 32 | > 116:d=1 hl=2 l= 65 prim: BIT STRING | ||
| 33 | > | ||
| 34 | > The first BIT STRING is the public key and the second BIT STRING is | ||
| 35 | > the signature. | ||
| 36 | > But a public key consists of the public exponent and the modulus. Are | ||
| 37 | > both numbers in the first BIT STRING? | ||
| 38 | > Is there a document simply describing this coding stuff (checking | ||
| 39 | > signature, get the public key, etc.)? | ||
| 40 | |||
| 41 | Minimal in SSLeay. If you want to see what the modulus and exponent are, | ||
| 42 | try asn1parse -offset 25 -length 75 <key.pem | ||
| 43 | asn1parse will currently stuff up on the 'length 75' part (fixed in next | ||
| 44 | release) but it will print the stuff. If you are after more | ||
| 45 | documentation on ASN.1, have a look at www.rsa.com and get their PKCS | ||
| 46 | documents, most of my initial work on SSLeay was done using them. | ||
| 47 | |||
| 48 | As for SSLeay, | ||
| 49 | util/crypto.num and util/ssl.num are lists of all exported functions in | ||
| 50 | the library (but not macros :-(. | ||
| 51 | |||
| 52 | The ones for extracting public keys from certificates and certificate | ||
| 53 | requests are EVP_PKEY * X509_REQ_extract_key(X509_REQ *req); | ||
| 54 | EVP_PKEY * X509_extract_key(X509 *x509); | ||
| 55 | |||
| 56 | To verify a signature on a signed ASN.1 object | ||
| 57 | int X509_verify(X509 *a,EVP_PKEY *key); | ||
| 58 | int X509_REQ_verify(X509_REQ *a,EVP_PKEY *key); | ||
| 59 | int X509_CRL_verify(X509_CRL *a,EVP_PKEY *key); | ||
| 60 | int NETSCAPE_SPKI_verify(NETSCAPE_SPKI *a,EVP_PKEY *key); | ||
| 61 | |||
| 62 | I should mention that EVP_PKEY can be used to hold a public or a private key, | ||
| 63 | since for things like RSA and DSS, a public key is just a subset of what | ||
| 64 | is stored for the private key. | ||
| 65 | |||
| 66 | To sign any of the above structures | ||
| 67 | |||
| 68 | int X509_sign(X509 *a,EVP_PKEY *key,EVP_MD *md); | ||
| 69 | int X509_REQ_sign(X509_REQ *a,EVP_PKEY *key,EVP_MD *md); | ||
| 70 | int X509_CRL_sign(X509_CRL *a,EVP_PKEY *key,EVP_MD *md); | ||
| 71 | int NETSCAPE_SPKI_sign(NETSCAPE_SPKI *a,EVP_PKEY *key,EVP_MD *md); | ||
| 72 | |||
| 73 | where md is the message digest to sign with. | ||
| 74 | |||
| 75 | There are all defined in x509.h and all the _sign and _verify functions are | ||
| 76 | actually macros to the ASN1_sign() and ASN1_verify() functions. | ||
| 77 | These functions will put the correct algorithm identifiers in the correct | ||
| 78 | places in the structures. | ||
| 79 | |||
| 80 | eric | ||
| 81 | -- | ||
| 82 | Eric Young | BOOL is tri-state according to Bill Gates. | ||
| 83 | AARNet: eay@mincom.oz.au | RTFM Win32 GetMessage(). | ||
| 84 | |||
| 85 | |||
diff --git a/src/lib/libssl/src/doc/apps.doc b/src/lib/libssl/src/doc/apps.doc new file mode 100644 index 0000000000..a2a4e0de72 --- /dev/null +++ b/src/lib/libssl/src/doc/apps.doc | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | The applications | ||
| 2 | |||
| 3 | Ok, where to begin.... | ||
| 4 | In the begining, when SSLeay was small (April 1995), there | ||
| 5 | were but few applications, they did happily cohabit in | ||
| 6 | the one bin directory. Then over time, they did multiply and grow, | ||
| 7 | and they started to look like microsoft software; 500k to print 'hello world'. | ||
| 8 | A new approach was needed. They were coalessed into one 'Monolithic' | ||
| 9 | application, ssleay. This one program is composed of many programs that | ||
| 10 | can all be compiled independantly. | ||
| 11 | |||
| 12 | ssleay has 3 modes of operation. | ||
| 13 | 1) If the ssleay binaray has the name of one of its component programs, it | ||
| 14 | executes that program and then exits. This can be achieve by using hard or | ||
| 15 | symbolic links, or failing that, just renaming the binary. | ||
| 16 | 2) If the first argument to ssleay is the name of one of the component | ||
| 17 | programs, that program runs that program and then exits. | ||
| 18 | 3) If there are no arguments, ssleay enters a 'command' mode. Each line is | ||
| 19 | interpreted as a program name plus arguments. After each 'program' is run, | ||
| 20 | ssleay returns to the comand line. | ||
| 21 | |||
| 22 | dgst - message digests | ||
| 23 | enc - encryption and base64 encoding | ||
| 24 | |||
| 25 | ans1parse - 'pulls' appart ASN.1 encoded objects like certificates. | ||
| 26 | |||
| 27 | dh - Diffle-Hellman parameter manipulation. | ||
| 28 | rsa - RSA manipulations. | ||
| 29 | crl - Certificate revokion list manipulations | ||
| 30 | x509 - X509 cert fiddles, including signing. | ||
| 31 | pkcs7 - pkcs7 manipulation, only DER versions right now. | ||
| 32 | |||
| 33 | genrsa - generate an RSA private key. | ||
| 34 | gendh - Generate a set of Diffle-Hellman parameters. | ||
| 35 | req - Generate a PKCS#10 object, a certificate request. | ||
| 36 | |||
| 37 | s_client - SSL client program | ||
| 38 | s_server - SSL server program | ||
| 39 | s_time - A SSL protocol timing program | ||
| 40 | s_mult - Another SSL server, but it multiplexes | ||
| 41 | connections. | ||
| 42 | s_filter - under development | ||
| 43 | |||
| 44 | errstr - Convert SSLeay error numbers to strings. | ||
| 45 | ca - Sign certificate requests, and generate | ||
| 46 | certificate revokion lists | ||
| 47 | crl2pkcs7 - put a crl and certifcates into a pkcs7 object. | ||
| 48 | speed - Benchmark the ciphers. | ||
| 49 | verify - Check certificates | ||
| 50 | hashdir - under development | ||
| 51 | |||
| 52 | [ there a now a few more options, play with the program to see what they | ||
| 53 | are ] | ||
diff --git a/src/lib/libssl/src/doc/asn1.doc b/src/lib/libssl/src/doc/asn1.doc new file mode 100644 index 0000000000..fdad17c05c --- /dev/null +++ b/src/lib/libssl/src/doc/asn1.doc | |||
| @@ -0,0 +1,401 @@ | |||
| 1 | The ASN.1 Routines. | ||
| 2 | |||
| 3 | ASN.1 is a specification for how to encode structured 'data' in binary form. | ||
| 4 | The approach I have take to the manipulation of structures and their encoding | ||
| 5 | into ASN.1 is as follows. | ||
| 6 | |||
| 7 | For each distinct structure there are 4 function of the following form | ||
| 8 | TYPE *TYPE_new(void); | ||
| 9 | void TYPE_free(TYPE *); | ||
| 10 | TYPE *d2i_TYPE(TYPE **a,unsigned char **pp,long length); | ||
| 11 | long i2d_TYPE(TYPE *a,unsigned char **pp); /* CHECK RETURN VALUE */ | ||
| 12 | |||
| 13 | where TYPE is the type of the 'object'. The TYPE that have these functions | ||
| 14 | can be in one of 2 forms, either the internal C malloc()ed data structure | ||
| 15 | or in the DER (a variant of ASN.1 encoding) binary encoding which is just | ||
| 16 | an array of unsigned bytes. The 'i2d' functions converts from the internal | ||
| 17 | form to the DER form and the 'd2i' functions convert from the DER form to | ||
| 18 | the internal form. | ||
| 19 | |||
| 20 | The 'new' function returns a malloc()ed version of the structure with all | ||
| 21 | substructures either created or left as NULL pointers. For 'optional' | ||
| 22 | fields, they are normally left as NULL to indicate no value. For variable | ||
| 23 | size sub structures (often 'SET OF' or 'SEQUENCE OF' in ASN.1 syntax) the | ||
| 24 | STACK data type is used to hold the values. Have a read of stack.doc | ||
| 25 | and have a look at the relevant header files to see what I mean. If there | ||
| 26 | is an error while malloc()ing the structure, NULL is returned. | ||
| 27 | |||
| 28 | The 'free' function will free() all the sub components of a particular | ||
| 29 | structure. If any of those sub components have been 'removed', replace | ||
| 30 | them with NULL pointers, the 'free' functions are tolerant of NULL fields. | ||
| 31 | |||
| 32 | The 'd2i' function copies a binary representation into a C structure. It | ||
| 33 | operates as follows. 'a' is a pointer to a pointer to | ||
| 34 | the structure to populate, 'pp' is a pointer to a pointer to where the DER | ||
| 35 | byte string is located and 'length' is the length of the '*pp' data. | ||
| 36 | If there are no errors, a pointer to the populated structure is returned. | ||
| 37 | If there is an error, NULL is returned. Errors can occur because of | ||
| 38 | malloc() failures but normally they will be due to syntax errors in the DER | ||
| 39 | encoded data being parsed. It is also an error if there was an | ||
| 40 | attempt to read more that 'length' bytes from '*p'. If | ||
| 41 | everything works correctly, the value in '*p' is updated | ||
| 42 | to point at the location just beyond where the DER | ||
| 43 | structure was read from. In this way, chained calls to 'd2i' type | ||
| 44 | functions can be made, with the pointer into the 'data' array being | ||
| 45 | 'walked' along the input byte array. | ||
| 46 | Depending on the value passed for 'a', different things will be done. If | ||
| 47 | 'a' is NULL, a new structure will be malloc()ed and returned. If '*a' is | ||
| 48 | NULL, a new structure will be malloc()ed and put into '*a' and returned. | ||
| 49 | If '*a' is not NULL, the structure in '*a' will be populated, or in the | ||
| 50 | case of an error, free()ed and then returned. | ||
| 51 | Having these semantics means that a structure | ||
| 52 | can call a 'd2i' function to populate a field and if the field is currently | ||
| 53 | NULL, the structure will be created. | ||
| 54 | |||
| 55 | The 'i2d' function type is used to copy a C structure to a byte array. | ||
| 56 | The parameter 'a' is the structure to convert and '*p' is where to put it. | ||
| 57 | As for the 'd2i' type structure, 'p' is updated to point after the last | ||
| 58 | byte written. If p is NULL, no data is written. The function also returns | ||
| 59 | the number of bytes written. Where this becomes useful is that if the | ||
| 60 | function is called with a NULL 'p' value, the length is returned. This can | ||
| 61 | then be used to malloc() an array of bytes and then the same function can | ||
| 62 | be recalled passing the malloced array to be written to. e.g. | ||
| 63 | |||
| 64 | int len; | ||
| 65 | unsigned char *bytes,*p; | ||
| 66 | len=i2d_X509(x,NULL); /* get the size of the ASN1 encoding of 'x' */ | ||
| 67 | if ((bytes=(unsigned char *)malloc(len)) == NULL) | ||
| 68 | goto err; | ||
| 69 | p=bytes; | ||
| 70 | i2d_X509(x,&p); | ||
| 71 | |||
| 72 | Please note that a new variable, 'p' was passed to i2d_X509. After the | ||
| 73 | call to i2d_X509 p has been incremented by len bytes. | ||
| 74 | |||
| 75 | Now the reason for this functional organisation is that it allows nested | ||
| 76 | structures to be built up by calling these functions as required. There | ||
| 77 | are various macros used to help write the general 'i2d', 'd2i', 'new' and | ||
| 78 | 'free' functions. They are discussed in another file and would only be | ||
| 79 | used by some-one wanting to add new structures to the library. As you | ||
| 80 | might be able to guess, the process of writing ASN.1 files can be a bit CPU | ||
| 81 | expensive for complex structures. I'm willing to live with this since the | ||
| 82 | simpler library code make my life easier and hopefully most programs using | ||
| 83 | these routines will have their execution profiles dominated by cipher or | ||
| 84 | message digest routines. | ||
| 85 | What follows is a list of 'TYPE' values and the corresponding ASN.1 | ||
| 86 | structure and where it is used. | ||
| 87 | |||
| 88 | TYPE ASN.1 | ||
| 89 | ASN1_INTEGER INTEGER | ||
| 90 | ASN1_BIT_STRING BIT STRING | ||
| 91 | ASN1_OCTET_STRING OCTET STRING | ||
| 92 | ASN1_OBJECT OBJECT IDENTIFIER | ||
| 93 | ASN1_PRINTABLESTRING PrintableString | ||
| 94 | ASN1_T61STRING T61String | ||
| 95 | ASN1_IA5STRING IA5String | ||
| 96 | ASN1_UTCTIME UTCTime | ||
| 97 | ASN1_TYPE Any of the above mentioned types plus SEQUENCE and SET | ||
| 98 | |||
| 99 | Most of the above mentioned types are actualled stored in the | ||
| 100 | ASN1_BIT_STRING type and macros are used to differentiate between them. | ||
| 101 | The 3 types used are | ||
| 102 | |||
| 103 | typedef struct asn1_object_st | ||
| 104 | { | ||
| 105 | /* both null if a dynamic ASN1_OBJECT, one is | ||
| 106 | * defined if a 'static' ASN1_OBJECT */ | ||
| 107 | char *sn,*ln; | ||
| 108 | int nid; | ||
| 109 | int length; | ||
| 110 | unsigned char *data; | ||
| 111 | } ASN1_OBJECT; | ||
| 112 | This is used to store ASN1 OBJECTS. Read 'objects.doc' for details ono | ||
| 113 | routines to manipulate this structure. 'sn' and 'ln' are used to hold text | ||
| 114 | strings that represent the object (short name and long or lower case name). | ||
| 115 | These are used by the 'OBJ' library. 'nid' is a number used by the OBJ | ||
| 116 | library to uniquely identify objects. The ASN1 routines will populate the | ||
| 117 | 'length' and 'data' fields which will contain the bit string representing | ||
| 118 | the object. | ||
| 119 | |||
| 120 | typedef struct asn1_bit_string_st | ||
| 121 | { | ||
| 122 | int length; | ||
| 123 | int type; | ||
| 124 | unsigned char *data; | ||
| 125 | } ASN1_BIT_STRING; | ||
| 126 | This structure is used to hold all the other base ASN1 types except for | ||
| 127 | ASN1_UTCTIME (which is really just a 'char *'). Length is the number of | ||
| 128 | bytes held in data and type is the ASN1 type of the object (there is a list | ||
| 129 | in asn1.h). | ||
| 130 | |||
| 131 | typedef struct asn1_type_st | ||
| 132 | { | ||
| 133 | int type; | ||
| 134 | union { | ||
| 135 | char *ptr; | ||
| 136 | ASN1_INTEGER * integer; | ||
| 137 | ASN1_BIT_STRING * bit_string; | ||
| 138 | ASN1_OCTET_STRING * octet_string; | ||
| 139 | ASN1_OBJECT * object; | ||
| 140 | ASN1_PRINTABLESTRING * printablestring; | ||
| 141 | ASN1_T61STRING * t61string; | ||
| 142 | ASN1_IA5STRING * ia5string; | ||
| 143 | ASN1_UTCTIME * utctime; | ||
| 144 | ASN1_BIT_STRING * set; | ||
| 145 | ASN1_BIT_STRING * sequence; | ||
| 146 | } value; | ||
| 147 | } ASN1_TYPE; | ||
| 148 | This structure is used in a few places when 'any' type of object can be | ||
| 149 | expected. | ||
| 150 | |||
| 151 | X509 Certificate | ||
| 152 | X509_CINF CertificateInfo | ||
| 153 | X509_ALGOR AlgorithmIdentifier | ||
| 154 | X509_NAME Name | ||
| 155 | X509_NAME_ENTRY A single sub component of the name. | ||
| 156 | X509_VAL Validity | ||
| 157 | X509_PUBKEY SubjectPublicKeyInfo | ||
| 158 | The above mentioned types are declared in x509.h. They are all quite | ||
| 159 | straight forward except for the X509_NAME/X509_NAME_ENTRY pair. | ||
| 160 | A X509_NAME is a STACK (see stack.doc) of X509_NAME_ENTRY's. | ||
| 161 | typedef struct X509_name_entry_st | ||
| 162 | { | ||
| 163 | ASN1_OBJECT *object; | ||
| 164 | ASN1_BIT_STRING *value; | ||
| 165 | int set; | ||
| 166 | int size; /* temp variable */ | ||
| 167 | } X509_NAME_ENTRY; | ||
| 168 | The size is a temporary variable used by i2d_NAME and set is the set number | ||
| 169 | for the particular NAME_ENTRY. A X509_NAME is encoded as a sequence of | ||
| 170 | sequence of sets. Normally each set contains only a single item. | ||
| 171 | Sometimes it contains more. Normally throughout this library there will be | ||
| 172 | only one item per set. The set field contains the 'set' that this entry is | ||
| 173 | a member of. So if you have just created a X509_NAME structure and | ||
| 174 | populated it with X509_NAME_ENTRYs, you should then traverse the X509_NAME | ||
| 175 | (which is just a STACK) and set the 'set/' field to incrementing numbers. | ||
| 176 | For more details on why this is done, read the ASN.1 spec for Distinguished | ||
| 177 | Names. | ||
| 178 | |||
| 179 | X509_REQ CertificateRequest | ||
| 180 | X509_REQ_INFO CertificateRequestInfo | ||
| 181 | These are used to hold certificate requests. | ||
| 182 | |||
| 183 | X509_CRL CertificateRevocationList | ||
| 184 | These are used to hold a certificate revocation list | ||
| 185 | |||
| 186 | RSAPrivateKey PrivateKeyInfo | ||
| 187 | RSAPublicKey PublicKeyInfo | ||
| 188 | Both these 'function groups' operate on 'RSA' structures (see rsa.doc). | ||
| 189 | The difference is that the RSAPublicKey operations only manipulate the m | ||
| 190 | and e fields in the RSA structure. | ||
| 191 | |||
| 192 | DSAPrivateKey DSS private key | ||
| 193 | DSAPublicKey DSS public key | ||
| 194 | Both these 'function groups' operate on 'DSS' structures (see dsa.doc). | ||
| 195 | The difference is that the RSAPublicKey operations only manipulate the | ||
| 196 | XXX fields in the DSA structure. | ||
| 197 | |||
| 198 | DHparams DHParameter | ||
| 199 | This is used to hold the p and g value for The Diffie-Hellman operation. | ||
| 200 | The function deal with the 'DH' strucure (see dh.doc). | ||
| 201 | |||
| 202 | Now all of these function types can be used with several other functions to give | ||
| 203 | quite useful set of general manipulation routines. Normally one would | ||
| 204 | not uses these functions directly but use them via macros. | ||
| 205 | |||
| 206 | char *ASN1_dup(int (*i2d)(),char *(*d2i)(),char *x); | ||
| 207 | 'x' is the input structure case to a 'char *', 'i2d' is the 'i2d_TYPE' | ||
| 208 | function for the type that 'x' is and d2i is the 'd2i_TYPE' function for the | ||
| 209 | type that 'x' is. As is obvious from the parameters, this function | ||
| 210 | duplicates the strucutre by transforming it into the DER form and then | ||
| 211 | re-loading it into a new strucutre and returning the new strucutre. This | ||
| 212 | is obviously a bit cpu intensive but when faced with a complex dynamic | ||
| 213 | structure this is the simplest programming approach. There are macros for | ||
| 214 | duplicating the major data types but is simple to add extras. | ||
| 215 | |||
| 216 | char *ASN1_d2i_fp(char *(*new)(),char *(*d2i)(),FILE *fp,unsigned char **x); | ||
| 217 | 'x' is a pointer to a pointer of the 'desired type'. new and d2i are the | ||
| 218 | corresponding 'TYPE_new' and 'd2i_TYPE' functions for the type and 'fp' is | ||
| 219 | an open file pointer to read from. This function reads from 'fp' as much | ||
| 220 | data as it can and then uses 'd2i' to parse the bytes to load and return | ||
| 221 | the parsed strucutre in 'x' (if it was non-NULL) and to actually return the | ||
| 222 | strucutre. The behavior of 'x' is as per all the other d2i functions. | ||
| 223 | |||
| 224 | char *ASN1_d2i_bio(char *(*new)(),char *(*d2i)(),BIO *fp,unsigned char **x); | ||
| 225 | The 'BIO' is the new IO type being used in SSLeay (see bio.doc). This | ||
| 226 | function is the same as ASN1_d2i_fp() except for the BIO argument. | ||
| 227 | ASN1_d2i_fp() actually calls this function. | ||
| 228 | |||
| 229 | int ASN1_i2d_fp(int (*i2d)(),FILE *out,unsigned char *x); | ||
| 230 | 'x' is converted to bytes by 'i2d' and then written to 'out'. ASN1_i2d_fp | ||
| 231 | and ASN1_d2i_fp are not really symetric since ASN1_i2d_fp will read all | ||
| 232 | available data from the file pointer before parsing a single item while | ||
| 233 | ASN1_i2d_fp can be used to write a sequence of data objects. To read a | ||
| 234 | series of objects from a file I would sugest loading the file into a buffer | ||
| 235 | and calling the relevent 'd2i' functions. | ||
| 236 | |||
| 237 | char *ASN1_d2i_bio(char *(*new)(),char *(*d2i)(),BIO *fp,unsigned char **x); | ||
| 238 | This function is the same as ASN1_i2d_fp() except for the BIO argument. | ||
| 239 | ASN1_i2d_fp() actually calls this function. | ||
| 240 | |||
| 241 | char * PEM_ASN1_read(char *(*d2i)(),char *name,FILE *fp,char **x,int (*cb)()); | ||
| 242 | This function will read the next PEM encoded (base64) object of the same | ||
| 243 | type as 'x' (loaded by the d2i function). 'name' is the name that is in | ||
| 244 | the '-----BEGIN name-----' that designates the start of that object type. | ||
| 245 | If the data is encrypted, 'cb' will be called to prompt for a password. If | ||
| 246 | it is NULL a default function will be used to prompt from the password. | ||
| 247 | 'x' is delt with as per the standard 'd2i' function interface. This | ||
| 248 | function can be used to read a series of objects from a file. While any | ||
| 249 | data type can be encrypted (see PEM_ASN1_write) only RSA private keys tend | ||
| 250 | to be encrypted. | ||
| 251 | |||
| 252 | char * PEM_ASN1_read_bio(char *(*d2i)(),char *name,BIO *fp, | ||
| 253 | char **x,int (*cb)()); | ||
| 254 | Same as PEM_ASN1_read() except using a BIO. This is called by | ||
| 255 | PEM_ASN1_read(). | ||
| 256 | |||
| 257 | int PEM_ASN1_write(int (*i2d)(),char *name,FILE *fp,char *x,EVP_CIPHER *enc, | ||
| 258 | unsigned char *kstr,int klen,int (*callback)()); | ||
| 259 | |||
| 260 | int PEM_ASN1_write_bio(int (*i2d)(),char *name,BIO *fp, | ||
| 261 | char *x,EVP_CIPHER *enc,unsigned char *kstr,int klen, | ||
| 262 | int (*callback)()); | ||
| 263 | |||
| 264 | int ASN1_sign(int (*i2d)(), X509_ALGOR *algor1, X509_ALGOR *algor2, | ||
| 265 | ASN1_BIT_STRING *signature, char *data, RSA *rsa, EVP_MD *type); | ||
| 266 | int ASN1_verify(int (*i2d)(), X509_ALGOR *algor1, | ||
| 267 | ASN1_BIT_STRING *signature,char *data, RSA *rsa); | ||
| 268 | |||
| 269 | int ASN1_BIT_STRING_cmp(ASN1_BIT_STRING *a, ASN1_BIT_STRING *b); | ||
| 270 | ASN1_BIT_STRING *ASN1_BIT_STRING_type_new(int type ); | ||
| 271 | |||
| 272 | int ASN1_UTCTIME_check(ASN1_UTCTIME *a); | ||
| 273 | void ASN1_UTCTIME_print(BIO *fp,ASN1_UTCTIME *a); | ||
| 274 | ASN1_UTCTIME *ASN1_UTCTIME_dup(ASN1_UTCTIME *a); | ||
| 275 | |||
| 276 | ASN1_BIT_STRING *d2i_asn1_print_type(ASN1_BIT_STRING **a,unsigned char **pp, | ||
| 277 | long length,int type); | ||
| 278 | |||
| 279 | int i2d_ASN1_SET(STACK *a, unsigned char **pp, | ||
| 280 | int (*func)(), int ex_tag, int ex_class); | ||
| 281 | STACK * d2i_ASN1_SET(STACK **a, unsigned char **pp, long length, | ||
| 282 | char *(*func)(), int ex_tag, int ex_class); | ||
| 283 | |||
| 284 | int i2a_ASN1_OBJECT(BIO *bp,ASN1_OBJECT *object); | ||
| 285 | int i2a_ASN1_INTEGER(BIO *bp, ASN1_INTEGER *a); | ||
| 286 | int a2i_ASN1_INTEGER(BIO *bp,ASN1_INTEGER *bs,char *buf,int size); | ||
| 287 | |||
| 288 | int ASN1_INTEGER_set(ASN1_INTEGER *a, long v); | ||
| 289 | long ASN1_INTEGER_get(ASN1_INTEGER *a); | ||
| 290 | ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai); | ||
| 291 | BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai,BIGNUM *bn); | ||
| 292 | |||
| 293 | /* given a string, return the correct type. Max is the maximum number | ||
| 294 | * of bytes to parse. It stops parsing when 'max' bytes have been | ||
| 295 | * processed or a '\0' is hit */ | ||
| 296 | int ASN1_PRINTABLE_type(unsigned char *s,int max); | ||
| 297 | |||
| 298 | void ASN1_parse(BIO *fp,unsigned char *pp,long len); | ||
| 299 | |||
| 300 | int i2d_ASN1_bytes(ASN1_BIT_STRING *a, unsigned char **pp, int tag, int class); | ||
| 301 | ASN1_BIT_STRING *d2i_ASN1_bytes(ASN1_OCTET_STRING **a, unsigned char **pp, | ||
| 302 | long length, int Ptag, int Pclass); | ||
| 303 | |||
| 304 | /* PARSING */ | ||
| 305 | int asn1_Finish(ASN1_CTX *c); | ||
| 306 | |||
| 307 | /* SPECIALS */ | ||
| 308 | int ASN1_get_object(unsigned char **pp, long *plength, int *ptag, | ||
| 309 | int *pclass, long omax); | ||
| 310 | int ASN1_check_infinite_end(unsigned char **p,long len); | ||
| 311 | void ASN1_put_object(unsigned char **pp, int constructed, int length, | ||
| 312 | int tag, int class); | ||
| 313 | int ASN1_object_size(int constructed, int length, int tag); | ||
| 314 | |||
| 315 | X509 * X509_get_cert(CERTIFICATE_CTX *ctx,X509_NAME * name,X509 *tmp_x509); | ||
| 316 | int X509_add_cert(CERTIFICATE_CTX *ctx,X509 *); | ||
| 317 | |||
| 318 | char * X509_cert_verify_error_string(int n); | ||
| 319 | int X509_add_cert_file(CERTIFICATE_CTX *c,char *file, int type); | ||
| 320 | char * X509_gmtime (char *s, long adj); | ||
| 321 | int X509_add_cert_dir (CERTIFICATE_CTX *c,char *dir, int type); | ||
| 322 | int X509_load_verify_locations (CERTIFICATE_CTX *ctx, | ||
| 323 | char *file_env, char *dir_env); | ||
| 324 | int X509_set_default_verify_paths(CERTIFICATE_CTX *cts); | ||
| 325 | X509 * X509_new_D2i_X509(int len, unsigned char *p); | ||
| 326 | char * X509_get_default_cert_area(void ); | ||
| 327 | char * X509_get_default_cert_dir(void ); | ||
| 328 | char * X509_get_default_cert_file(void ); | ||
| 329 | char * X509_get_default_cert_dir_env(void ); | ||
| 330 | char * X509_get_default_cert_file_env(void ); | ||
| 331 | char * X509_get_default_private_dir(void ); | ||
| 332 | X509_REQ *X509_X509_TO_req(X509 *x, RSA *rsa); | ||
| 333 | int X509_cert_verify(CERTIFICATE_CTX *ctx,X509 *xs, int (*cb)()); | ||
| 334 | |||
| 335 | CERTIFICATE_CTX *CERTIFICATE_CTX_new(); | ||
| 336 | void CERTIFICATE_CTX_free(CERTIFICATE_CTX *c); | ||
| 337 | |||
| 338 | void X509_NAME_print(BIO *fp, X509_NAME *name, int obase); | ||
| 339 | int X509_print_fp(FILE *fp,X509 *x); | ||
| 340 | int X509_print(BIO *fp,X509 *x); | ||
| 341 | |||
| 342 | X509_INFO * X509_INFO_new(void); | ||
| 343 | void X509_INFO_free(X509_INFO *a); | ||
| 344 | |||
| 345 | char * X509_NAME_oneline(X509_NAME *a); | ||
| 346 | |||
| 347 | #define X509_verify(x,rsa) | ||
| 348 | #define X509_REQ_verify(x,rsa) | ||
| 349 | #define X509_CRL_verify(x,rsa) | ||
| 350 | |||
| 351 | #define X509_sign(x,rsa,md) | ||
| 352 | #define X509_REQ_sign(x,rsa,md) | ||
| 353 | #define X509_CRL_sign(x,rsa,md) | ||
| 354 | |||
| 355 | #define X509_dup(x509) | ||
| 356 | #define d2i_X509_fp(fp,x509) | ||
| 357 | #define i2d_X509_fp(fp,x509) | ||
| 358 | #define d2i_X509_bio(bp,x509) | ||
| 359 | #define i2d_X509_bio(bp,x509) | ||
| 360 | |||
| 361 | #define X509_CRL_dup(crl) | ||
| 362 | #define d2i_X509_CRL_fp(fp,crl) | ||
| 363 | #define i2d_X509_CRL_fp(fp,crl) | ||
| 364 | #define d2i_X509_CRL_bio(bp,crl) | ||
| 365 | #define i2d_X509_CRL_bio(bp,crl) | ||
| 366 | |||
| 367 | #define X509_REQ_dup(req) | ||
| 368 | #define d2i_X509_REQ_fp(fp,req) | ||
| 369 | #define i2d_X509_REQ_fp(fp,req) | ||
| 370 | #define d2i_X509_REQ_bio(bp,req) | ||
| 371 | #define i2d_X509_REQ_bio(bp,req) | ||
| 372 | |||
| 373 | #define RSAPrivateKey_dup(rsa) | ||
| 374 | #define d2i_RSAPrivateKey_fp(fp,rsa) | ||
| 375 | #define i2d_RSAPrivateKey_fp(fp,rsa) | ||
| 376 | #define d2i_RSAPrivateKey_bio(bp,rsa) | ||
| 377 | #define i2d_RSAPrivateKey_bio(bp,rsa) | ||
| 378 | |||
| 379 | #define X509_NAME_dup(xn) | ||
| 380 | #define X509_NAME_ENTRY_dup(ne) | ||
| 381 | |||
| 382 | void X509_REQ_print_fp(FILE *fp,X509_REQ *req); | ||
| 383 | void X509_REQ_print(BIO *fp,X509_REQ *req); | ||
| 384 | |||
| 385 | RSA *X509_REQ_extract_key(X509_REQ *req); | ||
| 386 | RSA *X509_extract_key(X509 *x509); | ||
| 387 | |||
| 388 | int X509_issuer_and_serial_cmp(X509 *a, X509 *b); | ||
| 389 | unsigned long X509_issuer_and_serial_hash(X509 *a); | ||
| 390 | |||
| 391 | X509_NAME * X509_get_issuer_name(X509 *a); | ||
| 392 | int X509_issuer_name_cmp(X509 *a, X509 *b); | ||
| 393 | unsigned long X509_issuer_name_hash(X509 *a); | ||
| 394 | |||
| 395 | X509_NAME * X509_get_subject_name(X509 *a); | ||
| 396 | int X509_subject_name_cmp(X509 *a,X509 *b); | ||
| 397 | unsigned long X509_subject_name_hash(X509 *x); | ||
| 398 | |||
| 399 | int X509_NAME_cmp (X509_NAME *a, X509_NAME *b); | ||
| 400 | unsigned long X509_NAME_hash(X509_NAME *x); | ||
| 401 | |||
diff --git a/src/lib/libssl/src/doc/bio.doc b/src/lib/libssl/src/doc/bio.doc new file mode 100644 index 0000000000..545a57cdff --- /dev/null +++ b/src/lib/libssl/src/doc/bio.doc | |||
| @@ -0,0 +1,423 @@ | |||
| 1 | BIO Routines | ||
| 2 | |||
| 3 | This documentation is rather sparse, you are probably best | ||
| 4 | off looking at the code for specific details. | ||
| 5 | |||
| 6 | The BIO library is a IO abstraction that was originally | ||
| 7 | inspired by the need to have callbacks to perform IO to FILE | ||
| 8 | pointers when using Windows 3.1 DLLs. There are two types | ||
| 9 | of BIO; a source/sink type and a filter type. | ||
| 10 | The source/sink methods are as follows: | ||
| 11 | - BIO_s_mem() memory buffer - a read/write byte array that | ||
| 12 | grows until memory runs out :-). | ||
| 13 | - BIO_s_file() FILE pointer - A wrapper around the normal | ||
| 14 | 'FILE *' commands, good for use with stdin/stdout. | ||
| 15 | - BIO_s_fd() File descriptor - A wrapper around file | ||
| 16 | descriptors, often used with pipes. | ||
| 17 | - BIO_s_socket() Socket - Used around sockets. It is | ||
| 18 | mostly in the Microsoft world that sockets are different | ||
| 19 | from file descriptors and there are all those ugly winsock | ||
| 20 | commands. | ||
| 21 | - BIO_s_null() Null - read nothing and write nothing.; a | ||
| 22 | useful endpoint for filter type BIO's specifically things | ||
| 23 | like the message digest BIO. | ||
| 24 | |||
| 25 | The filter types are | ||
| 26 | - BIO_f_buffer() IO buffering - does output buffering into | ||
| 27 | larger chunks and performs input buffering to allow gets() | ||
| 28 | type functions. | ||
| 29 | - BIO_f_md() Message digest - a transparent filter that can | ||
| 30 | be asked to return a message digest for the data that has | ||
| 31 | passed through it. | ||
| 32 | - BIO_f_cipher() Encrypt or decrypt all data passing | ||
| 33 | through the filter. | ||
| 34 | - BIO_f_base64() Base64 decode on read and encode on write. | ||
| 35 | - BIO_f_ssl() A filter that performs SSL encryption on the | ||
| 36 | data sent through it. | ||
| 37 | |||
| 38 | Base BIO functions. | ||
| 39 | The BIO library has a set of base functions that are | ||
| 40 | implemented for each particular type. Filter BIOs will | ||
| 41 | normally call the equivalent function on the source/sink BIO | ||
| 42 | that they are layered on top of after they have performed | ||
| 43 | some modification to the data stream. Multiple filter BIOs | ||
| 44 | can be 'push' into a stack of modifers, so to read from a | ||
| 45 | file, unbase64 it, then decrypt it, a BIO_f_cipher, | ||
| 46 | BIO_f_base64 and a BIO_s_file would probably be used. If a | ||
| 47 | sha-1 and md5 message digest needed to be generated, a stack | ||
| 48 | two BIO_f_md() BIOs and a BIO_s_null() BIO could be used. | ||
| 49 | The base functions are | ||
| 50 | - BIO *BIO_new(BIO_METHOD *type); Create a new BIO of type 'type'. | ||
| 51 | - int BIO_free(BIO *a); Free a BIO structure. Depending on | ||
| 52 | the configuration, this will free the underlying data | ||
| 53 | object for a source/sink BIO. | ||
| 54 | - int BIO_read(BIO *b, char *data, int len); Read upto 'len' | ||
| 55 | bytes into 'data'. | ||
| 56 | - int BIO_gets(BIO *bp,char *buf, int size); Depending on | ||
| 57 | the BIO, this can either be a 'get special' or a get one | ||
| 58 | line of data, as per fgets(); | ||
| 59 | - int BIO_write(BIO *b, char *data, int len); Write 'len' | ||
| 60 | bytes from 'data' to the 'b' BIO. | ||
| 61 | - int BIO_puts(BIO *bp,char *buf); Either a 'put special' or | ||
| 62 | a write null terminated string as per fputs(). | ||
| 63 | - long BIO_ctrl(BIO *bp,int cmd,long larg,char *parg); A | ||
| 64 | control function which is used to manipulate the BIO | ||
| 65 | structure and modify it's state and or report on it. This | ||
| 66 | function is just about never used directly, rather it | ||
| 67 | should be used in conjunction with BIO_METHOD specific | ||
| 68 | macros. | ||
| 69 | - BIO *BIO_push(BIO *new_top, BIO *old); new_top is apped to the | ||
| 70 | top of the 'old' BIO list. new_top should be a filter BIO. | ||
| 71 | All writes will go through 'new_top' first and last on read. | ||
| 72 | 'old' is returned. | ||
| 73 | - BIO *BIO_pop(BIO *bio); the new topmost BIO is returned, NULL if | ||
| 74 | there are no more. | ||
| 75 | |||
| 76 | If a particular low level BIO method is not supported | ||
| 77 | (normally BIO_gets()), -2 will be returned if that method is | ||
| 78 | called. Otherwise the IO methods (read, write, gets, puts) | ||
| 79 | will return the number of bytes read or written, and 0 or -1 | ||
| 80 | for error (or end of input). For the -1 case, | ||
| 81 | BIO_should_retry(bio) can be called to determine if it was a | ||
| 82 | genuine error or a temporary problem. -2 will also be | ||
| 83 | returned if the BIO has not been initalised yet, in all | ||
| 84 | cases, the correct error codes are set (accessible via the | ||
| 85 | ERR library). | ||
| 86 | |||
| 87 | |||
| 88 | The following functions are convenience functions: | ||
| 89 | - int BIO_printf(BIO *bio, char * format, ..); printf but | ||
| 90 | to a BIO handle. | ||
| 91 | - long BIO_ctrl_int(BIO *bp,int cmd,long larg,int iarg); a | ||
| 92 | convenience function to allow a different argument types | ||
| 93 | to be passed to BIO_ctrl(). | ||
| 94 | - int BIO_dump(BIO *b,char *bytes,int len); output 'len' | ||
| 95 | bytes from 'bytes' in a hex dump debug format. | ||
| 96 | - long BIO_debug_callback(BIO *bio, int cmd, char *argp, int | ||
| 97 | argi, long argl, long ret) - a default debug BIO callback, | ||
| 98 | this is mentioned below. To use this one normally has to | ||
| 99 | use the BIO_set_callback_arg() function to assign an | ||
| 100 | output BIO for the callback to use. | ||
| 101 | - BIO *BIO_find_type(BIO *bio,int type); when there is a 'stack' | ||
| 102 | of BIOs, this function scan the list and returns the first | ||
| 103 | that is of type 'type', as listed in buffer.h under BIO_TYPE_XXX. | ||
| 104 | - void BIO_free_all(BIO *bio); Free the bio and all other BIOs | ||
| 105 | in the list. It walks the bio->next_bio list. | ||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | Extra commands are normally implemented as macros calling BIO_ctrl(). | ||
| 110 | - BIO_number_read(BIO *bio) - the number of bytes processed | ||
| 111 | by BIO_read(bio,.). | ||
| 112 | - BIO_number_written(BIO *bio) - the number of bytes written | ||
| 113 | by BIO_write(bio,.). | ||
| 114 | - BIO_reset(BIO *bio) - 'reset' the BIO. | ||
| 115 | - BIO_eof(BIO *bio) - non zero if we are at the current end | ||
| 116 | of input. | ||
| 117 | - BIO_set_close(BIO *bio, int close_flag) - set the close flag. | ||
| 118 | - BIO_get_close(BIO *bio) - return the close flag. | ||
| 119 | BIO_pending(BIO *bio) - return the number of bytes waiting | ||
| 120 | to be read (normally buffered internally). | ||
| 121 | - BIO_flush(BIO *bio) - output any data waiting to be output. | ||
| 122 | - BIO_should_retry(BIO *io) - after a BIO_read/BIO_write | ||
| 123 | operation returns 0 or -1, a call to this function will | ||
| 124 | return non zero if you should retry the call later (this | ||
| 125 | is for non-blocking IO). | ||
| 126 | - BIO_should_read(BIO *io) - we should retry when data can | ||
| 127 | be read. | ||
| 128 | - BIO_should_write(BIO *io) - we should retry when data can | ||
| 129 | be written. | ||
| 130 | - BIO_method_name(BIO *io) - return a string for the method name. | ||
| 131 | - BIO_method_type(BIO *io) - return the unique ID of the BIO method. | ||
| 132 | - BIO_set_callback(BIO *io, long (*callback)(BIO *io, int | ||
| 133 | cmd, char *argp, int argi, long argl, long ret); - sets | ||
| 134 | the debug callback. | ||
| 135 | - BIO_get_callback(BIO *io) - return the assigned function | ||
| 136 | as mentioned above. | ||
| 137 | - BIO_set_callback_arg(BIO *io, char *arg) - assign some | ||
| 138 | data against the BIO. This is normally used by the debug | ||
| 139 | callback but could in reality be used for anything. To | ||
| 140 | get an idea of how all this works, have a look at the code | ||
| 141 | in the default debug callback mentioned above. The | ||
| 142 | callback can modify the return values. | ||
| 143 | |||
| 144 | Details of the BIO_METHOD structure. | ||
| 145 | typedef struct bio_method_st | ||
| 146 | { | ||
| 147 | int type; | ||
| 148 | char *name; | ||
| 149 | int (*bwrite)(); | ||
| 150 | int (*bread)(); | ||
| 151 | int (*bputs)(); | ||
| 152 | int (*bgets)(); | ||
| 153 | long (*ctrl)(); | ||
| 154 | int (*create)(); | ||
| 155 | int (*destroy)(); | ||
| 156 | } BIO_METHOD; | ||
| 157 | |||
| 158 | The 'type' is the numeric type of the BIO, these are listed in buffer.h; | ||
| 159 | 'Name' is a textual representation of the BIO 'type'. | ||
| 160 | The 7 function pointers point to the respective function | ||
| 161 | methods, some of which can be NULL if not implemented. | ||
| 162 | The BIO structure | ||
| 163 | typedef struct bio_st | ||
| 164 | { | ||
| 165 | BIO_METHOD *method; | ||
| 166 | long (*callback)(BIO * bio, int mode, char *argp, int | ||
| 167 | argi, long argl, long ret); | ||
| 168 | char *cb_arg; /* first argument for the callback */ | ||
| 169 | int init; | ||
| 170 | int shutdown; | ||
| 171 | int flags; /* extra storage */ | ||
| 172 | int num; | ||
| 173 | char *ptr; | ||
| 174 | struct bio_st *next_bio; /* used by filter BIOs */ | ||
| 175 | int references; | ||
| 176 | unsigned long num_read; | ||
| 177 | unsigned long num_write; | ||
| 178 | } BIO; | ||
| 179 | |||
| 180 | - 'Method' is the BIO method. | ||
| 181 | - 'callback', when configured, is called before and after | ||
| 182 | each BIO method is called for that particular BIO. This | ||
| 183 | is intended primarily for debugging and of informational feedback. | ||
| 184 | - 'init' is 0 when the BIO can be used for operation. | ||
| 185 | Often, after a BIO is created, a number of operations may | ||
| 186 | need to be performed before it is available for use. An | ||
| 187 | example is for BIO_s_sock(). A socket needs to be | ||
| 188 | assigned to the BIO before it can be used. | ||
| 189 | - 'shutdown', this flag indicates if the underlying | ||
| 190 | comunication primative being used should be closed/freed | ||
| 191 | when the BIO is closed. | ||
| 192 | - 'flags' is used to hold extra state. It is primarily used | ||
| 193 | to hold information about why a non-blocking operation | ||
| 194 | failed and to record startup protocol information for the | ||
| 195 | SSL BIO. | ||
| 196 | - 'num' and 'ptr' are used to hold instance specific state | ||
| 197 | like file descriptors or local data structures. | ||
| 198 | - 'next_bio' is used by filter BIOs to hold the pointer of the | ||
| 199 | next BIO in the chain. written data is sent to this BIO and | ||
| 200 | data read is taken from it. | ||
| 201 | - 'references' is used to indicate the number of pointers to | ||
| 202 | this structure. This needs to be '1' before a call to | ||
| 203 | BIO_free() is made if the BIO_free() function is to | ||
| 204 | actually free() the structure, otherwise the reference | ||
| 205 | count is just decreased. The actual BIO subsystem does | ||
| 206 | not really use this functionality but it is useful when | ||
| 207 | used in more advanced applicaion. | ||
| 208 | - num_read and num_write are the total number of bytes | ||
| 209 | read/written via the 'read()' and 'write()' methods. | ||
| 210 | |||
| 211 | BIO_ctrl operations. | ||
| 212 | The following is the list of standard commands passed as the | ||
| 213 | second parameter to BIO_ctrl() and should be supported by | ||
| 214 | all BIO as best as possible. Some are optional, some are | ||
| 215 | manditory, in any case, where is makes sense, a filter BIO | ||
| 216 | should pass such requests to underlying BIO's. | ||
| 217 | - BIO_CTRL_RESET - Reset the BIO back to an initial state. | ||
| 218 | - BIO_CTRL_EOF - return 0 if we are not at the end of input, | ||
| 219 | non 0 if we are. | ||
| 220 | - BIO_CTRL_INFO - BIO specific special command, normal | ||
| 221 | information return. | ||
| 222 | - BIO_CTRL_SET - set IO specific parameter. | ||
| 223 | - BIO_CTRL_GET - get IO specific parameter. | ||
| 224 | - BIO_CTRL_GET_CLOSE - Get the close on BIO_free() flag, one | ||
| 225 | of BIO_CLOSE or BIO_NOCLOSE. | ||
| 226 | - BIO_CTRL_SET_CLOSE - Set the close on BIO_free() flag. | ||
| 227 | - BIO_CTRL_PENDING - Return the number of bytes available | ||
| 228 | for instant reading | ||
| 229 | - BIO_CTRL_FLUSH - Output pending data, return number of bytes output. | ||
| 230 | - BIO_CTRL_SHOULD_RETRY - After an IO error (-1 returned) | ||
| 231 | should we 'retry' when IO is possible on the underlying IO object. | ||
| 232 | - BIO_CTRL_RETRY_TYPE - What kind of IO are we waiting on. | ||
| 233 | |||
| 234 | The following command is a special BIO_s_file() specific option. | ||
| 235 | - BIO_CTRL_SET_FILENAME - specify a file to open for IO. | ||
| 236 | |||
| 237 | The BIO_CTRL_RETRY_TYPE needs a little more explanation. | ||
| 238 | When performing non-blocking IO, or say reading on a memory | ||
| 239 | BIO, when no data is present (or cannot be written), | ||
| 240 | BIO_read() and/or BIO_write() will return -1. | ||
| 241 | BIO_should_retry(bio) will return true if this is due to an | ||
| 242 | IO condition rather than an actual error. In the case of | ||
| 243 | BIO_s_mem(), a read when there is no data will return -1 and | ||
| 244 | a should retry when there is more 'read' data. | ||
| 245 | The retry type is deduced from 2 macros | ||
| 246 | BIO_should_read(bio) and BIO_should_write(bio). | ||
| 247 | Now while it may appear obvious that a BIO_read() failure | ||
| 248 | should indicate that a retry should be performed when more | ||
| 249 | read data is available, this is often not true when using | ||
| 250 | things like an SSL BIO. During the SSL protocol startup | ||
| 251 | multiple reads and writes are performed, triggered by any | ||
| 252 | SSL_read or SSL_write. | ||
| 253 | So to write code that will transparently handle either a | ||
| 254 | socket or SSL BIO, | ||
| 255 | i=BIO_read(bio,..) | ||
| 256 | if (I == -1) | ||
| 257 | { | ||
| 258 | if (BIO_should_retry(bio)) | ||
| 259 | { | ||
| 260 | if (BIO_should_read(bio)) | ||
| 261 | { | ||
| 262 | /* call us again when BIO can be read */ | ||
| 263 | } | ||
| 264 | if (BIO_should_write(bio)) | ||
| 265 | { | ||
| 266 | /* call us again when BIO can be written */ | ||
| 267 | } | ||
| 268 | } | ||
| 269 | } | ||
| 270 | |||
| 271 | At this point in time only read and write conditions can be | ||
| 272 | used but in the future I can see the situation for other | ||
| 273 | conditions, specifically with SSL there could be a condition | ||
| 274 | of a X509 certificate lookup taking place and so the non- | ||
| 275 | blocking BIO_read would require a retry when the certificate | ||
| 276 | lookup subsystem has finished it's lookup. This is all | ||
| 277 | makes more sense and is easy to use in a event loop type | ||
| 278 | setup. | ||
| 279 | When using the SSL BIO, either SSL_read() or SSL_write()s | ||
| 280 | can be called during the protocol startup and things will | ||
| 281 | still work correctly. | ||
| 282 | The nice aspect of the use of the BIO_should_retry() macro | ||
| 283 | is that all the errno codes that indicate a non-fatal error | ||
| 284 | are encapsulated in one place. The Windows specific error | ||
| 285 | codes and WSAGetLastError() calls are also hidden from the | ||
| 286 | application. | ||
| 287 | |||
| 288 | Notes on each BIO method. | ||
| 289 | Normally buffer.h is just required but depending on the | ||
| 290 | BIO_METHOD, ssl.h or evp.h will also be required. | ||
| 291 | |||
| 292 | BIO_METHOD *BIO_s_mem(void); | ||
| 293 | - BIO_set_mem_buf(BIO *bio, BUF_MEM *bm, int close_flag) - | ||
| 294 | set the underlying BUF_MEM structure for the BIO to use. | ||
| 295 | - BIO_get_mem_ptr(BIO *bio, char **pp) - if pp is not NULL, | ||
| 296 | set it to point to the memory array and return the number | ||
| 297 | of bytes available. | ||
| 298 | A read/write BIO. Any data written is appended to the | ||
| 299 | memory array and any read is read from the front. This BIO | ||
| 300 | can be used for read/write at the same time. BIO_gets() is | ||
| 301 | supported in the fgets() sense. | ||
| 302 | BIO_CTRL_INFO can be used to retrieve pointers to the memory | ||
| 303 | buffer and it's length. | ||
| 304 | |||
| 305 | BIO_METHOD *BIO_s_file(void); | ||
| 306 | - BIO_set_fp(BIO *bio, FILE *fp, int close_flag) - set 'FILE *' to use. | ||
| 307 | - BIO_get_fp(BIO *bio, FILE **fp) - get the 'FILE *' in use. | ||
| 308 | - BIO_read_filename(BIO *bio, char *name) - read from file. | ||
| 309 | - BIO_write_filename(BIO *bio, char *name) - write to file. | ||
| 310 | - BIO_append_filename(BIO *bio, char *name) - append to file. | ||
| 311 | This BIO sits over the normal system fread()/fgets() type | ||
| 312 | functions. Gets() is supported. This BIO in theory could be | ||
| 313 | used for read and write but it is best to think of each BIO | ||
| 314 | of this type as either a read or a write BIO, not both. | ||
| 315 | |||
| 316 | BIO_METHOD *BIO_s_socket(void); | ||
| 317 | BIO_METHOD *BIO_s_fd(void); | ||
| 318 | - BIO_sock_should_retry(int i) - the underlying function | ||
| 319 | used to determine if a call should be retried; the | ||
| 320 | argument is the '0' or '-1' returned by the previous BIO | ||
| 321 | operation. | ||
| 322 | - BIO_fd_should_retry(int i) - same as the | ||
| 323 | - BIO_sock_should_retry() except that it is different internally. | ||
| 324 | - BIO_set_fd(BIO *bio, int fd, int close_flag) - set the | ||
| 325 | file descriptor to use | ||
| 326 | - BIO_get_fd(BIO *bio, int *fd) - get the file descriptor. | ||
| 327 | These two methods are very similar. Gets() is not | ||
| 328 | supported, if you want this functionality, put a | ||
| 329 | BIO_f_buffer() onto it. This BIO is bi-directional if the | ||
| 330 | underlying file descriptor is. This is normally the case | ||
| 331 | for sockets but not the case for stdio descriptors. | ||
| 332 | |||
| 333 | BIO_METHOD *BIO_s_null(void); | ||
| 334 | Read and write as much data as you like, it all disappears | ||
| 335 | into this BIO. | ||
| 336 | |||
| 337 | BIO_METHOD *BIO_f_buffer(void); | ||
| 338 | - BIO_get_buffer_num_lines(BIO *bio) - return the number of | ||
| 339 | complete lines in the buffer. | ||
| 340 | - BIO_set_buffer_size(BIO *bio, long size) - set the size of | ||
| 341 | the buffers. | ||
| 342 | This type performs input and output buffering. It performs | ||
| 343 | both at the same time. The size of the buffer can be set | ||
| 344 | via the set buffer size option. Data buffered for output is | ||
| 345 | only written when the buffer fills. | ||
| 346 | |||
| 347 | BIO_METHOD *BIO_f_ssl(void); | ||
| 348 | - BIO_set_ssl(BIO *bio, SSL *ssl, int close_flag) - the SSL | ||
| 349 | structure to use. | ||
| 350 | - BIO_get_ssl(BIO *bio, SSL **ssl) - get the SSL structure | ||
| 351 | in use. | ||
| 352 | The SSL bio is a little different from normal BIOs because | ||
| 353 | the underlying SSL structure is a little different. A SSL | ||
| 354 | structure performs IO via a read and write BIO. These can | ||
| 355 | be different and are normally set via the | ||
| 356 | SSL_set_rbio()/SSL_set_wbio() calls. The SSL_set_fd() calls | ||
| 357 | are just wrappers that create socket BIOs and then call | ||
| 358 | SSL_set_bio() where the read and write BIOs are the same. | ||
| 359 | The BIO_push() operation makes the SSLs IO BIOs the same, so | ||
| 360 | make sure the BIO pushed is capable of two directional | ||
| 361 | traffic. If it is not, you will have to install the BIOs | ||
| 362 | via the more conventional SSL_set_bio() call. BIO_pop() will retrieve | ||
| 363 | the 'SSL read' BIO. | ||
| 364 | |||
| 365 | BIO_METHOD *BIO_f_md(void); | ||
| 366 | - BIO_set_md(BIO *bio, EVP_MD *md) - set the message digest | ||
| 367 | to use. | ||
| 368 | - BIO_get_md(BIO *bio, EVP_MD **mdp) - return the digest | ||
| 369 | method in use in mdp, return 0 if not set yet. | ||
| 370 | - BIO_reset() reinitializes the digest (EVP_DigestInit()) | ||
| 371 | and passes the reset to the underlying BIOs. | ||
| 372 | All data read or written via BIO_read() or BIO_write() to | ||
| 373 | this BIO will be added to the calculated digest. This | ||
| 374 | implies that this BIO is only one directional. If read and | ||
| 375 | write operations are performed, two separate BIO_f_md() BIOs | ||
| 376 | are reuqired to generate digests on both the input and the | ||
| 377 | output. BIO_gets(BIO *bio, char *md, int size) will place the | ||
| 378 | generated digest into 'md' and return the number of bytes. | ||
| 379 | The EVP_MAX_MD_SIZE should probably be used to size the 'md' | ||
| 380 | array. Reading the digest will also reset it. | ||
| 381 | |||
| 382 | BIO_METHOD *BIO_f_cipher(void); | ||
| 383 | - BIO_reset() reinitializes the cipher. | ||
| 384 | - BIO_flush() should be called when the last bytes have been | ||
| 385 | output to flush the final block of block ciphers. | ||
| 386 | - BIO_get_cipher_status(BIO *b), when called after the last | ||
| 387 | read from a cipher BIO, returns non-zero if the data | ||
| 388 | decrypted correctly, otherwise, 0. | ||
| 389 | - BIO_set_cipher(BIO *b, EVP_CIPHER *c, unsigned char *key, | ||
| 390 | unsigned char *iv, int encrypt) This function is used to | ||
| 391 | setup a cipher BIO. The length of key and iv are | ||
| 392 | specified by the choice of EVP_CIPHER. Encrypt is 1 to | ||
| 393 | encrypt and 0 to decrypt. | ||
| 394 | |||
| 395 | BIO_METHOD *BIO_f_base64(void); | ||
| 396 | - BIO_flush() should be called when the last bytes have been output. | ||
| 397 | This BIO base64 encodes when writing and base64 decodes when | ||
| 398 | reading. It will scan the input until a suitable begin line | ||
| 399 | is found. After reading data, BIO_reset() will reset the | ||
| 400 | BIO to start scanning again. Do not mix reading and writing | ||
| 401 | on the same base64 BIO. It is meant as a single stream BIO. | ||
| 402 | |||
| 403 | Directions type | ||
| 404 | both BIO_s_mem() | ||
| 405 | one/both BIO_s_file() | ||
| 406 | both BIO_s_fd() | ||
| 407 | both BIO_s_socket() | ||
| 408 | both BIO_s_null() | ||
| 409 | both BIO_f_buffer() | ||
| 410 | one BIO_f_md() | ||
| 411 | one BIO_f_cipher() | ||
| 412 | one BIO_f_base64() | ||
| 413 | both BIO_f_ssl() | ||
| 414 | |||
| 415 | It is easy to mix one and two directional BIOs, all one has | ||
| 416 | to do is to keep two separate BIO pointers for reading and | ||
| 417 | writing and be careful about usage of underlying BIOs. The | ||
| 418 | SSL bio by it's very nature has to be two directional but | ||
| 419 | the BIO_push() command will push the one BIO into the SSL | ||
| 420 | BIO for both reading and writing. | ||
| 421 | |||
| 422 | The best example program to look at is apps/enc.c and/or perhaps apps/dgst.c. | ||
| 423 | |||
diff --git a/src/lib/libssl/src/doc/blowfish.doc b/src/lib/libssl/src/doc/blowfish.doc new file mode 100644 index 0000000000..8a7f425b32 --- /dev/null +++ b/src/lib/libssl/src/doc/blowfish.doc | |||
| @@ -0,0 +1,146 @@ | |||
| 1 | The Blowfish library. | ||
| 2 | |||
| 3 | Blowfish is a block cipher that operates on 64bit (8 byte) quantities. It | ||
| 4 | uses variable size key, but 128bit (16 byte) key would normally be considered | ||
| 5 | good. It can be used in all the modes that DES can be used. This | ||
| 6 | library implements the ecb, cbc, cfb64, ofb64 modes. | ||
| 7 | |||
| 8 | Blowfish is quite a bit faster that DES, and much faster than IDEA or | ||
| 9 | RC2. It is one of the faster block ciphers. | ||
| 10 | |||
| 11 | For all calls that have an 'input' and 'output' variables, they can be the | ||
| 12 | same. | ||
| 13 | |||
| 14 | This library requires the inclusion of 'blowfish.h'. | ||
| 15 | |||
| 16 | All of the encryption functions take what is called an BF_KEY as an | ||
| 17 | argument. An BF_KEY is an expanded form of the Blowfish key. | ||
| 18 | For all modes of the Blowfish algorithm, the BF_KEY used for | ||
| 19 | decryption is the same one that was used for encryption. | ||
| 20 | |||
| 21 | The define BF_ENCRYPT is passed to specify encryption for the functions | ||
| 22 | that require an encryption/decryption flag. BF_DECRYPT is passed to | ||
| 23 | specify decryption. | ||
| 24 | |||
| 25 | Please note that any of the encryption modes specified in my DES library | ||
| 26 | could be used with Blowfish. I have only implemented ecb, cbc, cfb64 and | ||
| 27 | ofb64 for the following reasons. | ||
| 28 | - ecb is the basic Blowfish encryption. | ||
| 29 | - cbc is the normal 'chaining' form for block ciphers. | ||
| 30 | - cfb64 can be used to encrypt single characters, therefore input and output | ||
| 31 | do not need to be a multiple of 8. | ||
| 32 | - ofb64 is similar to cfb64 but is more like a stream cipher, not as | ||
| 33 | secure (not cipher feedback) but it does not have an encrypt/decrypt mode. | ||
| 34 | - If you want triple Blowfish, thats 384 bits of key and you must be totally | ||
| 35 | obsessed with security. Still, if you want it, it is simple enough to | ||
| 36 | copy the function from the DES library and change the des_encrypt to | ||
| 37 | BF_encrypt; an exercise left for the paranoid reader :-). | ||
| 38 | |||
| 39 | The functions are as follows: | ||
| 40 | |||
| 41 | void BF_set_key( | ||
| 42 | BF_KEY *ks; | ||
| 43 | int len; | ||
| 44 | unsigned char *key; | ||
| 45 | BF_set_key converts an 'len' byte key into a BF_KEY. | ||
| 46 | A 'ks' is an expanded form of the 'key' which is used to | ||
| 47 | perform actual encryption. It can be regenerated from the Blowfish key | ||
| 48 | so it only needs to be kept when encryption or decryption is about | ||
| 49 | to occur. Don't save or pass around BF_KEY's since they | ||
| 50 | are CPU architecture dependent, 'key's are not. Blowfish is an | ||
| 51 | interesting cipher in that it can be used with a variable length | ||
| 52 | key. 'len' is the length of 'key' to be used as the key. | ||
| 53 | A 'len' of 16 is recomended by me, but blowfish can use upto | ||
| 54 | 72 bytes. As a warning, blowfish has a very very slow set_key | ||
| 55 | function, it actually runs BF_encrypt 521 times. | ||
| 56 | |||
| 57 | void BF_encrypt(unsigned long *data, BF_KEY *key); | ||
| 58 | void BF_decrypt(unsigned long *data, BF_KEY *key); | ||
| 59 | These are the Blowfish encryption function that gets called by just | ||
| 60 | about every other Blowfish routine in the library. You should not | ||
| 61 | use this function except to implement 'modes' of Blowfish. | ||
| 62 | I say this because the | ||
| 63 | functions that call this routine do the conversion from 'char *' to | ||
| 64 | long, and this needs to be done to make sure 'non-aligned' memory | ||
| 65 | access do not occur. | ||
| 66 | Data is a pointer to 2 unsigned long's and key is the | ||
| 67 | BF_KEY to use. | ||
| 68 | |||
| 69 | void BF_ecb_encrypt( | ||
| 70 | unsigned char *in, | ||
| 71 | unsigned char *out, | ||
| 72 | BF_KEY *key, | ||
| 73 | int encrypt); | ||
| 74 | This is the basic Electronic Code Book form of Blowfish (in DES this | ||
| 75 | mode is called Electronic Code Book so I'm going to use the term | ||
| 76 | for blowfish as well. | ||
| 77 | Input is encrypted into output using the key represented by | ||
| 78 | key. Depending on the encrypt, encryption or | ||
| 79 | decryption occurs. Input is 8 bytes long and output is 8 bytes. | ||
| 80 | |||
| 81 | void BF_cbc_encrypt( | ||
| 82 | unsigned char *in, | ||
| 83 | unsigned char *out, | ||
| 84 | long length, | ||
| 85 | BF_KEY *ks, | ||
| 86 | unsigned char *ivec, | ||
| 87 | int encrypt); | ||
| 88 | This routine implements Blowfish in Cipher Block Chaining mode. | ||
| 89 | Input, which should be a multiple of 8 bytes is encrypted | ||
| 90 | (or decrypted) to output which will also be a multiple of 8 bytes. | ||
| 91 | The number of bytes is in length (and from what I've said above, | ||
| 92 | should be a multiple of 8). If length is not a multiple of 8, bad | ||
| 93 | things will probably happen. ivec is the initialisation vector. | ||
| 94 | This function updates iv after each call so that it can be passed to | ||
| 95 | the next call to BF_cbc_encrypt(). | ||
| 96 | |||
| 97 | void BF_cfb64_encrypt( | ||
| 98 | unsigned char *in, | ||
| 99 | unsigned char *out, | ||
| 100 | long length, | ||
| 101 | BF_KEY *schedule, | ||
| 102 | unsigned char *ivec, | ||
| 103 | int *num, | ||
| 104 | int encrypt); | ||
| 105 | This is one of the more useful functions in this Blowfish library, it | ||
| 106 | implements CFB mode of Blowfish with 64bit feedback. | ||
| 107 | This allows you to encrypt an arbitrary number of bytes, | ||
| 108 | you do not require 8 byte padding. Each call to this | ||
| 109 | routine will encrypt the input bytes to output and then update ivec | ||
| 110 | and num. Num contains 'how far' we are though ivec. | ||
| 111 | 'Encrypt' is used to indicate encryption or decryption. | ||
| 112 | CFB64 mode operates by using the cipher to generate a stream | ||
| 113 | of bytes which is used to encrypt the plain text. | ||
| 114 | The cipher text is then encrypted to generate the next 64 bits to | ||
| 115 | be xored (incrementally) with the next 64 bits of plain | ||
| 116 | text. As can be seen from this, to encrypt or decrypt, | ||
| 117 | the same 'cipher stream' needs to be generated but the way the next | ||
| 118 | block of data is gathered for encryption is different for | ||
| 119 | encryption and decryption. | ||
| 120 | |||
| 121 | void BF_ofb64_encrypt( | ||
| 122 | unsigned char *in, | ||
| 123 | unsigned char *out, | ||
| 124 | long length, | ||
| 125 | BF_KEY *schedule, | ||
| 126 | unsigned char *ivec, | ||
| 127 | int *num); | ||
| 128 | This functions implements OFB mode of Blowfish with 64bit feedback. | ||
| 129 | This allows you to encrypt an arbitrary number of bytes, | ||
| 130 | you do not require 8 byte padding. Each call to this | ||
| 131 | routine will encrypt the input bytes to output and then update ivec | ||
| 132 | and num. Num contains 'how far' we are though ivec. | ||
| 133 | This is in effect a stream cipher, there is no encryption or | ||
| 134 | decryption mode. | ||
| 135 | |||
| 136 | For reading passwords, I suggest using des_read_pw_string() from my DES library. | ||
| 137 | To generate a password from a text string, I suggest using MD5 (or MD2) to | ||
| 138 | produce a 16 byte message digest that can then be passed directly to | ||
| 139 | BF_set_key(). | ||
| 140 | |||
| 141 | ===== | ||
| 142 | For more information about the specific Blowfish modes in this library | ||
| 143 | (ecb, cbc, cfb and ofb), read the section entitled 'Modes of DES' from the | ||
| 144 | documentation on my DES library. What is said about DES is directly | ||
| 145 | applicable for Blowfish. | ||
| 146 | |||
diff --git a/src/lib/libssl/src/doc/bn.doc b/src/lib/libssl/src/doc/bn.doc new file mode 100644 index 0000000000..47be23b6ea --- /dev/null +++ b/src/lib/libssl/src/doc/bn.doc | |||
| @@ -0,0 +1,381 @@ | |||
| 1 | The Big Number library. | ||
| 2 | |||
| 3 | #include "bn.h" when using this library. | ||
| 4 | |||
| 5 | This big number library was written for use in implementing the RSA and DH | ||
| 6 | public key encryption algorithms. As such, features such as negative | ||
| 7 | numbers have not been extensively tested but they should work as expected. | ||
| 8 | This library uses dynamic memory allocation for storing its data structures | ||
| 9 | and so there are no limit on the size of the numbers manipulated by these | ||
| 10 | routines but there is always the requirement to check return codes from | ||
| 11 | functions just in case a memory allocation error has occurred. | ||
| 12 | |||
| 13 | The basic object in this library is a BIGNUM. It is used to hold a single | ||
| 14 | large integer. This type should be considered opaque and fields should not | ||
| 15 | be modified or accessed directly. | ||
| 16 | typedef struct bignum_st | ||
| 17 | { | ||
| 18 | int top; /* Index of last used d. */ | ||
| 19 | BN_ULONG *d; /* Pointer to an array of 'BITS2' bit chunks. */ | ||
| 20 | int max; /* Size of the d array. */ | ||
| 21 | int neg; | ||
| 22 | } BIGNUM; | ||
| 23 | The big number is stored in a malloced array of BN_ULONG's. A BN_ULONG can | ||
| 24 | be either 16, 32 or 64 bits in size, depending on the 'number of bits' | ||
| 25 | specified in bn.h. | ||
| 26 | The 'd' field is this array. 'max' is the size of the 'd' array that has | ||
| 27 | been allocated. 'top' is the 'last' entry being used, so for a value of 4, | ||
| 28 | bn.d[0]=4 and bn.top=1. 'neg' is 1 if the number is negative. | ||
| 29 | When a BIGNUM is '0', the 'd' field can be NULL and top == 0. | ||
| 30 | |||
| 31 | Various routines in this library require the use of 'temporary' BIGNUM | ||
| 32 | variables during their execution. Due to the use of dynamic memory | ||
| 33 | allocation to create BIGNUMs being rather expensive when used in | ||
| 34 | conjunction with repeated subroutine calls, the BN_CTX structure is | ||
| 35 | used. This structure contains BN_CTX BIGNUMs. BN_CTX | ||
| 36 | is the maximum number of temporary BIGNUMs any publicly exported | ||
| 37 | function will use. | ||
| 38 | |||
| 39 | #define BN_CTX 12 | ||
| 40 | typedef struct bignum_ctx | ||
| 41 | { | ||
| 42 | int tos; /* top of stack */ | ||
| 43 | BIGNUM *bn[BN_CTX]; /* The variables */ | ||
| 44 | } BN_CTX; | ||
| 45 | |||
| 46 | The functions that follow have been grouped according to function. Most | ||
| 47 | arithmetic functions return a result in the first argument, sometimes this | ||
| 48 | first argument can also be an input parameter, sometimes it cannot. These | ||
| 49 | restrictions are documented. | ||
| 50 | |||
| 51 | extern BIGNUM *BN_value_one; | ||
| 52 | There is one variable defined by this library, a BIGNUM which contains the | ||
| 53 | number 1. This variable is useful for use in comparisons and assignment. | ||
| 54 | |||
| 55 | Get Size functions. | ||
| 56 | |||
| 57 | int BN_num_bits(BIGNUM *a); | ||
| 58 | This function returns the size of 'a' in bits. | ||
| 59 | |||
| 60 | int BN_num_bytes(BIGNUM *a); | ||
| 61 | This function (macro) returns the size of 'a' in bytes. | ||
| 62 | For conversion of BIGNUMs to byte streams, this is the number of | ||
| 63 | bytes the output string will occupy. If the output byte | ||
| 64 | format specifies that the 'top' bit indicates if the number is | ||
| 65 | signed, so an extra '0' byte is required if the top bit on a | ||
| 66 | positive number is being written, it is upto the application to | ||
| 67 | make this adjustment. Like I said at the start, I don't | ||
| 68 | really support negative numbers :-). | ||
| 69 | |||
| 70 | Creation/Destruction routines. | ||
| 71 | |||
| 72 | BIGNUM *BN_new(); | ||
| 73 | Return a new BIGNUM object. The number initially has a value of 0. If | ||
| 74 | there is an error, NULL is returned. | ||
| 75 | |||
| 76 | void BN_free(BIGNUM *a); | ||
| 77 | Free()s a BIGNUM. | ||
| 78 | |||
| 79 | void BN_clear(BIGNUM *a); | ||
| 80 | Sets 'a' to a value of 0 and also zeros all unused allocated | ||
| 81 | memory. This function is used to clear a variable of 'sensitive' | ||
| 82 | data that was held in it. | ||
| 83 | |||
| 84 | void BN_clear_free(BIGNUM *a); | ||
| 85 | This function zeros the memory used by 'a' and then free()'s it. | ||
| 86 | This function should be used to BN_free() BIGNUMS that have held | ||
| 87 | sensitive numeric values like RSA private key values. Both this | ||
| 88 | function and BN_clear tend to only be used by RSA and DH routines. | ||
| 89 | |||
| 90 | BN_CTX *BN_CTX_new(void); | ||
| 91 | Returns a new BN_CTX. NULL on error. | ||
| 92 | |||
| 93 | void BN_CTX_free(BN_CTX *c); | ||
| 94 | Free a BN_CTX structure. The BIGNUMs in 'c' are BN_clear_free()ed. | ||
| 95 | |||
| 96 | BIGNUM *bn_expand(BIGNUM *b, int bits); | ||
| 97 | This is an internal function that should not normally be used. It | ||
| 98 | ensures that 'b' has enough room for a 'bits' bit number. It is | ||
| 99 | mostly used by the various BIGNUM routines. If there is an error, | ||
| 100 | NULL is returned. if not, 'b' is returned. | ||
| 101 | |||
| 102 | BIGNUM *BN_copy(BIGNUM *to, BIGNUM *from); | ||
| 103 | The 'from' is copied into 'to'. NULL is returned if there is an | ||
| 104 | error, otherwise 'to' is returned. | ||
| 105 | |||
| 106 | BIGNUM *BN_dup(BIGNUM *a); | ||
| 107 | A new BIGNUM is created and returned containing the value of 'a'. | ||
| 108 | NULL is returned on error. | ||
| 109 | |||
| 110 | Comparison and Test Functions. | ||
| 111 | |||
| 112 | int BN_is_zero(BIGNUM *a) | ||
| 113 | Return 1 if 'a' is zero, else 0. | ||
| 114 | |||
| 115 | int BN_is_one(a) | ||
| 116 | Return 1 is 'a' is one, else 0. | ||
| 117 | |||
| 118 | int BN_is_word(a,w) | ||
| 119 | Return 1 if 'a' == w, else 0. 'w' is a BN_ULONG. | ||
| 120 | |||
| 121 | int BN_cmp(BIGNUM *a, BIGNUM *b); | ||
| 122 | Return -1 if 'a' is less than 'b', 0 if 'a' and 'b' are the same | ||
| 123 | and 1 is 'a' is greater than 'b'. This is a signed comparison. | ||
| 124 | |||
| 125 | int BN_ucmp(BIGNUM *a, BIGNUM *b); | ||
| 126 | This function is the same as BN_cmp except that the comparison | ||
| 127 | ignores the sign of the numbers. | ||
| 128 | |||
| 129 | Arithmetic Functions | ||
| 130 | For all of these functions, 0 is returned if there is an error and 1 is | ||
| 131 | returned for success. The return value should always be checked. eg. | ||
| 132 | if (!BN_add(r,a,b)) goto err; | ||
| 133 | Unless explicitly mentioned, the 'return' value can be one of the | ||
| 134 | 'parameters' to the function. | ||
| 135 | |||
| 136 | int BN_add(BIGNUM *r, BIGNUM *a, BIGNUM *b); | ||
| 137 | Add 'a' and 'b' and return the result in 'r'. This is r=a+b. | ||
| 138 | |||
| 139 | int BN_sub(BIGNUM *r, BIGNUM *a, BIGNUM *b); | ||
| 140 | Subtract 'a' from 'b' and put the result in 'r'. This is r=a-b. | ||
| 141 | |||
| 142 | int BN_lshift(BIGNUM *r, BIGNUM *a, int n); | ||
| 143 | Shift 'a' left by 'n' bits. This is r=a*(2^n). | ||
| 144 | |||
| 145 | int BN_lshift1(BIGNUM *r, BIGNUM *a); | ||
| 146 | Shift 'a' left by 1 bit. This form is more efficient than | ||
| 147 | BN_lshift(r,a,1). This is r=a*2. | ||
| 148 | |||
| 149 | int BN_rshift(BIGNUM *r, BIGNUM *a, int n); | ||
| 150 | Shift 'a' right by 'n' bits. This is r=int(a/(2^n)). | ||
| 151 | |||
| 152 | int BN_rshift1(BIGNUM *r, BIGNUM *a); | ||
| 153 | Shift 'a' right by 1 bit. This form is more efficient than | ||
| 154 | BN_rshift(r,a,1). This is r=int(a/2). | ||
| 155 | |||
| 156 | int BN_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b); | ||
| 157 | Multiply a by b and return the result in 'r'. 'r' must not be | ||
| 158 | either 'a' or 'b'. It has to be a different BIGNUM. | ||
| 159 | This is r=a*b. | ||
| 160 | |||
| 161 | int BN_sqr(BIGNUM *r, BIGNUM *a, BN_CTX *ctx); | ||
| 162 | Multiply a by a and return the result in 'r'. 'r' must not be | ||
| 163 | 'a'. This function is alot faster than BN_mul(r,a,a). This is r=a*a. | ||
| 164 | |||
| 165 | int BN_div(BIGNUM *dv, BIGNUM *rem, BIGNUM *m, BIGNUM *d, BN_CTX *ctx); | ||
| 166 | Divide 'm' by 'd' and return the result in 'dv' and the remainder | ||
| 167 | in 'rem'. Either of 'dv' or 'rem' can be NULL in which case that | ||
| 168 | value is not returned. 'ctx' needs to be passed as a source of | ||
| 169 | temporary BIGNUM variables. | ||
| 170 | This is dv=int(m/d), rem=m%d. | ||
| 171 | |||
| 172 | int BN_mod(BIGNUM *rem, BIGNUM *m, BIGNUM *d, BN_CTX *ctx); | ||
| 173 | Find the remainder of 'm' divided by 'd' and return it in 'rem'. | ||
| 174 | 'ctx' holds the temporary BIGNUMs required by this function. | ||
| 175 | This function is more efficient than BN_div(NULL,rem,m,d,ctx); | ||
| 176 | This is rem=m%d. | ||
| 177 | |||
| 178 | int BN_mod_mul(BIGNUM *r, BIGNUM *a, BIGNUM *b, BIGNUM *m,BN_CTX *ctx); | ||
| 179 | Multiply 'a' by 'b' and return the remainder when divided by 'm'. | ||
| 180 | 'ctx' holds the temporary BIGNUMs required by this function. | ||
| 181 | This is r=(a*b)%m. | ||
| 182 | |||
| 183 | int BN_mod_exp(BIGNUM *r, BIGNUM *a, BIGNUM *p, BIGNUM *m,BN_CTX *ctx); | ||
| 184 | Raise 'a' to the 'p' power and return the remainder when divided by | ||
| 185 | 'm'. 'ctx' holds the temporary BIGNUMs required by this function. | ||
| 186 | This is r=(a^p)%m. | ||
| 187 | |||
| 188 | int BN_reciprocal(BIGNUM *r, BIGNUM *m, BN_CTX *ctx); | ||
| 189 | Return the reciprocal of 'm'. 'ctx' holds the temporary variables | ||
| 190 | required. This function returns -1 on error, otherwise it returns | ||
| 191 | the number of bits 'r' is shifted left to make 'r' into an integer. | ||
| 192 | This number of bits shifted is required in BN_mod_mul_reciprocal(). | ||
| 193 | This is r=(1/m)<<(BN_num_bits(m)+1). | ||
| 194 | |||
| 195 | int BN_mod_mul_reciprocal(BIGNUM *r, BIGNUM *x, BIGNUM *y, BIGNUM *m, | ||
| 196 | BIGNUM *i, int nb, BN_CTX *ctx); | ||
| 197 | This function is used to perform an efficient BN_mod_mul() | ||
| 198 | operation. If one is going to repeatedly perform BN_mod_mul() with | ||
| 199 | the same modulus is worth calculating the reciprocal of the modulus | ||
| 200 | and then using this function. This operation uses the fact that | ||
| 201 | a/b == a*r where r is the reciprocal of b. On modern computers | ||
| 202 | multiplication is very fast and big number division is very slow. | ||
| 203 | 'x' is multiplied by 'y' and then divided by 'm' and the remainder | ||
| 204 | is returned. 'i' is the reciprocal of 'm' and 'nb' is the number | ||
| 205 | of bits as returned from BN_reciprocal(). Normal usage is as follows. | ||
| 206 | bn=BN_reciprocal(i,m); | ||
| 207 | for (...) | ||
| 208 | { BN_mod_mul_reciprocal(r,x,y,m,i,bn,ctx); } | ||
| 209 | This is r=(x*y)%m. Internally it is approximately | ||
| 210 | r=(x*y)-m*(x*y/m) or r=(x*y)-m*((x*y*i) >> bn) | ||
| 211 | This function is used in BN_mod_exp() and BN_is_prime(). | ||
| 212 | |||
| 213 | Assignment Operations | ||
| 214 | |||
| 215 | int BN_one(BIGNUM *a) | ||
| 216 | Set 'a' to hold the value one. | ||
| 217 | This is a=1. | ||
| 218 | |||
| 219 | int BN_zero(BIGNUM *a) | ||
| 220 | Set 'a' to hold the value zero. | ||
| 221 | This is a=0. | ||
| 222 | |||
| 223 | int BN_set_word(BIGNUM *a, unsigned long w); | ||
| 224 | Set 'a' to hold the value of 'w'. 'w' is an unsigned long. | ||
| 225 | This is a=w. | ||
| 226 | |||
| 227 | unsigned long BN_get_word(BIGNUM *a); | ||
| 228 | Returns 'a' in an unsigned long. Not remarkably, often 'a' will | ||
| 229 | be biger than a word, in which case 0xffffffffL is returned. | ||
| 230 | |||
| 231 | Word Operations | ||
| 232 | These functions are much more efficient that the normal bignum arithmetic | ||
| 233 | operations. | ||
| 234 | |||
| 235 | BN_ULONG BN_mod_word(BIGNUM *a, unsigned long w); | ||
| 236 | Return the remainder of 'a' divided by 'w'. | ||
| 237 | This is return(a%w). | ||
| 238 | |||
| 239 | int BN_add_word(BIGNUM *a, unsigned long w); | ||
| 240 | Add 'w' to 'a'. This function does not take the sign of 'a' into | ||
| 241 | account. This is a+=w; | ||
| 242 | |||
| 243 | Bit operations. | ||
| 244 | |||
| 245 | int BN_is_bit_set(BIGNUM *a, int n); | ||
| 246 | This function return 1 if bit 'n' is set in 'a' else 0. | ||
| 247 | |||
| 248 | int BN_set_bit(BIGNUM *a, int n); | ||
| 249 | This function sets bit 'n' to 1 in 'a'. | ||
| 250 | This is a&= ~(1<<n); | ||
| 251 | |||
| 252 | int BN_clear_bit(BIGNUM *a, int n); | ||
| 253 | This function sets bit 'n' to zero in 'a'. Return 0 if less | ||
| 254 | than 'n' bits in 'a' else 1. This is a&= ~(1<<n); | ||
| 255 | |||
| 256 | int BN_mask_bits(BIGNUM *a, int n); | ||
| 257 | Truncate 'a' to n bits long. This is a&= ~((~0)<<n) | ||
| 258 | |||
| 259 | Format conversion routines. | ||
| 260 | |||
| 261 | BIGNUM *BN_bin2bn(unsigned char *s, int len,BIGNUM *ret); | ||
| 262 | This function converts 'len' bytes in 's' into a BIGNUM which | ||
| 263 | is put in 'ret'. If ret is NULL, a new BIGNUM is created. | ||
| 264 | Either this new BIGNUM or ret is returned. The number is | ||
| 265 | assumed to be in bigendian form in 's'. By this I mean that | ||
| 266 | to 'ret' is created as follows for 'len' == 5. | ||
| 267 | ret = s[0]*2^32 + s[1]*2^24 + s[2]*2^16 + s[3]*2^8 + s[4]; | ||
| 268 | This function cannot be used to convert negative numbers. It | ||
| 269 | is always assumed the number is positive. The application | ||
| 270 | needs to diddle the 'neg' field of th BIGNUM its self. | ||
| 271 | The better solution would be to save the numbers in ASN.1 format | ||
| 272 | since this is a defined standard for storing big numbers. | ||
| 273 | Look at the functions | ||
| 274 | |||
| 275 | ASN1_INTEGER *BN_to_ASN1_INTEGER(BIGNUM *bn, ASN1_INTEGER *ai); | ||
| 276 | BIGNUM *ASN1_INTEGER_to_BN(ASN1_INTEGER *ai,BIGNUM *bn); | ||
| 277 | int i2d_ASN1_INTEGER(ASN1_INTEGER *a,unsigned char **pp); | ||
| 278 | ASN1_INTEGER *d2i_ASN1_INTEGER(ASN1_INTEGER **a,unsigned char **pp, | ||
| 279 | long length; | ||
| 280 | |||
| 281 | int BN_bn2bin(BIGNUM *a, unsigned char *to); | ||
| 282 | This function converts 'a' to a byte string which is put into | ||
| 283 | 'to'. The representation is big-endian in that the most | ||
| 284 | significant byte of 'a' is put into to[0]. This function | ||
| 285 | returns the number of bytes used to hold 'a'. BN_num_bytes(a) | ||
| 286 | would return the same value and can be used to determine how | ||
| 287 | large 'to' needs to be. If the number is negative, this | ||
| 288 | information is lost. Since this library was written to | ||
| 289 | manipulate large positive integers, the inability to save and | ||
| 290 | restore them is not considered to be a problem by me :-). | ||
| 291 | As for BN_bin2bn(), look at the ASN.1 integer encoding funtions | ||
| 292 | for SSLeay. They use BN_bin2bn() and BN_bn2bin() internally. | ||
| 293 | |||
| 294 | char *BN_bn2ascii(BIGNUM *a); | ||
| 295 | This function returns a malloc()ed string that contains the | ||
| 296 | ascii hexadecimal encoding of 'a'. The number is in bigendian | ||
| 297 | format with a '-' in front if the number is negative. | ||
| 298 | |||
| 299 | int BN_ascii2bn(BIGNUM **bn, char *a); | ||
| 300 | The inverse of BN_bn2ascii. The function returns the number of | ||
| 301 | characters from 'a' were processed in generating a the bignum. | ||
| 302 | error is inticated by 0 being returned. The number is a | ||
| 303 | hex digit string, optionally with a leading '-'. If *bn | ||
| 304 | is null, a BIGNUM is created and returned via that variable. | ||
| 305 | |||
| 306 | int BN_print_fp(FILE *fp, BIGNUM *a); | ||
| 307 | 'a' is printed to file pointer 'fp'. It is in the same format | ||
| 308 | that is output from BN_bn2ascii(). 0 is returned on error, | ||
| 309 | 1 if things are ok. | ||
| 310 | |||
| 311 | int BN_print(BIO *bp, BIGNUM *a); | ||
| 312 | Same as BN_print except that the output is done to the SSLeay libraries | ||
| 313 | BIO routines. BN_print_fp() actually calls this function. | ||
| 314 | |||
| 315 | Miscellaneous Routines. | ||
| 316 | |||
| 317 | int BN_rand(BIGNUM *rnd, int bits, int top, int bottom); | ||
| 318 | This function returns in 'rnd' a random BIGNUM that is bits | ||
| 319 | long. If bottom is 1, the number returned is odd. If top is set, | ||
| 320 | the top 2 bits of the number are set. This is useful because if | ||
| 321 | this is set, 2 'n; bit numbers multiplied together will return a 2n | ||
| 322 | bit number. If top was not set, they could produce a 2n-1 bit | ||
| 323 | number. | ||
| 324 | |||
| 325 | BIGNUM *BN_mod_inverse(BIGNUM *a, BIGNUM *n,BN_CTX *ctx); | ||
| 326 | This function create a new BIGNUM and returns it. This number | ||
| 327 | is the inverse mod 'n' of 'a'. By this it is meant that the | ||
| 328 | returned value 'r' satisfies (a*r)%n == 1. This function is | ||
| 329 | used in the generation of RSA keys. 'ctx', as per usual, | ||
| 330 | is used to hold temporary variables that are required by the | ||
| 331 | function. NULL is returned on error. | ||
| 332 | |||
| 333 | int BN_gcd(BIGNUM *r,BIGNUM *a,BIGNUM *b,BN_CTX *ctx); | ||
| 334 | 'r' has the greatest common divisor of 'a' and 'b'. 'ctx' is | ||
| 335 | used for temporary variables and 0 is returned on error. | ||
| 336 | |||
| 337 | int BN_is_prime(BIGNUM *p,int nchecks,void (*callback)(),BN_CTX *ctx, | ||
| 338 | char *cb_arg); | ||
| 339 | This function is used to check if a BIGNUM ('p') is prime. | ||
| 340 | It performs this test by using the Miller-Rabin randomised | ||
| 341 | primality test. This is a probalistic test that requires a | ||
| 342 | number of rounds to ensure the number is prime to a high | ||
| 343 | degree of probability. Since this can take quite some time, a | ||
| 344 | callback function can be passed and it will be called each | ||
| 345 | time 'p' passes a round of the prime testing. 'callback' will | ||
| 346 | be called as follows, callback(1,n,cb_arg) where n is the number of | ||
| 347 | the round, just passed. As per usual 'ctx' contains temporary | ||
| 348 | variables used. If ctx is NULL, it does not matter, a local version | ||
| 349 | will be malloced. This parameter is present to save some mallocing | ||
| 350 | inside the function but probably could be removed. | ||
| 351 | 0 is returned on error. | ||
| 352 | 'ncheck' is the number of Miller-Rabin tests to run. It is | ||
| 353 | suggested to use the value 'BN_prime_checks' by default. | ||
| 354 | |||
| 355 | BIGNUM *BN_generate_prime( | ||
| 356 | int bits, | ||
| 357 | int strong, | ||
| 358 | BIGNUM *a, | ||
| 359 | BIGNUM *rems, | ||
| 360 | void (*callback)()); | ||
| 361 | char *cb_arg | ||
| 362 | This function is used to generate prime numbers. It returns a | ||
| 363 | new BIGNUM that has a high probability of being a prime. | ||
| 364 | 'bits' is the number of bits that | ||
| 365 | are to be in the prime. If 'strong' is true, the returned prime | ||
| 366 | will also be a strong prime ((p-1)/2 is also prime). | ||
| 367 | While searching for the prime ('p'), we | ||
| 368 | can add the requirement that the prime fill the following | ||
| 369 | condition p%a == rem. This can be used to help search for | ||
| 370 | primes with specific features, which is required when looking | ||
| 371 | for primes suitable for use with certain 'g' values in the | ||
| 372 | Diffie-Hellman key exchange algorithm. If 'a' is NULL, | ||
| 373 | this condition is not checked. If rem is NULL, rem is assumed | ||
| 374 | to be 1. Since this search for a prime | ||
| 375 | can take quite some time, if callback is not NULL, it is called | ||
| 376 | in the following situations. | ||
| 377 | We have a suspected prime (from a quick sieve), | ||
| 378 | callback(0,sus_prime++,cb_arg). Each item to be passed to BN_is_prime(). | ||
| 379 | callback(1,round++,cb_arg). Each successful 'round' in BN_is_prime(). | ||
| 380 | callback(2,round,cb_arg). For each successful BN_is_prime() test. | ||
| 381 | |||
diff --git a/src/lib/libssl/src/doc/ca.1 b/src/lib/libssl/src/doc/ca.1 new file mode 100644 index 0000000000..5b0c5a198d --- /dev/null +++ b/src/lib/libssl/src/doc/ca.1 | |||
| @@ -0,0 +1,121 @@ | |||
| 1 | From eay@orb.mincom.oz.au Thu Dec 28 23:56:45 1995 | ||
| 2 | Received: by orb.mincom.oz.au id AA07374 | ||
| 3 | (5.65c/IDA-1.4.4 for eay); Thu, 28 Dec 1995 13:56:45 +1000 | ||
| 4 | Date: Thu, 28 Dec 1995 13:56:45 +1000 (EST) | ||
| 5 | From: Eric Young <eay@mincom.oz.au> | ||
| 6 | X-Sender: eay@orb | ||
| 7 | To: sameer <sameer@c2.org> | ||
| 8 | Cc: ssleay@mincom.oz.au | ||
| 9 | Subject: Re: 'ca' | ||
| 10 | In-Reply-To: <199512230440.UAA23410@infinity.c2.org> | ||
| 11 | Message-Id: <Pine.SOL.3.91.951228133525.7269A-100000@orb> | ||
| 12 | Mime-Version: 1.0 | ||
| 13 | Content-Type: TEXT/PLAIN; charset=US-ASCII | ||
| 14 | Status: RO | ||
| 15 | X-Status: | ||
| 16 | |||
| 17 | On Fri, 22 Dec 1995, sameer wrote: | ||
| 18 | > I could use documentation on 'ca'. Thanks. | ||
| 19 | |||
| 20 | Very quickly. | ||
| 21 | The ca program uses the ssleay.conf file for most of its configuration | ||
| 22 | |||
| 23 | ./ca -help | ||
| 24 | |||
| 25 | -verbose - Talk alot while doing things | ||
| 26 | -config file - A config file. If you don't want to use the | ||
| 27 | default config file | ||
| 28 | -name arg - The particular CA definition to use | ||
| 29 | In the config file, the section to use for parameters. This lets | ||
| 30 | multiple setups to be contained in the one file. By default, the | ||
| 31 | default_ca variable is looked up in the [ ca ] section. So in the | ||
| 32 | shipped ssleay.conf, the CA definition used is CA_default. It could be | ||
| 33 | any other name. | ||
| 34 | -gencrl days - Generate a new CRL, days is when the next CRL is due | ||
| 35 | This will generate a new certificate revocion list. | ||
| 36 | -days arg - number of days to certify the certificate for | ||
| 37 | When certifiying certificates, this is the number of days to use. | ||
| 38 | -md arg - md to use, one of md2, md5, sha or sha1 | ||
| 39 | -policy arg - The CA 'policy' to support | ||
| 40 | I'll describe this later, but there are 2 policies definied in the | ||
| 41 | shipped ssleay.conf | ||
| 42 | -keyfile arg - PEM RSA private key file | ||
| 43 | -key arg - key to decode the RSA private key if it is encrypted | ||
| 44 | since we need to keep the CA's RSA key encrypted | ||
| 45 | -cert - The CA certificate | ||
| 46 | -in file - The input PEM encoded certificate request(s) | ||
| 47 | -out file - Where to put the output file(s) | ||
| 48 | -outdir dir - Where to put output certificates | ||
| 49 | The -out options concatinates all the output certificied | ||
| 50 | certificates to one file, -outdir puts them in a directory, | ||
| 51 | named by serial number. | ||
| 52 | -infiles .... - The last argument, requests to process | ||
| 53 | The certificate requests to process, -in is the same. | ||
| 54 | |||
| 55 | Just about all the above have default values defined in ssleay.conf. | ||
| 56 | |||
| 57 | The key variables in ssleay.conf are (for the pariticular '-name' being | ||
| 58 | used, in the default, it is CA_default). | ||
| 59 | |||
| 60 | dir is where all the CA database stuff is kept. | ||
| 61 | certs is where all the previously issued certificates are kept. | ||
| 62 | The database is a simple text database containing the following tab separated | ||
| 63 | fields. | ||
| 64 | status: a value of 'R' - revoked, 'E' -expired or 'V' valid. | ||
| 65 | issued date: When the certificate was certified. | ||
| 66 | revoked date: When it was revoked, blank if not revoked. | ||
| 67 | serial number: The certificate serial number. | ||
| 68 | certificate: Where the certificate is located. | ||
| 69 | CN: The name of the certificate. | ||
| 70 | |||
| 71 | The demo file has quite a few made up values it it. The last 2 were | ||
| 72 | added by the ca program and are acurate. | ||
| 73 | The CA program does not update the 'certificate' file correctly right now. | ||
| 74 | The serial field should be unique as should the CN/status combination. | ||
| 75 | The ca program checks these at startup. What still needs to be | ||
| 76 | wrtten is a program to 'regenerate' the data base file from the issued | ||
| 77 | certificate list (and a CRL list). | ||
| 78 | |||
| 79 | Back to the CA_default variables. | ||
| 80 | |||
| 81 | Most of the variables are commented. | ||
| 82 | |||
| 83 | policy is the default policy. | ||
| 84 | |||
| 85 | Ok for policies, they define the order and which fields must be present | ||
| 86 | in the certificate request and what gets filled in. | ||
| 87 | |||
| 88 | So a value of | ||
| 89 | countryName = match | ||
| 90 | means that the country name must match the CA certificate. | ||
| 91 | organizationalUnitName = optional | ||
| 92 | The org.Unit,Name does not have to be present and | ||
| 93 | commonName = supplied | ||
| 94 | commonName must be supplied in the certificate request. | ||
| 95 | |||
| 96 | For the 'policy_match' polocy, the order of the attributes in the | ||
| 97 | generated certiticate would be | ||
| 98 | countryName | ||
| 99 | stateOrProvinceName | ||
| 100 | organizationName | ||
| 101 | organizationalUnitName | ||
| 102 | commonName | ||
| 103 | emailAddress | ||
| 104 | |||
| 105 | Have a play, it sort of makes sense. If you think about how the persona | ||
| 106 | requests operate, it is similar to the 'policy_match' policy and the | ||
| 107 | 'policy_anything' is similar to what versign is doing. | ||
| 108 | |||
| 109 | I hope this helps a bit. Some backend scripts are definitly needed to | ||
| 110 | update the database and to make certificate revocion easy. All | ||
| 111 | certificates issued should also be kept forever (or until they expire?) | ||
| 112 | |||
| 113 | hope this helps | ||
| 114 | eric (who has to run off an buy some cheap knee pads for the caving in 4 | ||
| 115 | days time :-) | ||
| 116 | |||
| 117 | -- | ||
| 118 | Eric Young | Signature removed since it was generating | ||
| 119 | AARNet: eay@mincom.oz.au | more followups than the message contents :-) | ||
| 120 | |||
| 121 | |||
diff --git a/src/lib/libssl/src/doc/callback.doc b/src/lib/libssl/src/doc/callback.doc new file mode 100644 index 0000000000..7ad0f7f7d2 --- /dev/null +++ b/src/lib/libssl/src/doc/callback.doc | |||
| @@ -0,0 +1,240 @@ | |||
| 1 | Callback functions used in SSLeay. | ||
| 2 | |||
| 3 | -------------------------- | ||
| 4 | The BIO library. | ||
| 5 | |||
| 6 | Each BIO structure can have a callback defined against it. This callback is | ||
| 7 | called 2 times for each BIO 'function'. It is passed 6 parameters. | ||
| 8 | BIO_debug_callback() is an example callback which is defined in | ||
| 9 | crypto/buffer/bio_cb.c and is used in apps/dgst.c This is intended mostly | ||
| 10 | for debuging or to notify the application of IO. | ||
| 11 | |||
| 12 | long BIO_debug_callback(BIO *bio,int cmd,char *argp,int argi,long argl, | ||
| 13 | long ret); | ||
| 14 | bio is the BIO being called, cmd is the type of BIO function being called. | ||
| 15 | Look at the BIO_CB_* defines in buffer.h. Argp and argi are the arguments | ||
| 16 | passed to BIO_read(), BIO_write, BIO_gets(), BIO_puts(). In the case of | ||
| 17 | BIO_ctrl(), argl is also defined. The first time the callback is called, | ||
| 18 | before the underlying function has been executed, 0 is passed as 'ret', and | ||
| 19 | if the return code from the callback is not > 0, the call is aborted | ||
| 20 | and the returned <= 0 value is returned. | ||
| 21 | The second time the callback is called, the 'cmd' value also has | ||
| 22 | BIO_CB_RETURN logically 'or'ed with it. The 'ret' value is the value returned | ||
| 23 | from the actuall function call and whatever the callback returns is returned | ||
| 24 | from the BIO function. | ||
| 25 | |||
| 26 | BIO_set_callback(b,cb) can be used to set the callback function | ||
| 27 | (b is a BIO), and BIO_set_callback_arg(b,arg) can be used to | ||
| 28 | set the cb_arg argument in the BIO strucutre. This field is only intended | ||
| 29 | to be used by application, primarily in the callback function since it is | ||
| 30 | accessable since the BIO is passed. | ||
| 31 | |||
| 32 | -------------------------- | ||
| 33 | The PEM library. | ||
| 34 | |||
| 35 | The pem library only really uses one type of callback, | ||
| 36 | static int def_callback(char *buf, int num, int verify); | ||
| 37 | which is used to return a password string if required. | ||
| 38 | 'buf' is the buffer to put the string in. 'num' is the size of 'buf' | ||
| 39 | and 'verify' is used to indicate that the password should be checked. | ||
| 40 | This last flag is mostly used when reading a password for encryption. | ||
| 41 | |||
| 42 | For all of these functions, a NULL callback will call the above mentioned | ||
| 43 | default callback. This default function does not work under Windows 3.1. | ||
| 44 | For other machines, it will use an application defined prompt string | ||
| 45 | (EVP_set_pw_prompt(), which defines a library wide prompt string) | ||
| 46 | if defined, otherwise it will use it's own PEM password prompt. | ||
| 47 | It will then call EVP_read_pw_string() to get a password from the console. | ||
| 48 | If your application wishes to use nice fancy windows to retrieve passwords, | ||
| 49 | replace this function. The callback should return the number of bytes read | ||
| 50 | into 'buf'. If the number of bytes <= 0, it is considered an error. | ||
| 51 | |||
| 52 | Functions that take this callback are listed below. For the 'read' type | ||
| 53 | functions, the callback will only be required if the PEM data is encrypted. | ||
| 54 | |||
| 55 | For the Write functions, normally a password can be passed in 'kstr', of | ||
| 56 | 'klen' bytes which will be used if the 'enc' cipher is not NULL. If | ||
| 57 | 'kstr' is NULL, the callback will be used to retrieve a password. | ||
| 58 | |||
| 59 | int PEM_do_header (EVP_CIPHER_INFO *cipher, unsigned char *data,long *len, | ||
| 60 | int (*callback)()); | ||
| 61 | char *PEM_ASN1_read_bio(char *(*d2i)(),char *name,BIO *bp,char **x,int (*cb)()); | ||
| 62 | char *PEM_ASN1_read(char *(*d2i)(),char *name,FILE *fp,char **x,int (*cb)()); | ||
| 63 | int PEM_ASN1_write_bio(int (*i2d)(),char *name,BIO *bp,char *x, | ||
| 64 | EVP_CIPHER *enc,unsigned char *kstr,int klen,int (*callback)()); | ||
| 65 | int PEM_ASN1_write(int (*i2d)(),char *name,FILE *fp,char *x, | ||
| 66 | EVP_CIPHER *enc,unsigned char *kstr,int klen,int (*callback)()); | ||
| 67 | STACK *PEM_X509_INFO_read(FILE *fp, STACK *sk, int (*cb)()); | ||
| 68 | STACK *PEM_X509_INFO_read_bio(BIO *fp, STACK *sk, int (*cb)()); | ||
| 69 | |||
| 70 | #define PEM_write_RSAPrivateKey(fp,x,enc,kstr,klen,cb) | ||
| 71 | #define PEM_write_DSAPrivateKey(fp,x,enc,kstr,klen,cb) | ||
| 72 | #define PEM_write_bio_RSAPrivateKey(bp,x,enc,kstr,klen,cb) | ||
| 73 | #define PEM_write_bio_DSAPrivateKey(bp,x,enc,kstr,klen,cb) | ||
| 74 | #define PEM_read_SSL_SESSION(fp,x,cb) | ||
| 75 | #define PEM_read_X509(fp,x,cb) | ||
| 76 | #define PEM_read_X509_REQ(fp,x,cb) | ||
| 77 | #define PEM_read_X509_CRL(fp,x,cb) | ||
| 78 | #define PEM_read_RSAPrivateKey(fp,x,cb) | ||
| 79 | #define PEM_read_DSAPrivateKey(fp,x,cb) | ||
| 80 | #define PEM_read_PrivateKey(fp,x,cb) | ||
| 81 | #define PEM_read_PKCS7(fp,x,cb) | ||
| 82 | #define PEM_read_DHparams(fp,x,cb) | ||
| 83 | #define PEM_read_bio_SSL_SESSION(bp,x,cb) | ||
| 84 | #define PEM_read_bio_X509(bp,x,cb) | ||
| 85 | #define PEM_read_bio_X509_REQ(bp,x,cb) | ||
| 86 | #define PEM_read_bio_X509_CRL(bp,x,cb) | ||
| 87 | #define PEM_read_bio_RSAPrivateKey(bp,x,cb) | ||
| 88 | #define PEM_read_bio_DSAPrivateKey(bp,x,cb) | ||
| 89 | #define PEM_read_bio_PrivateKey(bp,x,cb) | ||
| 90 | #define PEM_read_bio_PKCS7(bp,x,cb) | ||
| 91 | #define PEM_read_bio_DHparams(bp,x,cb) | ||
| 92 | int i2d_Netscape_RSA(RSA *a, unsigned char **pp, int (*cb)()); | ||
| 93 | RSA *d2i_Netscape_RSA(RSA **a, unsigned char **pp, long length, int (*cb)()); | ||
| 94 | |||
| 95 | Now you will notice that macros like | ||
| 96 | #define PEM_write_X509(fp,x) \ | ||
| 97 | PEM_ASN1_write((int (*)())i2d_X509,PEM_STRING_X509,fp, \ | ||
| 98 | (char *)x, NULL,NULL,0,NULL) | ||
| 99 | Don't do encryption normally. If you want to PEM encrypt your X509 structure, | ||
| 100 | either just call PEM_ASN1_write directly or just define you own | ||
| 101 | macro variant. As you can see, this macro just sets all encryption related | ||
| 102 | parameters to NULL. | ||
| 103 | |||
| 104 | |||
| 105 | -------------------------- | ||
| 106 | The SSL library. | ||
| 107 | |||
| 108 | #define SSL_set_info_callback(ssl,cb) | ||
| 109 | #define SSL_CTX_set_info_callback(ctx,cb) | ||
| 110 | void callback(SSL *ssl,int location,int ret) | ||
| 111 | This callback is called each time around the SSL_connect()/SSL_accept() | ||
| 112 | state machine. So it will be called each time the SSL protocol progresses. | ||
| 113 | It is mostly present for use when debugging. When SSL_connect() or | ||
| 114 | SSL_accept() return, the location flag is SSL_CB_ACCEPT_EXIT or | ||
| 115 | SSL_CB_CONNECT_EXIT and 'ret' is the value about to be returned. | ||
| 116 | Have a look at the SSL_CB_* defines in ssl.h. If an info callback is defined | ||
| 117 | against the SSL_CTX, it is called unless there is one set against the SSL. | ||
| 118 | Have a look at | ||
| 119 | void client_info_callback() in apps/s_client() for an example. | ||
| 120 | |||
| 121 | Certificate verification. | ||
| 122 | void SSL_set_verify(SSL *s, int mode, int (*callback) ()); | ||
| 123 | void SSL_CTX_set_verify(SSL_CTX *ctx,int mode,int (*callback)()); | ||
| 124 | This callback is used to help verify client and server X509 certificates. | ||
| 125 | It is actually passed to X509_cert_verify(), along with the SSL structure | ||
| 126 | so you have to read about X509_cert_verify() :-). The SSL_CTX version is used | ||
| 127 | if the SSL version is not defined. X509_cert_verify() is the function used | ||
| 128 | by the SSL part of the library to verify certificates. This function is | ||
| 129 | nearly always defined by the application. | ||
| 130 | |||
| 131 | void SSL_CTX_set_cert_verify_cb(SSL_CTX *ctx, int (*cb)(),char *arg); | ||
| 132 | int callback(char *arg,SSL *s,X509 *xs,STACK *cert_chain); | ||
| 133 | This call is used to replace the SSLeay certificate verification code. | ||
| 134 | The 'arg' is kept in the SSL_CTX and is passed to the callback. | ||
| 135 | If the callback returns 0, the certificate is rejected, otherwise it | ||
| 136 | is accepted. The callback is replacing the X509_cert_verify() call. | ||
| 137 | This feature is not often used, but if you wished to implement | ||
| 138 | some totally different certificate authentication system, this 'hook' is | ||
| 139 | vital. | ||
| 140 | |||
| 141 | SSLeay keeps a cache of session-ids against each SSL_CTX. These callbacks can | ||
| 142 | be used to notify the application when a SSL_SESSION is added to the cache | ||
| 143 | or to retrieve a SSL_SESSION that is not in the cache from the application. | ||
| 144 | #define SSL_CTX_sess_set_get_cb(ctx,cb) | ||
| 145 | SSL_SESSION *callback(SSL *s,char *session_id,int session_id_len,int *copy); | ||
| 146 | If defined, this callback is called to return the SESSION_ID for the | ||
| 147 | session-id in 'session_id', of 'session_id_len' bytes. 'copy' is set to 1 | ||
| 148 | if the server is to 'take a copy' of the SSL_SESSION structure. It is 0 | ||
| 149 | if the SSL_SESSION is being 'passed in' so the SSLeay library is now | ||
| 150 | responsible for 'free()ing' the structure. Basically it is used to indicate | ||
| 151 | if the reference count on the SSL_SESSION structure needs to be incremented. | ||
| 152 | |||
| 153 | #define SSL_CTX_sess_set_new_cb(ctx,cb) | ||
| 154 | int callback(SSL *s, SSL_SESSION *sess); | ||
| 155 | When a new connection is established, if the SSL_SESSION is going to be added | ||
| 156 | to the cache, this callback is called. Return 1 if a 'copy' is required, | ||
| 157 | otherwise, return 0. This return value just causes the reference count | ||
| 158 | to be incremented (on return of a 1), this means the application does | ||
| 159 | not need to worry about incrementing the refernece count (and the | ||
| 160 | locking that implies in a multi-threaded application). | ||
| 161 | |||
| 162 | void SSL_CTX_set_default_passwd_cb(SSL_CTX *ctx,int (*cb)()); | ||
| 163 | This sets the SSL password reading function. | ||
| 164 | It is mostly used for windowing applications | ||
| 165 | and used by PEM_read_bio_X509() and PEM_read_bio_RSAPrivateKey() | ||
| 166 | calls inside the SSL library. The only reason this is present is because the | ||
| 167 | calls to PEM_* functions is hidden in the SSLeay library so you have to | ||
| 168 | pass in the callback some how. | ||
| 169 | |||
| 170 | #define SSL_CTX_set_client_cert_cb(ctx,cb) | ||
| 171 | int callback(SSL *s,X509 **x509, EVP_PKEY **pkey); | ||
| 172 | Called when a client certificate is requested but there is not one set | ||
| 173 | against the SSL_CTX or the SSL. If the callback returns 1, x509 and | ||
| 174 | pkey need to point to valid data. The library will free these when | ||
| 175 | required so if the application wants to keep these around, increment | ||
| 176 | their reference counts. If 0 is returned, no client cert is | ||
| 177 | available. If -1 is returned, it is assumed that the callback needs | ||
| 178 | to be called again at a later point in time. SSL_connect will return | ||
| 179 | -1 and SSL_want_x509_lookup(ssl) returns true. Remember that | ||
| 180 | application data can be attached to an SSL structure via the | ||
| 181 | SSL_set_app_data(SSL *ssl,char *data) call. | ||
| 182 | |||
| 183 | -------------------------- | ||
| 184 | The X509 library. | ||
| 185 | |||
| 186 | int X509_cert_verify(CERTIFICATE_CTX *ctx,X509 *xs, int (*cb)(), | ||
| 187 | int *error,char *arg,STACK *cert_chain); | ||
| 188 | int verify_callback(int ok,X509 *xs,X509 *xi,int depth,int error,char *arg, | ||
| 189 | STACK *cert_chain); | ||
| 190 | |||
| 191 | X509_cert_verify() is used to authenticate X509 certificates. The 'ctx' holds | ||
| 192 | the details of the various caches and files used to locate certificates. | ||
| 193 | 'xs' is the certificate to verify and 'cb' is the application callback (more | ||
| 194 | detail later). 'error' will be set to the error code and 'arg' is passed | ||
| 195 | to the 'cb' callback. Look at the VERIFY_* defines in crypto/x509/x509.h | ||
| 196 | |||
| 197 | When ever X509_cert_verify() makes a 'negative' decision about a | ||
| 198 | certitificate, the callback is called. If everything checks out, the | ||
| 199 | callback is called with 'VERIFY_OK' or 'VERIFY_ROOT_OK' (for a self | ||
| 200 | signed cert that is not the passed certificate). | ||
| 201 | |||
| 202 | The callback is passed the X509_cert_verify opinion of the certificate | ||
| 203 | in 'ok', the certificate in 'xs', the issuer certificate in 'xi', | ||
| 204 | the 'depth' of the certificate in the verification 'chain', the | ||
| 205 | VERIFY_* code in 'error' and the argument passed to X509_cert_verify() | ||
| 206 | in 'arg'. cert_chain is a list of extra certs to use if they are not | ||
| 207 | in the cache. | ||
| 208 | |||
| 209 | The callback can be used to look at the error reason, and then return 0 | ||
| 210 | for an 'error' or '1' for ok. This will override the X509_cert_verify() | ||
| 211 | opinion of the certificates validity. Processing will continue depending on | ||
| 212 | the return value. If one just wishes to use the callback for informational | ||
| 213 | reason, just return the 'ok' parameter. | ||
| 214 | |||
| 215 | -------------------------- | ||
| 216 | The BN and DH library. | ||
| 217 | |||
| 218 | BIGNUM *BN_generate_prime(int bits,int strong,BIGNUM *add, | ||
| 219 | BIGNUM *rem,void (*callback)(int,int)); | ||
| 220 | int BN_is_prime(BIGNUM *p,int nchecks,void (*callback)(int,int), | ||
| 221 | |||
| 222 | Read doc/bn.doc for the description of these 2. | ||
| 223 | |||
| 224 | DH *DH_generate_parameters(int prime_len,int generator, | ||
| 225 | void (*callback)(int,int)); | ||
| 226 | Read doc/bn.doc for the description of the callback, since it is just passed | ||
| 227 | to BN_generate_prime(), except that it is also called as | ||
| 228 | callback(3,0) by this function. | ||
| 229 | |||
| 230 | -------------------------- | ||
| 231 | The CRYPTO library. | ||
| 232 | |||
| 233 | void CRYPTO_set_locking_callback(void (*func)(int mode,int type,char *file, | ||
| 234 | int line)); | ||
| 235 | void CRYPTO_set_add_lock_callback(int (*func)(int *num,int mount, | ||
| 236 | int type,char *file, int line)); | ||
| 237 | void CRYPTO_set_id_callback(unsigned long (*func)(void)); | ||
| 238 | |||
| 239 | Read threads.doc for info on these ones. | ||
| 240 | |||
diff --git a/src/lib/libssl/src/doc/cipher.doc b/src/lib/libssl/src/doc/cipher.doc new file mode 100644 index 0000000000..d49ba78c5c --- /dev/null +++ b/src/lib/libssl/src/doc/cipher.doc | |||
| @@ -0,0 +1,345 @@ | |||
| 1 | The Cipher subroutines. | ||
| 2 | |||
| 3 | These routines require "evp.h" to be included. | ||
| 4 | |||
| 5 | These functions are a higher level interface to the various cipher | ||
| 6 | routines found in this library. As such, they allow the same code to be | ||
| 7 | used to encrypt and decrypt via different ciphers with only a change | ||
| 8 | in an initial parameter. These routines also provide buffering for block | ||
| 9 | ciphers. | ||
| 10 | |||
| 11 | These routines all take a pointer to the following structure to specify | ||
| 12 | which cipher to use. If you wish to use a new cipher with these routines, | ||
| 13 | you would probably be best off looking an how an existing cipher is | ||
| 14 | implemented and copying it. At this point in time, I'm not going to go | ||
| 15 | into many details. This structure should be considered opaque | ||
| 16 | |||
| 17 | typedef struct pem_cipher_st | ||
| 18 | { | ||
| 19 | int type; | ||
| 20 | int block_size; | ||
| 21 | int key_len; | ||
| 22 | int iv_len; | ||
| 23 | void (*enc_init)(); /* init for encryption */ | ||
| 24 | void (*dec_init)(); /* init for decryption */ | ||
| 25 | void (*do_cipher)(); /* encrypt data */ | ||
| 26 | } EVP_CIPHER; | ||
| 27 | |||
| 28 | The type field is the object NID of the cipher type | ||
| 29 | (read the section on Objects for an explanation of what a NID is). | ||
| 30 | The cipher block_size is how many bytes need to be passed | ||
| 31 | to the cipher at a time. Key_len is the | ||
| 32 | length of the key the cipher requires and iv_len is the length of the | ||
| 33 | initialisation vector required. enc_init is the function | ||
| 34 | called to initialise the ciphers context for encryption and dec_init is the | ||
| 35 | function to initialise for decryption (they need to be different, especially | ||
| 36 | for the IDEA cipher). | ||
| 37 | |||
| 38 | One reason for specifying the Cipher via a pointer to a structure | ||
| 39 | is that if you only use des-cbc, only the des-cbc routines will | ||
| 40 | be included when you link the program. If you passed an integer | ||
| 41 | that specified which cipher to use, the routine that mapped that | ||
| 42 | integer to a set of cipher functions would cause all the ciphers | ||
| 43 | to be link into the code. This setup also allows new ciphers | ||
| 44 | to be added by the application (with some restrictions). | ||
| 45 | |||
| 46 | The thirteen ciphers currently defined in this library are | ||
| 47 | |||
| 48 | EVP_CIPHER *EVP_des_ecb(); /* DES in ecb mode, iv=0, block=8, key= 8 */ | ||
| 49 | EVP_CIPHER *EVP_des_ede(); /* DES in ecb ede mode, iv=0, block=8, key=16 */ | ||
| 50 | EVP_CIPHER *EVP_des_ede3(); /* DES in ecb ede mode, iv=0, block=8, key=24 */ | ||
| 51 | EVP_CIPHER *EVP_des_cfb(); /* DES in cfb mode, iv=8, block=1, key= 8 */ | ||
| 52 | EVP_CIPHER *EVP_des_ede_cfb(); /* DES in ede cfb mode, iv=8, block=1, key=16 */ | ||
| 53 | EVP_CIPHER *EVP_des_ede3_cfb();/* DES in ede cfb mode, iv=8, block=1, key=24 */ | ||
| 54 | EVP_CIPHER *EVP_des_ofb(); /* DES in ofb mode, iv=8, block=1, key= 8 */ | ||
| 55 | EVP_CIPHER *EVP_des_ede_ofb(); /* DES in ede ofb mode, iv=8, block=1, key=16 */ | ||
| 56 | EVP_CIPHER *EVP_des_ede3_ofb();/* DES in ede ofb mode, iv=8, block=1, key=24 */ | ||
| 57 | EVP_CIPHER *EVP_des_cbc(); /* DES in cbc mode, iv=8, block=8, key= 8 */ | ||
| 58 | EVP_CIPHER *EVP_des_ede_cbc(); /* DES in cbc ede mode, iv=8, block=8, key=16 */ | ||
| 59 | EVP_CIPHER *EVP_des_ede3_cbc();/* DES in cbc ede mode, iv=8, block=8, key=24 */ | ||
| 60 | EVP_CIPHER *EVP_desx_cbc(); /* DES in desx cbc mode,iv=8, block=8, key=24 */ | ||
| 61 | EVP_CIPHER *EVP_rc4(); /* RC4, iv=0, block=1, key=16 */ | ||
| 62 | EVP_CIPHER *EVP_idea_ecb(); /* IDEA in ecb mode, iv=0, block=8, key=16 */ | ||
| 63 | EVP_CIPHER *EVP_idea_cfb(); /* IDEA in cfb mode, iv=8, block=1, key=16 */ | ||
| 64 | EVP_CIPHER *EVP_idea_ofb(); /* IDEA in ofb mode, iv=8, block=1, key=16 */ | ||
| 65 | EVP_CIPHER *EVP_idea_cbc(); /* IDEA in cbc mode, iv=8, block=8, key=16 */ | ||
| 66 | EVP_CIPHER *EVP_rc2_ecb(); /* RC2 in ecb mode, iv=0, block=8, key=16 */ | ||
| 67 | EVP_CIPHER *EVP_rc2_cfb(); /* RC2 in cfb mode, iv=8, block=1, key=16 */ | ||
| 68 | EVP_CIPHER *EVP_rc2_ofb(); /* RC2 in ofb mode, iv=8, block=1, key=16 */ | ||
| 69 | EVP_CIPHER *EVP_rc2_cbc(); /* RC2 in cbc mode, iv=8, block=8, key=16 */ | ||
| 70 | EVP_CIPHER *EVP_bf_ecb(); /* Blowfish in ecb mode,iv=0, block=8, key=16 */ | ||
| 71 | EVP_CIPHER *EVP_bf_cfb(); /* Blowfish in cfb mode,iv=8, block=1, key=16 */ | ||
| 72 | EVP_CIPHER *EVP_bf_ofb(); /* Blowfish in ofb mode,iv=8, block=1, key=16 */ | ||
| 73 | EVP_CIPHER *EVP_bf_cbc(); /* Blowfish in cbc mode,iv=8, block=8, key=16 */ | ||
| 74 | |||
| 75 | The meaning of the compound names is as follows. | ||
| 76 | des The base cipher is DES. | ||
| 77 | idea The base cipher is IDEA | ||
| 78 | rc4 The base cipher is RC4-128 | ||
| 79 | rc2 The base cipher is RC2-128 | ||
| 80 | ecb Electronic Code Book form of the cipher. | ||
| 81 | cbc Cipher Block Chaining form of the cipher. | ||
| 82 | cfb 64 bit Cipher Feedback form of the cipher. | ||
| 83 | ofb 64 bit Output Feedback form of the cipher. | ||
| 84 | ede The cipher is used in Encrypt, Decrypt, Encrypt mode. The first | ||
| 85 | and last keys are the same. | ||
| 86 | ede3 The cipher is used in Encrypt, Decrypt, Encrypt mode. | ||
| 87 | |||
| 88 | All the Cipher routines take a EVP_CIPHER_CTX pointer as an argument. | ||
| 89 | The state of the cipher is kept in this structure. | ||
| 90 | |||
| 91 | typedef struct EVP_CIPHER_Ctx_st | ||
| 92 | { | ||
| 93 | EVP_CIPHER *cipher; | ||
| 94 | int encrypt; /* encrypt or decrypt */ | ||
| 95 | int buf_len; /* number we have left */ | ||
| 96 | unsigned char buf[8]; | ||
| 97 | union { | ||
| 98 | .... /* cipher specific stuff */ | ||
| 99 | } c; | ||
| 100 | } EVP_CIPHER_CTX; | ||
| 101 | |||
| 102 | Cipher is a pointer the the EVP_CIPHER for the current context. The encrypt | ||
| 103 | flag indicates encryption or decryption. buf_len is the number of bytes | ||
| 104 | currently being held in buf. | ||
| 105 | The 'c' union holds the cipher specify context. | ||
| 106 | |||
| 107 | The following functions are to be used. | ||
| 108 | |||
| 109 | int EVP_read_pw_string( | ||
| 110 | char *buf, | ||
| 111 | int len, | ||
| 112 | char *prompt, | ||
| 113 | int verify, | ||
| 114 | This function is the same as des_read_pw_string() (des.doc). | ||
| 115 | |||
| 116 | void EVP_set_pw_prompt(char *prompt); | ||
| 117 | This function sets the 'default' prompt to use to use in | ||
| 118 | EVP_read_pw_string when the prompt parameter is NULL. If the | ||
| 119 | prompt parameter is NULL, this 'default prompt' feature is turned | ||
| 120 | off. Be warned, this is a global variable so weird things | ||
| 121 | will happen if it is used under Win16 and care must be taken | ||
| 122 | with a multi-threaded version of the library. | ||
| 123 | |||
| 124 | char *EVP_get_pw_prompt(); | ||
| 125 | This returns a pointer to the default prompt string. NULL | ||
| 126 | if it is not set. | ||
| 127 | |||
| 128 | int EVP_BytesToKey( | ||
| 129 | EVP_CIPHER *type, | ||
| 130 | EVP_MD *md, | ||
| 131 | unsigned char *salt, | ||
| 132 | unsigned char *data, | ||
| 133 | int datal, | ||
| 134 | int count, | ||
| 135 | unsigned char *key, | ||
| 136 | unsigned char *iv); | ||
| 137 | This function is used to generate a key and an initialisation vector | ||
| 138 | for a specified cipher from a key string and a salt. Type | ||
| 139 | specifies the cipher the 'key' is being generated for. Md is the | ||
| 140 | message digest algorithm to use to generate the key and iv. The salt | ||
| 141 | is an optional 8 byte object that is used to help seed the key | ||
| 142 | generator. | ||
| 143 | If the salt value is NULL, it is just not used. Datal is the | ||
| 144 | number of bytes to use from 'data' in the key generation. | ||
| 145 | This function returns the key size for the specified cipher, if | ||
| 146 | data is NULL, this value is returns and no other | ||
| 147 | computation is performed. Count is | ||
| 148 | the number of times to loop around the key generator. I would | ||
| 149 | suggest leaving it's value as 1. Key and iv are the structures to | ||
| 150 | place the returning iv and key in. If they are NULL, no value is | ||
| 151 | generated for that particular value. | ||
| 152 | The algorithm used is as follows | ||
| 153 | |||
| 154 | /* M[] is an array of message digests | ||
| 155 | * MD() is the message digest function */ | ||
| 156 | M[0]=MD(data . salt); | ||
| 157 | for (i=1; i<count; i++) M[0]=MD(M[0]); | ||
| 158 | |||
| 159 | i=1 | ||
| 160 | while (data still needed for key and iv) | ||
| 161 | { | ||
| 162 | M[i]=MD(M[i-1] . data . salt); | ||
| 163 | for (i=1; i<count; i++) M[i]=MD(M[i]); | ||
| 164 | i++; | ||
| 165 | } | ||
| 166 | |||
| 167 | If the salt is NULL, it is not used. | ||
| 168 | The digests are concatenated together. | ||
| 169 | M = M[0] . M[1] . M[2] ....... | ||
| 170 | |||
| 171 | For key= 8, iv=8 => key=M[0.. 8], iv=M[ 9 .. 16]. | ||
| 172 | For key=16, iv=0 => key=M[0..16]. | ||
| 173 | For key=16, iv=8 => key=M[0..16], iv=M[17 .. 24]. | ||
| 174 | For key=24, iv=8 => key=M[0..24], iv=M[25 .. 32]. | ||
| 175 | |||
| 176 | This routine will produce DES-CBC keys and iv that are compatible | ||
| 177 | with the PKCS-5 standard when md2 or md5 are used. If md5 is | ||
| 178 | used, the salt is NULL and count is 1, this routine will produce | ||
| 179 | the password to key mapping normally used with RC4. | ||
| 180 | I have attempted to logically extend the PKCS-5 standard to | ||
| 181 | generate keys and iv for ciphers that require more than 16 bytes, | ||
| 182 | if anyone knows what the correct standard is, please inform me. | ||
| 183 | When using sha or sha1, things are a bit different under this scheme, | ||
| 184 | since sha produces a 20 byte digest. So for ciphers requiring | ||
| 185 | 24 bits of data, 20 will come from the first MD and 4 will | ||
| 186 | come from the second. | ||
| 187 | |||
| 188 | I have considered having a separate function so this 'routine' | ||
| 189 | can be used without the requirement of passing a EVP_CIPHER *, | ||
| 190 | but I have decided to not bother. If you wish to use the | ||
| 191 | function without official EVP_CIPHER structures, just declare | ||
| 192 | a local one and set the key_len and iv_len fields to the | ||
| 193 | length you desire. | ||
| 194 | |||
| 195 | The following routines perform encryption and decryption 'by parts'. By | ||
| 196 | this I mean that there are groups of 3 routines. An Init function that is | ||
| 197 | used to specify a cipher and initialise data structures. An Update routine | ||
| 198 | that does encryption/decryption, one 'chunk' at a time. And finally a | ||
| 199 | 'Final' function that finishes the encryption/decryption process. | ||
| 200 | All these functions take a EVP_CIPHER pointer to specify which cipher to | ||
| 201 | encrypt/decrypt with. They also take a EVP_CIPHER_CTX object as an | ||
| 202 | argument. This structure is used to hold the state information associated | ||
| 203 | with the operation in progress. | ||
| 204 | |||
| 205 | void EVP_EncryptInit( | ||
| 206 | EVP_CIPHER_CTX *ctx, | ||
| 207 | EVP_CIPHER *type, | ||
| 208 | unsigned char *key, | ||
| 209 | unsigned char *iv); | ||
| 210 | This function initialise a EVP_CIPHER_CTX for encryption using the | ||
| 211 | cipher passed in the 'type' field. The cipher is initialised to use | ||
| 212 | 'key' as the key and 'iv' for the initialisation vector (if one is | ||
| 213 | required). If the type, key or iv is NULL, the value currently in the | ||
| 214 | EVP_CIPHER_CTX is reused. So to perform several decrypt | ||
| 215 | using the same cipher, key and iv, initialise with the cipher, | ||
| 216 | key and iv the first time and then for subsequent calls, | ||
| 217 | reuse 'ctx' but pass NULL for type, key and iv. You must make sure | ||
| 218 | to pass a key that is large enough for a particular cipher. I | ||
| 219 | would suggest using the EVP_BytesToKey() function. | ||
| 220 | |||
| 221 | void EVP_EncryptUpdate( | ||
| 222 | EVP_CIPHER_CTX *ctx, | ||
| 223 | unsigned char *out, | ||
| 224 | int *outl, | ||
| 225 | unsigned char *in, | ||
| 226 | int inl); | ||
| 227 | This function takes 'inl' bytes from 'in' and outputs bytes | ||
| 228 | encrypted by the cipher 'ctx' was initialised with into 'out'. The | ||
| 229 | number of bytes written to 'out' is put into outl. If a particular | ||
| 230 | cipher encrypts in blocks, less or more bytes than input may be | ||
| 231 | output. Currently the largest block size used by supported ciphers | ||
| 232 | is 8 bytes, so 'out' should have room for 'inl+7' bytes. Normally | ||
| 233 | EVP_EncryptInit() is called once, followed by lots and lots of | ||
| 234 | calls to EVP_EncryptUpdate, followed by a single EVP_EncryptFinal | ||
| 235 | call. | ||
| 236 | |||
| 237 | void EVP_EncryptFinal( | ||
| 238 | EVP_CIPHER_CTX *ctx, | ||
| 239 | unsigned char *out, | ||
| 240 | int *outl); | ||
| 241 | Because quite a large number of ciphers are block ciphers, there is | ||
| 242 | often an incomplete block to write out at the end of the | ||
| 243 | encryption. EVP_EncryptFinal() performs processing on this last | ||
| 244 | block. The last block in encoded in such a way that it is possible | ||
| 245 | to determine how many bytes in the last block are valid. For 8 byte | ||
| 246 | block size ciphers, if only 5 bytes in the last block are valid, the | ||
| 247 | last three bytes will be filled with the value 3. If only 2 were | ||
| 248 | valid, the other 6 would be filled with sixes. If all 8 bytes are | ||
| 249 | valid, a extra 8 bytes are appended to the cipher stream containing | ||
| 250 | nothing but 8 eights. These last bytes are output into 'out' and | ||
| 251 | the number of bytes written is put into 'outl' These last bytes | ||
| 252 | are output into 'out' and the number of bytes written is put into | ||
| 253 | 'outl'. This form of block cipher finalisation is compatible with | ||
| 254 | PKCS-5. Please remember that even if you are using ciphers like | ||
| 255 | RC4 that has no blocking and so the function will not write | ||
| 256 | anything into 'out', it would still be a good idea to pass a | ||
| 257 | variable for 'out' that can hold 8 bytes just in case the cipher is | ||
| 258 | changed some time in the future. It should also be remembered | ||
| 259 | that the EVP_CIPHER_CTX contains the password and so when one has | ||
| 260 | finished encryption with a particular EVP_CIPHER_CTX, it is good | ||
| 261 | practice to zero the structure | ||
| 262 | (ie. memset(ctx,0,sizeof(EVP_CIPHER_CTX)). | ||
| 263 | |||
| 264 | void EVP_DecryptInit( | ||
| 265 | EVP_CIPHER_CTX *ctx, | ||
| 266 | EVP_CIPHER *type, | ||
| 267 | unsigned char *key, | ||
| 268 | unsigned char *iv); | ||
| 269 | This function is basically the same as EVP_EncryptInit() accept that | ||
| 270 | is prepares the EVP_CIPHER_CTX for decryption. | ||
| 271 | |||
| 272 | void EVP_DecryptUpdate( | ||
| 273 | EVP_CIPHER_CTX *ctx, | ||
| 274 | unsigned char *out, | ||
| 275 | int *outl, | ||
| 276 | unsigned char *in, | ||
| 277 | int inl); | ||
| 278 | This function is basically the same as EVP_EncryptUpdate() | ||
| 279 | except that it performs decryption. There is one | ||
| 280 | fundamental difference though. 'out' can not be the same as | ||
| 281 | 'in' for any ciphers with a block size greater than 1 if more | ||
| 282 | than one call to EVP_DecryptUpdate() will be made. This | ||
| 283 | is because this routine can hold a 'partial' block between | ||
| 284 | calls. When a partial block is decrypted (due to more bytes | ||
| 285 | being passed via this function, they will be written to 'out' | ||
| 286 | overwriting the input bytes in 'in' that have not been read | ||
| 287 | yet. From this it should also be noted that 'out' should | ||
| 288 | be at least one 'block size' larger than 'inl'. This problem | ||
| 289 | only occurs on the second and subsequent call to | ||
| 290 | EVP_DecryptUpdate() when using a block cipher. | ||
| 291 | |||
| 292 | int EVP_DecryptFinal( | ||
| 293 | EVP_CIPHER_CTX *ctx, | ||
| 294 | unsigned char *out, | ||
| 295 | int *outl); | ||
| 296 | This function is different to EVP_EncryptFinal in that it 'removes' | ||
| 297 | any padding bytes appended when the data was encrypted. Due to the | ||
| 298 | way in which 1 to 8 bytes may have been appended when encryption | ||
| 299 | using a block cipher, 'out' can end up with 0 to 7 bytes being put | ||
| 300 | into it. When decoding the padding bytes, it is possible to detect | ||
| 301 | an incorrect decryption. If the decryption appears to be wrong, 0 | ||
| 302 | is returned. If everything seems ok, 1 is returned. For ciphers | ||
| 303 | with a block size of 1 (RC4), this function would normally not | ||
| 304 | return any bytes and would always return 1. Just because this | ||
| 305 | function returns 1 does not mean the decryption was correct. It | ||
| 306 | would normally be wrong due to either the wrong key/iv or | ||
| 307 | corruption of the cipher data fed to EVP_DecryptUpdate(). | ||
| 308 | As for EVP_EncryptFinal, it is a good idea to zero the | ||
| 309 | EVP_CIPHER_CTX after use since the structure contains the key used | ||
| 310 | to decrypt the data. | ||
| 311 | |||
| 312 | The following Cipher routines are convenience routines that call either | ||
| 313 | EVP_EncryptXxx or EVP_DecryptXxx depending on weather the EVP_CIPHER_CTX | ||
| 314 | was setup to encrypt or decrypt. | ||
| 315 | |||
| 316 | void EVP_CipherInit( | ||
| 317 | EVP_CIPHER_CTX *ctx, | ||
| 318 | EVP_CIPHER *type, | ||
| 319 | unsigned char *key, | ||
| 320 | unsigned char *iv, | ||
| 321 | int enc); | ||
| 322 | This function take arguments that are the same as EVP_EncryptInit() | ||
| 323 | and EVP_DecryptInit() except for the extra 'enc' flag. If 1, the | ||
| 324 | EVP_CIPHER_CTX is setup for encryption, if 0, decryption. | ||
| 325 | |||
| 326 | void EVP_CipherUpdate( | ||
| 327 | EVP_CIPHER_CTX *ctx, | ||
| 328 | unsigned char *out, | ||
| 329 | int *outl, | ||
| 330 | unsigned char *in, | ||
| 331 | int inl); | ||
| 332 | Again this function calls either EVP_EncryptUpdate() or | ||
| 333 | EVP_DecryptUpdate() depending on state in the 'ctx' structure. | ||
| 334 | As noted for EVP_DecryptUpdate(), when this routine is used | ||
| 335 | for decryption with block ciphers, 'out' should not be the | ||
| 336 | same as 'in'. | ||
| 337 | |||
| 338 | int EVP_CipherFinal( | ||
| 339 | EVP_CIPHER_CTX *ctx, | ||
| 340 | unsigned char *outm, | ||
| 341 | int *outl); | ||
| 342 | This routine call EVP_EncryptFinal() or EVP_DecryptFinal() | ||
| 343 | depending on the state information in 'ctx'. 1 is always returned | ||
| 344 | if the mode is encryption, otherwise the return value is the return | ||
| 345 | value of EVP_DecryptFinal(). | ||
diff --git a/src/lib/libssl/src/doc/cipher.m b/src/lib/libssl/src/doc/cipher.m new file mode 100644 index 0000000000..9f74917135 --- /dev/null +++ b/src/lib/libssl/src/doc/cipher.m | |||
| @@ -0,0 +1,128 @@ | |||
| 1 | From ssl-lists-owner@mincom.com Tue Oct 15 18:16:14 1996 | ||
| 2 | Received: from cygnus.mincom.oz.au by orb.mincom.oz.au with SMTP id AA11550 | ||
| 3 | (5.65c/IDA-1.4.4 for eay); Tue, 15 Oct 1996 08:17:41 +1000 | ||
| 4 | Received: (from daemon@localhost) by cygnus.mincom.oz.au (8.7.5/8.7.3) id IAA12472 for ssl-users-outgoing; Tue, 15 Oct 1996 08:16:35 +1000 (EST) | ||
| 5 | Received: from orb.mincom.oz.au (eay@orb.mincom.oz.au [192.55.197.1]) by cygnus.mincom.oz.au (8.7.5/8.7.3) with SMTP id IAA12463 for <ssl-users@listserv.mincom.oz.au>; Tue, 15 Oct 1996 08:16:32 +1000 (EST) | ||
| 6 | Received: by orb.mincom.oz.au id AA11544 | ||
| 7 | (5.65c/IDA-1.4.4 for ssl-users@listserv.mincom.oz.au); Tue, 15 Oct 1996 08:16:15 +1000 | ||
| 8 | Date: Tue, 15 Oct 1996 08:16:14 +1000 (EST) | ||
| 9 | From: Eric Young <eay@mincom.com> | ||
| 10 | X-Sender: eay@orb | ||
| 11 | To: Roland Haring <rharing@tandem.cl> | ||
| 12 | Cc: ssl-users@mincom.com | ||
| 13 | Subject: Re: Symmetric encryption with ssleay | ||
| 14 | In-Reply-To: <m0vBpyq-00001aC@tandemnet.tandem.cl> | ||
| 15 | Message-Id: <Pine.SOL.3.91.961015075623.11394A-100000@orb> | ||
| 16 | Mime-Version: 1.0 | ||
| 17 | Content-Type: TEXT/PLAIN; charset=US-ASCII | ||
| 18 | Sender: ssl-lists-owner@mincom.com | ||
| 19 | Precedence: bulk | ||
| 20 | Status: RO | ||
| 21 | X-Status: | ||
| 22 | |||
| 23 | |||
| 24 | On Fri, 11 Oct 1996, Roland Haring wrote: | ||
| 25 | > THE_POINT: | ||
| 26 | > Would somebody be so kind to give me the minimum basic | ||
| 27 | > calls I need to do to libcrypto.a to get some text encrypted | ||
| 28 | > and decrypted again? ...hopefully with code included to do | ||
| 29 | > base64 encryption and decryption ... e.g. that sign-it.c code | ||
| 30 | > posted some while ago was a big help :-) (please, do not point | ||
| 31 | > me to apps/enc.c where I suspect my Heissenbug to be hidden :-) | ||
| 32 | |||
| 33 | Ok, the base64 encoding stuff in 'enc.c' does the wrong thing sometimes | ||
| 34 | when the data is less than a line long (this is for decoding). I'll dig | ||
| 35 | up the exact fix today and post it. I am taking longer on 0.6.5 than I | ||
| 36 | intended so I'll just post this patch. | ||
| 37 | |||
| 38 | The documentation to read is in | ||
| 39 | doc/cipher.doc, | ||
| 40 | doc/encode.doc (very sparse :-). | ||
| 41 | and perhaps | ||
| 42 | doc/digest.doc, | ||
| 43 | |||
| 44 | The basic calls to encrypt with say triple DES are | ||
| 45 | |||
| 46 | Given | ||
| 47 | char key[EVP_MAX_KEY_LENGTH]; | ||
| 48 | char iv[EVP_MAX_IV_LENGTH]; | ||
| 49 | EVP_CIPHER_CTX ctx; | ||
| 50 | unsigned char out[512+8]; | ||
| 51 | int outl; | ||
| 52 | |||
| 53 | /* optional generation of key/iv data from text password using md5 | ||
| 54 | * via an upward compatable verson of PKCS#5. */ | ||
| 55 | EVP_BytesToKey(EVP_des_ede3_cbc,EVP_md5,NULL,passwd,strlen(passwd), | ||
| 56 | key,iv); | ||
| 57 | |||
| 58 | /* Initalise the EVP_CIPHER_CTX */ | ||
| 59 | EVP_EncryptInit(ctx,EVP_des_ede3_cbc,key,iv); | ||
| 60 | |||
| 61 | while (....) | ||
| 62 | { | ||
| 63 | /* This is processing 512 bytes at a time, the bytes are being | ||
| 64 | * copied into 'out', outl bytes are output. 'out' should not be the | ||
| 65 | * same as 'in' for reasons mentioned in the documentation. */ | ||
| 66 | EVP_EncryptUpdate(ctx,out,&outl,in,512); | ||
| 67 | } | ||
| 68 | |||
| 69 | /* Output the last 'block'. If the cipher is a block cipher, the last | ||
| 70 | * block is encoded in such a way so that a wrong decryption will normally be | ||
| 71 | * detected - again, one of the PKCS standards. */ | ||
| 72 | |||
| 73 | EVP_EncryptFinal(ctx,out,&outl); | ||
| 74 | |||
| 75 | To decrypt, use the EVP_DecryptXXXXX functions except that EVP_DecryptFinal() | ||
| 76 | will return 0 if the decryption fails (only detectable on block ciphers). | ||
| 77 | |||
| 78 | You can also use | ||
| 79 | EVP_CipherInit() | ||
| 80 | EVP_CipherUpdate() | ||
| 81 | EVP_CipherFinal() | ||
| 82 | which does either encryption or decryption depending on an extra | ||
| 83 | parameter to EVP_CipherInit(). | ||
| 84 | |||
| 85 | |||
| 86 | To do the base64 encoding, | ||
| 87 | EVP_EncodeInit() | ||
| 88 | EVP_EncodeUpdate() | ||
| 89 | EVP_EncodeFinal() | ||
| 90 | |||
| 91 | EVP_DecodeInit() | ||
| 92 | EVP_DecodeUpdate() | ||
| 93 | EVP_DecodeFinal() | ||
| 94 | |||
| 95 | where the encoding is quite simple, but the decoding can be a bit more | ||
| 96 | fun (due to dud input). | ||
| 97 | |||
| 98 | EVP_DecodeUpdate() returns -1 for an error on an input line, 0 if the | ||
| 99 | 'last line' was just processed, and 1 if more lines should be submitted. | ||
| 100 | |||
| 101 | EVP_DecodeFinal() returns -1 for an error or 1 if things are ok. | ||
| 102 | |||
| 103 | So the loop becomes | ||
| 104 | EVP_DecodeInit(....) | ||
| 105 | for (;;) | ||
| 106 | { | ||
| 107 | i=EVP_DecodeUpdate(....); | ||
| 108 | if (i < 0) goto err; | ||
| 109 | |||
| 110 | /* process the data */ | ||
| 111 | |||
| 112 | if (i == 0) break; | ||
| 113 | } | ||
| 114 | EVP_DecodeFinal(....); | ||
| 115 | /* process the data */ | ||
| 116 | |||
| 117 | The problem in 'enc.c' is that I was stuff the processing up after the | ||
| 118 | EVP_DecodeFinal(...) when the for(..) loop was not being run (one line of | ||
| 119 | base64 data) and this was because 'enc.c' tries to scan over a file until | ||
| 120 | it hits the first valid base64 encoded line. | ||
| 121 | |||
| 122 | hope this helps a bit. | ||
| 123 | eric | ||
| 124 | -- | ||
| 125 | Eric Young | BOOL is tri-state according to Bill Gates. | ||
| 126 | AARNet: eay@mincom.oz.au | RTFM Win32 GetMessage(). | ||
| 127 | |||
| 128 | |||
diff --git a/src/lib/libssl/src/doc/conf.doc b/src/lib/libssl/src/doc/conf.doc new file mode 100644 index 0000000000..f12fe884f5 --- /dev/null +++ b/src/lib/libssl/src/doc/conf.doc | |||
| @@ -0,0 +1,89 @@ | |||
| 1 | The CONF library. | ||
| 2 | |||
| 3 | The CONF library is a simple set of routines that can be used to configure | ||
| 4 | programs. It is a superset of the genenv() function with some extra | ||
| 5 | structure. | ||
| 6 | |||
| 7 | The library consists of 5 functions. | ||
| 8 | |||
| 9 | LHASH *CONF_load(LHASH *config,char *file); | ||
| 10 | This function is called to load in a configuration file. Multiple | ||
| 11 | configuration files can be loaded, with each subsequent 'load' overwriting | ||
| 12 | any already defined 'variables'. If there is an error, NULL is returned. | ||
| 13 | If config is NULL, a new LHASH structure is created and returned, otherwise | ||
| 14 | the new data in the 'file' is loaded into the 'config' structure. | ||
| 15 | |||
| 16 | void CONF_free(LHASH *config); | ||
| 17 | This function free()s the data in config. | ||
| 18 | |||
| 19 | char *CONF_get_string(LHASH *config,char *section,char *name); | ||
| 20 | This function returns the string found in 'config' that corresponds to the | ||
| 21 | 'section' and 'name' specified. Classes and the naming system used will be | ||
| 22 | discussed later in this document. If the variable is not defined, an NULL | ||
| 23 | is returned. | ||
| 24 | |||
| 25 | long CONF_get_long(LHASH *config,char *section, char *name); | ||
| 26 | This function is the same as CONF_get_string() except that it converts the | ||
| 27 | string to an long and returns it. If variable is not a number or the | ||
| 28 | variable does not exist, 0 is returned. This is a little problematic but I | ||
| 29 | don't know of a simple way around it. | ||
| 30 | |||
| 31 | STACK *CONF_get_section(LHASH *config, char *section); | ||
| 32 | This function returns a 'stack' of CONF_VALUE items that are all the | ||
| 33 | items defined in a particular section. DO NOT free() any of the | ||
| 34 | variable returned. They will disappear when CONF_free() is called. | ||
| 35 | |||
| 36 | The 'lookup' model. | ||
| 37 | The configuration file is divided into 'sections'. Each section is started by | ||
| 38 | a line of the form '[ section ]'. All subsequent variable definitions are | ||
| 39 | of this section. A variable definition is a simple alpha-numeric name | ||
| 40 | followed by an '=' and then the data. A section or variable name can be | ||
| 41 | described by a regular expression of the following form '[A-Za-z0-9_]+'. | ||
| 42 | The value of the variable is the text after the '=' until the end of the | ||
| 43 | line, stripped of leading and trailing white space. | ||
| 44 | At this point I should mention that a '#' is a comment character, \ is the | ||
| 45 | escape character, and all three types of quote can be used to stop any | ||
| 46 | special interpretation of the data. | ||
| 47 | Now when the data is being loaded, variable expansion can occur. This is | ||
| 48 | done by expanding any $NAME sequences into the value represented by the | ||
| 49 | variable NAME. If the variable is not in the current section, the different | ||
| 50 | section can be specified by using the $SECTION::NAME form. The ${NAME} form | ||
| 51 | also works and is very useful for expanding variables inside strings. | ||
| 52 | |||
| 53 | When a variable is looked up, there are 2 special section. 'default', which | ||
| 54 | is the initial section, and 'ENV' which is the processes environment | ||
| 55 | variables (accessed via getenv()). When a variable is looked up, it is | ||
| 56 | first 'matched' with it's section (if one was specified), if this fails, the | ||
| 57 | 'default' section is matched. | ||
| 58 | If the 'lhash' variable passed was NULL, the environment is searched. | ||
| 59 | |||
| 60 | Now why do we bother with sections? So we can have multiple programs using | ||
| 61 | the same configuration file, or multiple instances of the same program | ||
| 62 | using different variables. It also provides a nice mechanism to override | ||
| 63 | the processes environment variables (eg ENV::HOME=/tmp). If there is a | ||
| 64 | program specific variable missing, we can have default values. | ||
| 65 | Multiple configuration files can be loaded, with each new value clearing | ||
| 66 | any predefined values. A system config file can provide 'default' values, | ||
| 67 | and application/usr specific files can provide overriding values. | ||
| 68 | |||
| 69 | Examples | ||
| 70 | |||
| 71 | # This is a simple example | ||
| 72 | SSLEAY_HOME = /usr/local/ssl | ||
| 73 | ENV::PATH = $SSLEAY_HOME/bin:$PATH # override my path | ||
| 74 | |||
| 75 | [X509] | ||
| 76 | cert_dir = $SSLEAY_HOME/certs # /usr/local/ssl/certs | ||
| 77 | |||
| 78 | [SSL] | ||
| 79 | CIPHER = DES-EDE-MD5:RC4-MD5 | ||
| 80 | USER_CERT = $HOME/${USER}di'r 5' # /home/eay/eaydir 5 | ||
| 81 | USER_CERT = $HOME/\${USER}di\'r # /home/eay/${USER}di'r | ||
| 82 | USER_CERT = "$HOME/${US"ER}di\'r # $HOME/${USER}di'r | ||
| 83 | |||
| 84 | TEST = 1234\ | ||
| 85 | 5678\ | ||
| 86 | 9ab # TEST=123456789ab | ||
| 87 | TTT = 1234\n\n # TTT=1234<nl><nl> | ||
| 88 | |||
| 89 | |||
diff --git a/src/lib/libssl/src/doc/des.doc b/src/lib/libssl/src/doc/des.doc new file mode 100644 index 0000000000..5879d968f3 --- /dev/null +++ b/src/lib/libssl/src/doc/des.doc | |||
| @@ -0,0 +1,505 @@ | |||
| 1 | The DES library. | ||
| 2 | |||
| 3 | Please note that this library was originally written to operate with | ||
| 4 | eBones, a version of Kerberos that had had encryption removed when it left | ||
| 5 | the USA and then put back in. As such there are some routines that I will | ||
| 6 | advise not using but they are still in the library for historical reasons. | ||
| 7 | For all calls that have an 'input' and 'output' variables, they can be the | ||
| 8 | same. | ||
| 9 | |||
| 10 | This library requires the inclusion of 'des.h'. | ||
| 11 | |||
| 12 | All of the encryption functions take what is called a des_key_schedule as an | ||
| 13 | argument. A des_key_schedule is an expanded form of the des key. | ||
| 14 | A des_key is 8 bytes of odd parity, the type used to hold the key is a | ||
| 15 | des_cblock. A des_cblock is an array of 8 bytes, often in this library | ||
| 16 | description I will refer to input bytes when the function specifies | ||
| 17 | des_cblock's as input or output, this just means that the variable should | ||
| 18 | be a multiple of 8 bytes. | ||
| 19 | |||
| 20 | The define DES_ENCRYPT is passed to specify encryption, DES_DECRYPT to | ||
| 21 | specify decryption. The functions and global variable are as follows: | ||
| 22 | |||
| 23 | int des_check_key; | ||
| 24 | DES keys are supposed to be odd parity. If this variable is set to | ||
| 25 | a non-zero value, des_set_key() will check that the key has odd | ||
| 26 | parity and is not one of the known weak DES keys. By default this | ||
| 27 | variable is turned off; | ||
| 28 | |||
| 29 | void des_set_odd_parity( | ||
| 30 | des_cblock *key ); | ||
| 31 | This function takes a DES key (8 bytes) and sets the parity to odd. | ||
| 32 | |||
| 33 | int des_is_weak_key( | ||
| 34 | des_cblock *key ); | ||
| 35 | This function returns a non-zero value if the DES key passed is a | ||
| 36 | weak, DES key. If it is a weak key, don't use it, try a different | ||
| 37 | one. If you are using 'random' keys, the chances of hitting a weak | ||
| 38 | key are 1/2^52 so it is probably not worth checking for them. | ||
| 39 | |||
| 40 | int des_set_key( | ||
| 41 | des_cblock *key, | ||
| 42 | des_key_schedule schedule); | ||
| 43 | Des_set_key converts an 8 byte DES key into a des_key_schedule. | ||
| 44 | A des_key_schedule is an expanded form of the key which is used to | ||
| 45 | perform actual encryption. It can be regenerated from the DES key | ||
| 46 | so it only needs to be kept when encryption or decryption is about | ||
| 47 | to occur. Don't save or pass around des_key_schedule's since they | ||
| 48 | are CPU architecture dependent, DES keys are not. If des_check_key | ||
| 49 | is non zero, zero is returned if the key has the wrong parity or | ||
| 50 | the key is a weak key, else 1 is returned. | ||
| 51 | |||
| 52 | int des_key_sched( | ||
| 53 | des_cblock *key, | ||
| 54 | des_key_schedule schedule); | ||
| 55 | An alternative name for des_set_key(). | ||
| 56 | |||
| 57 | int des_rw_mode; /* defaults to DES_PCBC_MODE */ | ||
| 58 | This flag holds either DES_CBC_MODE or DES_PCBC_MODE (default). | ||
| 59 | This specifies the function to use in the enc_read() and enc_write() | ||
| 60 | functions. | ||
| 61 | |||
| 62 | void des_encrypt( | ||
| 63 | unsigned long *data, | ||
| 64 | des_key_schedule ks, | ||
| 65 | int enc); | ||
| 66 | This is the DES encryption function that gets called by just about | ||
| 67 | every other DES routine in the library. You should not use this | ||
| 68 | function except to implement 'modes' of DES. I say this because the | ||
| 69 | functions that call this routine do the conversion from 'char *' to | ||
| 70 | long, and this needs to be done to make sure 'non-aligned' memory | ||
| 71 | access do not occur. The characters are loaded 'little endian', | ||
| 72 | have a look at my source code for more details on how I use this | ||
| 73 | function. | ||
| 74 | Data is a pointer to 2 unsigned long's and ks is the | ||
| 75 | des_key_schedule to use. enc, is non zero specifies encryption, | ||
| 76 | zero if decryption. | ||
| 77 | |||
| 78 | void des_encrypt2( | ||
| 79 | unsigned long *data, | ||
| 80 | des_key_schedule ks, | ||
| 81 | int enc); | ||
| 82 | This functions is the same as des_encrypt() except that the DES | ||
| 83 | initial permutation (IP) and final permutation (FP) have been left | ||
| 84 | out. As for des_encrypt(), you should not use this function. | ||
| 85 | It is used by the routines in my library that implement triple DES. | ||
| 86 | IP() des_encrypt2() des_encrypt2() des_encrypt2() FP() is the same | ||
| 87 | as des_encrypt() des_encrypt() des_encrypt() except faster :-). | ||
| 88 | |||
| 89 | void des_ecb_encrypt( | ||
| 90 | des_cblock *input, | ||
| 91 | des_cblock *output, | ||
| 92 | des_key_schedule ks, | ||
| 93 | int enc); | ||
| 94 | This is the basic Electronic Code Book form of DES, the most basic | ||
| 95 | form. Input is encrypted into output using the key represented by | ||
| 96 | ks. If enc is non zero (DES_ENCRYPT), encryption occurs, otherwise | ||
| 97 | decryption occurs. Input is 8 bytes long and output is 8 bytes. | ||
| 98 | (the des_cblock structure is 8 chars). | ||
| 99 | |||
| 100 | void des_ecb3_encrypt( | ||
| 101 | des_cblock *input, | ||
| 102 | des_cblock *output, | ||
| 103 | des_key_schedule ks1, | ||
| 104 | des_key_schedule ks2, | ||
| 105 | des_key_schedule ks3, | ||
| 106 | int enc); | ||
| 107 | This is the 3 key EDE mode of ECB DES. What this means is that | ||
| 108 | the 8 bytes of input is encrypted with ks1, decrypted with ks2 and | ||
| 109 | then encrypted again with ks3, before being put into output; | ||
| 110 | C=E(ks3,D(ks2,E(ks1,M))). There is a macro, des_ecb2_encrypt() | ||
| 111 | that only takes 2 des_key_schedules that implements, | ||
| 112 | C=E(ks1,D(ks2,E(ks1,M))) in that the final encrypt is done with ks1. | ||
| 113 | |||
| 114 | void des_cbc_encrypt( | ||
| 115 | des_cblock *input, | ||
| 116 | des_cblock *output, | ||
| 117 | long length, | ||
| 118 | des_key_schedule ks, | ||
| 119 | des_cblock *ivec, | ||
| 120 | int enc); | ||
| 121 | This routine implements DES in Cipher Block Chaining mode. | ||
| 122 | Input, which should be a multiple of 8 bytes is encrypted | ||
| 123 | (or decrypted) to output which will also be a multiple of 8 bytes. | ||
| 124 | The number of bytes is in length (and from what I've said above, | ||
| 125 | should be a multiple of 8). If length is not a multiple of 8, I'm | ||
| 126 | not being held responsible :-). ivec is the initialisation vector. | ||
| 127 | This function does not modify this variable. To correctly implement | ||
| 128 | cbc mode, you need to do one of 2 things; copy the last 8 bytes of | ||
| 129 | cipher text for use as the next ivec in your application, | ||
| 130 | or use des_ncbc_encrypt(). | ||
| 131 | Only this routine has this problem with updating the ivec, all | ||
| 132 | other routines that are implementing cbc mode update ivec. | ||
| 133 | |||
| 134 | void des_ncbc_encrypt( | ||
| 135 | des_cblock *input, | ||
| 136 | des_cblock *output, | ||
| 137 | long length, | ||
| 138 | des_key_schedule sk, | ||
| 139 | des_cblock *ivec, | ||
| 140 | int enc); | ||
| 141 | For historical reasons, des_cbc_encrypt() did not update the | ||
| 142 | ivec with the value requires so that subsequent calls to | ||
| 143 | des_cbc_encrypt() would 'chain'. This was needed so that the same | ||
| 144 | 'length' values would not need to be used when decrypting. | ||
| 145 | des_ncbc_encrypt() does the right thing. It is the same as | ||
| 146 | des_cbc_encrypt accept that ivec is updates with the correct value | ||
| 147 | to pass in subsequent calls to des_ncbc_encrypt(). I advise using | ||
| 148 | des_ncbc_encrypt() instead of des_cbc_encrypt(); | ||
| 149 | |||
| 150 | void des_xcbc_encrypt( | ||
| 151 | des_cblock *input, | ||
| 152 | des_cblock *output, | ||
| 153 | long length, | ||
| 154 | des_key_schedule sk, | ||
| 155 | des_cblock *ivec, | ||
| 156 | des_cblock *inw, | ||
| 157 | des_cblock *outw, | ||
| 158 | int enc); | ||
| 159 | This is RSA's DESX mode of DES. It uses inw and outw to | ||
| 160 | 'whiten' the encryption. inw and outw are secret (unlike the iv) | ||
| 161 | and are as such, part of the key. So the key is sort of 24 bytes. | ||
| 162 | This is much better than cbc des. | ||
| 163 | |||
| 164 | void des_3cbc_encrypt( | ||
| 165 | des_cblock *input, | ||
| 166 | des_cblock *output, | ||
| 167 | long length, | ||
| 168 | des_key_schedule sk1, | ||
| 169 | des_key_schedule sk2, | ||
| 170 | des_cblock *ivec1, | ||
| 171 | des_cblock *ivec2, | ||
| 172 | int enc); | ||
| 173 | This function is flawed, do not use it. I have left it in the | ||
| 174 | library because it is used in my des(1) program and will function | ||
| 175 | correctly when used by des(1). If I removed the function, people | ||
| 176 | could end up unable to decrypt files. | ||
| 177 | This routine implements outer triple cbc encryption using 2 ks and | ||
| 178 | 2 ivec's. Use des_ede2_cbc_encrypt() instead. | ||
| 179 | |||
| 180 | void des_ede3_cbc_encrypt( | ||
| 181 | des_cblock *input, | ||
| 182 | des_cblock *output, | ||
| 183 | long length, | ||
| 184 | des_key_schedule ks1, | ||
| 185 | des_key_schedule ks2, | ||
| 186 | des_key_schedule ks3, | ||
| 187 | des_cblock *ivec, | ||
| 188 | int enc); | ||
| 189 | This function implements outer triple CBC DES encryption with 3 | ||
| 190 | keys. What this means is that each 'DES' operation | ||
| 191 | inside the cbc mode is really an C=E(ks3,D(ks2,E(ks1,M))). | ||
| 192 | Again, this is cbc mode so an ivec is requires. | ||
| 193 | This mode is used by SSL. | ||
| 194 | There is also a des_ede2_cbc_encrypt() that only uses 2 | ||
| 195 | des_key_schedule's, the first being reused for the final | ||
| 196 | encryption. C=E(ks1,D(ks2,E(ks1,M))). This form of triple DES | ||
| 197 | is used by the RSAref library. | ||
| 198 | |||
| 199 | void des_pcbc_encrypt( | ||
| 200 | des_cblock *input, | ||
| 201 | des_cblock *output, | ||
| 202 | long length, | ||
| 203 | des_key_schedule ks, | ||
| 204 | des_cblock *ivec, | ||
| 205 | int enc); | ||
| 206 | This is Propagating Cipher Block Chaining mode of DES. It is used | ||
| 207 | by Kerberos v4. It's parameters are the same as des_ncbc_encrypt(). | ||
| 208 | |||
| 209 | void des_cfb_encrypt( | ||
| 210 | unsigned char *in, | ||
| 211 | unsigned char *out, | ||
| 212 | int numbits, | ||
| 213 | long length, | ||
| 214 | des_key_schedule ks, | ||
| 215 | des_cblock *ivec, | ||
| 216 | int enc); | ||
| 217 | Cipher Feedback Back mode of DES. This implementation 'feeds back' | ||
| 218 | in numbit blocks. The input (and output) is in multiples of numbits | ||
| 219 | bits. numbits should to be a multiple of 8 bits. Length is the | ||
| 220 | number of bytes input. If numbits is not a multiple of 8 bits, | ||
| 221 | the extra bits in the bytes will be considered padding. So if | ||
| 222 | numbits is 12, for each 2 input bytes, the 4 high bits of the | ||
| 223 | second byte will be ignored. So to encode 72 bits when using | ||
| 224 | a numbits of 12 take 12 bytes. To encode 72 bits when using | ||
| 225 | numbits of 9 will take 16 bytes. To encode 80 bits when using | ||
| 226 | numbits of 16 will take 10 bytes. etc, etc. This padding will | ||
| 227 | apply to both input and output. | ||
| 228 | |||
| 229 | |||
| 230 | void des_cfb64_encrypt( | ||
| 231 | unsigned char *in, | ||
| 232 | unsigned char *out, | ||
| 233 | long length, | ||
| 234 | des_key_schedule ks, | ||
| 235 | des_cblock *ivec, | ||
| 236 | int *num, | ||
| 237 | int enc); | ||
| 238 | This is one of the more useful functions in this DES library, it | ||
| 239 | implements CFB mode of DES with 64bit feedback. Why is this | ||
| 240 | useful you ask? Because this routine will allow you to encrypt an | ||
| 241 | arbitrary number of bytes, no 8 byte padding. Each call to this | ||
| 242 | routine will encrypt the input bytes to output and then update ivec | ||
| 243 | and num. num contains 'how far' we are though ivec. If this does | ||
| 244 | not make much sense, read more about cfb mode of DES :-). | ||
| 245 | |||
| 246 | void des_ede3_cfb64_encrypt( | ||
| 247 | unsigned char *in, | ||
| 248 | unsigned char *out, | ||
| 249 | long length, | ||
| 250 | des_key_schedule ks1, | ||
| 251 | des_key_schedule ks2, | ||
| 252 | des_key_schedule ks3, | ||
| 253 | des_cblock *ivec, | ||
| 254 | int *num, | ||
| 255 | int enc); | ||
| 256 | Same as des_cfb64_encrypt() accept that the DES operation is | ||
| 257 | triple DES. As usual, there is a macro for | ||
| 258 | des_ede2_cfb64_encrypt() which reuses ks1. | ||
| 259 | |||
| 260 | void des_ofb_encrypt( | ||
| 261 | unsigned char *in, | ||
| 262 | unsigned char *out, | ||
| 263 | int numbits, | ||
| 264 | long length, | ||
| 265 | des_key_schedule ks, | ||
| 266 | des_cblock *ivec); | ||
| 267 | This is a implementation of Output Feed Back mode of DES. It is | ||
| 268 | the same as des_cfb_encrypt() in that numbits is the size of the | ||
| 269 | units dealt with during input and output (in bits). | ||
| 270 | |||
| 271 | void des_ofb64_encrypt( | ||
| 272 | unsigned char *in, | ||
| 273 | unsigned char *out, | ||
| 274 | long length, | ||
| 275 | des_key_schedule ks, | ||
| 276 | des_cblock *ivec, | ||
| 277 | int *num); | ||
| 278 | The same as des_cfb64_encrypt() except that it is Output Feed Back | ||
| 279 | mode. | ||
| 280 | |||
| 281 | void des_ede3_ofb64_encrypt( | ||
| 282 | unsigned char *in, | ||
| 283 | unsigned char *out, | ||
| 284 | long length, | ||
| 285 | des_key_schedule ks1, | ||
| 286 | des_key_schedule ks2, | ||
| 287 | des_key_schedule ks3, | ||
| 288 | des_cblock *ivec, | ||
| 289 | int *num); | ||
| 290 | Same as des_ofb64_encrypt() accept that the DES operation is | ||
| 291 | triple DES. As usual, there is a macro for | ||
| 292 | des_ede2_ofb64_encrypt() which reuses ks1. | ||
| 293 | |||
| 294 | int des_read_pw_string( | ||
| 295 | char *buf, | ||
| 296 | int length, | ||
| 297 | char *prompt, | ||
| 298 | int verify); | ||
| 299 | This routine is used to get a password from the terminal with echo | ||
| 300 | turned off. Buf is where the string will end up and length is the | ||
| 301 | size of buf. Prompt is a string presented to the 'user' and if | ||
| 302 | verify is set, the key is asked for twice and unless the 2 copies | ||
| 303 | match, an error is returned. A return code of -1 indicates a | ||
| 304 | system error, 1 failure due to use interaction, and 0 is success. | ||
| 305 | |||
| 306 | unsigned long des_cbc_cksum( | ||
| 307 | des_cblock *input, | ||
| 308 | des_cblock *output, | ||
| 309 | long length, | ||
| 310 | des_key_schedule ks, | ||
| 311 | des_cblock *ivec); | ||
| 312 | This function produces an 8 byte checksum from input that it puts in | ||
| 313 | output and returns the last 4 bytes as a long. The checksum is | ||
| 314 | generated via cbc mode of DES in which only the last 8 byes are | ||
| 315 | kept. I would recommend not using this function but instead using | ||
| 316 | the EVP_Digest routines, or at least using MD5 or SHA. This | ||
| 317 | function is used by Kerberos v4 so that is why it stays in the | ||
| 318 | library. | ||
| 319 | |||
| 320 | char *des_fcrypt( | ||
| 321 | const char *buf, | ||
| 322 | const char *salt | ||
| 323 | char *ret); | ||
| 324 | This is my fast version of the unix crypt(3) function. This version | ||
| 325 | takes only a small amount of space relative to other fast | ||
| 326 | crypt() implementations. This is different to the normal crypt | ||
| 327 | in that the third parameter is the buffer that the return value | ||
| 328 | is written into. It needs to be at least 14 bytes long. This | ||
| 329 | function is thread safe, unlike the normal crypt. | ||
| 330 | |||
| 331 | char *crypt( | ||
| 332 | const char *buf, | ||
| 333 | const char *salt); | ||
| 334 | This function calls des_fcrypt() with a static array passed as the | ||
| 335 | third parameter. This emulates the normal non-thread safe semantics | ||
| 336 | of crypt(3). | ||
| 337 | |||
| 338 | void des_string_to_key( | ||
| 339 | char *str, | ||
| 340 | des_cblock *key); | ||
| 341 | This function takes str and converts it into a DES key. I would | ||
| 342 | recommend using MD5 instead and use the first 8 bytes of output. | ||
| 343 | When I wrote the first version of these routines back in 1990, MD5 | ||
| 344 | did not exist but I feel these routines are still sound. This | ||
| 345 | routines is compatible with the one in MIT's libdes. | ||
| 346 | |||
| 347 | void des_string_to_2keys( | ||
| 348 | char *str, | ||
| 349 | des_cblock *key1, | ||
| 350 | des_cblock *key2); | ||
| 351 | This function takes str and converts it into 2 DES keys. | ||
| 352 | I would recommend using MD5 and using the 16 bytes as the 2 keys. | ||
| 353 | I have nothing against these 2 'string_to_key' routines, it's just | ||
| 354 | that if you say that your encryption key is generated by using the | ||
| 355 | 16 bytes of an MD5 hash, every-one knows how you generated your | ||
| 356 | keys. | ||
| 357 | |||
| 358 | int des_read_password( | ||
| 359 | des_cblock *key, | ||
| 360 | char *prompt, | ||
| 361 | int verify); | ||
| 362 | This routine combines des_read_pw_string() with des_string_to_key(). | ||
| 363 | |||
| 364 | int des_read_2passwords( | ||
| 365 | des_cblock *key1, | ||
| 366 | des_cblock *key2, | ||
| 367 | char *prompt, | ||
| 368 | int verify); | ||
| 369 | This routine combines des_read_pw_string() with des_string_to_2key(). | ||
| 370 | |||
| 371 | void des_random_seed( | ||
| 372 | des_cblock key); | ||
| 373 | This routine sets a starting point for des_random_key(). | ||
| 374 | |||
| 375 | void des_random_key( | ||
| 376 | des_cblock ret); | ||
| 377 | This function return a random key. Make sure to 'seed' the random | ||
| 378 | number generator (with des_random_seed()) before using this function. | ||
| 379 | I personally now use a MD5 based random number system. | ||
| 380 | |||
| 381 | int des_enc_read( | ||
| 382 | int fd, | ||
| 383 | char *buf, | ||
| 384 | int len, | ||
| 385 | des_key_schedule ks, | ||
| 386 | des_cblock *iv); | ||
| 387 | This function will write to a file descriptor the encrypted data | ||
| 388 | from buf. This data will be preceded by a 4 byte 'byte count' and | ||
| 389 | will be padded out to 8 bytes. The encryption is either CBC of | ||
| 390 | PCBC depending on the value of des_rw_mode. If it is DES_PCBC_MODE, | ||
| 391 | pcbc is used, if DES_CBC_MODE, cbc is used. The default is to use | ||
| 392 | DES_PCBC_MODE. | ||
| 393 | |||
| 394 | int des_enc_write( | ||
| 395 | int fd, | ||
| 396 | char *buf, | ||
| 397 | int len, | ||
| 398 | des_key_schedule ks, | ||
| 399 | des_cblock *iv); | ||
| 400 | This routines read stuff written by des_enc_read() and decrypts it. | ||
| 401 | I have used these routines quite a lot but I don't believe they are | ||
| 402 | suitable for non-blocking io. If you are after a full | ||
| 403 | authentication/encryption over networks, have a look at SSL instead. | ||
| 404 | |||
| 405 | unsigned long des_quad_cksum( | ||
| 406 | des_cblock *input, | ||
| 407 | des_cblock *output, | ||
| 408 | long length, | ||
| 409 | int out_count, | ||
| 410 | des_cblock *seed); | ||
| 411 | This is a function from Kerberos v4 that is not anything to do with | ||
| 412 | DES but was needed. It is a cksum that is quicker to generate than | ||
| 413 | des_cbc_cksum(); I personally would use MD5 routines now. | ||
| 414 | ===== | ||
| 415 | Modes of DES | ||
| 416 | Quite a bit of the following information has been taken from | ||
| 417 | AS 2805.5.2 | ||
| 418 | Australian Standard | ||
| 419 | Electronic funds transfer - Requirements for interfaces, | ||
| 420 | Part 5.2: Modes of operation for an n-bit block cipher algorithm | ||
| 421 | Appendix A | ||
| 422 | |||
| 423 | There are several different modes in which DES can be used, they are | ||
| 424 | as follows. | ||
| 425 | |||
| 426 | Electronic Codebook Mode (ECB) (des_ecb_encrypt()) | ||
| 427 | - 64 bits are enciphered at a time. | ||
| 428 | - The order of the blocks can be rearranged without detection. | ||
| 429 | - The same plaintext block always produces the same ciphertext block | ||
| 430 | (for the same key) making it vulnerable to a 'dictionary attack'. | ||
| 431 | - An error will only affect one ciphertext block. | ||
| 432 | |||
| 433 | Cipher Block Chaining Mode (CBC) (des_cbc_encrypt()) | ||
| 434 | - a multiple of 64 bits are enciphered at a time. | ||
| 435 | - The CBC mode produces the same ciphertext whenever the same | ||
| 436 | plaintext is encrypted using the same key and starting variable. | ||
| 437 | - The chaining operation makes the ciphertext blocks dependent on the | ||
| 438 | current and all preceding plaintext blocks and therefore blocks can not | ||
| 439 | be rearranged. | ||
| 440 | - The use of different starting variables prevents the same plaintext | ||
| 441 | enciphering to the same ciphertext. | ||
| 442 | - An error will affect the current and the following ciphertext blocks. | ||
| 443 | |||
| 444 | Cipher Feedback Mode (CFB) (des_cfb_encrypt()) | ||
| 445 | - a number of bits (j) <= 64 are enciphered at a time. | ||
| 446 | - The CFB mode produces the same ciphertext whenever the same | ||
| 447 | plaintext is encrypted using the same key and starting variable. | ||
| 448 | - The chaining operation makes the ciphertext variables dependent on the | ||
| 449 | current and all preceding variables and therefore j-bit variables are | ||
| 450 | chained together and can not be rearranged. | ||
| 451 | - The use of different starting variables prevents the same plaintext | ||
| 452 | enciphering to the same ciphertext. | ||
| 453 | - The strength of the CFB mode depends on the size of k (maximal if | ||
| 454 | j == k). In my implementation this is always the case. | ||
| 455 | - Selection of a small value for j will require more cycles through | ||
| 456 | the encipherment algorithm per unit of plaintext and thus cause | ||
| 457 | greater processing overheads. | ||
| 458 | - Only multiples of j bits can be enciphered. | ||
| 459 | - An error will affect the current and the following ciphertext variables. | ||
| 460 | |||
| 461 | Output Feedback Mode (OFB) (des_ofb_encrypt()) | ||
| 462 | - a number of bits (j) <= 64 are enciphered at a time. | ||
| 463 | - The OFB mode produces the same ciphertext whenever the same | ||
| 464 | plaintext enciphered using the same key and starting variable. More | ||
| 465 | over, in the OFB mode the same key stream is produced when the same | ||
| 466 | key and start variable are used. Consequently, for security reasons | ||
| 467 | a specific start variable should be used only once for a given key. | ||
| 468 | - The absence of chaining makes the OFB more vulnerable to specific attacks. | ||
| 469 | - The use of different start variables values prevents the same | ||
| 470 | plaintext enciphering to the same ciphertext, by producing different | ||
| 471 | key streams. | ||
| 472 | - Selection of a small value for j will require more cycles through | ||
| 473 | the encipherment algorithm per unit of plaintext and thus cause | ||
| 474 | greater processing overheads. | ||
| 475 | - Only multiples of j bits can be enciphered. | ||
| 476 | - OFB mode of operation does not extend ciphertext errors in the | ||
| 477 | resultant plaintext output. Every bit error in the ciphertext causes | ||
| 478 | only one bit to be in error in the deciphered plaintext. | ||
| 479 | - OFB mode is not self-synchronising. If the two operation of | ||
| 480 | encipherment and decipherment get out of synchronism, the system needs | ||
| 481 | to be re-initialised. | ||
| 482 | - Each re-initialisation should use a value of the start variable | ||
| 483 | different from the start variable values used before with the same | ||
| 484 | key. The reason for this is that an identical bit stream would be | ||
| 485 | produced each time from the same parameters. This would be | ||
| 486 | susceptible to a ' known plaintext' attack. | ||
| 487 | |||
| 488 | Triple ECB Mode (des_ecb3_encrypt()) | ||
| 489 | - Encrypt with key1, decrypt with key2 and encrypt with key3 again. | ||
| 490 | - As for ECB encryption but increases the key length to 168 bits. | ||
| 491 | There are theoretic attacks that can be used that make the effective | ||
| 492 | key length 112 bits, but this attack also requires 2^56 blocks of | ||
| 493 | memory, not very likely, even for the NSA. | ||
| 494 | - If both keys are the same it is equivalent to encrypting once with | ||
| 495 | just one key. | ||
| 496 | - If the first and last key are the same, the key length is 112 bits. | ||
| 497 | There are attacks that could reduce the key space to 55 bit's but it | ||
| 498 | requires 2^56 blocks of memory. | ||
| 499 | - If all 3 keys are the same, this is effectively the same as normal | ||
| 500 | ecb mode. | ||
| 501 | |||
| 502 | Triple CBC Mode (des_ede3_cbc_encrypt()) | ||
| 503 | - Encrypt with key1, decrypt with key2 and then encrypt with key3. | ||
| 504 | - As for CBC encryption but increases the key length to 168 bits with | ||
| 505 | the same restrictions as for triple ecb mode. | ||
diff --git a/src/lib/libssl/src/doc/digest.doc b/src/lib/libssl/src/doc/digest.doc new file mode 100644 index 0000000000..d2fb987591 --- /dev/null +++ b/src/lib/libssl/src/doc/digest.doc | |||
| @@ -0,0 +1,94 @@ | |||
| 1 | |||
| 2 | The Message Digest subroutines. | ||
| 3 | |||
| 4 | These routines require "evp.h" to be included. | ||
| 5 | |||
| 6 | These functions are a higher level interface to the various message digest | ||
| 7 | routines found in this library. As such, they allow the same code to be | ||
| 8 | used to digest via different algorithms with only a change in an initial | ||
| 9 | parameter. They are basically just a front-end to the MD2, MD5, SHA | ||
| 10 | and SHA1 | ||
| 11 | routines. | ||
| 12 | |||
| 13 | These routines all take a pointer to the following structure to specify | ||
| 14 | which message digest algorithm to use. | ||
| 15 | typedef struct evp_md_st | ||
| 16 | { | ||
| 17 | int type; | ||
| 18 | int pkey_type; | ||
| 19 | int md_size; | ||
| 20 | void (*init)(); | ||
| 21 | void (*update)(); | ||
| 22 | void (*final)(); | ||
| 23 | |||
| 24 | int required_pkey_type; /*EVP_PKEY_xxx */ | ||
| 25 | int (*sign)(); | ||
| 26 | int (*verify)(); | ||
| 27 | } EVP_MD; | ||
| 28 | |||
| 29 | If additional message digest algorithms are to be supported, a structure of | ||
| 30 | this type needs to be declared and populated and then the Digest routines | ||
| 31 | can be used with that algorithm. The type field is the object NID of the | ||
| 32 | digest type (read the section on Objects for an explanation). The pkey_type | ||
| 33 | is the Object type to use when the a message digest is generated by there | ||
| 34 | routines and then is to be signed with the pkey algorithm. Md_size is | ||
| 35 | the size of the message digest returned. Init, update | ||
| 36 | and final are the relevant functions to perform the message digest function | ||
| 37 | by parts. One reason for specifying the message digest to use via this | ||
| 38 | mechanism is that if you only use md5, only the md5 routines will | ||
| 39 | be included in you linked program. If you passed an integer | ||
| 40 | that specified which message digest to use, the routine that mapped that | ||
| 41 | integer to a set of message digest functions would cause all the message | ||
| 42 | digests functions to be link into the code. This setup also allows new | ||
| 43 | message digest functions to be added by the application. | ||
| 44 | |||
| 45 | The six message digests defined in this library are | ||
| 46 | |||
| 47 | EVP_MD *EVP_md2(void); /* RSA sign/verify */ | ||
| 48 | EVP_MD *EVP_md5(void); /* RSA sign/verify */ | ||
| 49 | EVP_MD *EVP_sha(void); /* RSA sign/verify */ | ||
| 50 | EVP_MD *EVP_sha1(void); /* RSA sign/verify */ | ||
| 51 | EVP_MD *EVP_dss(void); /* DSA sign/verify */ | ||
| 52 | EVP_MD *EVP_dss1(void); /* DSA sign/verify */ | ||
| 53 | |||
| 54 | All the message digest routines take a EVP_MD_CTX pointer as an argument. | ||
| 55 | The state of the message digest is kept in this structure. | ||
| 56 | |||
| 57 | typedef struct pem_md_ctx_st | ||
| 58 | { | ||
| 59 | EVP_MD *digest; | ||
| 60 | union { | ||
| 61 | unsigned char base[4]; /* this is used in my library as a | ||
| 62 | * 'pointer' to all union elements | ||
| 63 | * structures. */ | ||
| 64 | MD2_CTX md2; | ||
| 65 | MD5_CTX md5; | ||
| 66 | SHA_CTX sha; | ||
| 67 | } md; | ||
| 68 | } EVP_MD_CTX; | ||
| 69 | |||
| 70 | The Digest functions are as follows. | ||
| 71 | |||
| 72 | void EVP_DigestInit( | ||
| 73 | EVP_MD_CTX *ctx, | ||
| 74 | EVP_MD *type); | ||
| 75 | This function is used to initialise the EVP_MD_CTX. The message | ||
| 76 | digest that will associated with 'ctx' is specified by 'type'. | ||
| 77 | |||
| 78 | void EVP_DigestUpdate( | ||
| 79 | EVP_MD_CTX *ctx, | ||
| 80 | unsigned char *data, | ||
| 81 | unsigned int cnt); | ||
| 82 | This function is used to pass more data to the message digest | ||
| 83 | function. 'cnt' bytes are digested from 'data'. | ||
| 84 | |||
| 85 | void EVP_DigestFinal( | ||
| 86 | EVP_MD_CTX *ctx, | ||
| 87 | unsigned char *md, | ||
| 88 | unsigned int *len); | ||
| 89 | This function finishes the digestion and puts the message digest | ||
| 90 | into 'md'. The length of the message digest is put into len; | ||
| 91 | EVP_MAX_MD_SIZE is the size of the largest message digest that | ||
| 92 | can be returned from this function. Len can be NULL if the | ||
| 93 | size of the digest is not required. | ||
| 94 | |||
diff --git a/src/lib/libssl/src/doc/encode.doc b/src/lib/libssl/src/doc/encode.doc new file mode 100644 index 0000000000..af17549289 --- /dev/null +++ b/src/lib/libssl/src/doc/encode.doc | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | |||
| 2 | void EVP_EncodeInit(EVP_ENCODE_CTX *ctx); | ||
| 3 | void EVP_EncodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out, | ||
| 4 | int *outl,unsigned char *in,int inl); | ||
| 5 | void EVP_EncodeFinal(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl); | ||
| 6 | int EVP_EncodeBlock(unsigned char *t, unsigned char *f, int n); | ||
| 7 | |||
| 8 | void EVP_DecodeInit(EVP_ENCODE_CTX *ctx); | ||
| 9 | int EVP_DecodeUpdate(EVP_ENCODE_CTX *ctx,unsigned char *out,int *outl, | ||
| 10 | unsigned char *in, int inl); | ||
| 11 | int EVP_DecodeFinal(EVP_ENCODE_CTX *ctx, unsigned | ||
| 12 | char *out, int *outl); | ||
| 13 | int EVP_DecodeBlock(unsigned char *t, unsigned | ||
| 14 | char *f, int n); | ||
| 15 | |||
diff --git a/src/lib/libssl/src/doc/envelope.doc b/src/lib/libssl/src/doc/envelope.doc new file mode 100644 index 0000000000..483e4fca6b --- /dev/null +++ b/src/lib/libssl/src/doc/envelope.doc | |||
| @@ -0,0 +1,67 @@ | |||
| 1 | The following routines are use to create 'digital' envelopes. | ||
| 2 | By this I mean that they perform various 'higher' level cryptographic | ||
| 3 | functions. Have a read of 'cipher.doc' and 'digest.doc' since those | ||
| 4 | routines are used by these functions. | ||
| 5 | cipher.doc contains documentation about the cipher part of the | ||
| 6 | envelope library and digest.doc contatins the description of the | ||
| 7 | message digests supported. | ||
| 8 | |||
| 9 | To 'sign' a document involves generating a message digest and then encrypting | ||
| 10 | the digest with an private key. | ||
| 11 | |||
| 12 | #define EVP_SignInit(a,b) EVP_DigestInit(a,b) | ||
| 13 | #define EVP_SignUpdate(a,b,c) EVP_DigestUpdate(a,b,c) | ||
| 14 | Due to the fact this operation is basically just an extended message | ||
| 15 | digest, the first 2 functions are macro calls to Digest generating | ||
| 16 | functions. | ||
| 17 | |||
| 18 | int EVP_SignFinal( | ||
| 19 | EVP_MD_CTX *ctx, | ||
| 20 | unsigned char *md, | ||
| 21 | unsigned int *s, | ||
| 22 | EVP_PKEY *pkey); | ||
| 23 | This finalisation function finishes the generation of the message | ||
| 24 | digest and then encrypts the digest (with the correct message digest | ||
| 25 | object identifier) with the EVP_PKEY private key. 'ctx' is the message digest | ||
| 26 | context. 'md' will end up containing the encrypted message digest. This | ||
| 27 | array needs to be EVP_PKEY_size(pkey) bytes long. 's' will actually | ||
| 28 | contain the exact length. 'pkey' of course is the private key. It is | ||
| 29 | one of EVP_PKEY_RSA or EVP_PKEY_DSA type. | ||
| 30 | If there is an error, 0 is returned, otherwise 1. | ||
| 31 | |||
| 32 | Verify is used to check an signed message digest. | ||
| 33 | |||
| 34 | #define EVP_VerifyInit(a,b) EVP_DigestInit(a,b) | ||
| 35 | #define EVP_VerifyUpdate(a,b,c) EVP_DigestUpdate(a,b,c) | ||
| 36 | Since the first step is to generate a message digest, the first 2 functions | ||
| 37 | are macros. | ||
| 38 | |||
| 39 | int EVP_VerifyFinal( | ||
| 40 | EVP_MD_CTX *ctx, | ||
| 41 | unsigned char *md, | ||
| 42 | unsigned int s, | ||
| 43 | EVP_PKEY *pkey); | ||
| 44 | This function finishes the generation of the message digest and then | ||
| 45 | compares it with the supplied encrypted message digest. 'md' contains the | ||
| 46 | 's' bytes of encrypted message digest. 'pkey' is used to public key decrypt | ||
| 47 | the digest. It is then compared with the message digest just generated. | ||
| 48 | If they match, 1 is returned else 0. | ||
| 49 | |||
| 50 | int EVP_SealInit(EVP_CIPHER_CTX *ctx, EVP_CIPHER *type, unsigned char **ek, | ||
| 51 | int *ekl, unsigned char *iv, EVP_PKEY **pubk, int npubk); | ||
| 52 | Must have at least one public key, error is 0. I should also mention that | ||
| 53 | the buffers pointed to by 'ek' need to be EVP_PKEY_size(pubk[n]) is size. | ||
| 54 | |||
| 55 | #define EVP_SealUpdate(a,b,c,d,e) EVP_EncryptUpdate(a,b,c,d,e) | ||
| 56 | void EVP_SealFinal(EVP_CIPHER_CTX *ctx,unsigned char *out,int *outl); | ||
| 57 | |||
| 58 | |||
| 59 | int EVP_OpenInit(EVP_CIPHER_CTX *ctx,EVP_CIPHER *type,unsigned char *ek, | ||
| 60 | int ekl,unsigned char *iv,EVP_PKEY *priv); | ||
| 61 | 0 on failure | ||
| 62 | |||
| 63 | #define EVP_OpenUpdate(a,b,c,d,e) EVP_DecryptUpdate(a,b,c,d,e) | ||
| 64 | |||
| 65 | int EVP_OpenFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl); | ||
| 66 | Decrypt final return code | ||
| 67 | |||
diff --git a/src/lib/libssl/src/doc/error.doc b/src/lib/libssl/src/doc/error.doc new file mode 100644 index 0000000000..a91654999a --- /dev/null +++ b/src/lib/libssl/src/doc/error.doc | |||
| @@ -0,0 +1,115 @@ | |||
| 1 | The error routines. | ||
| 2 | |||
| 3 | The 'error' system I've implemented is intended to server 2 purpose, to | ||
| 4 | record the reason why a command failed and to record where in the libraries | ||
| 5 | the failure occurred. It is more or less setup to record a 'trace' of which | ||
| 6 | library components were being traversed when the error occurred. | ||
| 7 | |||
| 8 | When an error is recorded, it is done so a as single unsigned long which is | ||
| 9 | composed of three parts. The top byte is the 'library' number, the middle | ||
| 10 | 12 bytes is the function code, and the bottom 12 bits is the 'reason' code. | ||
| 11 | |||
| 12 | Each 'library', or should a say, 'section' of the SSLeay library has a | ||
| 13 | different unique 'library' error number. Each function in the library has | ||
| 14 | a number that is unique for that library. Each 'library' also has a number | ||
| 15 | for each 'error reason' that is only unique for that 'library'. | ||
| 16 | |||
| 17 | Due to the way these error routines record a 'error trace', there is an | ||
| 18 | array per thread that is used to store the error codes. | ||
| 19 | The various functions in this library are used to access | ||
| 20 | and manipulate this array. | ||
| 21 | |||
| 22 | void ERR_put_error(int lib, int func,int reason); | ||
| 23 | This routine records an error in library 'lib', function 'func' | ||
| 24 | and reason 'reason'. As errors get 'put' into the buffer, they wrap | ||
| 25 | around and overwrite old errors if too many are written. It is assumed | ||
| 26 | that the last errors are the most important. | ||
| 27 | |||
| 28 | unsigned long ERR_get_error(void ); | ||
| 29 | This function returns the last error added to the error buffer. | ||
| 30 | In effect it is popping the value off the buffer so repeated calls will | ||
| 31 | continue to return values until there are no more errors to return in which | ||
| 32 | case 0 is returned. | ||
| 33 | |||
| 34 | unsigned long ERR_peek_error(void ); | ||
| 35 | This function returns the value of the last error added to the | ||
| 36 | error buffer but does not 'pop' it from the buffer. | ||
| 37 | |||
| 38 | void ERR_clear_error(void ); | ||
| 39 | This function clears the error buffer, discarding all unread | ||
| 40 | errors. | ||
| 41 | |||
| 42 | While the above described error system obviously produces lots of different | ||
| 43 | error number, a method for 'reporting' these errors in a human readable | ||
| 44 | form is required. To achieve this, each library has the option of | ||
| 45 | 'registering' error strings. | ||
| 46 | |||
| 47 | typedef struct ERR_string_data_st | ||
| 48 | { | ||
| 49 | unsigned long error; | ||
| 50 | char *string; | ||
| 51 | } ERR_STRING_DATA; | ||
| 52 | |||
| 53 | The 'ERR_STRING_DATA' contains an error code and the corresponding text | ||
| 54 | string. To add new function error strings for a library, the | ||
| 55 | ERR_STRING_DATA needs to be 'registered' with the library. | ||
| 56 | |||
| 57 | void ERR_load_strings(unsigned long lib,ERR_STRING_DATA *err); | ||
| 58 | This function 'registers' the array of ERR_STRING_DATA pointed to by | ||
| 59 | 'err' as error text strings for the error library 'lib'. | ||
| 60 | |||
| 61 | void ERR_free_strings(void); | ||
| 62 | This function free()s all the loaded error strings. | ||
| 63 | |||
| 64 | char *ERR_error_string(unsigned long error,char *buf); | ||
| 65 | This function returns a text string that is a human readable | ||
| 66 | version of the error represented by 'error'. Buff should be at least 120 | ||
| 67 | bytes long and if it is NULL, the return value is a pointer to a static | ||
| 68 | variable that will contain the error string, otherwise 'buf' is returned. | ||
| 69 | If there is not a text string registered for a particular error, a text | ||
| 70 | string containing the error number is returned instead. | ||
| 71 | |||
| 72 | void ERR_print_errors(BIO *bp); | ||
| 73 | void ERR_print_errors_fp(FILE *fp); | ||
| 74 | This function is a convenience routine that prints the error string | ||
| 75 | for each error until all errors have been accounted for. | ||
| 76 | |||
| 77 | char *ERR_lib_error_string(unsigned long e); | ||
| 78 | char *ERR_func_error_string(unsigned long e); | ||
| 79 | char *ERR_reason_error_string(unsigned long e); | ||
| 80 | The above three functions return the 3 different components strings for the | ||
| 81 | error 'e'. ERR_error_string() uses these functions. | ||
| 82 | |||
| 83 | void ERR_load_ERR_strings(void ); | ||
| 84 | This function 'registers' the error strings for the 'ERR' module. | ||
| 85 | |||
| 86 | void ERR_load_crypto_strings(void ); | ||
| 87 | This function 'register' the error strings for just about every | ||
| 88 | library in the SSLeay package except for the SSL routines. There is no | ||
| 89 | need to ever register any error text strings and you will probably save in | ||
| 90 | program size. If on the other hand you do 'register' all errors, it is | ||
| 91 | quite easy to determine why a particular routine failed. | ||
| 92 | |||
| 93 | As a final footnote as to why the error system is designed as it is. | ||
| 94 | 1) I did not want a single 'global' error code. | ||
| 95 | 2) I wanted to know which subroutine a failure occurred in. | ||
| 96 | 3) For Windows NT etc, it should be simple to replace the 'key' routines | ||
| 97 | with code to pass error codes back to the application. | ||
| 98 | 4) I wanted the option of meaningful error text strings. | ||
| 99 | |||
| 100 | Late breaking news - the changes to support threads. | ||
| 101 | |||
| 102 | Each 'thread' has an 'ERR_STATE' state associated with it. | ||
| 103 | ERR_STATE *ERR_get_state(void ) will return the 'state' for the calling | ||
| 104 | thread/process. | ||
| 105 | |||
| 106 | ERR_remove_state(unsigned long pid); will 'free()' this state. If pid == 0 | ||
| 107 | the current 'thread/process' will have it's error state removed. | ||
| 108 | If you do not remove the error state of a thread, this could be considered a | ||
| 109 | form of memory leak, so just after 'reaping' a thread that has died, | ||
| 110 | call ERR_remove_state(pid). | ||
| 111 | |||
| 112 | Have a read of thread.doc for more details for what is required for | ||
| 113 | multi-threading support. All the other error routines will | ||
| 114 | work correctly when using threads. | ||
| 115 | |||
diff --git a/src/lib/libssl/src/doc/legal.doc b/src/lib/libssl/src/doc/legal.doc new file mode 100644 index 0000000000..b55ed5ce6a --- /dev/null +++ b/src/lib/libssl/src/doc/legal.doc | |||
| @@ -0,0 +1,117 @@ | |||
| 1 | From eay@mincom.com Thu Jun 27 00:25:45 1996 | ||
| 2 | Received: by orb.mincom.oz.au id AA15821 | ||
| 3 | (5.65c/IDA-1.4.4 for eay); Wed, 26 Jun 1996 14:25:45 +1000 | ||
| 4 | Date: Wed, 26 Jun 1996 14:25:45 +1000 (EST) | ||
| 5 | From: Eric Young <eay@mincom.oz.au> | ||
| 6 | X-Sender: eay@orb | ||
| 7 | To: Ken Toll <ktoll@ren.digitalage.com> | ||
| 8 | Cc: Eric Young <eay@mincom.oz.au>, ssl-talk@netscape.com | ||
| 9 | Subject: Re: Unidentified subject! | ||
| 10 | In-Reply-To: <9606261950.ZM28943@ren.digitalage.com> | ||
| 11 | Message-Id: <Pine.SOL.3.91.960626131156.28573K-100000@orb> | ||
| 12 | Mime-Version: 1.0 | ||
| 13 | Content-Type: TEXT/PLAIN; charset=US-ASCII | ||
| 14 | Status: O | ||
| 15 | X-Status: | ||
| 16 | |||
| 17 | |||
| 18 | This is a little off topic but since SSLeay is a free implementation of | ||
| 19 | the SSLv2 protocol, I feel it is worth responding on the topic of if it | ||
| 20 | is actually legal for Americans to use free cryptographic software. | ||
| 21 | |||
| 22 | On Wed, 26 Jun 1996, Ken Toll wrote: | ||
| 23 | > Is the U.S the only country that SSLeay cannot be used commercially | ||
| 24 | > (because of RSAref) or is that going to be an issue with every country | ||
| 25 | > that a client/server application (non-web browser/server) is deployed | ||
| 26 | > and sold? | ||
| 27 | |||
| 28 | >From what I understand, the software patents that apply to algorithms | ||
| 29 | like RSA and DH only apply in the USA. The IDEA algorithm I believe is | ||
| 30 | patened in europe (USA?), but considing how little it is used by other SSL | ||
| 31 | implementations, it quite easily be left out of the SSLeay build | ||
| 32 | (this can be done with a compile flag). | ||
| 33 | |||
| 34 | Actually if the RSA patent did apply outside the USA, it could be rather | ||
| 35 | interesting since RSA is not alowed to let RSA toolkits outside of the USA | ||
| 36 | [1], and since these are the only forms that they will alow the algorithm | ||
| 37 | to be used in, it would mean that non-one outside of the USA could produce | ||
| 38 | public key software which would be a very strong statment for | ||
| 39 | international patent law to make :-). This logic is a little flawed but | ||
| 40 | it still points out some of the more interesting permutations of USA | ||
| 41 | patent law and ITAR restrictions. | ||
| 42 | |||
| 43 | Inside the USA there is also the unresolved issue of RC4/RC2 which were | ||
| 44 | made public on sci.crypt in Sep 1994 (RC4) and Feb 1996 (RC2). I have | ||
| 45 | copies of the origional postings if people are interested. RSA I believe | ||
| 46 | claim that they were 'trade-secrets' and that some-one broke an NDA in | ||
| 47 | revealing them. Other claim they reverse engineered the algorithms from | ||
| 48 | compiled binaries. If the algorithms were reverse engineered, I belive | ||
| 49 | RSA had no legal leg to stand on. If an NDA was broken, I don't know. | ||
| 50 | Regardless, RSA, I belive, is willing to go to court over the issue so | ||
| 51 | licencing is probably the best idea, or at least talk to them. | ||
| 52 | If there are people who actually know more about this, pease let me know, I | ||
| 53 | don't want to vilify or spread miss-information if I can help it. | ||
| 54 | |||
| 55 | If you are not producing a web browser, it is easy to build SSLeay with | ||
| 56 | RC2/RC4 removed. Since RC4 is the defacto standard cipher in | ||
| 57 | all web software (and it is damn fast) it is more or less required for | ||
| 58 | www use. For non www use of SSL, especially for an application where | ||
| 59 | interoperability with other vendors is not critical just leave it out. | ||
| 60 | |||
| 61 | Removing IDEA, RC2 and RC4 would only leave DES and Triple DES but | ||
| 62 | they should be ok. Considing that Triple DES can encrypt at rates of | ||
| 63 | 410k/sec on a pentium 100, and 940k/sec on a P6/200, this is quite | ||
| 64 | reasonable performance. Single DES clocks in at 1160k/s and 2467k/s | ||
| 65 | respectivly is actually quite fast for those not so paranoid (56 bit key).[1] | ||
| 66 | |||
| 67 | > Is it possible to get a certificate for commercial use outside of the U.S.? | ||
| 68 | yes. | ||
| 69 | |||
| 70 | Thawte Consulting issues certificates (they are the people who sell the | ||
| 71 | Sioux httpd server and are based in South Africa) | ||
| 72 | Verisign will issue certificates for Sioux (sold from South Africa), so this | ||
| 73 | proves that they will issue certificate for OS use if they are | ||
| 74 | happy with the quality of the software. | ||
| 75 | |||
| 76 | (The above mentioned companies just the ones that I know for sure are issuing | ||
| 77 | certificates outside the USA). | ||
| 78 | |||
| 79 | There is always the point that if you are using SSL for an intra net, | ||
| 80 | SSLeay provides programs that can be used so you can issue your own | ||
| 81 | certificates. They need polishing but at least it is a good starting point. | ||
| 82 | |||
| 83 | I am not doing anything outside Australian law by implementing these | ||
| 84 | algorithms (to the best of my knowedge). It is another example of how | ||
| 85 | the world legal system does not cope with the internet very well. | ||
| 86 | |||
| 87 | I may start making shared libraries available (I have now got DLL's for | ||
| 88 | Windows). This will mean that distributions into the usa could be | ||
| 89 | shipped with a version with a reduced cipher set and the versions outside | ||
| 90 | could use the DLL/shared library with all the ciphers (and without RSAref). | ||
| 91 | |||
| 92 | This could be completly hidden from the application, so this would not | ||
| 93 | even require a re-linking. | ||
| 94 | |||
| 95 | This is the reverse of what people were talking about doing to get around | ||
| 96 | USA export regulations :-) | ||
| 97 | |||
| 98 | eric | ||
| 99 | |||
| 100 | [1]: The RSAref2.0 tookit is available on at least 3 ftp sites in Europe | ||
| 101 | and one in South Africa. | ||
| 102 | |||
| 103 | [2]: Since I always get questions when I post benchmark numbers :-), | ||
| 104 | DES performace figures are in 1000's of bytes per second in cbc | ||
| 105 | mode using an 8192 byte buffer. The pentium 100 was running Windows NT | ||
| 106 | 3.51 DLLs and the 686/200 was running NextStep. | ||
| 107 | I quote pentium 100 benchmarks because it is basically the | ||
| 108 | 'entry level' computer that most people buy for personal use. | ||
| 109 | Windows 95 is the OS shipping on those boxes, so I'll give | ||
| 110 | NT numbers (the same Win32 runtime environment). The 686 | ||
| 111 | numbers are present as an indication of where we will be in a | ||
| 112 | few years. | ||
| 113 | -- | ||
| 114 | Eric Young | BOOL is tri-state according to Bill Gates. | ||
| 115 | AARNet: eay@mincom.oz.au | RTFM Win32 GetMessage(). | ||
| 116 | |||
| 117 | |||
diff --git a/src/lib/libssl/src/doc/lhash.doc b/src/lib/libssl/src/doc/lhash.doc new file mode 100644 index 0000000000..5a2aeb4b38 --- /dev/null +++ b/src/lib/libssl/src/doc/lhash.doc | |||
| @@ -0,0 +1,151 @@ | |||
| 1 | The LHASH library. | ||
| 2 | |||
| 3 | I wrote this library in 1991 and have since forgotten why I called it lhash. | ||
| 4 | It implements a hash table from an article I read at the | ||
| 5 | time from 'Communications of the ACM'. What makes this hash | ||
| 6 | table different is that as the table fills, the hash table is | ||
| 7 | increased (or decreased) in size via realloc(). | ||
| 8 | When a 'resize' is done, instead of all hashes being redistributed over | ||
| 9 | twice as many 'buckets', one bucket is split. So when an 'expand' is done, | ||
| 10 | there is only a minimal cost to redistribute some values. Subsequent | ||
| 11 | inserts will cause more single 'bucket' redistributions but there will | ||
| 12 | never be a sudden large cost due to redistributing all the 'buckets'. | ||
| 13 | |||
| 14 | The state for a particular hash table is kept in the LHASH structure. | ||
| 15 | The LHASH structure also records statistics about most aspects of accessing | ||
| 16 | the hash table. This is mostly a legacy of my writing this library for | ||
| 17 | the reasons of implementing what looked like a nice algorithm rather than | ||
| 18 | for a particular software product. | ||
| 19 | |||
| 20 | Internal stuff you probably don't want to know about. | ||
| 21 | The decision to increase or decrease the hash table size is made depending | ||
| 22 | on the 'load' of the hash table. The load is the number of items in the | ||
| 23 | hash table divided by the size of the hash table. The default values are | ||
| 24 | as follows. If (hash->up_load < load) => expand. | ||
| 25 | if (hash->down_load > load) => contract. The 'up_load' has a default value of | ||
| 26 | 1 and 'down_load' has a default value of 2. These numbers can be modified | ||
| 27 | by the application by just playing with the 'up_load' and 'down_load' | ||
| 28 | variables. The 'load' is kept in a form which is multiplied by 256. So | ||
| 29 | hash->up_load=8*256; will cause a load of 8 to be set. | ||
| 30 | |||
| 31 | If you are interested in performance the field to watch is | ||
| 32 | num_comp_calls. The hash library keeps track of the 'hash' value for | ||
| 33 | each item so when a lookup is done, the 'hashes' are compared, if | ||
| 34 | there is a match, then a full compare is done, and | ||
| 35 | hash->num_comp_calls is incremented. If num_comp_calls is not equal | ||
| 36 | to num_delete plus num_retrieve it means that your hash function is | ||
| 37 | generating hashes that are the same for different values. It is | ||
| 38 | probably worth changing your hash function if this is the case because | ||
| 39 | even if your hash table has 10 items in a 'bucked', it can be searched | ||
| 40 | with 10 'unsigned long' compares and 10 linked list traverses. This | ||
| 41 | will be much less expensive that 10 calls to you compare function. | ||
| 42 | |||
| 43 | LHASH *lh_new( | ||
| 44 | unsigned long (*hash)(), | ||
| 45 | int (*cmp)()); | ||
| 46 | This function is used to create a new LHASH structure. It is passed | ||
| 47 | function pointers that are used to store and retrieve values passed | ||
| 48 | into the hash table. The 'hash' | ||
| 49 | function is a hashing function that will return a hashed value of | ||
| 50 | it's passed structure. 'cmp' is passed 2 parameters, it returns 0 | ||
| 51 | is they are equal, otherwise, non zero. | ||
| 52 | If there are any problems (usually malloc failures), NULL is | ||
| 53 | returned, otherwise a new LHASH structure is returned. The | ||
| 54 | hash value is normally truncated to a power of 2, so make sure | ||
| 55 | that your hash function returns well mixed low order bits. | ||
| 56 | |||
| 57 | void lh_free( | ||
| 58 | LHASH *lh); | ||
| 59 | This function free()s a LHASH structure. If there is malloced | ||
| 60 | data in the hash table, it will not be freed. Consider using the | ||
| 61 | lh_doall function to deallocate any remaining entries in the hash | ||
| 62 | table. | ||
| 63 | |||
| 64 | char *lh_insert( | ||
| 65 | LHASH *lh, | ||
| 66 | char *data); | ||
| 67 | This function inserts the data pointed to by data into the lh hash | ||
| 68 | table. If there is already and entry in the hash table entry, the | ||
| 69 | value being replaced is returned. A NULL is returned if the new | ||
| 70 | entry does not clash with an entry already in the table (the normal | ||
| 71 | case) or on a malloc() failure (perhaps I should change this....). | ||
| 72 | The 'char *data' is exactly what is passed to the hash and | ||
| 73 | comparison functions specified in lh_new(). | ||
| 74 | |||
| 75 | char *lh_delete( | ||
| 76 | LHASH *lh, | ||
| 77 | char *data); | ||
| 78 | This routine deletes an entry from the hash table. The value being | ||
| 79 | deleted is returned. NULL is returned if there is no such value in | ||
| 80 | the hash table. | ||
| 81 | |||
| 82 | char *lh_retrieve( | ||
| 83 | LHASH *lh, | ||
| 84 | char *data); | ||
| 85 | If 'data' is in the hash table it is returned, else NULL is | ||
| 86 | returned. The way these routines would normally be uses is that a | ||
| 87 | dummy structure would have key fields populated and then | ||
| 88 | ret=lh_retrieve(hash,&dummy);. Ret would now be a pointer to a fully | ||
| 89 | populated structure. | ||
| 90 | |||
| 91 | void lh_doall( | ||
| 92 | LHASH *lh, | ||
| 93 | void (*func)(char *a)); | ||
| 94 | This function will, for every entry in the hash table, call function | ||
| 95 | 'func' with the data item as parameters. | ||
| 96 | This function can be quite useful when used as follows. | ||
| 97 | void cleanup(STUFF *a) | ||
| 98 | { STUFF_free(a); } | ||
| 99 | lh_doall(hash,cleanup); | ||
| 100 | lh_free(hash); | ||
| 101 | This can be used to free all the entries, lh_free() then | ||
| 102 | cleans up the 'buckets' that point to nothing. Be careful | ||
| 103 | when doing this. If you delete entries from the hash table, | ||
| 104 | in the call back function, the table may decrease in size, | ||
| 105 | moving item that you are | ||
| 106 | currently on down lower in the hash table. This could cause | ||
| 107 | some entries to be skipped. The best solution to this problem | ||
| 108 | is to set lh->down_load=0 before you start. This will stop | ||
| 109 | the hash table ever being decreased in size. | ||
| 110 | |||
| 111 | void lh_doall_arg( | ||
| 112 | LHASH *lh; | ||
| 113 | void(*func)(char *a,char *arg)); | ||
| 114 | char *arg; | ||
| 115 | This function is the same as lh_doall except that the function | ||
| 116 | called will be passed 'arg' as the second argument. | ||
| 117 | |||
| 118 | unsigned long lh_strhash( | ||
| 119 | char *c); | ||
| 120 | This function is a demo string hashing function. Since the LHASH | ||
| 121 | routines would normally be passed structures, this routine would | ||
| 122 | not normally be passed to lh_new(), rather it would be used in the | ||
| 123 | function passed to lh_new(). | ||
| 124 | |||
| 125 | The next three routines print out various statistics about the state of the | ||
| 126 | passed hash table. These numbers are all kept in the lhash structure. | ||
| 127 | |||
| 128 | void lh_stats( | ||
| 129 | LHASH *lh, | ||
| 130 | FILE *out); | ||
| 131 | This function prints out statistics on the size of the hash table, | ||
| 132 | how many entries are in it, and the number and result of calls to | ||
| 133 | the routines in this library. | ||
| 134 | |||
| 135 | void lh_node_stats( | ||
| 136 | LHASH *lh, | ||
| 137 | FILE *out); | ||
| 138 | For each 'bucket' in the hash table, the number of entries is | ||
| 139 | printed. | ||
| 140 | |||
| 141 | void lh_node_usage_stats( | ||
| 142 | LHASH *lh, | ||
| 143 | FILE *out); | ||
| 144 | This function prints out a short summary of the state of the hash | ||
| 145 | table. It prints what I call the 'load' and the 'actual load'. | ||
| 146 | The load is the average number of data items per 'bucket' in the | ||
| 147 | hash table. The 'actual load' is the average number of items per | ||
| 148 | 'bucket', but only for buckets which contain entries. So the | ||
| 149 | 'actual load' is the average number of searches that will need to | ||
| 150 | find an item in the hash table, while the 'load' is the average number | ||
| 151 | that will be done to record a miss. | ||
diff --git a/src/lib/libssl/src/doc/md2.doc b/src/lib/libssl/src/doc/md2.doc new file mode 100644 index 0000000000..b106bc675d --- /dev/null +++ b/src/lib/libssl/src/doc/md2.doc | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | The MD2 library. | ||
| 2 | MD2 is a message digest algorithm that can be used to condense an arbitrary | ||
| 3 | length message down to a 16 byte hash. The functions all need to be passed | ||
| 4 | a MD2_CTX which is used to hold the MD2 context during multiple MD2_Update() | ||
| 5 | function calls. The normal method of use for this library is as follows | ||
| 6 | |||
| 7 | MD2_Init(...); | ||
| 8 | MD2_Update(...); | ||
| 9 | ... | ||
| 10 | MD2_Update(...); | ||
| 11 | MD2_Final(...); | ||
| 12 | |||
| 13 | This library requires the inclusion of 'md2.h'. | ||
| 14 | |||
| 15 | The main negative about MD2 is that it is slow, especially when compared | ||
| 16 | to MD5. | ||
| 17 | |||
| 18 | The functions are as follows: | ||
| 19 | |||
| 20 | void MD2_Init( | ||
| 21 | MD2_CTX *c); | ||
| 22 | This function needs to be called to initiate a MD2_CTX structure for | ||
| 23 | use. | ||
| 24 | |||
| 25 | void MD2_Update( | ||
| 26 | MD2_CTX *c; | ||
| 27 | unsigned char *data; | ||
| 28 | unsigned long len); | ||
| 29 | This updates the message digest context being generated with 'len' | ||
| 30 | bytes from the 'data' pointer. The number of bytes can be any | ||
| 31 | length. | ||
| 32 | |||
| 33 | void MD2_Final( | ||
| 34 | unsigned char *md; | ||
| 35 | MD2_CTX *c; | ||
| 36 | This function is called when a message digest of the data digested | ||
| 37 | with MD2_Update() is wanted. The message digest is put in the 'md' | ||
| 38 | array and is MD2_DIGEST_LENGTH (16) bytes long. | ||
| 39 | |||
| 40 | unsigned char *MD2( | ||
| 41 | unsigned long n; | ||
| 42 | unsigned char *d; | ||
| 43 | unsigned char *md; | ||
| 44 | This function performs a MD2_Init(), followed by a MD2_Update() | ||
| 45 | followed by a MD2_Final() (using a local MD2_CTX). | ||
| 46 | The resulting digest is put into 'md' if it is not NULL. | ||
| 47 | Regardless of the value of 'md', the message | ||
| 48 | digest is returned from the function. If 'md' was NULL, the message | ||
| 49 | digest returned is being stored in a static structure. | ||
diff --git a/src/lib/libssl/src/doc/md5.doc b/src/lib/libssl/src/doc/md5.doc new file mode 100644 index 0000000000..519dbdc61a --- /dev/null +++ b/src/lib/libssl/src/doc/md5.doc | |||
| @@ -0,0 +1,50 @@ | |||
| 1 | The MD5 library. | ||
| 2 | MD5 is a message digest algorithm that can be used to condense an arbitrary | ||
| 3 | length message down to a 16 byte hash. The functions all need to be passed | ||
| 4 | a MD5_CTX which is used to hold the MD5 context during multiple MD5_Update() | ||
| 5 | function calls. This library also contains random number routines that are | ||
| 6 | based on MD5 | ||
| 7 | |||
| 8 | The normal method of use for this library is as follows | ||
| 9 | |||
| 10 | MD5_Init(...); | ||
| 11 | MD5_Update(...); | ||
| 12 | ... | ||
| 13 | MD5_Update(...); | ||
| 14 | MD5_Final(...); | ||
| 15 | |||
| 16 | This library requires the inclusion of 'md5.h'. | ||
| 17 | |||
| 18 | The functions are as follows: | ||
| 19 | |||
| 20 | void MD5_Init( | ||
| 21 | MD5_CTX *c); | ||
| 22 | This function needs to be called to initiate a MD5_CTX structure for | ||
| 23 | use. | ||
| 24 | |||
| 25 | void MD5_Update( | ||
| 26 | MD5_CTX *c; | ||
| 27 | unsigned char *data; | ||
| 28 | unsigned long len); | ||
| 29 | This updates the message digest context being generated with 'len' | ||
| 30 | bytes from the 'data' pointer. The number of bytes can be any | ||
| 31 | length. | ||
| 32 | |||
| 33 | void MD5_Final( | ||
| 34 | unsigned char *md; | ||
| 35 | MD5_CTX *c; | ||
| 36 | This function is called when a message digest of the data digested | ||
| 37 | with MD5_Update() is wanted. The message digest is put in the 'md' | ||
| 38 | array and is MD5_DIGEST_LENGTH (16) bytes long. | ||
| 39 | |||
| 40 | unsigned char *MD5( | ||
| 41 | unsigned char *d; | ||
| 42 | unsigned long n; | ||
| 43 | unsigned char *md; | ||
| 44 | This function performs a MD5_Init(), followed by a MD5_Update() | ||
| 45 | followed by a MD5_Final() (using a local MD5_CTX). | ||
| 46 | The resulting digest is put into 'md' if it is not NULL. | ||
| 47 | Regardless of the value of 'md', the message | ||
| 48 | digest is returned from the function. If 'md' was NULL, the message | ||
| 49 | digest returned is being stored in a static structure. | ||
| 50 | |||
diff --git a/src/lib/libssl/src/doc/memory.doc b/src/lib/libssl/src/doc/memory.doc new file mode 100644 index 0000000000..b9aa33ace0 --- /dev/null +++ b/src/lib/libssl/src/doc/memory.doc | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | In the interests of debugging SSLeay, there is an option to compile | ||
| 2 | using some simple memory leak checking. | ||
| 3 | |||
| 4 | All malloc(), free() and realloc() calls in SSLeay now go via | ||
| 5 | Malloc(), Free() and Realloc() (except those in crypto/lhash). | ||
| 6 | |||
| 7 | If CRYPTO_MDEBUG is defined, these calls are #defined to | ||
| 8 | CRYPTO_malloc(), CRYPTO_free() and CRYPTO_realloc(). | ||
| 9 | If it is not defined, they are #defined to malloc(), free() and realloc(). | ||
| 10 | |||
| 11 | the CRYPTO_malloc() routines by default just call the underlying library | ||
| 12 | functons. | ||
| 13 | |||
| 14 | If CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_ON) is called, memory leak detection is | ||
| 15 | turned on. CRYPTO_mem_ctrl(CRYPTO_MEM_CHECK_OFF) turns it off. | ||
| 16 | |||
| 17 | When turned on, each Malloc() or Realloc() call is recored along with the file | ||
| 18 | and line number from where the call was made. (This is done using the | ||
| 19 | lhash library which always uses normal system malloc(3) routines). | ||
| 20 | |||
| 21 | void CRYPTO_mem_leaks(BIO *b); | ||
| 22 | void CRYPTO_mem_leaks_fp(FILE *fp); | ||
| 23 | These both print out the list of memory that has not been free()ed. | ||
| 24 | This will probably be rather hard to read, but if you look for the 'top level' | ||
| 25 | structure allocation, this will often give an idea as to what is not being | ||
| 26 | free()ed. I don't expect people to use this stuff normally. | ||
| 27 | |||
diff --git a/src/lib/libssl/src/doc/ms3-ca.doc b/src/lib/libssl/src/doc/ms3-ca.doc new file mode 100644 index 0000000000..f8350aadc2 --- /dev/null +++ b/src/lib/libssl/src/doc/ms3-ca.doc | |||
| @@ -0,0 +1,398 @@ | |||
| 1 | Date: Mon, 9 Jun 97 08:00:33 +0200 | ||
| 2 | From: Holger.Reif@PrakInf.TU-Ilmenau.DE (Holger Reif) | ||
| 3 | Subject: ms3-ca.doc | ||
| 4 | Organization: TU Ilmenau, Fak. IA, FG Telematik | ||
| 5 | Content-Length: 14575 | ||
| 6 | Status: RO | ||
| 7 | X-Status: | ||
| 8 | |||
| 9 | Loading client certs into MSIE 3.01 | ||
| 10 | =================================== | ||
| 11 | |||
| 12 | This document conatains all the information necessary to succesfully set up | ||
| 13 | some scripts to issue client certs to Microsoft Internet Explorer. It | ||
| 14 | includes the required knowledge about the model MSIE uses for client | ||
| 15 | certification and includes complete sample scripts ready to play with. The | ||
| 16 | scripts were tested against a modified ca program of SSLeay 0.6.6 and should | ||
| 17 | work with the regular ca program that comes with version 0.8.0. I haven't | ||
| 18 | tested against MSIE 4.0 | ||
| 19 | |||
| 20 | You can use the information contained in this document in either way you | ||
| 21 | want. However if you feel it saved you a lot of time I ask you to be as fair | ||
| 22 | as to mention my name: Holger Reif <reif@prakinf.tu-ilmenau.de>. | ||
| 23 | |||
| 24 | 1.) The model used by MSIE | ||
| 25 | -------------------------- | ||
| 26 | |||
| 27 | The Internet Explorer doesn't come with a embedded engine for installing | ||
| 28 | client certs like Netscape's Navigator. It rather uses the CryptoAPI (CAPI) | ||
| 29 | defined by Microsoft. CAPI comes with WindowsNT 4.0 or is installed together | ||
| 30 | with Internet Explorer since 3.01. The advantage of this approach is a higher | ||
| 31 | flexibility because the certificates in the (per user) system open | ||
| 32 | certificate store may be used by other applications as well. The drawback | ||
| 33 | however is that you need to do a bit more work to get a client cert issued. | ||
| 34 | |||
| 35 | CAPI defines functions which will handle basic cryptographic work, eg. | ||
| 36 | generating keys, encrypting some data, signing text or building a certificate | ||
| 37 | request. The procedure is as follows: A CAPI function generates you a key | ||
| 38 | pair and saves it into the certificate store. After that one builds a | ||
| 39 | Distinguished Name. Together with that key pair another CAPI function forms a | ||
| 40 | PKCS#10 request which you somehow need to submit to a CA. Finally the issued | ||
| 41 | cert is given to a yet another CAPI function which saves it into the | ||
| 42 | certificate store. | ||
| 43 | |||
| 44 | The certificate store with the user's keys and certs is in the registry. You | ||
| 45 | will find it under HKEY_CURRENT_USER/Software/Microsoft/Cryptography/ (I | ||
| 46 | leave it to you as a little exercise to figure out what all the entries mean | ||
| 47 | ;-). Note that the keys are protected only with the user's usual Windows | ||
| 48 | login password. | ||
| 49 | |||
| 50 | 2.) The practical usage | ||
| 51 | ----------------------- | ||
| 52 | |||
| 53 | Unfortunatly since CAPI is a system API you can't access its functions from | ||
| 54 | HTML code directly. For this purpose Microsoft provides a wrapper called | ||
| 55 | certenr3.dll. This DLL accesses the CAPI functions and provides an interface | ||
| 56 | usable from Visual Basic Script. One needs to install that library on the | ||
| 57 | computer which wants to have client cert. The easiest way is to load it as an | ||
| 58 | ActiveX control (certenr3.dll is properly authenticode signed by MS ;-). If | ||
| 59 | you have ever enrolled e cert request at a CA you will have installed it. | ||
| 60 | |||
| 61 | At time of writing certenr3.dll is contained in | ||
| 62 | http://www.microsoft.com/workshop/prog/security/csa/certenr3.exe. It comes | ||
| 63 | with an README file which explains the available functions. It is labeled | ||
| 64 | beta but every CA seems to use it anyway. The license.txt allows you the | ||
| 65 | usage for your own purposes (as far as I understood) and a somehow limited | ||
| 66 | distribution. | ||
| 67 | |||
| 68 | The two functions of main interest are GenerateKeyPair and AcceptCredentials. | ||
| 69 | For complete explanation of all possible parameters see the README file. Here | ||
| 70 | are only minimal required parameters and their values. | ||
| 71 | |||
| 72 | GenerateKeyPair(sessionID, FASLE, szName, 0, "ClientAuth", TRUE, FALSE, 1) | ||
| 73 | - sessionID is a (locally to that computer) unique string to correlate the | ||
| 74 | generated key pair with a cert installed later. | ||
| 75 | - szName is the DN of the form "C=DE; S=Thueringen; L=Ilmenau; CN=Holger | ||
| 76 | Reif; 1.2.840.113549.1.9.1=reif@prakinf.tu-ilmenau.de". Note that S is the | ||
| 77 | abreviation for StateOrProvince. The recognized abreviation include CN, O, C, | ||
| 78 | OU, G, I, L, S, T. If the abreviation is unknown (eg. for PKCS#9 email addr) | ||
| 79 | you need to use the full object identifier. The starting point for searching | ||
| 80 | them could be crypto/objects.h since all OIDs know to SSLeay are listed | ||
| 81 | there. | ||
| 82 | - note: the possible ninth parameter which should give a default name to the | ||
| 83 | certificate storage location doesn't seem to work. Changes to the constant | ||
| 84 | values in the call above doesn't seem to make sense. You can't generate | ||
| 85 | PKCS#10 extensions with that function. | ||
| 86 | |||
| 87 | The result of GenerateKeyPair is the base64 encoded PKCS#10 request. However | ||
| 88 | it has a little strange format that SSLeay doesn't accept. (BTW I feel the | ||
| 89 | decision of rejecting that format as standard conforming.) It looks like | ||
| 90 | follows: | ||
| 91 | 1st line with 76 chars | ||
| 92 | 2nd line with 76 chars | ||
| 93 | ... | ||
| 94 | (n-2)th line with 76 chars | ||
| 95 | (n-1)th line contains a multiple of 4 chars less then 76 (possible | ||
| 96 | empty) | ||
| 97 | (n)th line has zero or 4 chars (then with 1 or 2 equal signs - the | ||
| 98 | original text's lenght wasn'T a multiple of 3) | ||
| 99 | The line separator has two chars: 0x0d 0x0a | ||
| 100 | |||
| 101 | AcceptCredentials(sessionID, credentials, 0, FALSE) | ||
| 102 | - sessionID needs to be the same as while generating the key pair | ||
| 103 | - credentials is the base64 encoded PKCS#7 object containing the cert. | ||
| 104 | |||
| 105 | CRL's and CA certs are not required simply just the client cert. (It seems to | ||
| 106 | me that both are not even checked somehow.) The only format of the base64 | ||
| 107 | encoded object I succesfully used was all characters in a very long string | ||
| 108 | without line feeds or carriage returns. (Hey, it doesn't matter, only a | ||
| 109 | computer reads it!) | ||
| 110 | |||
| 111 | The result should be S_OK. For error handling see the example that comes with | ||
| 112 | certenr3.dll. | ||
| 113 | |||
| 114 | A note about ASN.1 character encodings. certenr3.dll seems to know only about | ||
| 115 | 2 of them: UniversalString and PrintableString. First it is definitely wrong | ||
| 116 | for an email address which is IA5STRING (checked by ssleay's ca). Second | ||
| 117 | unfortunately MSIE (at least until version 3.02) can't handle UniversalString | ||
| 118 | correctly - they just blow up you cert store! Therefore ssleay's ca (starting | ||
| 119 | from version 0.8.0) tries to convert the encodings automatically to IA5STRING | ||
| 120 | or TeletexString. The beef is it will work only for the latin-1 (western) | ||
| 121 | charset. Microsoft still has to do abit of homework... | ||
| 122 | |||
| 123 | 3.) An example | ||
| 124 | -------------- | ||
| 125 | |||
| 126 | At least you need two steps: generating the key & request and then installing | ||
| 127 | the certificate. A real world CA would have some more steps involved, eg. | ||
| 128 | accepting some license. Note that both scripts shown below are just | ||
| 129 | experimental state without any warrenty! | ||
| 130 | |||
| 131 | First how to generate a request. Note that we can't use a static page because | ||
| 132 | of the sessionID. I generate it from system time plus pid and hope it is | ||
| 133 | unique enough. Your are free to feed it through md5 to get more impressive | ||
| 134 | ID's ;-) Then the intended text is read in with sed which inserts the | ||
| 135 | sessionID. | ||
| 136 | |||
| 137 | -----BEGIN ms-enroll.cgi----- | ||
| 138 | #!/bin/sh | ||
| 139 | SESSION_ID=`date '+%y%m%d%H%M%S'`$$ | ||
| 140 | echo Content-type: text/html | ||
| 141 | echo | ||
| 142 | sed s/template_for_sessId/$SESSION_ID/ <<EOF | ||
| 143 | <HTML><HEAD> | ||
| 144 | <TITLE>Certificate Enrollment Test Page</TITLE> | ||
| 145 | </HEAD><BODY> | ||
| 146 | |||
| 147 | <OBJECT | ||
| 148 | classid="clsid:33BEC9E0-F78F-11cf-B782-00C04FD7BF43" | ||
| 149 | codebase=certenr3.dll | ||
| 150 | id=certHelper | ||
| 151 | > | ||
| 152 | </OBJECT> | ||
| 153 | |||
| 154 | <CENTER> | ||
| 155 | <H2>enrollment for a personal cert</H2> | ||
| 156 | <BR><HR WIDTH=50%><BR><P> | ||
| 157 | <FORM NAME="MSIE_Enrollment" ACTION="ms-gencert.cgi" ENCTYPE=x-www-form- | ||
| 158 | encoded METHOD=POST> | ||
| 159 | <TABLE> | ||
| 160 | <TR><TD>Country</TD><TD><INPUT NAME="Country" VALUE=""></TD></TR> | ||
| 161 | <TR><TD>State</TD><TD><INPUT NAME="StateOrProvince" VALUE=""></TD></TR> | ||
| 162 | <TR><TD>Location</TD><TD><INPUT NAME="Location" VALUE=""></TD></TR> | ||
| 163 | <TR><TD>Organization</TD><TD><INPUT NAME="Organization" | ||
| 164 | VALUE=""></TD></TR> | ||
| 165 | <TR><TD>Organizational Unit</TD> | ||
| 166 | <TD><INPUT NAME="OrganizationalUnit" VALUE=""></TD></TR> | ||
| 167 | <TR><TD>Name</TD><TD><INPUT NAME="CommonName" VALUE=""></TD></TR> | ||
| 168 | <TR><TD>eMail Address</TD> | ||
| 169 | <TD><INPUT NAME="EmailAddress" VALUE=""></TD></TR> | ||
| 170 | <TR><TD></TD> | ||
| 171 | <TD><INPUT TYPE="BUTTON" NAME="submit" VALUE="Beantragen"></TD></TR> | ||
| 172 | </TABLE> | ||
| 173 | <INPUT TYPE="hidden" NAME="SessionId" VALUE="template_for_sessId"> | ||
| 174 | <INPUT TYPE="hidden" NAME="Request" VALUE=""> | ||
| 175 | </FORM> | ||
| 176 | <BR><HR WIDTH=50%><BR><P> | ||
| 177 | </CENTER> | ||
| 178 | |||
| 179 | <SCRIPT LANGUAGE=VBS> | ||
| 180 | Dim DN | ||
| 181 | |||
| 182 | Sub Submit_OnClick | ||
| 183 | Dim TheForm | ||
| 184 | Set TheForm = Document.MSIE_Enrollment | ||
| 185 | sessionId = TheForm.SessionId.value | ||
| 186 | reqHardware = FALSE | ||
| 187 | C = TheForm.Country.value | ||
| 188 | SP = TheForm.StateOrProvince.value | ||
| 189 | L = TheForm.Location.value | ||
| 190 | O = TheForm.Organization.value | ||
| 191 | OU = TheForm.OrganizationalUnit.value | ||
| 192 | CN = TheForm.CommonName.value | ||
| 193 | Email = TheForm.EmailAddress.value | ||
| 194 | szPurpose = "ClientAuth" | ||
| 195 | doAcceptanceUINow = FALSE | ||
| 196 | doOnline = TRUE | ||
| 197 | |||
| 198 | DN = "" | ||
| 199 | |||
| 200 | Call Add_RDN("C", C) | ||
| 201 | Call Add_RDN("S", SP) | ||
| 202 | Call Add_RDN("L", L) | ||
| 203 | Call Add_RDN("O", O) | ||
| 204 | Call Add_RDN("OU", OU) | ||
| 205 | Call Add_RDN("CN", CN) | ||
| 206 | Call Add_RDN("1.2.840.113549.1.9.1", Email) | ||
| 207 | ' rsadsi | ||
| 208 | ' pkcs | ||
| 209 | ' pkcs9 | ||
| 210 | ' eMailAddress | ||
| 211 | On Error Resume Next | ||
| 212 | sz10 = certHelper.GenerateKeyPair(sessionId, _ | ||
| 213 | FALSE, DN, 0, ClientAuth, FASLE, TRUE, 1)_ | ||
| 214 | theError = Err.Number | ||
| 215 | On Error Goto 0 | ||
| 216 | if (sz10 = Empty OR theError <> 0) Then | ||
| 217 | sz = "The error '" & Hex(theError) & "' occurred." & chr(13) & _ | ||
| 218 | chr(10) & "Your credentials could not be generated." | ||
| 219 | result = MsgBox(sz, 0, "Credentials Enrollment") | ||
| 220 | Exit Sub | ||
| 221 | else | ||
| 222 | TheForm.Request.value = sz10 | ||
| 223 | TheForm.Submit | ||
| 224 | end if | ||
| 225 | End Sub | ||
| 226 | |||
| 227 | Sub Add_RDN(sn, value) | ||
| 228 | if (value <> "") then | ||
| 229 | if (DN <> "") then | ||
| 230 | DN = DN & "; " | ||
| 231 | end if | ||
| 232 | DN = DN & sn & "=" & value | ||
| 233 | end if | ||
| 234 | End Sub | ||
| 235 | </SCRIPT> | ||
| 236 | </BODY> | ||
| 237 | </HTML> | ||
| 238 | EOF | ||
| 239 | -----END ms-enroll.cgi----- | ||
| 240 | |||
| 241 | Second, how to extract the request and feed the certificate back? We need to | ||
| 242 | "normalize" the base64 encoding of the PKCS#10 format which means | ||
| 243 | regenerating the lines and wrapping with BEGIN and END line. This is done by | ||
| 244 | gawk. The request is taken by ca the normal way. Then the cert needs to be | ||
| 245 | packed into a PKCS#7 structure (note: the use of a CRL is necessary for | ||
| 246 | crl2pkcs7 as of version 0.6.6. Starting with 0.8.0 it it might probably be | ||
| 247 | ommited). Finally we need to format the PKCS#7 object and generate the HTML | ||
| 248 | text. I use two templates to have a clearer script. | ||
| 249 | |||
| 250 | 1st note: postit2 is slightly modified from a program I found at ncsa's ftp | ||
| 251 | site. Grab it from http://www.easterngraphics.com/certs/IX9704/postit2.c. You | ||
| 252 | need utils.c from there too. | ||
| 253 | |||
| 254 | 2nd note: I'm note quite sure wether the gawk script really handles all | ||
| 255 | possible inputs for the request right! Today I don't use this construction | ||
| 256 | anymore myself. | ||
| 257 | |||
| 258 | 3d note: the cert must be of version 3! This could be done with the nsComment | ||
| 259 | line in ssleay.cnf... | ||
| 260 | |||
| 261 | ------BEGIN ms-gencert.cgi----- | ||
| 262 | #!/bin/sh | ||
| 263 | FILE="/tmp/"`date '+%y%m%d%H%M%S'-`$$ | ||
| 264 | rm -f "$FILE".* | ||
| 265 | |||
| 266 | HOME=`pwd`; export HOME # as ssleay.cnf insists on having such an env var | ||
| 267 | cd /usr/local/ssl #where demoCA (as named in ssleay.conf) is located | ||
| 268 | |||
| 269 | postit2 -s " " -i 0x0d > "$FILE".inp # process the FORM vars | ||
| 270 | |||
| 271 | SESSION_ID=`gawk '$1 == "SessionId" { print $2; exit }' "$FILE".inp` | ||
| 272 | |||
| 273 | gawk \ | ||
| 274 | 'BEGIN { \ | ||
| 275 | OFS = ""; \ | ||
| 276 | print "-----BEGIN CERTIFICATE REQUEST-----"; \ | ||
| 277 | req_seen=0 \ | ||
| 278 | } \ | ||
| 279 | $1 == "Request" { \ | ||
| 280 | req_seen=1; \ | ||
| 281 | if (length($2) == 72) print($2); \ | ||
| 282 | lastline=$2; \ | ||
| 283 | next; \ | ||
| 284 | } \ | ||
| 285 | { \ | ||
| 286 | if (req_seen == 1) { \ | ||
| 287 | if (length($1) >= 72) print($1); \ | ||
| 288 | else if (length(lastline) < 72) { \ | ||
| 289 | req_seen=0; \ | ||
| 290 | print (lastline,$1); \ | ||
| 291 | } \ | ||
| 292 | lastline=$1; \ | ||
| 293 | } \ | ||
| 294 | } \ | ||
| 295 | END { \ | ||
| 296 | print "-----END CERTIFICATE REQUEST-----"; \ | ||
| 297 | }' > "$FILE".pem < "$FILE".inp | ||
| 298 | |||
| 299 | ssleay ca -batch -in "$FILE".pem -key passwd -out "$FILE".out | ||
| 300 | ssleay crl2pkcs7 -certfile "$FILE".out -out "$FILE".pkcs7 -in demoCA/crl.pem | ||
| 301 | |||
| 302 | sed s/template_for_sessId/$SESSION_ID/ <ms-enroll2a.html >"$FILE".cert | ||
| 303 | /usr/local/bin/gawk \ | ||
| 304 | 'BEGIN { \ | ||
| 305 | OFS = ""; \ | ||
| 306 | dq = sprintf("%c",34); \ | ||
| 307 | } \ | ||
| 308 | $0 ~ "PKCS7" { next; } \ | ||
| 309 | { \ | ||
| 310 | print dq$0dq" & _"; \ | ||
| 311 | }' <"$FILE".pkcs7 >> "$FILE".cert | ||
| 312 | cat ms-enroll2b.html >>"$FILE".cert | ||
| 313 | |||
| 314 | echo Content-type: text/html | ||
| 315 | echo Content-length: `wc -c "$FILE".cert` | ||
| 316 | echo | ||
| 317 | cat "$FILE".cert | ||
| 318 | rm -f "$FILE".* | ||
| 319 | -----END ms-gencert.cgi----- | ||
| 320 | |||
| 321 | ----BEGIN ms-enroll2a.html---- | ||
| 322 | <HTML><HEAD><TITLE>Certificate Acceptance Test Page</TITLE></HEAD><BODY> | ||
| 323 | |||
| 324 | <OBJECT | ||
| 325 | classid="clsid:33BEC9E0-F78F-11cf-B782-00C04FD7BF43" | ||
| 326 | codebase=certenr3.dll | ||
| 327 | id=certHelper | ||
| 328 | > | ||
| 329 | </OBJECT> | ||
| 330 | |||
| 331 | <CENTER> | ||
| 332 | <H2>Your personal certificate</H2> | ||
| 333 | <BR><HR WIDTH=50%><BR><P> | ||
| 334 | Press the button! | ||
| 335 | <P><INPUT TYPE=BUTTON VALUE="Nimm mich!" NAME="InstallCert"> | ||
| 336 | </CENTER> | ||
| 337 | <BR><HR WIDTH=50%><BR> | ||
| 338 | |||
| 339 | <SCRIPT LANGUAGE=VBS> | ||
| 340 | Sub InstallCert_OnClick | ||
| 341 | |||
| 342 | sessionId = "template_for_sessId" | ||
| 343 | credentials = "" & _ | ||
| 344 | ----END ms-enroll2a.html---- | ||
| 345 | |||
| 346 | ----BEGIN ms-enroll2b.html---- | ||
| 347 | "" | ||
| 348 | On Error Resume Next | ||
| 349 | result = certHelper.AcceptCredentials(sessionId, credentials, 0, | ||
| 350 | FALSE) | ||
| 351 | if (IsEmpty(result)) Then | ||
| 352 | sz = "The error '" & Err.Number & "' occurred." & chr(13) & | ||
| 353 | chr(10) & "This Digital ID could not be registered." | ||
| 354 | msgOut = MsgBox(sz, 0, "Credentials Registration Error") | ||
| 355 | navigate "error.html" | ||
| 356 | else | ||
| 357 | sz = "Digital ID successfully registered." | ||
| 358 | msgOut = MsgBox(sz, 0, "Credentials Registration") | ||
| 359 | navigate "success.html" | ||
| 360 | end if | ||
| 361 | Exit Sub | ||
| 362 | End Sub | ||
| 363 | </SCRIPT> | ||
| 364 | </BODY> | ||
| 365 | </HTML> | ||
| 366 | ----END ms-enroll2b.html---- | ||
| 367 | |||
| 368 | 4.) What do do with the cert? | ||
| 369 | ----------------------------- | ||
| 370 | |||
| 371 | The cert is visible (without restarting MSIE) under the following menu: | ||
| 372 | View->Options->Security->Personal certs. You can examine it's contents at | ||
| 373 | least partially. | ||
| 374 | |||
| 375 | To use it for client authentication you need to use SSL3.0 (fortunately | ||
| 376 | SSLeay supports it with 0.8.0). Furthermore MSIE is told to only supports a | ||
| 377 | kind of automatic selection of certs (I personally wasn't able to test it | ||
| 378 | myself). But there is a requirement that the issuer of the server cert and | ||
| 379 | the issuer of the client cert needs to be the same (according to a developer | ||
| 380 | from MS). Which means: you need may more then one cert to talk to all | ||
| 381 | servers... | ||
| 382 | |||
| 383 | I'm sure we will get a bit more experience after ApacheSSL is available for | ||
| 384 | SSLeay 0.8.8. | ||
| 385 | |||
| 386 | |||
| 387 | I hope you enjoyed reading and that in future questions on this topic will | ||
| 388 | rarely appear on ssl-users@moncom.com ;-) | ||
| 389 | |||
| 390 | Ilmenau, 9th of June 1997 | ||
| 391 | Holger Reif <reif@prakinf.tu-ilmenau.de> | ||
| 392 | -- | ||
| 393 | read you later - Holger Reif | ||
| 394 | ---------------------------------------- Signaturprojekt Deutsche Einheit | ||
| 395 | TU Ilmenau - Informatik - Telematik (Verdamp lang her) | ||
| 396 | Holger.Reif@PrakInf.TU-Ilmenau.DE Alt wie ein Baum werden, um ueber | ||
| 397 | http://Remus.PrakInf.TU-Ilmenau.DE/Reif/ alle 7 Bruecken gehen zu koennen | ||
| 398 | |||
diff --git a/src/lib/libssl/src/doc/ns-ca.doc b/src/lib/libssl/src/doc/ns-ca.doc new file mode 100644 index 0000000000..836883e1a0 --- /dev/null +++ b/src/lib/libssl/src/doc/ns-ca.doc | |||
| @@ -0,0 +1,154 @@ | |||
| 1 | The following documentation was supplied by Jeff Barber, who provided the | ||
| 2 | patch to the CA program to add this functionality. | ||
| 3 | |||
| 4 | eric | ||
| 5 | -- | ||
| 6 | Jeff Barber Email: jeffb@issl.atl.hp.com | ||
| 7 | |||
| 8 | Hewlett Packard Phone: (404) 648-9503 | ||
| 9 | Internet and System Security Lab Fax: (404) 648-9516 | ||
| 10 | |||
| 11 | oo | ||
| 12 | ---------------------cut /\ here for ns-ca.doc ------------------------------ | ||
| 13 | |||
| 14 | This document briefly describes how to use SSLeay to implement a | ||
| 15 | certificate authority capable of dynamically serving up client | ||
| 16 | certificates for version 3.0 beta 5 (and presumably later) versions of | ||
| 17 | the Netscape Navigator. Before describing how this is done, it's | ||
| 18 | important to understand a little about how the browser implements its | ||
| 19 | client certificate support. This is documented in some detail in the | ||
| 20 | URLs based at <URL:http://home.netscape.com/eng/security/certs.html>. | ||
| 21 | Here's a brief overview: | ||
| 22 | |||
| 23 | - The Navigator supports a new HTML tag "KEYGEN" which will cause | ||
| 24 | the browser to generate an RSA key pair when you submit a form | ||
| 25 | containing the tag. The public key, along with an optional | ||
| 26 | challenge (supposedly provided for use in certificate revocation | ||
| 27 | but I don't use it) is signed, DER-encoded, base-64 encoded | ||
| 28 | and sent to the web server as the value of the variable | ||
| 29 | whose NAME is provided in the KEYGEN tag. The private key is | ||
| 30 | stored by the browser in a local key database. | ||
| 31 | |||
| 32 | This "Signed Public Key And Challenge" (SPKAC) arrives formatted | ||
| 33 | into 64 character lines (which are of course URL-encoded when | ||
| 34 | sent via HTTP -- i.e. spaces, newlines and most punctuatation are | ||
| 35 | encoded as "%HH" where HH is the hex equivalent of the ASCII code). | ||
| 36 | Note that the SPKAC does not contain the other usual attributes | ||
| 37 | of a certificate request, especially the subject name fields. | ||
| 38 | These must be otherwise encoded in the form for submission along | ||
| 39 | with the SPKAC. | ||
| 40 | |||
| 41 | - Either immediately (in response to this form submission), or at | ||
| 42 | some later date (a real CA will probably verify your identity in | ||
| 43 | some way before issuing the certificate), a web server can send a | ||
| 44 | certificate based on the public key and other attributes back to | ||
| 45 | the browser by encoding it in DER (the binary form) and sending it | ||
| 46 | to the browser as MIME type: | ||
| 47 | "Content-type: application/x-x509-user-cert" | ||
| 48 | |||
| 49 | The browser uses the public key encoded in the certificate to | ||
| 50 | associate the certificate with the appropriate private key in | ||
| 51 | its local key database. Now, the certificate is "installed". | ||
| 52 | |||
| 53 | - When a server wants to require authentication based on client | ||
| 54 | certificates, it uses the right signals via the SSL protocol to | ||
| 55 | trigger the Navigator to ask you which certificate you want to | ||
| 56 | send. Whether the certificate is accepted is dependent on CA | ||
| 57 | certificates and so forth installed in the server and is beyond | ||
| 58 | the scope of this document. | ||
| 59 | |||
| 60 | |||
| 61 | Now, here's how the SSLeay package can be used to provide client | ||
| 62 | certficates: | ||
| 63 | |||
| 64 | - You prepare a file for input to the SSLeay ca application. | ||
| 65 | The file contains a number of "name = value" pairs that identify | ||
| 66 | the subject. The names here are the same subject name component | ||
| 67 | identifiers used in the CA section of the lib/ssleay.conf file, | ||
| 68 | such as "emailAddress", "commonName" "organizationName" and so | ||
| 69 | forth. Both the long version and the short version (e.g. "Email", | ||
| 70 | "CN", "O") can be used. | ||
| 71 | |||
| 72 | One more name is supported: this one is "SPKAC". Its value | ||
| 73 | is simply the value of the base-64 encoded SPKAC sent by the | ||
| 74 | browser (with all the newlines and other space charaters | ||
| 75 | removed -- and newline escapes are NOT supported). | ||
| 76 | |||
| 77 | [ As of SSLeay 0.6.4, multiple lines are supported. | ||
| 78 | Put a \ at the end of each line and it will be joined with the | ||
| 79 | previous line with the '\n' removed - eay ] | ||
| 80 | |||
| 81 | Here's a sample input file: | ||
| 82 | |||
| 83 | C = US | ||
| 84 | SP = Georgia | ||
| 85 | O = Some Organization, Inc. | ||
| 86 | OU = Netscape Compatibility Group | ||
| 87 | CN = John X. Doe | ||
| 88 | Email = jxdoe@someorg.com | ||
| 89 | SPKAC = MIG0MGAwXDANBgkqhkiG9w0BAQEFAANLADBIAkEAwmk6FMJ4uAVIYbcvIOx5+bDGTfvL8X5gE+R67ccMk6rCSGbVQz2cetyQtnI+VIs0NwdD6wjuSuVtVFbLoHonowIDAQABFgAwDQYJKoZIhvcNAQEEBQADQQBFZDUWFl6BJdomtN1Bi53mwijy1rRgJ4YirF15yBEDM3DjAQkKXHYOIX+qpz4KXKnl6EYxTnGSFL5wWt8X2iyx | ||
| 90 | |||
| 91 | - You execute the ca command (either from a CGI program run out of | ||
| 92 | the web server, or as a later manual task) giving it the above | ||
| 93 | file as input. For example, if the file were named /tmp/cert.req, | ||
| 94 | you'd run: | ||
| 95 | $SSLDIR/bin/ca -spkac /tmp/cert.req -out /tmp/cert | ||
| 96 | |||
| 97 | The output is in DER format (binary) if a -out argument is | ||
| 98 | provided, as above; otherwise, it's in the PEM format (base-64 | ||
| 99 | encoded DER). Also, the "-batch" switch is implied by the | ||
| 100 | "-spkac" so you don't get asked whether to complete the signing | ||
| 101 | (probably it shouldn't work this way but I was only interested | ||
| 102 | in hacking together an online CA that could be used for issuing | ||
| 103 | test certificates). | ||
| 104 | |||
| 105 | The "-spkac" capability doesn't support multiple files (I think). | ||
| 106 | |||
| 107 | Any CHALLENGE provided in the SPKAC is simply ignored. | ||
| 108 | |||
| 109 | The interactions between the identification fields you provide | ||
| 110 | and those identified in your lib/ssleay.conf are the same as if | ||
| 111 | you did an ordinary "ca -in infile -out outfile" -- that is, if | ||
| 112 | something is marked as required in the ssleay.conf file and it | ||
| 113 | isn't found in the -spkac file, the certificate won't be issued. | ||
| 114 | |||
| 115 | - Now, you pick up the output from /tmp/cert and pass it back to | ||
| 116 | the Navigator prepending the Content-type string described earlier. | ||
| 117 | |||
| 118 | - In order to run the ca command out of a CGI program, you must | ||
| 119 | provide a password to decrypt the CA's private key. You can | ||
| 120 | do this by using "echo MyKeyPassword | $SSLDIR/bin/ca ..." | ||
| 121 | I think there's a way to not encrypt the key file in the first | ||
| 122 | place, but I didn't see how to do that, so I made a small change | ||
| 123 | to the library that allows the password to be accepted from a pipe. | ||
| 124 | Either way is UTTERLY INSECURE and a real CA would never do that. | ||
| 125 | |||
| 126 | [ You can use the 'ssleay rsa' command to remove the password | ||
| 127 | from the private key, or you can use the '-key' option to the | ||
| 128 | ca command to specify the decryption key on the command line | ||
| 129 | or use the -nodes option when generating the key. | ||
| 130 | ca will try to clear the command line version of the password | ||
| 131 | but for quite a few operating systems, this is not possible. | ||
| 132 | - eric ] | ||
| 133 | |||
| 134 | So, what do you have to do to make use of this stuff to create an online | ||
| 135 | demo CA capability with SSLeay? | ||
| 136 | |||
| 137 | 1 Create an HTML form for your users. The form should contain | ||
| 138 | fields for all of the required or optional fields in ssleay.conf. | ||
| 139 | The form must contain a KEYGEN tag somewhere with at least a NAME | ||
| 140 | attribute. | ||
| 141 | |||
| 142 | 2 Create a CGI program to process the form input submitted by the | ||
| 143 | browser. The CGI program must URL-decode the variables and create | ||
| 144 | the file described above, containing subject identification info | ||
| 145 | as well as the SPKAC block. It should then run the the ca program | ||
| 146 | with the -spkac option. If it works (check the exit status), | ||
| 147 | return the new certificate with the appropriate MIME type. If not, | ||
| 148 | return the output of the ca command with MIME type "text/plain". | ||
| 149 | |||
| 150 | 3 Set up your web server to accept connections signed by your demo | ||
| 151 | CA. This probably involves obtaining the PEM-encoded CA certificate | ||
| 152 | (ordinarily in $SSLDIR/CA/cacert.pem) and installing it into a | ||
| 153 | server database. See your server manual for instructions. | ||
| 154 | |||
diff --git a/src/lib/libssl/src/doc/obj.doc b/src/lib/libssl/src/doc/obj.doc new file mode 100644 index 0000000000..bad347c936 --- /dev/null +++ b/src/lib/libssl/src/doc/obj.doc | |||
| @@ -0,0 +1,69 @@ | |||
| 1 | The Object library. | ||
| 2 | |||
| 3 | As part of my Crypto library, I found I required a method of identifying various | ||
| 4 | objects. These objects normally had 3 different values associated with | ||
| 5 | them, a short text name, a long (or lower case) text name, and an | ||
| 6 | ASN.1 Object Identifier (which is a sequence of numbers). | ||
| 7 | This library contains a static list of objects and functions to lookup | ||
| 8 | according to one type and to return the other types. | ||
| 9 | |||
| 10 | To use these routines, 'Object.h' needs to be included. | ||
| 11 | |||
| 12 | For each supported object, #define entries are defined as follows | ||
| 13 | #define SN_Algorithm "Algorithm" | ||
| 14 | #define LN_algorithm "algorithm" | ||
| 15 | #define NID_algorithm 38 | ||
| 16 | #define OBJ_algorithm 1L,3L,14L,3L,2L | ||
| 17 | |||
| 18 | SN_ stands for short name. | ||
| 19 | LN_ stands for either long name or lowercase name. | ||
| 20 | NID_ stands for Numeric ID. I each object has a unique NID and this | ||
| 21 | should be used internally to identify objects. | ||
| 22 | OBJ_ stands for ASN.1 Object Identifier or ASN1_OBJECT as defined in the | ||
| 23 | ASN1 routines. These values are used in ASN1 encoding. | ||
| 24 | |||
| 25 | The following functions are to be used to return pointers into a static | ||
| 26 | definition of these types. What this means is "don't try to free() any | ||
| 27 | pointers returned from these functions. | ||
| 28 | |||
| 29 | ASN1_OBJECT *OBJ_nid2obj( | ||
| 30 | int n); | ||
| 31 | Return the ASN1_OBJECT that corresponds to a NID of n. | ||
| 32 | |||
| 33 | char *OBJ_nid2ln( | ||
| 34 | int n); | ||
| 35 | Return the long/lower case name of the object represented by the | ||
| 36 | NID of n. | ||
| 37 | |||
| 38 | char *OBJ_nid2sn( | ||
| 39 | int n); | ||
| 40 | Return the short name for the object represented by the NID of n. | ||
| 41 | |||
| 42 | ASN1_OBJECT *OBJ_dup( | ||
| 43 | ASN1_OBJECT *o); | ||
| 44 | Duplicate and return a new ASN1_OBJECT that is the same as the | ||
| 45 | passed parameter. | ||
| 46 | |||
| 47 | int OBJ_obj2nid( | ||
| 48 | ASN1_OBJECT *o); | ||
| 49 | Given ASN1_OBJECT o, return the NID that corresponds. | ||
| 50 | |||
| 51 | int OBJ_ln2nid( | ||
| 52 | char *s); | ||
| 53 | Given the long/lower case name 's', return the NID of the object. | ||
| 54 | |||
| 55 | int OBJ_sn2nid( | ||
| 56 | char *s); | ||
| 57 | Given the short name 's', return the NID of the object. | ||
| 58 | |||
| 59 | char *OBJ_bsearch( | ||
| 60 | char *key, | ||
| 61 | char *base, | ||
| 62 | int num, | ||
| 63 | int size, | ||
| 64 | int (*cmp)()); | ||
| 65 | Since I have come across a few platforms that do not have the | ||
| 66 | bsearch() function, OBJ_bsearch is my version of that function. | ||
| 67 | Feel free to use this function, but you may as well just use the | ||
| 68 | normal system bsearch(3) if it is present. This version also | ||
| 69 | has tolerance of being passed NULL pointers. | ||
diff --git a/src/lib/libssl/src/doc/rand.doc b/src/lib/libssl/src/doc/rand.doc new file mode 100644 index 0000000000..da02a07f64 --- /dev/null +++ b/src/lib/libssl/src/doc/rand.doc | |||
| @@ -0,0 +1,141 @@ | |||
| 1 | My Random number library. | ||
| 2 | |||
| 3 | These routines can be used to generate pseudo random numbers and can be | ||
| 4 | used to 'seed' the pseudo random number generator (RNG). The RNG make no | ||
| 5 | effort to reproduce the same random number stream with each execution. | ||
| 6 | Various other routines in the SSLeay library 'seed' the RNG when suitable | ||
| 7 | 'random' input data is available. Read the section at the end for details | ||
| 8 | on the design of the RNG. | ||
| 9 | |||
| 10 | void RAND_bytes( | ||
| 11 | unsigned char *buf, | ||
| 12 | int num); | ||
| 13 | This routine puts 'num' random bytes into 'buf'. One should make | ||
| 14 | sure RAND_seed() has been called before using this routine. | ||
| 15 | |||
| 16 | void RAND_seed( | ||
| 17 | unsigned char *buf, | ||
| 18 | int num); | ||
| 19 | This routine adds more 'seed' data the RNG state. 'num' bytes | ||
| 20 | are added to the RNG state, they are taken from 'buf'. This | ||
| 21 | routine can be called with sensitive data such as user entered | ||
| 22 | passwords. This sensitive data is in no way recoverable from | ||
| 23 | the RAND library routines or state. Try to pass as much data | ||
| 24 | from 'random' sources as possible into the RNG via this function. | ||
| 25 | Also strongly consider using the RAND_load_file() and | ||
| 26 | RAND_write_file() routines. | ||
| 27 | |||
| 28 | void RAND_cleanup(); | ||
| 29 | When a program has finished with the RAND library, if it so | ||
| 30 | desires, it can 'zero' all RNG state. | ||
| 31 | |||
| 32 | The following 3 routines are convenience routines that can be used to | ||
| 33 | 'save' and 'restore' data from/to the RNG and it's state. | ||
| 34 | Since the more 'random' data that is feed as seed data the better, why not | ||
| 35 | keep it around between executions of the program? Of course the | ||
| 36 | application should pass more 'random' data in via RAND_seed() and | ||
| 37 | make sure no-one can read the 'random' data file. | ||
| 38 | |||
| 39 | char *RAND_file_name( | ||
| 40 | char *buf, | ||
| 41 | int size); | ||
| 42 | This routine returns a 'default' name for the location of a 'rand' | ||
| 43 | file. The 'rand' file should keep a sequence of random bytes used | ||
| 44 | to initialise the RNG. The filename is put in 'buf'. Buf is 'size' | ||
| 45 | bytes long. Buf is returned if things go well, if they do not, | ||
| 46 | NULL is returned. The 'rand' file name is generated in the | ||
| 47 | following way. First, if there is a 'RANDFILE' environment | ||
| 48 | variable, it is returned. Second, if there is a 'HOME' environment | ||
| 49 | variable, $HOME/.rand is returned. Third, NULL is returned. NULL | ||
| 50 | is also returned if a buf would overflow. | ||
| 51 | |||
| 52 | int RAND_load_file( | ||
| 53 | char *file, | ||
| 54 | long number); | ||
| 55 | This function 'adds' the 'file' into the RNG state. It does this by | ||
| 56 | doing a RAND_seed() on the value returned from a stat() system call | ||
| 57 | on the file and if 'number' is non-zero, upto 'number' bytes read | ||
| 58 | from the file. The number of bytes passed to RAND_seed() is returned. | ||
| 59 | |||
| 60 | int RAND_write_file( | ||
| 61 | char *file), | ||
| 62 | RAND_write_file() writes N random bytes to the file 'file', where | ||
| 63 | N is the size of the internal RND state (currently 1k). | ||
| 64 | This is a suitable method of saving RNG state for reloading via | ||
| 65 | RAND_load_file(). | ||
| 66 | |||
| 67 | What follows is a description of this RNG and a description of the rational | ||
| 68 | behind it's design. | ||
| 69 | |||
| 70 | It should be noted that this RNG is intended to be used to generate | ||
| 71 | 'random' keys for various ciphers including generation of DH and RSA keys. | ||
| 72 | |||
| 73 | It should also be noted that I have just created a system that I am happy with. | ||
| 74 | It may be overkill but that does not worry me. I have not spent that much | ||
| 75 | time on this algorithm so if there are glaring errors, please let me know. | ||
| 76 | Speed has not been a consideration in the design of these routines. | ||
| 77 | |||
| 78 | First up I will state the things I believe I need for a good RNG. | ||
| 79 | 1) A good hashing algorithm to mix things up and to convert the RNG 'state' | ||
| 80 | to random numbers. | ||
| 81 | 2) An initial source of random 'state'. | ||
| 82 | 3) The state should be very large. If the RNG is being used to generate | ||
| 83 | 4096 bit RSA keys, 2 2048 bit random strings are required (at a minimum). | ||
| 84 | If your RNG state only has 128 bits, you are obviously limiting the | ||
| 85 | search space to 128 bits, not 2048. I'm probably getting a little | ||
| 86 | carried away on this last point but it does indicate that it may not be | ||
| 87 | a bad idea to keep quite a lot of RNG state. It should be easier to | ||
| 88 | break a cipher than guess the RNG seed data. | ||
| 89 | 4) Any RNG seed data should influence all subsequent random numbers | ||
| 90 | generated. This implies that any random seed data entered will have | ||
| 91 | an influence on all subsequent random numbers generated. | ||
| 92 | 5) When using data to seed the RNG state, the data used should not be | ||
| 93 | extractable from the RNG state. I believe this should be a | ||
| 94 | requirement because one possible source of 'secret' semi random | ||
| 95 | data would be a private key or a password. This data must | ||
| 96 | not be disclosed by either subsequent random numbers or a | ||
| 97 | 'core' dump left by a program crash. | ||
| 98 | 6) Given the same initial 'state', 2 systems should deviate in their RNG state | ||
| 99 | (and hence the random numbers generated) over time if at all possible. | ||
| 100 | 7) Given the random number output stream, it should not be possible to determine | ||
| 101 | the RNG state or the next random number. | ||
| 102 | |||
| 103 | |||
| 104 | The algorithm is as follows. | ||
| 105 | |||
| 106 | There is global state made up of a 1023 byte buffer (the 'state'), a | ||
| 107 | working message digest ('md') and a counter ('count'). | ||
| 108 | |||
| 109 | Whenever seed data is added, it is inserted into the 'state' as | ||
| 110 | follows. | ||
| 111 | The input is chopped up into units of 16 bytes (or less for | ||
| 112 | the last block). Each of these blocks is run through the MD5 | ||
| 113 | message digest. The data passed to the MD5 digest is the | ||
| 114 | current 'md', the same number of bytes from the 'state' | ||
| 115 | (the location determined by in incremented looping index) as | ||
| 116 | the current 'block' and the new key data 'block'. The result | ||
| 117 | of this is kept in 'md' and also xored into the 'state' at the | ||
| 118 | same locations that were used as input into the MD5. | ||
| 119 | I believe this system addresses points 1 (MD5), 3 (the 'state'), | ||
| 120 | 4 (via the 'md'), 5 (by the use of MD5 and xor). | ||
| 121 | |||
| 122 | When bytes are extracted from the RNG, the following process is used. | ||
| 123 | For each group of 8 bytes (or less), we do the following, | ||
| 124 | Input into MD5, the top 8 bytes from 'md', the byte that are | ||
| 125 | to be overwritten by the random bytes and bytes from the | ||
| 126 | 'state' (incrementing looping index). From this digest output | ||
| 127 | (which is kept in 'md'), the top (upto) 8 bytes are | ||
| 128 | returned to the caller and the bottom (upto) 8 bytes are xored | ||
| 129 | into the 'state'. | ||
| 130 | Finally, after we have finished 'generation' random bytes for the | ||
| 131 | called, 'count' (which is incremented) and 'md' are fed into MD5 and | ||
| 132 | the results are kept in 'md'. | ||
| 133 | I believe the above addressed points 1 (use of MD5), 6 (by | ||
| 134 | hashing into the 'state' the 'old' data from the caller that | ||
| 135 | is about to be overwritten) and 7 (by not using the 8 bytes | ||
| 136 | given to the caller to update the 'state', but they are used | ||
| 137 | to update 'md'). | ||
| 138 | |||
| 139 | So of the points raised, only 2 is not addressed, but sources of | ||
| 140 | random data will always be a problem. | ||
| 141 | |||
diff --git a/src/lib/libssl/src/doc/rc2.doc b/src/lib/libssl/src/doc/rc2.doc new file mode 100644 index 0000000000..efab015bd1 --- /dev/null +++ b/src/lib/libssl/src/doc/rc2.doc | |||
| @@ -0,0 +1,165 @@ | |||
| 1 | The RC2 library. | ||
| 2 | |||
| 3 | RC2 is a block cipher that operates on 64bit (8 byte) quantities. It | ||
| 4 | uses variable size key, but 128bit (16 byte) key would normally be considered | ||
| 5 | good. It can be used in all the modes that DES can be used. This | ||
| 6 | library implements the ecb, cbc, cfb64, ofb64 modes. | ||
| 7 | |||
| 8 | I have implemented this library from an article posted to sci.crypt on | ||
| 9 | 11-Feb-1996. I personally don't know how far to trust the RC2 cipher. | ||
| 10 | While it is capable of having a key of any size, not much reseach has | ||
| 11 | publically been done on it at this point in time (Apr-1996) | ||
| 12 | since the cipher has only been public for a few months :-) | ||
| 13 | It is of a similar speed to DES and IDEA, so unless it is required for | ||
| 14 | meeting some standard (SSLv2, perhaps S/MIME), it would probably be advisable | ||
| 15 | to stick to IDEA, or for the paranoid, Tripple DES. | ||
| 16 | |||
| 17 | Mind you, having said all that, I should mention that I just read alot and | ||
| 18 | implement ciphers, I'm a 'babe in the woods' when it comes to evaluating | ||
| 19 | ciphers :-). | ||
| 20 | |||
| 21 | For all calls that have an 'input' and 'output' variables, they can be the | ||
| 22 | same. | ||
| 23 | |||
| 24 | This library requires the inclusion of 'rc2.h'. | ||
| 25 | |||
| 26 | All of the encryption functions take what is called an RC2_KEY as an | ||
| 27 | argument. An RC2_KEY is an expanded form of the RC2 key. | ||
| 28 | For all modes of the RC2 algorithm, the RC2_KEY used for | ||
| 29 | decryption is the same one that was used for encryption. | ||
| 30 | |||
| 31 | The define RC2_ENCRYPT is passed to specify encryption for the functions | ||
| 32 | that require an encryption/decryption flag. RC2_DECRYPT is passed to | ||
| 33 | specify decryption. | ||
| 34 | |||
| 35 | Please note that any of the encryption modes specified in my DES library | ||
| 36 | could be used with RC2. I have only implemented ecb, cbc, cfb64 and | ||
| 37 | ofb64 for the following reasons. | ||
| 38 | - ecb is the basic RC2 encryption. | ||
| 39 | - cbc is the normal 'chaining' form for block ciphers. | ||
| 40 | - cfb64 can be used to encrypt single characters, therefore input and output | ||
| 41 | do not need to be a multiple of 8. | ||
| 42 | - ofb64 is similar to cfb64 but is more like a stream cipher, not as | ||
| 43 | secure (not cipher feedback) but it does not have an encrypt/decrypt mode. | ||
| 44 | - If you want triple RC2, thats 384 bits of key and you must be totally | ||
| 45 | obsessed with security. Still, if you want it, it is simple enough to | ||
| 46 | copy the function from the DES library and change the des_encrypt to | ||
| 47 | RC2_encrypt; an exercise left for the paranoid reader :-). | ||
| 48 | |||
| 49 | The functions are as follows: | ||
| 50 | |||
| 51 | void RC2_set_key( | ||
| 52 | RC2_KEY *ks; | ||
| 53 | int len; | ||
| 54 | unsigned char *key; | ||
| 55 | int bits; | ||
| 56 | RC2_set_key converts an 'len' byte key into a RC2_KEY. | ||
| 57 | A 'ks' is an expanded form of the 'key' which is used to | ||
| 58 | perform actual encryption. It can be regenerated from the RC2 key | ||
| 59 | so it only needs to be kept when encryption or decryption is about | ||
| 60 | to occur. Don't save or pass around RC2_KEY's since they | ||
| 61 | are CPU architecture dependent, 'key's are not. RC2 is an | ||
| 62 | interesting cipher in that it can be used with a variable length | ||
| 63 | key. 'len' is the length of 'key' to be used as the key. | ||
| 64 | A 'len' of 16 is recomended. The 'bits' argument is an | ||
| 65 | interesting addition which I only found out about in Aug 96. | ||
| 66 | BSAFE uses this parameter to 'limit' the number of bits used | ||
| 67 | for the key. To use the 'key' unmodified, set bits to 1024. | ||
| 68 | This is what old versions of my RC2 library did (SSLeay 0.6.3). | ||
| 69 | RSAs BSAFE library sets this parameter to be 128 if 128 bit | ||
| 70 | keys are being used. So to be compatable with BSAFE, set it | ||
| 71 | to 128, if you don't want to reduce RC2's key length, leave it | ||
| 72 | at 1024. | ||
| 73 | |||
| 74 | void RC2_encrypt( | ||
| 75 | unsigned long *data, | ||
| 76 | RC2_KEY *key, | ||
| 77 | int encrypt); | ||
| 78 | This is the RC2 encryption function that gets called by just about | ||
| 79 | every other RC2 routine in the library. You should not use this | ||
| 80 | function except to implement 'modes' of RC2. I say this because the | ||
| 81 | functions that call this routine do the conversion from 'char *' to | ||
| 82 | long, and this needs to be done to make sure 'non-aligned' memory | ||
| 83 | access do not occur. | ||
| 84 | Data is a pointer to 2 unsigned long's and key is the | ||
| 85 | RC2_KEY to use. Encryption or decryption is indicated by 'encrypt'. | ||
| 86 | which can have the values RC2_ENCRYPT or RC2_DECRYPT. | ||
| 87 | |||
| 88 | void RC2_ecb_encrypt( | ||
| 89 | unsigned char *in, | ||
| 90 | unsigned char *out, | ||
| 91 | RC2_KEY *key, | ||
| 92 | int encrypt); | ||
| 93 | This is the basic Electronic Code Book form of RC2 (in DES this | ||
| 94 | mode is called Electronic Code Book so I'm going to use the term | ||
| 95 | for rc2 as well. | ||
| 96 | Input is encrypted into output using the key represented by | ||
| 97 | key. Depending on the encrypt, encryption or | ||
| 98 | decryption occurs. Input is 8 bytes long and output is 8 bytes. | ||
| 99 | |||
| 100 | void RC2_cbc_encrypt( | ||
| 101 | unsigned char *in, | ||
| 102 | unsigned char *out, | ||
| 103 | long length, | ||
| 104 | RC2_KEY *ks, | ||
| 105 | unsigned char *ivec, | ||
| 106 | int encrypt); | ||
| 107 | This routine implements RC2 in Cipher Block Chaining mode. | ||
| 108 | Input, which should be a multiple of 8 bytes is encrypted | ||
| 109 | (or decrypted) to output which will also be a multiple of 8 bytes. | ||
| 110 | The number of bytes is in length (and from what I've said above, | ||
| 111 | should be a multiple of 8). If length is not a multiple of 8, bad | ||
| 112 | things will probably happen. ivec is the initialisation vector. | ||
| 113 | This function updates iv after each call so that it can be passed to | ||
| 114 | the next call to RC2_cbc_encrypt(). | ||
| 115 | |||
| 116 | void RC2_cfb64_encrypt( | ||
| 117 | unsigned char *in, | ||
| 118 | unsigned char *out, | ||
| 119 | long length, | ||
| 120 | RC2_KEY *schedule, | ||
| 121 | unsigned char *ivec, | ||
| 122 | int *num, | ||
| 123 | int encrypt); | ||
| 124 | This is one of the more useful functions in this RC2 library, it | ||
| 125 | implements CFB mode of RC2 with 64bit feedback. | ||
| 126 | This allows you to encrypt an arbitrary number of bytes, | ||
| 127 | you do not require 8 byte padding. Each call to this | ||
| 128 | routine will encrypt the input bytes to output and then update ivec | ||
| 129 | and num. Num contains 'how far' we are though ivec. | ||
| 130 | 'Encrypt' is used to indicate encryption or decryption. | ||
| 131 | CFB64 mode operates by using the cipher to generate a stream | ||
| 132 | of bytes which is used to encrypt the plain text. | ||
| 133 | The cipher text is then encrypted to generate the next 64 bits to | ||
| 134 | be xored (incrementally) with the next 64 bits of plain | ||
| 135 | text. As can be seen from this, to encrypt or decrypt, | ||
| 136 | the same 'cipher stream' needs to be generated but the way the next | ||
| 137 | block of data is gathered for encryption is different for | ||
| 138 | encryption and decryption. | ||
| 139 | |||
| 140 | void RC2_ofb64_encrypt( | ||
| 141 | unsigned char *in, | ||
| 142 | unsigned char *out, | ||
| 143 | long length, | ||
| 144 | RC2_KEY *schedule, | ||
| 145 | unsigned char *ivec, | ||
| 146 | int *num); | ||
| 147 | This functions implements OFB mode of RC2 with 64bit feedback. | ||
| 148 | This allows you to encrypt an arbitrary number of bytes, | ||
| 149 | you do not require 8 byte padding. Each call to this | ||
| 150 | routine will encrypt the input bytes to output and then update ivec | ||
| 151 | and num. Num contains 'how far' we are though ivec. | ||
| 152 | This is in effect a stream cipher, there is no encryption or | ||
| 153 | decryption mode. | ||
| 154 | |||
| 155 | For reading passwords, I suggest using des_read_pw_string() from my DES library. | ||
| 156 | To generate a password from a text string, I suggest using MD5 (or MD2) to | ||
| 157 | produce a 16 byte message digest that can then be passed directly to | ||
| 158 | RC2_set_key(). | ||
| 159 | |||
| 160 | ===== | ||
| 161 | For more information about the specific RC2 modes in this library | ||
| 162 | (ecb, cbc, cfb and ofb), read the section entitled 'Modes of DES' from the | ||
| 163 | documentation on my DES library. What is said about DES is directly | ||
| 164 | applicable for RC2. | ||
| 165 | |||
diff --git a/src/lib/libssl/src/doc/rc4.doc b/src/lib/libssl/src/doc/rc4.doc new file mode 100644 index 0000000000..4b2897eb74 --- /dev/null +++ b/src/lib/libssl/src/doc/rc4.doc | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | The RC4 library. | ||
| 2 | RC4 is a stream cipher that operates on a byte stream. It can be used with | ||
| 3 | any length key but I would recommend normally using 16 bytes. | ||
| 4 | |||
| 5 | This library requires the inclusion of 'rc4.h'. | ||
| 6 | |||
| 7 | The RC4 encryption function takes what is called an RC4_KEY as an argument. | ||
| 8 | The RC4_KEY is generated by the RC4_set_key function from the key bytes. | ||
| 9 | |||
| 10 | RC4, being a stream cipher, does not have an encryption or decryption mode. | ||
| 11 | It produces a stream of bytes that the input stream is xor'ed against and | ||
| 12 | so decryption is just a case of 'encrypting' again with the same key. | ||
| 13 | |||
| 14 | I have only put in one 'mode' for RC4 which is the normal one. This means | ||
| 15 | there is no initialisation vector and there is no feedback of the cipher | ||
| 16 | text into the cipher. This implies that you should not ever use the | ||
| 17 | same key twice if you can help it. If you do, you leave yourself open to | ||
| 18 | known plain text attacks; if you know the plain text and | ||
| 19 | corresponding cipher text in one message, all messages that used the same | ||
| 20 | key can have the cipher text decoded for the corresponding positions in the | ||
| 21 | cipher stream. | ||
| 22 | |||
| 23 | The main positive feature of RC4 is that it is a very fast cipher; about 4 | ||
| 24 | times faster that DES. This makes it ideally suited to protocols where the | ||
| 25 | key is randomly chosen, like SSL. | ||
| 26 | |||
| 27 | The functions are as follows: | ||
| 28 | |||
| 29 | void RC4_set_key( | ||
| 30 | RC4_KEY *key; | ||
| 31 | int len; | ||
| 32 | unsigned char *data); | ||
| 33 | This function initialises the RC4_KEY structure with the key passed | ||
| 34 | in 'data', which is 'len' bytes long. The key data can be any | ||
| 35 | length but 16 bytes seems to be a good number. | ||
| 36 | |||
| 37 | void RC4( | ||
| 38 | RC4_KEY *key; | ||
| 39 | unsigned long len; | ||
| 40 | unsigned char *in; | ||
| 41 | unsigned char *out); | ||
| 42 | Do the actual RC4 encryption/decryption. Using the 'key', 'len' | ||
| 43 | bytes are transformed from 'in' to 'out'. As mentioned above, | ||
| 44 | decryption is the operation as encryption. | ||
diff --git a/src/lib/libssl/src/doc/readme b/src/lib/libssl/src/doc/readme new file mode 100644 index 0000000000..824d4fd0e2 --- /dev/null +++ b/src/lib/libssl/src/doc/readme | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | This is the old 0.6.6 docuementation. Most of the cipher stuff is still | ||
| 2 | relevent but I'm working (very slowly) on new docuemtation. | ||
| 3 | The current version can be found online at | ||
| 4 | |||
| 5 | http://www.cryptsoft.com/ssleay/doc | ||
| 6 | |||
diff --git a/src/lib/libssl/src/doc/ref.doc b/src/lib/libssl/src/doc/ref.doc new file mode 100644 index 0000000000..211559900d --- /dev/null +++ b/src/lib/libssl/src/doc/ref.doc | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | I have lots more references etc, and will update this list in the future, | ||
| 2 | 30 Aug 1996 - eay | ||
| 3 | |||
| 4 | |||
| 5 | SSL The SSL Protocol - from Netscapes. | ||
| 6 | |||
| 7 | RC4 Newsgroups: sci.crypt | ||
| 8 | From: sterndark@netcom.com (David Sterndark) | ||
| 9 | Subject: RC4 Algorithm revealed. | ||
| 10 | Message-ID: <sternCvKL4B.Hyy@netcom.com> | ||
| 11 | |||
| 12 | RC2 Newsgroups: sci.crypt | ||
| 13 | From: pgut01@cs.auckland.ac.nz (Peter Gutmann) | ||
| 14 | Subject: Specification for Ron Rivests Cipher No.2 | ||
| 15 | Message-ID: <4fk39f$f70@net.auckland.ac.nz> | ||
| 16 | |||
| 17 | MD2 RFC1319 The MD2 Message-Digest Algorithm | ||
| 18 | MD5 RFC1321 The MD5 Message-Digest Algorithm | ||
| 19 | |||
| 20 | X509 Certificates | ||
| 21 | RFC1421 Privacy Enhancement for Internet Electronic Mail: Part I | ||
| 22 | RFC1422 Privacy Enhancement for Internet Electronic Mail: Part II | ||
| 23 | RFC1423 Privacy Enhancement for Internet Electronic Mail: Part III | ||
| 24 | RFC1424 Privacy Enhancement for Internet Electronic Mail: Part IV | ||
| 25 | |||
| 26 | RSA and various standard encoding | ||
| 27 | PKCS#1 RSA Encryption Standard | ||
| 28 | PKCS#5 Password-Based Encryption Standard | ||
| 29 | PKCS#7 Cryptographic Message Syntax Standard | ||
| 30 | A Layman's Guide to a Subset of ASN.1, BER, and DER | ||
| 31 | An Overview of the PKCS Standards | ||
| 32 | Some Examples of the PKCS Standards | ||
| 33 | |||
| 34 | IDEA Chapter 3 The Block Cipher IDEA | ||
| 35 | |||
| 36 | RSA, prime number generation and bignum algorithms | ||
| 37 | Introduction To Algorithms, | ||
| 38 | Thomas Cormen, Charles Leiserson, Ronald Rivest, | ||
| 39 | Section 29 Arithmetic Circuits | ||
| 40 | Section 33 Number-Theoretic Algorithms | ||
| 41 | |||
| 42 | Fast Private Key algorithm | ||
| 43 | Fast Decipherment Algorithm for RSA Public-Key Cryptosystem | ||
| 44 | J.-J. Quisquater and C. Couvreur, Electronics Letters, | ||
| 45 | 14th October 1982, Vol. 18 No. 21 | ||
| 46 | |||
| 47 | Prime number generation and bignum algorithms. | ||
| 48 | PGP-2.3a | ||
diff --git a/src/lib/libssl/src/doc/req.1 b/src/lib/libssl/src/doc/req.1 new file mode 100644 index 0000000000..684fda580e --- /dev/null +++ b/src/lib/libssl/src/doc/req.1 | |||
| @@ -0,0 +1,137 @@ | |||
| 1 | The 'req' command is used to manipulate and deal with pkcs#10 | ||
| 2 | certificate requests. | ||
| 3 | |||
| 4 | It's default mode of operation is to load a certificate and then | ||
| 5 | write it out again. | ||
| 6 | |||
| 7 | By default the 'req' is read from stdin in 'PEM' format. | ||
| 8 | The -inform option can be used to specify 'pem' format or 'der' | ||
| 9 | format. PEM format is the base64 encoding of the DER format. | ||
| 10 | |||
| 11 | By default 'req' then writes the request back out. -outform can be used | ||
| 12 | to indicate the desired output format, be it 'pem' or 'der'. | ||
| 13 | |||
| 14 | To specify an input file, use the '-in' option and the '-out' option | ||
| 15 | can be used to specify the output file. | ||
| 16 | |||
| 17 | If you wish to perform a command and not output the certificate | ||
| 18 | request afterwards, use the '-noout' option. | ||
| 19 | |||
| 20 | When a certificate is loaded, it can be printed in a human readable | ||
| 21 | ascii format via the '-text' option. | ||
| 22 | |||
| 23 | To check that the signature on a certificate request is correct, use | ||
| 24 | the '-verify' option to make sure that the private key contained in the | ||
| 25 | certificate request corresponds to the signature. | ||
| 26 | |||
| 27 | Besides the default mode, there is also the 'generate a certificate | ||
| 28 | request' mode. There are several flags that trigger this mode. | ||
| 29 | |||
| 30 | -new will generate a new RSA key (if required) and then prompts | ||
| 31 | the user for details for the certificate request. | ||
| 32 | -newkey has an argument that is the number of bits to make the new | ||
| 33 | key. This function also triggers '-new'. | ||
| 34 | |||
| 35 | The '-new' option can have a key to use specified instead of having to | ||
| 36 | load one, '-key' is used to specify the file containg the key. | ||
| 37 | -keyform can be used to specify the format of the key. Only | ||
| 38 | 'pem' and 'der' formats are supported, later, 'netscape' format may be added. | ||
| 39 | |||
| 40 | Finally there is the '-x509' options which makes req output a self | ||
| 41 | signed x509 certificate instead of a certificate request. | ||
| 42 | |||
| 43 | Now as you may have noticed, there are lots of default options that | ||
| 44 | cannot be specified via the command line. They are held in a 'template' | ||
| 45 | or 'configuration file'. The -config option specifies which configuration | ||
| 46 | file to use. See conf.doc for details on the syntax of this file. | ||
| 47 | |||
| 48 | The req command uses the 'req' section of the config file. | ||
| 49 | |||
| 50 | --- | ||
| 51 | # The following variables are defined. For this example I will populate | ||
| 52 | # the various values | ||
| 53 | [ req ] | ||
| 54 | default_bits = 512 # default number of bits to use. | ||
| 55 | default_keyfile = testkey.pem # Where to write the generated keyfile | ||
| 56 | # if not specified. | ||
| 57 | distinguished_name= req_dn # The section that contains the | ||
| 58 | # information about which 'object' we | ||
| 59 | # want to put in the DN. | ||
| 60 | attributes = req_attr # The objects we want for the | ||
| 61 | # attributes field. | ||
| 62 | encrypt_rsa_key = no # Should we encrypt newly generated | ||
| 63 | # keys. I strongly recommend 'yes'. | ||
| 64 | |||
| 65 | # The distinguished name section. For the following entries, the | ||
| 66 | # object names must exist in the SSLeay header file objects.h. If they | ||
| 67 | # do not, they will be silently ignored. The entries have the following | ||
| 68 | # format. | ||
| 69 | # <object_name> => string to prompt with | ||
| 70 | # <object_name>_default => default value for people | ||
| 71 | # <object_name>_value => Automatically use this value for this field. | ||
| 72 | # <object_name>_min => minimum number of characters for data (def. 0) | ||
| 73 | # <object_name>_max => maximum number of characters for data (def. inf.) | ||
| 74 | # All of these entries are optional except for the first one. | ||
| 75 | [ req_dn ] | ||
| 76 | countryName = Country Name (2 letter code) | ||
| 77 | countryName_default = AU | ||
| 78 | |||
| 79 | stateOrProvinceName = State or Province Name (full name) | ||
| 80 | stateOrProvinceName_default = Queensland | ||
| 81 | |||
| 82 | localityName = Locality Name (eg, city) | ||
| 83 | |||
| 84 | organizationName = Organization Name (eg, company) | ||
| 85 | organizationName_default = Mincom Pty Ltd | ||
| 86 | |||
| 87 | organizationalUnitName = Organizational Unit Name (eg, section) | ||
| 88 | organizationalUnitName_default = MTR | ||
| 89 | |||
| 90 | commonName = Common Name (eg, YOUR name) | ||
| 91 | commonName_max = 64 | ||
| 92 | |||
| 93 | emailAddress = Email Address | ||
| 94 | emailAddress_max = 40 | ||
| 95 | |||
| 96 | # The next section is the attributes section. This is exactly the | ||
| 97 | # same as for the previous section except that the resulting objects are | ||
| 98 | # put in the attributes field. | ||
| 99 | [ req_attr ] | ||
| 100 | challengePassword = A challenge password | ||
| 101 | challengePassword_min = 4 | ||
| 102 | challengePassword_max = 20 | ||
| 103 | |||
| 104 | unstructuredName = An optional company name | ||
| 105 | |||
| 106 | ---- | ||
| 107 | Also note that the order that attributes appear in this file is the | ||
| 108 | order they will be put into the distinguished name. | ||
| 109 | |||
| 110 | Once this request has been generated, it can be sent to a CA for | ||
| 111 | certifying. | ||
| 112 | |||
| 113 | ---- | ||
| 114 | A few quick examples.... | ||
| 115 | |||
| 116 | To generate a new request and a new key | ||
| 117 | req -new | ||
| 118 | |||
| 119 | To generate a new request and a 1058 bit key | ||
| 120 | req -newkey 1058 | ||
| 121 | |||
| 122 | To generate a new request using a pre-existing key | ||
| 123 | req -new -key key.pem | ||
| 124 | |||
| 125 | To generate a self signed x509 certificate from a certificate | ||
| 126 | request using a supplied key, and we want to see the text form of the | ||
| 127 | output certificate (which we will put in the file selfSign.pem | ||
| 128 | req -x509 -in req.pem -key key.pem -text -out selfSign.pem | ||
| 129 | |||
| 130 | Verify that the signature is correct on a certificate request. | ||
| 131 | req -verify -in req.pem | ||
| 132 | |||
| 133 | Verify that the signature was made using a specified public key. | ||
| 134 | req -verify -in req.pem -key key.pem | ||
| 135 | |||
| 136 | Print the contents of a certificate request | ||
| 137 | req -text -in req.pem | ||
diff --git a/src/lib/libssl/src/doc/rsa.doc b/src/lib/libssl/src/doc/rsa.doc new file mode 100644 index 0000000000..f260452bc6 --- /dev/null +++ b/src/lib/libssl/src/doc/rsa.doc | |||
| @@ -0,0 +1,135 @@ | |||
| 1 | The RSA encryption and utility routines. | ||
| 2 | |||
| 3 | The RSA routines are built on top of a big number library (the BN library). | ||
| 4 | There are support routines in the X509 library for loading and manipulating | ||
| 5 | the various objects in the RSA library. When errors are returned, read | ||
| 6 | about the ERR library for how to access the error codes. | ||
| 7 | |||
| 8 | All RSA encryption is done according to the PKCS-1 standard which is | ||
| 9 | compatible with PEM and RSAref. This means that any values being encrypted | ||
| 10 | must be less than the size of the modulus in bytes, minus 10, bytes long. | ||
| 11 | |||
| 12 | This library uses RAND_bytes()() for it's random data, make sure to feed | ||
| 13 | RAND_seed() with lots of interesting and varied data before using these | ||
| 14 | routines. | ||
| 15 | |||
| 16 | The RSA library has one specific data type, the RSA structure. | ||
| 17 | It is composed of 8 BIGNUM variables (see the BN library for details) and | ||
| 18 | can hold either a private RSA key or a public RSA key. | ||
| 19 | Some RSA libraries have different structures for public and private keys, I | ||
| 20 | don't. For my libraries, a public key is determined by the fact that the | ||
| 21 | RSA->d value is NULL. These routines will operate on any size RSA keys. | ||
| 22 | While I'm sure 4096 bit keys are very very secure, they take a lot longer | ||
| 23 | to process that 1024 bit keys :-). | ||
| 24 | |||
| 25 | The function in the RSA library are as follows. | ||
| 26 | |||
| 27 | RSA *RSA_new(); | ||
| 28 | This function creates a new RSA object. The sub-fields of the RSA | ||
| 29 | type are also malloced so you should always use this routine to | ||
| 30 | create RSA variables. | ||
| 31 | |||
| 32 | void RSA_free( | ||
| 33 | RSA *rsa); | ||
| 34 | This function 'frees' an RSA structure. This routine should always | ||
| 35 | be used to free the RSA structure since it will also 'free' any | ||
| 36 | sub-fields of the RSA type that need freeing. | ||
| 37 | |||
| 38 | int RSA_size( | ||
| 39 | RSA *rsa); | ||
| 40 | This function returns the size of the RSA modulus in bytes. Why do | ||
| 41 | I need this you may ask, well the reason is that when you encrypt | ||
| 42 | with RSA, the output string will be the size of the RSA modulus. | ||
| 43 | So the output for the RSA_encrypt and the input for the RSA_decrypt | ||
| 44 | routines need to be RSA_size() bytes long, because this is how many | ||
| 45 | bytes are expected. | ||
| 46 | |||
| 47 | For the following 4 RSA encryption routines, it should be noted that | ||
| 48 | RSA_private_decrypt() should be used on the output from | ||
| 49 | RSA_public_encrypt() and RSA_public_decrypt() should be used on | ||
| 50 | the output from RSA_private_encrypt(). | ||
| 51 | |||
| 52 | int RSA_public_encrypt( | ||
| 53 | int from_len; | ||
| 54 | unsigned char *from | ||
| 55 | unsigned char *to | ||
| 56 | RSA *rsa); | ||
| 57 | This function implements RSA public encryption, the rsa variable | ||
| 58 | should be a public key (but can be a private key). 'from_len' | ||
| 59 | bytes taken from 'from' and encrypted and put into 'to'. 'to' needs | ||
| 60 | to be at least RSA_size(rsa) bytes long. The number of bytes | ||
| 61 | written into 'to' is returned. -1 is returned on an error. The | ||
| 62 | operation performed is | ||
| 63 | to = from^rsa->e mod rsa->n. | ||
| 64 | |||
| 65 | int RSA_private_encrypt( | ||
| 66 | int from_len; | ||
| 67 | unsigned char *from | ||
| 68 | unsigned char *to | ||
| 69 | RSA *rsa); | ||
| 70 | This function implements RSA private encryption, the rsa variable | ||
| 71 | should be a private key. 'from_len' bytes taken from | ||
| 72 | 'from' and encrypted and put into 'to'. 'to' needs | ||
| 73 | to be at least RSA_size(rsa) bytes long. The number of bytes | ||
| 74 | written into 'to' is returned. -1 is returned on an error. The | ||
| 75 | operation performed is | ||
| 76 | to = from^rsa->d mod rsa->n. | ||
| 77 | |||
| 78 | int RSA_public_decrypt( | ||
| 79 | int from_len; | ||
| 80 | unsigned char *from | ||
| 81 | unsigned char *to | ||
| 82 | RSA *rsa); | ||
| 83 | This function implements RSA public decryption, the rsa variable | ||
| 84 | should be a public key (but can be a private key). 'from_len' | ||
| 85 | bytes are taken from 'from' and decrypted. The decrypted data is | ||
| 86 | put into 'to'. The number of bytes encrypted is returned. -1 is | ||
| 87 | returned to indicate an error. The operation performed is | ||
| 88 | to = from^rsa->e mod rsa->n. | ||
| 89 | |||
| 90 | int RSA_private_decrypt( | ||
| 91 | int from_len; | ||
| 92 | unsigned char *from | ||
| 93 | unsigned char *to | ||
| 94 | RSA *rsa); | ||
| 95 | This function implements RSA private decryption, the rsa variable | ||
| 96 | should be a private key. 'from_len' bytes are taken | ||
| 97 | from 'from' and decrypted. The decrypted data is | ||
| 98 | put into 'to'. The number of bytes encrypted is returned. -1 is | ||
| 99 | returned to indicate an error. The operation performed is | ||
| 100 | to = from^rsa->d mod rsa->n. | ||
| 101 | |||
| 102 | int RSA_mod_exp( | ||
| 103 | BIGNUM *n; | ||
| 104 | BIGNUM *p; | ||
| 105 | RSA *rsa); | ||
| 106 | Normally you will never use this routine. | ||
| 107 | This is really an internal function which is called by | ||
| 108 | RSA_private_encrypt() and RSA_private_decrypt(). It performs | ||
| 109 | n=n^p mod rsa->n except that it uses the 5 extra variables in the | ||
| 110 | RSA structure to make this more efficient. | ||
| 111 | |||
| 112 | RSA *RSA_generate_key( | ||
| 113 | int bits; | ||
| 114 | unsigned long e; | ||
| 115 | void (*callback)(); | ||
| 116 | char *cb_arg; | ||
| 117 | This routine is used to generate RSA private keys. It takes | ||
| 118 | quite a period of time to run and should only be used to | ||
| 119 | generate initial private keys that should then be stored | ||
| 120 | for later use. The passed callback function | ||
| 121 | will be called periodically so that feedback can be given | ||
| 122 | as to how this function is progressing. | ||
| 123 | 'bits' is the length desired for the modulus, so it would be 1024 | ||
| 124 | to generate a 1024 bit private key. | ||
| 125 | 'e' is the value to use for the public exponent 'e'. Traditionally | ||
| 126 | it is set to either 3 or 0x10001. | ||
| 127 | The callback function (if not NULL) is called in the following | ||
| 128 | situations. | ||
| 129 | when we have generated a suspected prime number to test, | ||
| 130 | callback(0,num1++,cb_arg). When it passes a prime number test, | ||
| 131 | callback(1,num2++,cb_arg). When it is rejected as one of | ||
| 132 | the 2 primes required due to gcd(prime,e value) != 0, | ||
| 133 | callback(2,num3++,cb_arg). When finally accepted as one | ||
| 134 | of the 2 primes, callback(3,num4++,cb_arg). | ||
| 135 | |||
diff --git a/src/lib/libssl/src/doc/rsaref.doc b/src/lib/libssl/src/doc/rsaref.doc new file mode 100644 index 0000000000..0505b76f76 --- /dev/null +++ b/src/lib/libssl/src/doc/rsaref.doc | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | This package can be compiled to use the RSAref library. | ||
| 2 | This library is not allowed outside of the USA but inside the USA it is | ||
| 3 | claimed by RSA to be the only RSA public key library that can be used | ||
| 4 | besides BSAFE.. | ||
| 5 | |||
| 6 | There are 2 files, rsaref/rsaref.c and rsaref/rsaref.h that contain the glue | ||
| 7 | code to use RSAref. These files were written by looking at the PGP | ||
| 8 | source code and seeing which routines it used to access RSAref. | ||
| 9 | I have also been sent by some-one a copy of the RSAref header file that | ||
| 10 | contains the library error codes. | ||
| 11 | |||
| 12 | [ Jun 1996 update - I have recently gotten hold of RSAref 2.0 from | ||
| 13 | South Africa and have been doing some performace tests. ] | ||
| 14 | |||
| 15 | They have now been tested against the recently announced RSAEURO | ||
| 16 | library. | ||
| 17 | |||
| 18 | There are 2 ways to use SSLeay and RSAref. First, to build so that | ||
| 19 | the programs must be linked with RSAref, add '-DRSAref' to CFLAG in the top | ||
| 20 | level makefile and -lrsaref (or where ever you are keeping RSAref) to | ||
| 21 | EX_LIBS. | ||
| 22 | |||
| 23 | To build a makefile via util/mk1mf.pl to do this, use the 'rsaref' option. | ||
| 24 | |||
| 25 | The second method is to build as per normal and link applications with | ||
| 26 | the RSAglue library. The correct library order would be | ||
| 27 | cc -o cmd cmd.o -lssl -lRSAglue -lcrypto -lrsaref -ldes | ||
| 28 | The RSAglue library is built in the rsa directory and is NOT | ||
| 29 | automatically installed. | ||
| 30 | |||
| 31 | Be warned that the RSAEURO library, that is claimed to be compatible | ||
| 32 | with RSAref contains a different value for the maximum number of bits | ||
| 33 | supported. This changes structure sizes and so if you are using | ||
| 34 | RSAEURO, change the value of RSAref_MAX_BITS in rsa/rsaref.h | ||
| 35 | |||
diff --git a/src/lib/libssl/src/doc/s_mult.doc b/src/lib/libssl/src/doc/s_mult.doc new file mode 100644 index 0000000000..726085bc57 --- /dev/null +++ b/src/lib/libssl/src/doc/s_mult.doc | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | s_mult is a test program I hacked up on a Sunday for testing non-blocking | ||
| 2 | IO. It has a select loop at it's centre that handles multiple readers | ||
| 3 | and writers. | ||
| 4 | |||
| 5 | Try the following command | ||
| 6 | ssleay s_mult -echo -nbio -ssl -v | ||
| 7 | echo - sends any sent text back to the sender | ||
| 8 | nbio - turns on non-blocking IO | ||
| 9 | ssl - accept SSL connections, default is normal text | ||
| 10 | v - print lots | ||
| 11 | type Q<cr> to quit | ||
| 12 | |||
| 13 | In another window, run the following | ||
| 14 | ssleay s_client -pause </etc/termcap | ||
| 15 | |||
| 16 | The pause option puts in a 1 second pause in each read(2)/write(2) call | ||
| 17 | so the other end will have read()s fail. | ||
diff --git a/src/lib/libssl/src/doc/session.doc b/src/lib/libssl/src/doc/session.doc new file mode 100644 index 0000000000..ffccb0306e --- /dev/null +++ b/src/lib/libssl/src/doc/session.doc | |||
| @@ -0,0 +1,297 @@ | |||
| 1 | I have just checked over and re-worked the session stuff. | ||
| 2 | The following brief example will ignore all setup information to do with | ||
| 3 | authentication. | ||
| 4 | |||
| 5 | Things operate as follows. | ||
| 6 | |||
| 7 | The SSL environment has a 'context', a SSL_CTX structure. This holds the | ||
| 8 | cached SSL_SESSIONS (which can be reused) and the certificate lookup | ||
| 9 | information. Each SSL structure needs to be associated with a SSL_CTX. | ||
| 10 | Normally only one SSL_CTX structure is needed per program. | ||
| 11 | |||
| 12 | SSL_CTX *SSL_CTX_new(void ); | ||
| 13 | void SSL_CTX_free(SSL_CTX *); | ||
| 14 | These 2 functions create and destroy SSL_CTX structures | ||
| 15 | |||
| 16 | The SSL_CTX has a session_cache_mode which is by default, | ||
| 17 | in SSL_SESS_CACHE_SERVER mode. What this means is that the library | ||
| 18 | will automatically add new session-id's to the cache apon sucsessful | ||
| 19 | SSL_accept() calls. | ||
| 20 | If SSL_SESS_CACHE_CLIENT is set, then client certificates are also added | ||
| 21 | to the cache. | ||
| 22 | SSL_set_session_cache_mode(ctx,mode) will set the 'mode' and | ||
| 23 | SSL_get_session_cache_mode(ctx) will get the cache 'mode'. | ||
| 24 | The modes can be | ||
| 25 | SSL_SESS_CACHE_OFF - no caching | ||
| 26 | SSL_SESS_CACHE_CLIENT - only SSL_connect() | ||
| 27 | SSL_SESS_CACHE_SERVER - only SSL_accept() | ||
| 28 | SSL_SESS_NO_CACHE_BOTH - Either SSL_accept() or SSL_connect(). | ||
| 29 | If SSL_SESS_CACHE_NO_AUTO_CLEAR is set, old timed out sessions are | ||
| 30 | not automatically removed each 255, SSL_connect()s or SSL_accept()s. | ||
| 31 | |||
| 32 | By default, apon every 255 successful SSL_connect() or SSL_accept()s, | ||
| 33 | the cache is flush. Please note that this could be expensive on | ||
| 34 | a heavily loaded SSL server, in which case, turn this off and | ||
| 35 | clear the cache of old entries 'manually' (with one of the functions | ||
| 36 | listed below) every few hours. Perhaps I should up this number, it is hard | ||
| 37 | to say. Remember, the '255' new calls is just a mechanims to get called | ||
| 38 | every now and then, in theory at most 255 new session-id's will have been | ||
| 39 | added but if 100 are added every minute, you would still have | ||
| 40 | 500 in the cache before any would start being flushed (assuming a 3 minute | ||
| 41 | timeout).. | ||
| 42 | |||
| 43 | int SSL_CTX_sess_hits(SSL_CTX *ctx); | ||
| 44 | int SSL_CTX_sess_misses(SSL_CTX *ctx); | ||
| 45 | int SSL_CTX_sess_timeouts(SSL_CTX *ctx); | ||
| 46 | These 3 functions return statistics about the SSL_CTX. These 3 are the | ||
| 47 | number of session id reuses. hits is the number of reuses, misses are the | ||
| 48 | number of lookups that failed, and timeouts is the number of cached | ||
| 49 | entries ignored because they had timeouted. | ||
| 50 | |||
| 51 | ctx->new_session_cb is a function pointer to a function of type | ||
| 52 | int new_session_callback(SSL *ssl,SSL_SESSION *new); | ||
| 53 | This function, if set in the SSL_CTX structure is called whenever a new | ||
| 54 | SSL_SESSION is added to the cache. If the callback returns non-zero, it | ||
| 55 | means that the application will have to do a SSL_SESSION_free() | ||
| 56 | on the structure (this is | ||
| 57 | to do with the cache keeping the reference counts correct, without the | ||
| 58 | application needing to know about it. | ||
| 59 | The 'active' parameter is the current SSL session for which this connection | ||
| 60 | was created. | ||
| 61 | |||
| 62 | void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx,int (*cb)()); | ||
| 63 | to set the callback, | ||
| 64 | int (*cb)() SSL_CTX_sess_get_new_cb(SSL_CTX *ctx) | ||
| 65 | to get the callback. | ||
| 66 | |||
| 67 | If the 'get session' callback is set, when a session id is looked up and | ||
| 68 | it is not in the session-id cache, this callback is called. The callback is | ||
| 69 | of the form | ||
| 70 | SSL_SESSION *get_session_callback(unsigned char *sess_id,int sess_id_len, | ||
| 71 | int *copy); | ||
| 72 | |||
| 73 | The get_session_callback is intended to return null if no session id is found. | ||
| 74 | The reference count on the SSL_SESSION in incremented by the SSL library, | ||
| 75 | if copy is 1. Otherwise, the reference count is not modified. | ||
| 76 | |||
| 77 | void SSL_CTX_sess_set_get_cb(ctx,cb) sets the callback and | ||
| 78 | int (*cb)()SSL_CTX_sess_get_get_cb(ctx) returns the callback. | ||
| 79 | |||
| 80 | These callbacks are basically indended to be used by processes to | ||
| 81 | send their session-id's to other processes. I currently have not implemented | ||
| 82 | non-blocking semantics for these callbacks, it is upto the appication | ||
| 83 | to make the callbacks effiecent if they require blocking (perhaps | ||
| 84 | by 'saving' them and then 'posting them' when control returns from | ||
| 85 | the SSL_accept(). | ||
| 86 | |||
| 87 | LHASH *SSL_CTX_sessions(SSL_CTX *ctx) | ||
| 88 | This returns the session cache. The lhash strucutre can be accessed for | ||
| 89 | statistics about the cache. | ||
| 90 | |||
| 91 | void lh_stats(LHASH *lh, FILE *out); | ||
| 92 | void lh_node_stats(LHASH *lh, FILE *out); | ||
| 93 | void lh_node_usage_stats(LHASH *lh, FILE *out); | ||
| 94 | |||
| 95 | can be used to print details about it's activity and current state. | ||
| 96 | You can also delve directly into the lhash structure for 14 different | ||
| 97 | counters that are kept against the structure. When I wrote the lhash library, | ||
| 98 | I was interested in gathering statistics :-). | ||
| 99 | Have a read of doc/lhash.doc in the SSLeay distribution area for more details | ||
| 100 | on the lhash library. | ||
| 101 | |||
| 102 | Now as mentioned ealier, when a SSL is created, it needs a SSL_CTX. | ||
| 103 | SSL * SSL_new(SSL_CTX *); | ||
| 104 | |||
| 105 | This stores a session. A session is secret information shared between 2 | ||
| 106 | SSL contexts. It will only be created if both ends of the connection have | ||
| 107 | authenticated their peer to their satisfaction. It basically contains | ||
| 108 | the information required to use a particular secret key cipher. | ||
| 109 | |||
| 110 | To retrieve the SSL_CTX being used by a SSL, | ||
| 111 | SSL_CTX *SSL_get_SSL_CTX(SSL *s); | ||
| 112 | |||
| 113 | Now when a SSL session is established between to programs, the 'session' | ||
| 114 | information that is cached in the SSL_CTX can me manipulated by the | ||
| 115 | following functions. | ||
| 116 | int SSL_set_session(SSL *s, SSL_SESSION *session); | ||
| 117 | This will set the SSL_SESSION to use for the next SSL_connect(). If you use | ||
| 118 | this function on an already 'open' established SSL connection, 'bad things | ||
| 119 | will happen'. This function is meaning-less when used on a ssl strucutre | ||
| 120 | that is just about to be used in a SSL_accept() call since the | ||
| 121 | SSL_accept() will either create a new session or retrieve one from the | ||
| 122 | cache. | ||
| 123 | |||
| 124 | SSL_SESSION *SSL_get_session(SSL *s); | ||
| 125 | This will return the SSL_SESSION for the current SSL, NULL if there is | ||
| 126 | no session associated with the SSL structure. | ||
| 127 | |||
| 128 | The SSL sessions are kept in the SSL_CTX in a hash table, to remove a | ||
| 129 | session | ||
| 130 | void SSL_CTX_remove_session(SSL_CTX *,SSL_SESSION *c); | ||
| 131 | and to add one | ||
| 132 | int SSL_CTX_add_session(SSL_CTX *s, SSL_SESSION *c); | ||
| 133 | SSL_CTX_add_session() returns 1 if the session was already in the cache (so it | ||
| 134 | was not added). | ||
| 135 | Whenever a new session is created via SSL_connect()/SSL_accept(), | ||
| 136 | they are automatically added to the cache, depending on the session_cache_mode | ||
| 137 | settings. SSL_set_session() | ||
| 138 | does not add it to the cache. Just call SSL_CTX_add_session() if you do want the | ||
| 139 | session added. For a 'client' this would not normally be the case. | ||
| 140 | SSL_CTX_add_session() is not normally ever used, except for doing 'evil' things | ||
| 141 | which the next 2 funtions help you do. | ||
| 142 | |||
| 143 | int i2d_SSL_SESSION(SSL_SESSION *in,unsigned char **pp); | ||
| 144 | SSL_SESSION *d2i_SSL_SESSION(SSL_SESSION **a,unsigned char **pp,long length); | ||
| 145 | These 2 functions are in the standard ASN1 library form and can be used to | ||
| 146 | load and save to a byte format, the SSL_SESSION structure. | ||
| 147 | With these functions, you can save and read these structures to a files or | ||
| 148 | arbitary byte string. | ||
| 149 | The PEM_write_SSL_SESSION(fp,x) and PEM_read_SSL_SESSION(fp,x,cb) will | ||
| 150 | write to a file pointer in base64 encoding. | ||
| 151 | |||
| 152 | What you can do with this, is pass session information between separate | ||
| 153 | processes. Please note, that you will probably also need to modify the | ||
| 154 | timeout information on the SSL_SESSIONs. | ||
| 155 | |||
| 156 | long SSL_get_time(SSL_SESSION *s) | ||
| 157 | will return the 'time' that the session | ||
| 158 | was loaded. The timeout is relative to this time. This information is | ||
| 159 | saved when the SSL_SESSION is converted to binarary but it is stored | ||
| 160 | in as a unix long, which is rather OS dependant, but easy to convert back. | ||
| 161 | |||
| 162 | long SSL_set_time(SSL_SESSION *s,long t) will set the above mentioned time. | ||
| 163 | The time value is just the value returned from time(3), and should really | ||
| 164 | be defined by be to be time_t. | ||
| 165 | |||
| 166 | long SSL_get_timeout(SSL_SESSION *s); | ||
| 167 | long SSL_set_timeout(SSL_SESSION *s,long t); | ||
| 168 | These 2 retrieve and set the timeout which is just a number of secconds | ||
| 169 | from the 'SSL_get_time()' value. When this time period has elapesed, | ||
| 170 | the session will no longer be in the cache (well it will actually be removed | ||
| 171 | the next time it is attempted to be retrieved, so you could 'bump' | ||
| 172 | the timeout so it remains valid). | ||
| 173 | The 'time' and 'timeout' are set on a session when it is created, not reset | ||
| 174 | each time it is reused. If you did wish to 'bump it', just after establishing | ||
| 175 | a connection, do a | ||
| 176 | SSL_set_time(ssl,time(NULL)); | ||
| 177 | |||
| 178 | You can also use | ||
| 179 | SSL_CTX_set_timeout(SSL_CTX *ctx,unsigned long t) and | ||
| 180 | SSL_CTX_get_timeout(SSL_CTX *ctx) to manipulate the default timeouts for | ||
| 181 | all SSL connections created against a SSL_CTX. If you set a timeout in | ||
| 182 | an SSL_CTX, all new SSL's created will inherit the timeout. It can be over | ||
| 183 | written by the SSL_set_timeout(SSL *s,unsigned long t) function call. | ||
| 184 | If you 'set' the timeout back to 0, the system default will be used. | ||
| 185 | |||
| 186 | SSL_SESSION *SSL_SESSION_new(); | ||
| 187 | void SSL_SESSION_free(SSL_SESSION *ses); | ||
| 188 | These 2 functions are used to create and dispose of SSL_SESSION functions. | ||
| 189 | You should not ever normally need to use them unless you are using | ||
| 190 | i2d_SSL_SESSION() and/or d2i_SSL_SESSION(). If you 'load' a SSL_SESSION | ||
| 191 | via d2i_SSL_SESSION(), you will need to SSL_SESSION_free() it. | ||
| 192 | Both SSL_set_session() and SSL_CTX_add_session() will 'take copies' of the | ||
| 193 | structure (via reference counts) when it is passed to them. | ||
| 194 | |||
| 195 | SSL_CTX_flush_sessions(ctx,time); | ||
| 196 | The first function will clear all sessions from the cache, which have expired | ||
| 197 | relative to 'time' (which could just be time(NULL)). | ||
| 198 | |||
| 199 | SSL_CTX_flush_sessions(ctx,0); | ||
| 200 | This is a special case that clears everything. | ||
| 201 | |||
| 202 | As a final comment, a 'session' is not enough to establish a new | ||
| 203 | connection. If a session has timed out, a certificate and private key | ||
| 204 | need to have been associated with the SSL structure. | ||
| 205 | SSL_copy_session_id(SSL *to,SSL *from); will copy not only the session | ||
| 206 | strucutre but also the private key and certificate associated with | ||
| 207 | 'from'. | ||
| 208 | |||
| 209 | EXAMPLES. | ||
| 210 | |||
| 211 | So lets play at being a wierd SSL server. | ||
| 212 | |||
| 213 | /* setup a context */ | ||
| 214 | ctx=SSL_CTX_new(); | ||
| 215 | |||
| 216 | /* Lets load some session from binary into the cache, why one would do | ||
| 217 | * this is not toally clear, but passing between programs does make sense | ||
| 218 | * Perhaps you are using 4096 bit keys and are happy to keep them | ||
| 219 | * valid for a week, to avoid the RSA overhead of 15 seconds, I'm not toally | ||
| 220 | * sure, perhaps this is a process called from an SSL inetd and this is being | ||
| 221 | * passed to the application. */ | ||
| 222 | session=d2i_SSL_SESSION(....) | ||
| 223 | SSL_CTX_add_session(ctx,session); | ||
| 224 | |||
| 225 | /* Lets even add a session from a file */ | ||
| 226 | session=PEM_read_SSL_SESSION(....) | ||
| 227 | SSL_CTX_add_session(ctx,session); | ||
| 228 | |||
| 229 | /* create a new SSL structure */ | ||
| 230 | ssl=SSL_new(ctx); | ||
| 231 | |||
| 232 | /* At this point we want to be able to 'create' new session if | ||
| 233 | * required, so we need a certificate and RSAkey. */ | ||
| 234 | SSL_use_RSAPrivateKey_file(ssl,...) | ||
| 235 | SSL_use_certificate_file(ssl,...) | ||
| 236 | |||
| 237 | /* Now since we are a server, it make little sence to load a session against | ||
| 238 | * the ssl strucutre since a SSL_accept() will either create a new session or | ||
| 239 | * grab an existing one from the cache. */ | ||
| 240 | |||
| 241 | /* grab a socket descriptor */ | ||
| 242 | fd=accept(...); | ||
| 243 | |||
| 244 | /* associated it with the ssl strucutre */ | ||
| 245 | SSL_set_fd(ssl,fd); | ||
| 246 | |||
| 247 | SSL_accept(ssl); /* 'do' SSL using out cert and RSA key */ | ||
| 248 | |||
| 249 | /* Lets print out the session details or lets save it to a file, | ||
| 250 | * perhaps with a secret key cipher, so that we can pass it to the FBI | ||
| 251 | * when they want to decode the session :-). While we have RSA | ||
| 252 | * this does not matter much but when I do SSLv3, this will allow a mechanism | ||
| 253 | * for the server/client to record the information needed to decode | ||
| 254 | * the traffic that went over the wire, even when using Diffie-Hellman */ | ||
| 255 | PEM_write_SSL_SESSION(SSL_get_session(ssl),stdout,....) | ||
| 256 | |||
| 257 | Lets 'connect' back to the caller using the same session id. | ||
| 258 | |||
| 259 | ssl2=SSL_new(ctx); | ||
| 260 | fd2=connect(them); | ||
| 261 | SSL_set_fd(ssl2,fd2); | ||
| 262 | SSL_set_session(ssl2,SSL_get_session(ssl)); | ||
| 263 | SSL_connect(ssl2); | ||
| 264 | |||
| 265 | /* what the hell, lets accept no more connections using this session */ | ||
| 266 | SSL_CTX_remove_session(SSL_get_SSL_CTX(ssl),SSL_get_session(ssl)); | ||
| 267 | |||
| 268 | /* we could have just as easily used ssl2 since they both are using the | ||
| 269 | * same session. | ||
| 270 | * You will note that both ssl and ssl2 are still using the session, and | ||
| 271 | * the SSL_SESSION structure will be free()ed when both ssl and ssl2 | ||
| 272 | * finish using the session. Also note that you could continue to initiate | ||
| 273 | * connections using this session by doing SSL_get_session(ssl) to get the | ||
| 274 | * existing session, but SSL_accept() will not be able to find it to | ||
| 275 | * use for incoming connections. | ||
| 276 | * Of corse, the session will timeout at the far end and it will no | ||
| 277 | * longer be accepted after a while. The time and timeout are ignored except | ||
| 278 | * by SSL_accept(). */ | ||
| 279 | |||
| 280 | /* Since we have had our server running for 10 weeks, and memory is getting | ||
| 281 | * short, perhaps we should clear the session cache to remove those | ||
| 282 | * 100000 session entries that have expired. Some may consider this | ||
| 283 | * a memory leak :-) */ | ||
| 284 | |||
| 285 | SSL_CTX_flush_sessions(ctx,time(NULL)); | ||
| 286 | |||
| 287 | /* Ok, after a bit more time we wish to flush all sessions from the cache | ||
| 288 | * so that all new connections will be authenticated and incure the | ||
| 289 | * public key operation overhead */ | ||
| 290 | |||
| 291 | SSL_CTX_flush_sessions(ctx,0); | ||
| 292 | |||
| 293 | /* As a final note, to copy everything to do with a SSL, use */ | ||
| 294 | SSL_copy_session_id(SSL *to,SSL *from); | ||
| 295 | /* as this also copies the certificate and RSA key so new session can | ||
| 296 | * be established using the same details */ | ||
| 297 | |||
diff --git a/src/lib/libssl/src/doc/sha.doc b/src/lib/libssl/src/doc/sha.doc new file mode 100644 index 0000000000..895fa182ed --- /dev/null +++ b/src/lib/libssl/src/doc/sha.doc | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | The SHA (Secure Hash Algorithm) library. | ||
| 2 | SHA is a message digest algorithm that can be used to condense an arbitrary | ||
| 3 | length message down to a 20 byte hash. The functions all need to be passed | ||
| 4 | a SHA_CTX which is used to hold the SHA context during multiple SHA_Update() | ||
| 5 | function calls. The normal method of use for this library is as follows | ||
| 6 | This library contains both SHA and SHA-1 digest algorithms. SHA-1 is | ||
| 7 | an update to SHA (which should really be called SHA-0 now) which | ||
| 8 | tweaks the algorithm slightly. The SHA-1 algorithm is used by simply | ||
| 9 | using SHA1_Init(), SHA1_Update(), SHA1_Final() and SHA1() instead of the | ||
| 10 | SHA*() calls | ||
| 11 | |||
| 12 | SHA_Init(...); | ||
| 13 | SHA_Update(...); | ||
| 14 | ... | ||
| 15 | SHA_Update(...); | ||
| 16 | SHA_Final(...); | ||
| 17 | |||
| 18 | This library requires the inclusion of 'sha.h'. | ||
| 19 | |||
| 20 | The functions are as follows: | ||
| 21 | |||
| 22 | void SHA_Init( | ||
| 23 | SHA_CTX *c); | ||
| 24 | This function needs to be called to initiate a SHA_CTX structure for | ||
| 25 | use. | ||
| 26 | |||
| 27 | void SHA_Update( | ||
| 28 | SHA_CTX *c; | ||
| 29 | unsigned char *data; | ||
| 30 | unsigned long len); | ||
| 31 | This updates the message digest context being generated with 'len' | ||
| 32 | bytes from the 'data' pointer. The number of bytes can be any | ||
| 33 | length. | ||
| 34 | |||
| 35 | void SHA_Final( | ||
| 36 | unsigned char *md; | ||
| 37 | SHA_CTX *c; | ||
| 38 | This function is called when a message digest of the data digested | ||
| 39 | with SHA_Update() is wanted. The message digest is put in the 'md' | ||
| 40 | array and is SHA_DIGEST_LENGTH (20) bytes long. | ||
| 41 | |||
| 42 | unsigned char *SHA( | ||
| 43 | unsigned char *d; | ||
| 44 | unsigned long n; | ||
| 45 | unsigned char *md; | ||
| 46 | This function performs a SHA_Init(), followed by a SHA_Update() | ||
| 47 | followed by a SHA_Final() (using a local SHA_CTX). | ||
| 48 | The resulting digest is put into 'md' if it is not NULL. | ||
| 49 | Regardless of the value of 'md', the message | ||
| 50 | digest is returned from the function. If 'md' was NULL, the message | ||
| 51 | digest returned is being stored in a static structure. | ||
| 52 | |||
diff --git a/src/lib/libssl/src/doc/speed.doc b/src/lib/libssl/src/doc/speed.doc new file mode 100644 index 0000000000..11dfa85f08 --- /dev/null +++ b/src/lib/libssl/src/doc/speed.doc | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | To get an idea of the performance of this library, use | ||
| 2 | ssleay speed | ||
| 3 | |||
| 4 | perl util/sp-diff.pl file1 file2 | ||
| 5 | |||
| 6 | will print out the relative differences between the 2 files which are | ||
| 7 | expected to be the output from the speed program. | ||
| 8 | |||
| 9 | The performace of the library is very dependant on the Compiler | ||
| 10 | quality and various flags used to build. | ||
| 11 | |||
| 12 | --- | ||
| 13 | |||
| 14 | These are some numbers I did comparing RSAref and SSLeay on a Pentium 100. | ||
| 15 | [ These numbers are all out of date, as of SSL - 0.6.1 the RSA | ||
| 16 | operations are about 2 times faster, so check the version number ] | ||
| 17 | |||
| 18 | RSA performance. | ||
| 19 | |||
| 20 | SSLeay 0.6.0 | ||
| 21 | Pentium 100, 32meg, Windows NT Workstation 3.51 | ||
| 22 | linux - gcc v 2.7.0 -O3 -fomit-frame-pointer -m486 | ||
| 23 | and | ||
| 24 | Windows NT - Windows NT 3.51 - Visual C++ 4.1 - 586 code + 32bit assember | ||
| 25 | Windows 3.1 - Windows NT 3.51 - Visual C++ 1.52c - 286 code + 32bit assember | ||
| 26 | NT Dos Shell- Windows NT 3.51 - Visual C++ 1.52c - 286 code + 16bit assember | ||
| 27 | |||
| 28 | Times are how long it takes to do an RSA private key operation. | ||
| 29 | |||
| 30 | 512bits 1024bits | ||
| 31 | ------------------------------- | ||
| 32 | SSLeay NT dll 0.042s 0.202s see above | ||
| 33 | SSLeay linux 0.046s 0.218s Assember inner loops (normal build) | ||
| 34 | SSLeay linux 0.067s 0.380s Pure C code with BN_LLONG defined | ||
| 35 | SSLeay W3.1 dll 0.108s 0.478s see above | ||
| 36 | SSLeay linux 0.109s 0.713s C without BN_LLONG. | ||
| 37 | RSAref2.0 linux 0.149s 0.936s | ||
| 38 | SSLeay MS-DOS 0.197s 1.049s see above | ||
| 39 | |||
| 40 | 486DX66, 32meg, Windows NT Server 3.51 | ||
| 41 | 512bits 1024bits | ||
| 42 | ------------------------------- | ||
| 43 | SSLeay NT dll 0.084s 0.495s <- SSLeay 0.6.3 | ||
| 44 | SSLeay NT dll 0.154s 0.882s | ||
| 45 | SSLeay W3.1 dll 0.335s 1.538s | ||
| 46 | SSLeay MS-DOS 0.490s 2.790s | ||
| 47 | |||
| 48 | What I find cute is that I'm still faster than RSAref when using standard C, | ||
| 49 | without using the 'long long' data type :-), %35 faster for 512bit and we | ||
| 50 | scale up to 3.2 times faster for the 'default linux' build. I should mention | ||
| 51 | that people should 'try' to use either x86-lnx.s (elf), x86-lnxa.s or | ||
| 52 | x86-sol.s for any x86 based unix they are building on. The only problems | ||
| 53 | with be with syntax but the performance gain is quite large, especially for | ||
| 54 | servers. The code is very simple, you just need to modify the 'header'. | ||
| 55 | |||
| 56 | The message is, if you are stuck using RSAref, the RSA performance will be | ||
| 57 | bad. Considering the code was compiled for a pentium, the 486DX66 number | ||
| 58 | would indicate 'Use RSAref and turn you Pentium 100 into a 486DX66' :-). | ||
| 59 | [ As of verson 0.6.1, it would be correct to say 'turn you pentium 100 | ||
| 60 | into a 486DX33' :-) ] | ||
| 61 | |||
| 62 | I won't tell people if the DLL's are using RSAref or my stuff if no-one | ||
| 63 | asks :-). | ||
| 64 | |||
| 65 | eric | ||
| 66 | |||
| 67 | PS while I know I could speed things up further, I will probably not do | ||
| 68 | so due to the effort involved. I did do some timings on the | ||
| 69 | SSLeay bignum format -> RSAref number format conversion that occurs | ||
| 70 | each time RSAref is used by SSLeay, and the numbers are trivial. | ||
| 71 | 0.00012s a call for 512bit vs 0.149s for the time spent in the function. | ||
| 72 | 0.00018s for 1024bit vs 0.938s. Insignificant. | ||
| 73 | So the 'way to go', to support faster RSA libraries, if people are keen, | ||
| 74 | is to write 'glue' code in a similar way that I do for RSAref and send it | ||
| 75 | to me :-). | ||
| 76 | My base library still has the advantage of being able to operate on | ||
| 77 | any size numbers, and is not that far from the performance from the | ||
| 78 | leaders in the field. (-%30?) | ||
| 79 | [ Well as of 0.6.1 I am now the leader in the filed on x86 (we at | ||
| 80 | least very close :-) ] | ||
| 81 | |||
| 82 | I suppose I should also mention some other numbers RSAref numbers, again | ||
| 83 | on my Pentium. | ||
| 84 | DES CBC EDE-DES MD5 | ||
| 85 | RSAref linux 830k/s 302k/s 4390k/s | ||
| 86 | SSLeay linux 855k/s 319k/s 10025k/s | ||
| 87 | SSLeay NT 1158k/s 410k/s 10470k/s | ||
| 88 | SSLeay w31 378k/s 143k/s 2383k/s (fully 16bit) | ||
| 89 | |||
| 90 | Got to admit that Visual C++ 4.[01] is a damn fine compiler :-) | ||
| 91 | -- | ||
| 92 | Eric Young | BOOL is tri-state according to Bill Gates. | ||
| 93 | AARNet: eay@cryptsoft.com | RTFM Win32 GetMessage(). | ||
| 94 | |||
| 95 | |||
| 96 | |||
diff --git a/src/lib/libssl/src/doc/ssl-ciph.doc b/src/lib/libssl/src/doc/ssl-ciph.doc new file mode 100644 index 0000000000..33a7e41f0e --- /dev/null +++ b/src/lib/libssl/src/doc/ssl-ciph.doc | |||
| @@ -0,0 +1,84 @@ | |||
| 1 | This is a quick high level summery of how things work now. | ||
| 2 | |||
| 3 | Each SSLv2 and SSLv3 cipher is composed of 4 major attributes plus a few extra | ||
| 4 | minor ones. | ||
| 5 | |||
| 6 | They are 'The key exchange algorithm', which is RSA for SSLv2 but can also | ||
| 7 | be Diffle-Hellman for SSLv3. | ||
| 8 | |||
| 9 | An 'Authenticion algorithm', which can be RSA, Diffle-Helman, DSS or | ||
| 10 | none. | ||
| 11 | |||
| 12 | The cipher | ||
| 13 | |||
| 14 | The MAC digest. | ||
| 15 | |||
| 16 | A cipher can also be an export cipher and is either an SSLv2 or a | ||
| 17 | SSLv3 ciphers. | ||
| 18 | |||
| 19 | To specify which ciphers to use, one can either specify all the ciphers, | ||
| 20 | one at a time, or use 'aliases' to specify the preference and order for | ||
| 21 | the ciphers. | ||
| 22 | |||
| 23 | There are a large number of aliases, but the most importaint are | ||
| 24 | kRSA, kDHr, kDHd and kEDH for key exchange types. | ||
| 25 | |||
| 26 | aRSA, aDSS, aNULL and aDH for authentication | ||
| 27 | DES, 3DES, RC4, RC2, IDEA and eNULL for ciphers | ||
| 28 | MD5, SHA0 and SHA1 digests | ||
| 29 | |||
| 30 | Now where this becomes interesting is that these can be put together to | ||
| 31 | specify the order and ciphers you wish to use. | ||
| 32 | |||
| 33 | To speed this up there are also aliases for certian groups of ciphers. | ||
| 34 | The main ones are | ||
| 35 | SSLv2 - all SSLv2 ciphers | ||
| 36 | SSLv3 - all SSLv3 ciphers | ||
| 37 | EXP - all export ciphers | ||
| 38 | LOW - all low strngth ciphers (no export ciphers, normally single DES) | ||
| 39 | MEDIUM - 128 bit encryption | ||
| 40 | HIGH - Triple DES | ||
| 41 | |||
| 42 | These aliases can be joined in a : separated list which specifies to | ||
| 43 | add ciphers, move them to the current location and delete them. | ||
| 44 | |||
| 45 | A simpler way to look at all of this is to use the 'ssleay ciphers -v' command. | ||
| 46 | The default library cipher spec is | ||
| 47 | !ADH:RC4+RSA:HIGH:MEDIUM:LOW:EXP:+SSLv2:+EXP | ||
| 48 | which means, first, remove from consideration any ciphers that do not | ||
| 49 | authenticate. Next up, use ciphers using RC4 and RSA. Next include the HIGH, | ||
| 50 | MEDIUM and the LOW security ciphers. Finish up by adding all the export | ||
| 51 | ciphers on the end, then 'pull' all the SSLv2 and export ciphers to | ||
| 52 | the end of the list. | ||
| 53 | |||
| 54 | The results are | ||
| 55 | $ ssleay ciphers -v '!ADH:RC4+RSA:HIGH:MEDIUM:LOW:EXP:+SSLv2:+EXP' | ||
| 56 | |||
| 57 | RC4-SHA SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=SHA1 | ||
| 58 | RC4-MD5 SSLv3 Kx=RSA Au=RSA Enc=RC4(128) Mac=MD5 | ||
| 59 | EDH-RSA-DES-CBC3-SHA SSLv3 Kx=DH Au=RSA Enc=3DES(168) Mac=SHA1 | ||
| 60 | EDH-DSS-DES-CBC3-SHA SSLv3 Kx=DH Au=DSS Enc=3DES(168) Mac=SHA1 | ||
| 61 | DES-CBC3-SHA SSLv3 Kx=RSA Au=RSA Enc=3DES(168) Mac=SHA1 | ||
| 62 | IDEA-CBC-MD5 SSLv3 Kx=RSA Au=RSA Enc=IDEA(128) Mac=SHA1 | ||
| 63 | EDH-RSA-DES-CBC-SHA SSLv3 Kx=DH Au=RSA Enc=DES(56) Mac=SHA1 | ||
| 64 | EDH-DSS-DES-CBC-SHA SSLv3 Kx=DH Au=DSS Enc=DES(56) Mac=SHA1 | ||
| 65 | DES-CBC-SHA SSLv3 Kx=RSA Au=RSA Enc=DES(56) Mac=SHA1 | ||
| 66 | DES-CBC3-MD5 SSLv2 Kx=RSA Au=RSA Enc=3DES(168) Mac=MD5 | ||
| 67 | DES-CBC-MD5 SSLv2 Kx=RSA Au=RSA Enc=DES(56) Mac=MD5 | ||
| 68 | IDEA-CBC-MD5 SSLv2 Kx=RSA Au=RSA Enc=IDEA(128) Mac=MD5 | ||
| 69 | RC2-CBC-MD5 SSLv2 Kx=RSA Au=RSA Enc=RC2(128) Mac=MD5 | ||
| 70 | RC4-MD5 SSLv2 Kx=RSA Au=RSA Enc=RC4(128) Mac=MD5 | ||
| 71 | EXP-EDH-RSA-DES-CBC SSLv3 Kx=DH(512) Au=RSA Enc=DES(40) Mac=SHA1 export | ||
| 72 | EXP-EDH-DSS-DES-CBC-SHA SSLv3 Kx=DH(512) Au=DSS Enc=DES(40) Mac=SHA1 export | ||
| 73 | EXP-DES-CBC-SHA SSLv3 Kx=RSA(512) Au=RSA Enc=DES(40) Mac=SHA1 export | ||
| 74 | EXP-RC2-CBC-MD5 SSLv3 Kx=RSA(512) Au=RSA Enc=RC2(40) Mac=MD5 export | ||
| 75 | EXP-RC4-MD5 SSLv3 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export | ||
| 76 | EXP-RC2-CBC-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC2(40) Mac=MD5 export | ||
| 77 | EXP-RC4-MD5 SSLv2 Kx=RSA(512) Au=RSA Enc=RC4(40) Mac=MD5 export | ||
| 78 | |||
| 79 | I would recoment people use the 'ssleay ciphers -v "text"' | ||
| 80 | command to check what they are going to use. | ||
| 81 | |||
| 82 | Anyway, I'm falling asleep here so I'll do some more tomorrow. | ||
| 83 | |||
| 84 | eric | ||
diff --git a/src/lib/libssl/src/doc/ssl.doc b/src/lib/libssl/src/doc/ssl.doc new file mode 100644 index 0000000000..1f89cd5db2 --- /dev/null +++ b/src/lib/libssl/src/doc/ssl.doc | |||
| @@ -0,0 +1,172 @@ | |||
| 1 | SSL_CTX_sessions(SSL_CTX *ctx) - the session-id hash table. | ||
| 2 | |||
| 3 | /* Session-id cache stats */ | ||
| 4 | SSL_CTX_sess_number | ||
| 5 | SSL_CTX_sess_connect | ||
| 6 | SSL_CTX_sess_connect_good | ||
| 7 | SSL_CTX_sess_accept | ||
| 8 | SSL_CTX_sess_accept_good | ||
| 9 | SSL_CTX_sess_hits | ||
| 10 | SSL_CTX_sess_cb_hits | ||
| 11 | SSL_CTX_sess_misses | ||
| 12 | SSL_CTX_sess_timeouts | ||
| 13 | |||
| 14 | /* Session-id application notification callbacks */ | ||
| 15 | SSL_CTX_sess_set_new_cb | ||
| 16 | SSL_CTX_sess_get_new_cb | ||
| 17 | SSL_CTX_sess_set_get_cb | ||
| 18 | SSL_CTX_sess_get_get_cb | ||
| 19 | |||
| 20 | /* Session-id cache operation mode */ | ||
| 21 | SSL_CTX_set_session_cache_mode | ||
| 22 | SSL_CTX_get_session_cache_mode | ||
| 23 | |||
| 24 | /* Set default timeout values to use. */ | ||
| 25 | SSL_CTX_set_timeout | ||
| 26 | SSL_CTX_get_timeout | ||
| 27 | |||
| 28 | /* Global SSL initalisation informational callback */ | ||
| 29 | SSL_CTX_set_info_callback | ||
| 30 | SSL_CTX_get_info_callback | ||
| 31 | SSL_set_info_callback | ||
| 32 | SSL_get_info_callback | ||
| 33 | |||
| 34 | /* If the SSL_accept/SSL_connect returned with -1, these indicate when | ||
| 35 | * we should re-call *. | ||
| 36 | SSL_want | ||
| 37 | SSL_want_nothing | ||
| 38 | SSL_want_read | ||
| 39 | SSL_want_write | ||
| 40 | SSL_want_x509_lookup | ||
| 41 | |||
| 42 | /* Where we are in SSL initalisation, used in non-blocking, perhaps | ||
| 43 | * have a look at ssl/bio_ssl.c */ | ||
| 44 | SSL_state | ||
| 45 | SSL_is_init_finished | ||
| 46 | SSL_in_init | ||
| 47 | SSL_in_connect_init | ||
| 48 | SSL_in_accept_init | ||
| 49 | |||
| 50 | /* Used to set the 'inital' state so SSL_in_connect_init and SSL_in_accept_init | ||
| 51 | * can be used to work out which function to call. */ | ||
| 52 | SSL_set_connect_state | ||
| 53 | SSL_set_accept_state | ||
| 54 | |||
| 55 | /* Where to look for certificates for authentication */ | ||
| 56 | SSL_set_default_verify_paths /* calles SSL_load_verify_locations */ | ||
| 57 | SSL_load_verify_locations | ||
| 58 | |||
| 59 | /* get info from an established connection */ | ||
| 60 | SSL_get_session | ||
| 61 | SSL_get_certificate | ||
| 62 | SSL_get_SSL_CTX | ||
| 63 | |||
| 64 | SSL_CTX_new | ||
| 65 | SSL_CTX_free | ||
| 66 | SSL_new | ||
| 67 | SSL_clear | ||
| 68 | SSL_free | ||
| 69 | |||
| 70 | SSL_CTX_set_cipher_list | ||
| 71 | SSL_get_cipher | ||
| 72 | SSL_set_cipher_list | ||
| 73 | SSL_get_cipher_list | ||
| 74 | SSL_get_shared_ciphers | ||
| 75 | |||
| 76 | SSL_accept | ||
| 77 | SSL_connect | ||
| 78 | SSL_read | ||
| 79 | SSL_write | ||
| 80 | |||
| 81 | SSL_debug | ||
| 82 | |||
| 83 | SSL_get_read_ahead | ||
| 84 | SSL_set_read_ahead | ||
| 85 | SSL_set_verify | ||
| 86 | |||
| 87 | SSL_pending | ||
| 88 | |||
| 89 | SSL_set_fd | ||
| 90 | SSL_set_rfd | ||
| 91 | SSL_set_wfd | ||
| 92 | SSL_set_bio | ||
| 93 | SSL_get_fd | ||
| 94 | SSL_get_rbio | ||
| 95 | SSL_get_wbio | ||
| 96 | |||
| 97 | SSL_use_RSAPrivateKey | ||
| 98 | SSL_use_RSAPrivateKey_ASN1 | ||
| 99 | SSL_use_RSAPrivateKey_file | ||
| 100 | SSL_use_PrivateKey | ||
| 101 | SSL_use_PrivateKey_ASN1 | ||
| 102 | SSL_use_PrivateKey_file | ||
| 103 | SSL_use_certificate | ||
| 104 | SSL_use_certificate_ASN1 | ||
| 105 | SSL_use_certificate_file | ||
| 106 | |||
| 107 | ERR_load_SSL_strings | ||
| 108 | SSL_load_error_strings | ||
| 109 | |||
| 110 | /* human readable version of the 'state' of the SSL connection. */ | ||
| 111 | SSL_state_string | ||
| 112 | SSL_state_string_long | ||
| 113 | /* These 2 report what kind of IO operation the library was trying to | ||
| 114 | * perform last. Probably not very usefull. */ | ||
| 115 | SSL_rstate_string | ||
| 116 | SSL_rstate_string_long | ||
| 117 | |||
| 118 | SSL_get_peer_certificate | ||
| 119 | |||
| 120 | SSL_SESSION_new | ||
| 121 | SSL_SESSION_print_fp | ||
| 122 | SSL_SESSION_print | ||
| 123 | SSL_SESSION_free | ||
| 124 | i2d_SSL_SESSION | ||
| 125 | d2i_SSL_SESSION | ||
| 126 | |||
| 127 | SSL_get_time | ||
| 128 | SSL_set_time | ||
| 129 | SSL_get_timeout | ||
| 130 | SSL_set_timeout | ||
| 131 | SSL_copy_session_id | ||
| 132 | SSL_set_session | ||
| 133 | SSL_CTX_add_session | ||
| 134 | SSL_CTX_remove_session | ||
| 135 | SSL_CTX_flush_sessions | ||
| 136 | |||
| 137 | BIO_f_ssl | ||
| 138 | |||
| 139 | /* used to hold information as to why a certificate verification failed */ | ||
| 140 | SSL_set_verify_result | ||
| 141 | SSL_get_verify_result | ||
| 142 | |||
| 143 | /* can be used by the application to associate data with an SSL structure. | ||
| 144 | * It needs to be 'free()ed' by the application */ | ||
| 145 | SSL_set_app_data | ||
| 146 | SSL_get_app_data | ||
| 147 | |||
| 148 | /* The following all set values that are kept in the SSL_CTX but | ||
| 149 | * are used as the default values when an SSL session is created. | ||
| 150 | * They are over writen by the relevent SSL_xxxx functions */ | ||
| 151 | |||
| 152 | /* SSL_set_verify */ | ||
| 153 | void SSL_CTX_set_default_verify | ||
| 154 | |||
| 155 | /* This callback, if set, totaly overrides the normal SSLeay verification | ||
| 156 | * functions and should return 1 on sucesss and 0 on failure */ | ||
| 157 | void SSL_CTX_set_cert_verify_callback | ||
| 158 | |||
| 159 | /* The following are the same as the equivilent SSL_xxx functions. | ||
| 160 | * Only one copy of this information is kept and if a particular | ||
| 161 | * SSL structure has a local override, it is totally separate structure. | ||
| 162 | */ | ||
| 163 | int SSL_CTX_use_RSAPrivateKey | ||
| 164 | int SSL_CTX_use_RSAPrivateKey_ASN1 | ||
| 165 | int SSL_CTX_use_RSAPrivateKey_file | ||
| 166 | int SSL_CTX_use_PrivateKey | ||
| 167 | int SSL_CTX_use_PrivateKey_ASN1 | ||
| 168 | int SSL_CTX_use_PrivateKey_file | ||
| 169 | int SSL_CTX_use_certificate | ||
| 170 | int SSL_CTX_use_certificate_ASN1 | ||
| 171 | int SSL_CTX_use_certificate_file | ||
| 172 | |||
diff --git a/src/lib/libssl/src/doc/ssl_ctx.doc b/src/lib/libssl/src/doc/ssl_ctx.doc new file mode 100644 index 0000000000..508394e75f --- /dev/null +++ b/src/lib/libssl/src/doc/ssl_ctx.doc | |||
| @@ -0,0 +1,68 @@ | |||
| 1 | This is now a bit dated, quite a few of the SSL_ functions could be | ||
| 2 | SSL_CTX_ functions. I will update this in the future. 30 Aug 1996 | ||
| 3 | |||
| 4 | From eay@orb.mincom.oz.au Mon Dec 11 21:37:08 1995 | ||
| 5 | Received: by orb.mincom.oz.au id AA00696 | ||
| 6 | (5.65c/IDA-1.4.4 for eay); Mon, 11 Dec 1995 11:37:08 +1000 | ||
| 7 | Date: Mon, 11 Dec 1995 11:37:08 +1000 (EST) | ||
| 8 | From: Eric Young <eay@mincom.oz.au> | ||
| 9 | X-Sender: eay@orb | ||
| 10 | To: sameer <sameer@c2.org> | ||
| 11 | Cc: Eric Young <eay@mincom.oz.au> | ||
| 12 | Subject: Re: PEM_readX509 oesn't seem to be working | ||
| 13 | In-Reply-To: <199512110102.RAA12521@infinity.c2.org> | ||
| 14 | Message-Id: <Pine.SOL.3.91.951211112115.28608D-100000@orb> | ||
| 15 | Mime-Version: 1.0 | ||
| 16 | Content-Type: TEXT/PLAIN; charset=US-ASCII | ||
| 17 | Status: RO | ||
| 18 | X-Status: | ||
| 19 | |||
| 20 | On Sun, 10 Dec 1995, sameer wrote: | ||
| 21 | > OK, that's solved. I've found out that it is saying "no | ||
| 22 | > certificate set" in SSL_accept because s->conn == NULL | ||
| 23 | > so there is some place I need to initialize s->conn that I am | ||
| 24 | > not initializing it. | ||
| 25 | |||
| 26 | The full order of things for a server should be. | ||
| 27 | |||
| 28 | ctx=SSL_CTX_new(); | ||
| 29 | |||
| 30 | /* The next line should not really be using ctx->cert but I'll leave it | ||
| 31 | * this way right now... I don't want a X509_ routine to know about an SSL | ||
| 32 | * structure, there should be an SSL_load_verify_locations... hmm, I may | ||
| 33 | * add it tonight. | ||
| 34 | */ | ||
| 35 | X509_load_verify_locations(ctx->cert,CAfile,CApath); | ||
| 36 | |||
| 37 | /* Ok now for each new connection we do the following */ | ||
| 38 | con=SSL_new(ctx); | ||
| 39 | SSL_set_fd(con,s); | ||
| 40 | SSL_set_verify(con,verify,verify_callback); | ||
| 41 | |||
| 42 | /* set the certificate and private key to use. */ | ||
| 43 | SSL_use_certificate_ASN1(con,X509_certificate); | ||
| 44 | SSL_use_RSAPrivateKey_ASN1(con,RSA_private_key); | ||
| 45 | |||
| 46 | SSL_accept(con); | ||
| 47 | |||
| 48 | SSL_read(con)/SSL_write(con); | ||
| 49 | |||
| 50 | There is a bit more than that but that is basically the structure. | ||
| 51 | |||
| 52 | Create a context and specify where to lookup certificates. | ||
| 53 | |||
| 54 | foreach connection | ||
| 55 | { | ||
| 56 | create a SSL structure | ||
| 57 | set the certificate and private key | ||
| 58 | do a SSL_accept | ||
| 59 | |||
| 60 | we should now be ok | ||
| 61 | } | ||
| 62 | |||
| 63 | eric | ||
| 64 | -- | ||
| 65 | Eric Young | Signature removed since it was generating | ||
| 66 | AARNet: eay@mincom.oz.au | more followups than the message contents :-) | ||
| 67 | |||
| 68 | |||
diff --git a/src/lib/libssl/src/doc/ssleay.doc b/src/lib/libssl/src/doc/ssleay.doc new file mode 100644 index 0000000000..a0e86aef7c --- /dev/null +++ b/src/lib/libssl/src/doc/ssleay.doc | |||
| @@ -0,0 +1,213 @@ | |||
| 1 | SSLeay: a cryptographic kitchen sink. | ||
| 2 | |||
| 3 | 1st December 1995 | ||
| 4 | Way back at the start of April 1995, I was looking for a mindless | ||
| 5 | programming project. A friend of mine (Tim Hudson) said "why don't you do SSL, | ||
| 6 | it has DES encryption in it and I would not mind using it in a SSL telnet". | ||
| 7 | While it was true I had written a DES library in previous years, litle | ||
| 8 | did I know what an expansive task SSL would turn into. | ||
| 9 | |||
| 10 | First of all, the SSL protocol contains DES encryption. Well and good. My | ||
| 11 | DES library was fast and portable. It also contained the RSA's RC4 stream | ||
| 12 | cipher. Again, not a problem, some-one had just posted to sci.crypt | ||
| 13 | something that was claimed to be RC4. It also contained IDEA, I had the | ||
| 14 | specifications, not a problem to implement. MD5, an RFC, trivial, at most | ||
| 15 | I could spend a week or so trying to see if I could speed up the | ||
| 16 | implementation. All in all a nice set of ciphers. | ||
| 17 | Then the first 'expantion of the scope', RSA public key | ||
| 18 | encryption. Since I did not knowing a thing about public key encryption | ||
| 19 | or number theory, this appeared quite a daunting task. Just writing a | ||
| 20 | big number library would be problomatic in itself, let alone making it fast. | ||
| 21 | At this point the scope of 'implementing SSL' expands eponentialy. | ||
| 22 | First of all, the RSA private keys were being kept in ASN.1 format. | ||
| 23 | Thankfully the RSA PKCS series of documents explains this format. So I now | ||
| 24 | needed to be able to encode and decode arbitary ASN.1 objects. The Public | ||
| 25 | keys were embeded in X509 certificates. Hmm... these are not only | ||
| 26 | ASN.1 objects but they make up a heirachy of authentication. To | ||
| 27 | authenticate a X509 certificate one needs to retrieve it's issuers | ||
| 28 | certificate etc etc. Hmm..., so I also need to implement some kind | ||
| 29 | of certificate management software. I would also have to implement | ||
| 30 | software to authenticate certificates. At this point the support code made | ||
| 31 | the SSL part of my library look quite small. | ||
| 32 | Around this time, the first version of SSLeay was released. | ||
| 33 | |||
| 34 | Ah, but here was the problem, I was not happy with the code so far. As may | ||
| 35 | have become obvious, I had been treating all of this as a learning | ||
| 36 | exersize, so I have completely written the library myself. As such, due | ||
| 37 | to the way it had grown like a fungus, much of the library was not | ||
| 38 | 'elagent' or neat. There were global and static variables all over the | ||
| 39 | place, the SSL part did not even handle non-blocking IO. | ||
| 40 | The Great rewrite began. | ||
| 41 | |||
| 42 | As of this point in time, the 'Great rewrite' has almost finished. So what | ||
| 43 | follows is an approximate list of what is actually SSLeay 0.5.0 | ||
| 44 | |||
| 45 | /********* This needs to be updated for 0.6.0+ *************/ | ||
| 46 | |||
| 47 | --- | ||
| 48 | The library contains the following routines. Please note that most of these | ||
| 49 | functions are not specfic for SSL or any other particular cipher | ||
| 50 | implementation. I have tried to make all the routines as general purpose | ||
| 51 | as possible. So you should not think of this library as an SSL | ||
| 52 | implemtation, but rather as a library of cryptographic functions | ||
| 53 | that also contains SSL. I refer to each of these function groupings as | ||
| 54 | libraries since they are often capable of functioning as independant | ||
| 55 | libraries | ||
| 56 | |||
| 57 | First up, the general ciphers and message digests supported by the library. | ||
| 58 | |||
| 59 | MD2 rfc???, a standard 'by parts' interface to this algorithm. | ||
| 60 | MD5 rfc???, the same type of interface as for the MD2 library except a | ||
| 61 | different algorithm. | ||
| 62 | SHA THe Secure Hash Algorithm. Again the same type of interface as | ||
| 63 | MD2/MD5 except the digest is 20 bytes. | ||
| 64 | SHA1 The 'revised' version of SHA. Just about identical to SHA except | ||
| 65 | for one tweak of an inner loop. | ||
| 66 | DES This is my libdes library that has been floating around for the last | ||
| 67 | few years. It has been enhanced for no other reason than completeness. | ||
| 68 | It now supports ecb, cbc, cfb, ofb, cfb64, ofb64 in normal mode and | ||
| 69 | triple DES modes of ecb, cbc, cfb64 and ofb64. cfb64 and ofb64 are | ||
| 70 | functional interfaces to the 64 bit modes of cfb and ofb used in | ||
| 71 | such a way thay they function as single character interfaces. | ||
| 72 | RC4 The RSA Inc. stream cipher. | ||
| 73 | RC2 The RSA Inc. block cipher. | ||
| 74 | IDEA An implmentation of the IDEA cipher, the library supports ecb, cbc, | ||
| 75 | cfb64 and ofb64 modes of operation. | ||
| 76 | |||
| 77 | Now all the above mentioned ciphers and digests libraries support high | ||
| 78 | speed, minimal 'crap in the way' type interfaces. For fastest and | ||
| 79 | lowest level access, these routines should be used directly. | ||
| 80 | |||
| 81 | Now there was also the matter of public key crypto systems. These are | ||
| 82 | based on large integer arithmatic. | ||
| 83 | |||
| 84 | BN This is my large integer library. It supports all the normal | ||
| 85 | arithmentic operations. It uses malloc extensivly and as such has | ||
| 86 | no limits of the size of the numbers being manipulated. If you | ||
| 87 | wish to use 4000 bit RSA moduli, these routines will handle it. | ||
| 88 | This library also contains routines to 'generate' prime numbers and | ||
| 89 | to test for primality. The RSA and DH libraries sit on top of this | ||
| 90 | library. As of this point in time, I don't support SHA, but | ||
| 91 | when I do add it, it will just sit on top of the routines contained | ||
| 92 | in this library. | ||
| 93 | RSA This implements the RSA public key algorithm. It also contains | ||
| 94 | routines that will generate a new private/public key pair. | ||
| 95 | All the RSA functions conform to the PKCS#1 standard. | ||
| 96 | DH This is an implementation of the | ||
| 97 | Diffie-Hellman protocol. There are all the require routines for | ||
| 98 | the protocol, plus extra routines that can be used to generate a | ||
| 99 | strong prime for use with a specified generator. While this last | ||
| 100 | routine is not generally required by applications implementing DH, | ||
| 101 | It is present for completeness and because I thing it is much | ||
| 102 | better to be able to 'generate' your own 'magic' numbers as oposed | ||
| 103 | to using numbers suplied by others. I conform to the PKCS#3 | ||
| 104 | standard where required. | ||
| 105 | |||
| 106 | You may have noticed the preceeding section mentions the 'generation' of | ||
| 107 | prime numbers. Now this requries the use of 'random numbers'. | ||
| 108 | |||
| 109 | RAND This psuedo-random number library is based on MD5 at it's core | ||
| 110 | and a large internal state (2k bytes). Once you have entered enough | ||
| 111 | seed data into this random number algorithm I don't feel | ||
| 112 | you will ever need to worry about it generating predictable output. | ||
| 113 | Due to the way I am writing a portable library, I have left the | ||
| 114 | issue of how to get good initial random seed data upto the | ||
| 115 | application but I do have support routines for saving and loading a | ||
| 116 | persistant random number state for use between program runs. | ||
| 117 | |||
| 118 | Now to make all these ciphers easier to use, a higher level | ||
| 119 | interface was required. In this form, the same function would be used to | ||
| 120 | encrypt 'by parts', via any one of the above mentioned ciphers. | ||
| 121 | |||
| 122 | EVP The Digital EnVeloPe library is quite large. At it's core are | ||
| 123 | function to perform encryption and decryption by parts while using | ||
| 124 | an initial parameter to specify which of the 17 different ciphers | ||
| 125 | or 4 different message digests to use. On top of these are implmented | ||
| 126 | the digital signature functions, sign, verify, seal and open. | ||
| 127 | Base64 encoding of binary data is also done in this library. | ||
| 128 | |||
| 129 | PEM rfc???? describe the format for Privacy Enhanced eMail. | ||
| 130 | As part of this standard, methods of encoding digital enveloped | ||
| 131 | data is an ascii format are defined. As such, I use a form of these | ||
| 132 | to encode enveloped data. While at this point in time full support | ||
| 133 | for PEM has not been built into the library, a minimal subset of | ||
| 134 | the secret key and Base64 encoding is present. These reoutines are | ||
| 135 | mostly used to Ascii encode binary data with a 'type' associated | ||
| 136 | with it and perhaps details of private key encryption used to | ||
| 137 | encrypt the data. | ||
| 138 | |||
| 139 | PKCS7 This is another Digital Envelope encoding standard which uses ASN.1 | ||
| 140 | to encode the data. At this point in time, while there are some | ||
| 141 | routines to encode and decode this binary format, full support is | ||
| 142 | not present. | ||
| 143 | |||
| 144 | As Mentioned, above, there are several different ways to encode | ||
| 145 | data structures. | ||
| 146 | |||
| 147 | ASN1 This library is more a set of primatives used to encode the packing | ||
| 148 | and unpacking of data structures. It is used by the X509 | ||
| 149 | certificate standard and by the PKCS standards which are used by | ||
| 150 | this library. It also contains routines for duplicating and signing | ||
| 151 | the structures asocisated with X509. | ||
| 152 | |||
| 153 | X509 The X509 library contains routines for packing and unpacking, | ||
| 154 | verifying and just about every thing else you would want to do with | ||
| 155 | X509 certificates. | ||
| 156 | |||
| 157 | PKCS7 PKCS-7 is a standard for encoding digital envelope data | ||
| 158 | structures. At this point in time the routines will load and save | ||
| 159 | DER forms of these structees. They need to be re-worked to support | ||
| 160 | the BER form which is the normal way PKCS-7 is encoded. If the | ||
| 161 | previous 2 sentances don't make much sense, don't worry, this | ||
| 162 | library is not used by this version of SSLeay anyway. | ||
| 163 | |||
| 164 | OBJ ASN.1 uses 'object identifiers' to identify objects. A set of | ||
| 165 | functions were requred to translate from ASN.1 to an intenger, to a | ||
| 166 | character string. This library provieds these translations | ||
| 167 | |||
| 168 | Now I mentioned an X509 library. X509 specified a hieachy of certificates | ||
| 169 | which needs to be traversed to authenticate particular certificates. | ||
| 170 | |||
| 171 | METH This library is used to push 'methods' of retrieving certificates | ||
| 172 | into the library. There are some supplied 'methods' with SSLeay | ||
| 173 | but applications can add new methods if they so desire. | ||
| 174 | This library has not been finished and is not being used in this | ||
| 175 | version. | ||
| 176 | |||
| 177 | Now all the above are required for use in the initial point of this project. | ||
| 178 | |||
| 179 | SSL The SSL protocol. This is a full implmentation of SSL v 2. It | ||
| 180 | support both server and client authentication. SSL v 3 support | ||
| 181 | will be added when the SSL v 3 specification is released in it's | ||
| 182 | final form. | ||
| 183 | |||
| 184 | Now quite a few of the above mentioned libraries rely on a few 'complex' | ||
| 185 | data structures. For each of these I have a library. | ||
| 186 | |||
| 187 | Lhash This is a hash table library which is used extensivly. | ||
| 188 | |||
| 189 | STACK An implemetation of a Stack data structure. | ||
| 190 | |||
| 191 | BUF A simple character array structure that also support a function to | ||
| 192 | check that the array is greater that a certain size, if it is not, | ||
| 193 | it is realloced so that is it. | ||
| 194 | |||
| 195 | TXT_DB A simple memory based text file data base. The application can specify | ||
| 196 | unique indexes that will be enforced at update time. | ||
| 197 | |||
| 198 | CONF Most of the programs written for this library require a configuration | ||
| 199 | file. Instead of letting programs constantly re-implment this | ||
| 200 | subsystem, the CONF library provides a consistant and flexable | ||
| 201 | interface to not only configuration files but also environment | ||
| 202 | variables. | ||
| 203 | |||
| 204 | But what about when something goes wrong? | ||
| 205 | The one advantage (and perhaps disadvantage) of all of these | ||
| 206 | functions being in one library was the ability to implement a | ||
| 207 | single error reporting system. | ||
| 208 | |||
| 209 | ERR This library is used to report errors. The error system records | ||
| 210 | library number, function number (in the library) and reason | ||
| 211 | number. Multiple errors can be reported so that an 'error' trace | ||
| 212 | is created. The errors can be printed in numeric or textual form. | ||
| 213 | |||
diff --git a/src/lib/libssl/src/doc/ssluse.doc b/src/lib/libssl/src/doc/ssluse.doc new file mode 100644 index 0000000000..2e3a26cbf3 --- /dev/null +++ b/src/lib/libssl/src/doc/ssluse.doc | |||
| @@ -0,0 +1,45 @@ | |||
| 1 | We have an SSL_CTX which contains global information for lots of | ||
| 2 | SSL connections. The session-id cache and the certificate verificate cache. | ||
| 3 | It also contains default values for use when certificates are used. | ||
| 4 | |||
| 5 | SSL_CTX | ||
| 6 | default cipher list | ||
| 7 | session-id cache | ||
| 8 | certificate cache | ||
| 9 | default session-id timeout period | ||
| 10 | New session-id callback | ||
| 11 | Required session-id callback | ||
| 12 | session-id stats | ||
| 13 | Informational callback | ||
| 14 | Callback that is set, overrides the SSLeay X509 certificate | ||
| 15 | verification | ||
| 16 | The default Certificate/Private Key pair | ||
| 17 | Default read ahead mode. | ||
| 18 | Default verify mode and verify callback. These are not used | ||
| 19 | if the over ride callback mentioned above is used. | ||
| 20 | |||
| 21 | Each SSL can have the following defined for it before a connection is made. | ||
| 22 | |||
| 23 | Certificate | ||
| 24 | Private key | ||
| 25 | Ciphers to use | ||
| 26 | Certificate verify mode and callback | ||
| 27 | IO object to use in the comunication. | ||
| 28 | Some 'read-ahead' mode information. | ||
| 29 | A previous session-id to re-use. | ||
| 30 | |||
| 31 | A connection is made by using SSL_connect or SSL_accept. | ||
| 32 | When non-blocking IO is being used, there are functions that can be used | ||
| 33 | to determin where and why the SSL_connect or SSL_accept did not complete. | ||
| 34 | This information can be used to recall the functions when the 'error' | ||
| 35 | condition has dissapeared. | ||
| 36 | |||
| 37 | After the connection has been made, information can be retrived about the | ||
| 38 | SSL session and the session-id values that have been decided apon. | ||
| 39 | The 'peer' certificate can be retrieved. | ||
| 40 | |||
| 41 | The session-id values include | ||
| 42 | 'start time' | ||
| 43 | 'timeout length' | ||
| 44 | |||
| 45 | |||
diff --git a/src/lib/libssl/src/doc/stack.doc b/src/lib/libssl/src/doc/stack.doc new file mode 100644 index 0000000000..7c20b1b664 --- /dev/null +++ b/src/lib/libssl/src/doc/stack.doc | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | The stack data structure is used to store an ordered list of objects. | ||
| 2 | It is basically misnamed to call it a stack but it can function that way | ||
| 3 | and that is what I originally used it for. Due to the way element | ||
| 4 | pointers are kept in a malloc()ed array, the most efficient way to use this | ||
| 5 | structure is to add and delete elements from the end via sk_pop() and | ||
| 6 | sk_push(). If you wish to do 'lookups' sk_find() is quite efficient since | ||
| 7 | it will sort the stack (if required) and then do a binary search to lookup | ||
| 8 | the requested item. This sorting occurs automatically so just sk_push() | ||
| 9 | elements on the stack and don't worry about the order. Do remember that if | ||
| 10 | you do a sk_find(), the order of the elements will change. | ||
| 11 | |||
| 12 | You should never need to 'touch' this structure directly. | ||
| 13 | typedef struct stack_st | ||
| 14 | { | ||
| 15 | unsigned int num; | ||
| 16 | char **data; | ||
| 17 | int sorted; | ||
| 18 | |||
| 19 | unsigned int num_alloc; | ||
| 20 | int (*comp)(); | ||
| 21 | } STACK; | ||
| 22 | |||
| 23 | 'num' holds the number of elements in the stack, 'data' is the array of | ||
| 24 | elements. 'sorted' is 1 is the list has been sorted, 0 if not. | ||
| 25 | |||
| 26 | num_alloc is the number of 'nodes' allocated in 'data'. When num becomes | ||
| 27 | larger than num_alloc, data is realloced to a larger size. | ||
| 28 | If 'comp' is set, it is a function that is used to compare 2 of the items | ||
| 29 | in the stack. The function should return -1, 0 or 1, depending on the | ||
| 30 | ordering. | ||
| 31 | |||
| 32 | #define sk_num(sk) ((sk)->num) | ||
| 33 | #define sk_value(sk,n) ((sk)->data[n]) | ||
| 34 | |||
| 35 | These 2 macros should be used to access the number of elements in the | ||
| 36 | 'stack' and to access a pointer to one of the values. | ||
| 37 | |||
| 38 | STACK *sk_new(int (*c)()); | ||
| 39 | This creates a new stack. If 'c', the comparison function, is not | ||
| 40 | specified, the various functions that operate on a sorted 'stack' will not | ||
| 41 | work (sk_find()). NULL is returned on failure. | ||
| 42 | |||
| 43 | void sk_free(STACK *); | ||
| 44 | This function free()'s a stack structure. The elements in the | ||
| 45 | stack will not be freed so one should 'pop' and free all elements from the | ||
| 46 | stack before calling this function or call sk_pop_free() instead. | ||
| 47 | |||
| 48 | void sk_pop_free(STACK *st; void (*func)()); | ||
| 49 | This function calls 'func' for each element on the stack, passing | ||
| 50 | the element as the argument. sk_free() is then called to free the 'stack' | ||
| 51 | structure. | ||
| 52 | |||
| 53 | int sk_insert(STACK *sk,char *data,int where); | ||
| 54 | This function inserts 'data' into stack 'sk' at location 'where'. | ||
| 55 | If 'where' is larger that the number of elements in the stack, the element | ||
| 56 | is put at the end. This function tends to be used by other 'stack' | ||
| 57 | functions. Returns 0 on failure, otherwise the number of elements in the | ||
| 58 | new stack. | ||
| 59 | |||
| 60 | char *sk_delete(STACK *st,int loc); | ||
| 61 | Remove the item a location 'loc' from the stack and returns it. | ||
| 62 | Returns NULL if the 'loc' is out of range. | ||
| 63 | |||
| 64 | char *sk_delete_ptr(STACK *st, char *p); | ||
| 65 | If the data item pointed to by 'p' is in the stack, it is deleted | ||
| 66 | from the stack and returned. NULL is returned if the element is not in the | ||
| 67 | stack. | ||
| 68 | |||
| 69 | int sk_find(STACK *st,char *data); | ||
| 70 | Returns the location that contains a value that is equal to | ||
| 71 | the 'data' item. If the comparison function was not set, this function | ||
| 72 | does a linear search. This function actually qsort()s the stack if it is not | ||
| 73 | in order and then uses bsearch() to do the initial search. If the | ||
| 74 | search fails,, -1 is returned. For mutliple items with the same | ||
| 75 | value, the index of the first in the array is returned. | ||
| 76 | |||
| 77 | int sk_push(STACK *st,char *data); | ||
| 78 | Append 'data' to the stack. 0 is returned if there is a failure | ||
| 79 | (due to a malloc failure), else 1. This is | ||
| 80 | sk_insert(st,data,sk_num(st)); | ||
| 81 | |||
| 82 | int sk_unshift(STACK *st,char *data); | ||
| 83 | Prepend 'data' to the front (location 0) of the stack. This is | ||
| 84 | sk_insert(st,data,0); | ||
| 85 | |||
| 86 | char *sk_shift(STACK *st); | ||
| 87 | Return and delete from the stack the first element in the stack. | ||
| 88 | This is sk_delete(st,0); | ||
| 89 | |||
| 90 | char *sk_pop(STACK *st); | ||
| 91 | Return and delete the last element on the stack. This is | ||
| 92 | sk_delete(st,sk_num(sk)-1); | ||
| 93 | |||
| 94 | void sk_zero(STACK *st); | ||
| 95 | Removes all items from the stack. It does not 'free' | ||
| 96 | pointers but is a quick way to clear a 'stack of references'. | ||
diff --git a/src/lib/libssl/src/doc/threads.doc b/src/lib/libssl/src/doc/threads.doc new file mode 100644 index 0000000000..251061e896 --- /dev/null +++ b/src/lib/libssl/src/doc/threads.doc | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | How to compile SSLeay for multi-threading. | ||
| 2 | |||
| 3 | Well basically it is quite simple, set the compiler flags and build. | ||
| 4 | I have only really done much testing under Solaris and Windows NT. | ||
| 5 | If you library supports localtime_r() and gmtime_r() add, | ||
| 6 | -DTHREADS to the makefile parameters. You can probably survive with out | ||
| 7 | this define unless you are going to have multiple threads generating | ||
| 8 | certificates at once. It will not affect the SSL side of things. | ||
| 9 | |||
| 10 | The approach I have taken to doing locking is to make the application provide | ||
| 11 | callbacks to perform locking and so that the SSLeay library can distinguish | ||
| 12 | between threads (for the error state). | ||
| 13 | |||
| 14 | To have a look at an example program, 'cd mt; vi mttest.c'. | ||
| 15 | To build under solaris, sh solaris.sh, for Windows NT or Windows 95, | ||
| 16 | win32.bat | ||
| 17 | |||
| 18 | This will build mttest which will fire up 10 threads that talk SSL | ||
| 19 | to each other 10 times. | ||
| 20 | To enable everything to work, the application needs to call | ||
| 21 | |||
| 22 | CRYPTO_set_id_callback(id_function); | ||
| 23 | CRYPTO_set_locking_callback(locking_function); | ||
| 24 | |||
| 25 | before any multithreading is started. | ||
| 26 | id_function does not need to be defined under Windows NT or 95, the | ||
| 27 | correct function will be called if it is not. Under unix, getpid() | ||
| 28 | is call if the id_callback is not defined, for solaris this is wrong | ||
| 29 | (since threads id's are not pid's) but under IRIX it is correct | ||
| 30 | (threads are just processes sharing the data segement). | ||
| 31 | |||
| 32 | The locking_callback is used to perform locking by the SSLeay library. | ||
| 33 | eg. | ||
| 34 | |||
| 35 | void solaris_locking_callback(mode,type,file,line) | ||
| 36 | int mode; | ||
| 37 | int type; | ||
| 38 | char *file; | ||
| 39 | int line; | ||
| 40 | { | ||
| 41 | if (mode & CRYPTO_LOCK) | ||
| 42 | mutex_lock(&(lock_cs[type])); | ||
| 43 | else | ||
| 44 | mutex_unlock(&(lock_cs[type])); | ||
| 45 | } | ||
| 46 | |||
| 47 | Now in this case I have used mutexes instead of read/write locks, since they | ||
| 48 | are faster and there are not many read locks in SSLeay, you may as well | ||
| 49 | always use write locks. file and line are __FILE__ and __LINE__ from | ||
| 50 | the compile and can be usefull when debugging. | ||
| 51 | |||
| 52 | Now as you can see, 'type' can be one of a range of values, these values are | ||
| 53 | defined in crypto/crypto.h | ||
| 54 | CRYPTO_get_lock_name(type) will return a text version of what the lock is. | ||
| 55 | There are CRYPTO_NUM_LOCKS locks required, so under solaris, the setup | ||
| 56 | for multi-threading can be | ||
| 57 | |||
| 58 | static mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | ||
| 59 | |||
| 60 | void thread_setup() | ||
| 61 | { | ||
| 62 | int i; | ||
| 63 | |||
| 64 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 65 | mutex_init(&(lock_cs[i]),USYNC_THREAD,NULL); | ||
| 66 | CRYPTO_set_id_callback((unsigned long (*)())solaris_thread_id); | ||
| 67 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); | ||
| 68 | } | ||
| 69 | |||
| 70 | As a final note, under Windows NT or Windows 95, you have to be careful | ||
| 71 | not to mix the various threaded, unthreaded and debug libraries. | ||
| 72 | Normally if they are mixed incorrectly, mttest will crash just after printing | ||
| 73 | out some usage statistics at the end. This is because the | ||
| 74 | different system libraries use different malloc routines and if | ||
| 75 | data is malloc()ed inside crypt32.dll or ssl32.dll and then free()ed by a | ||
| 76 | different library malloc, things get very confused. | ||
| 77 | |||
| 78 | The default SSLeay DLL builds use /MD, so if you use this on your | ||
| 79 | application, things will work as expected. If you use /MDd, | ||
| 80 | you will probably have to rebuild SSLeay using this flag. | ||
| 81 | I should modify util/mk1mf.pl so it does all this correctly, but | ||
| 82 | this has not been done yet. | ||
| 83 | |||
| 84 | One last warning. Because locking overheads are actually quite large, the | ||
| 85 | statistics collected against the SSL_CTX for successfull connections etc | ||
| 86 | are not locked when updated. This does make it possible for these | ||
| 87 | values to be slightly lower than they should be, if you are | ||
| 88 | running multithreaded on a multi-processor box, but this does not really | ||
| 89 | matter much. | ||
| 90 | |||
diff --git a/src/lib/libssl/src/doc/txt_db.doc b/src/lib/libssl/src/doc/txt_db.doc new file mode 100644 index 0000000000..3a5b0d50a1 --- /dev/null +++ b/src/lib/libssl/src/doc/txt_db.doc | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | TXT_DB, a simple text based in memory database. | ||
| 2 | |||
| 3 | It holds rows of ascii data, for which the only special character is '\0'. | ||
| 4 | The rows can be of an unlimited length. | ||
diff --git a/src/lib/libssl/src/doc/verify b/src/lib/libssl/src/doc/verify new file mode 100644 index 0000000000..b78d96159d --- /dev/null +++ b/src/lib/libssl/src/doc/verify | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | X509_verify_cert_chain( | ||
| 2 | CERT_STORE *cert_store, | ||
| 3 | STACK /* X509 */ *certs, | ||
| 4 | int *verify_result, | ||
| 5 | int (*verify_error_callback)() | ||
| 6 | char *argument_to_callback, /* SSL */ | ||
| 7 | |||
| 8 | app_verify_callback( | ||
| 9 | char *app_verify_arg, /* from SSL_CTX */ | ||
| 10 | STACK /* X509 */ *certs, | ||
| 11 | int *verify_result, | ||
| 12 | int (*verify_error_callback)() | ||
| 13 | SSL *s, | ||
| 14 | |||
| 15 | int X509_verify_cert( | ||
| 16 | CERT_STORE *cert_store, | ||
| 17 | X509 *x509, | ||
| 18 | int *verify_result, | ||
| 19 | int (*verify_error_callback)(), | ||
| 20 | char *arg, | ||
| 21 | |||
| 22 | |||
diff --git a/src/lib/libssl/src/doc/why.doc b/src/lib/libssl/src/doc/why.doc new file mode 100644 index 0000000000..a1ac84bd27 --- /dev/null +++ b/src/lib/libssl/src/doc/why.doc | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | This file is more of a note for other people who wish to understand why | ||
| 2 | the build environment is the way it is :-). | ||
| 3 | |||
| 4 | The include files 'depend' as follows. | ||
| 5 | Each of | ||
| 6 | crypto/*/*.c includes crypto/cryptlib.h | ||
| 7 | ssl/*.c include ssl/ssl_locl.h | ||
| 8 | apps/*.c include apps/apps.h | ||
| 9 | crypto/cryptlib.h, ssl/ssl_locl.h and apps/apps.h | ||
| 10 | all include e_os.h which contains OS/environment specific information. | ||
| 11 | If you need to add something todo with a particular environment, | ||
| 12 | add it to this file. It is worth remembering that quite a few libraries, | ||
| 13 | like lhash, des, md, sha etc etc do not include crypto/cryptlib.h. This | ||
| 14 | is because these libraries should be 'independantly compilable' and so I | ||
| 15 | try to keep them this way. | ||
| 16 | e_os.h is not so much a part of SSLeay, as the placing in one spot all the | ||
| 17 | evil OS dependant muck. | ||
| 18 | |||
| 19 | I wanted to automate as many things as possible. This includes | ||
| 20 | error number generation. A | ||
| 21 | make errors | ||
| 22 | will scan the source files for error codes, append them to the correct | ||
| 23 | header files, and generate the functions to print the text version | ||
| 24 | of the error numbers. So don't even think about adding error numbers by | ||
| 25 | hand, put them in the form | ||
| 26 | XXXerr(XXXX_F_XXXX,YYYY_R_YYYY); | ||
| 27 | on line and it will be automatically picked up my a make errors. | ||
| 28 | |||
| 29 | In a similar vein, programs to be added into ssleay in the apps directory | ||
| 30 | just need to have an entry added to E_EXE in makefile.ssl and | ||
| 31 | everthing will work as expected. Don't edit progs.h by hand. | ||
| 32 | |||
| 33 | make links re-generates the symbolic links that are used. The reason why | ||
| 34 | I keep everything in its own directory, and don't put all the | ||
| 35 | test programs and header files in 'test' and 'include' is because I want | ||
| 36 | to keep the 'sub-libraries' independant. I still 'pull' out | ||
| 37 | indervidual libraries for use in specific projects where the code is | ||
| 38 | required. I have used the 'lhash' library in just about every software | ||
| 39 | project I have worked on :-). | ||
| 40 | |||
| 41 | make depend generates dependancies and | ||
| 42 | make dclean removes them. | ||
| 43 | |||
| 44 | You will notice that I use perl quite a bit when I could be using 'sed'. | ||
| 45 | The reason I decided to do this was to just stick to one 'extra' program. | ||
| 46 | For Windows NT, I have perl and no sed. | ||
| 47 | |||
| 48 | The util/mk1mf.pl program can be used to generate a single makefile. | ||
| 49 | I use this because makefiles under Microsoft are horrific. | ||
| 50 | Each C compiler seems to have different linker formats, which have | ||
| 51 | to be used because the retarted C compilers explode when you do | ||
| 52 | cl -o file *.o. | ||
| 53 | |||
| 54 | Now some would argue that I should just use the single makefile. I don't | ||
| 55 | like it during develoment for 2 reasons. First, the actuall make | ||
| 56 | command takes a long time. For my current setup, if I'm in | ||
| 57 | crypto/bn and I type make, only the crypto/bn directory gets rebuilt, | ||
| 58 | which is nice when you are modifying prototypes in bn.h which | ||
| 59 | half the SSLeay depends on. The second is that to add a new souce file | ||
| 60 | I just plonk it in at the required spot in the local makefile. This | ||
| 61 | then alows me to keep things local, I don't need to modify a 'global' | ||
| 62 | tables (the make for unix, the make for NT, the make for w31...). | ||
| 63 | When I am ripping apart a library structure, it is nice to only | ||
| 64 | have to worry about one directory :-). | ||
| 65 | |||
| 66 | Having said all this, for the hell of it I put together 2 files that | ||
| 67 | #include all the souce code (generated by doing a ls */*.o after a build). | ||
| 68 | crypto.c takes only 30 seconds to build under NT and 2 minutes under linux | ||
| 69 | for my pentium100. Much faster that the normal build :-). | ||
| 70 | Again, the problem is that when using libraries, every program linked | ||
| 71 | to libcrypto.a would suddenly get 330k of library when it may only need | ||
| 72 | 1k. This technique does look like a nice way to do shared libraries though. | ||
| 73 | |||
| 74 | Oh yes, as a final note, to 'build' a distribution, I just type | ||
| 75 | make dist. | ||
| 76 | This cleans and packages everything. The directory needs to be called | ||
| 77 | SSLeay since the make does a 'cd ..' and renames and tars things up. | ||
| 78 | |||
| 79 | |||
diff --git a/src/lib/libssl/src/makefile.one b/src/lib/libssl/src/makefile.one new file mode 100644 index 0000000000..b0931e0d6f --- /dev/null +++ b/src/lib/libssl/src/makefile.one | |||
| @@ -0,0 +1,1781 @@ | |||
| 1 | # This makefile has been automatically generated from the SSLeay distribution. | ||
| 2 | # This single makefile will build the complete SSLeay distribution and | ||
| 3 | # by default leave the 'intertesting' output files in ./out and the stuff | ||
| 4 | # that needs deleting in ./tmp. | ||
| 5 | # The file was generated by running 'make makefile.one', which | ||
| 6 | # does a 'make files', which writes all the environment variables from all | ||
| 7 | # the makefiles to the file call MINFO. This file is used by | ||
| 8 | # util/mk1mf.pl to generate makefile.one. | ||
| 9 | # The 'makefile per directory' system suites me when developing this | ||
| 10 | # library and also so I can 'distribute' indervidual library sections. | ||
| 11 | # The one monster makefile better suits building in non-unix | ||
| 12 | # environments. | ||
| 13 | |||
| 14 | INSTALLTOP=/usr/local/ssl | ||
| 15 | |||
| 16 | # Set your compiler options | ||
| 17 | CC=cc | ||
| 18 | CFLAG=-O -DTERMIO | ||
| 19 | APP_CFLAG= | ||
| 20 | LIB_CFLAG= | ||
| 21 | SHLIB_CFLAG= | ||
| 22 | APP_EX_OBJ= | ||
| 23 | SHLIB_EX_OBJ= | ||
| 24 | # add extra libraries to this define, for solaris -lsocket -lnsl would | ||
| 25 | # be added | ||
| 26 | EX_LIBS= | ||
| 27 | |||
| 28 | # The SSLeay directory | ||
| 29 | SRC_D=. | ||
| 30 | |||
| 31 | LINK=${CC} | ||
| 32 | LFLAGS=${CFLAGS} | ||
| 33 | |||
| 34 | BN_MULW_OBJ= | ||
| 35 | BN_MULW_SRC= | ||
| 36 | DES_ENC_OBJ= | ||
| 37 | DES_ENC_SRC= | ||
| 38 | DES_CRYPT_OBJ= | ||
| 39 | DES_CRYPT_SRC= | ||
| 40 | BF_ENC_OBJ= | ||
| 41 | BF_ENC_SRC= | ||
| 42 | CAST_ENC_OBJ= | ||
| 43 | CAST_ENC_SRC= | ||
| 44 | RC4_ENC_OBJ= | ||
| 45 | RC4_ENC_SRC= | ||
| 46 | RC5_ENC_OBJ= | ||
| 47 | RC5_ENC_SRC= | ||
| 48 | MD5_ASM_OBJ= | ||
| 49 | MD5_ASM_SRC= | ||
| 50 | SHA1_ASM_OBJ= | ||
| 51 | SHA1_ASM_SRC= | ||
| 52 | RMD160_ASM_OBJ= | ||
| 53 | RMD160_ASM_SRC= | ||
| 54 | |||
| 55 | # The output directory for everything intersting | ||
| 56 | OUT_D=out | ||
| 57 | # The output directory for all the temporary muck | ||
| 58 | TMP_D=tmp | ||
| 59 | # The output directory for the header files | ||
| 60 | INC_D=outinc | ||
| 61 | |||
| 62 | CP=/bin/cp | ||
| 63 | RM=/bin/rm -f | ||
| 64 | RANLIB=$(SRC_D)/util/ranlib.sh | ||
| 65 | MKDIR=mkdir | ||
| 66 | MKLIB=ar r | ||
| 67 | MLFLAGS= | ||
| 68 | ASM=as | ||
| 69 | |||
| 70 | ###################################################### | ||
| 71 | # You should not need to touch anything below this point | ||
| 72 | ###################################################### | ||
| 73 | |||
| 74 | E_EXE=ssleay | ||
| 75 | SSL=ssl | ||
| 76 | CRYPTO=crypto | ||
| 77 | RSAGLUE=RSAglue | ||
| 78 | |||
| 79 | # BIN_D - Binary output directory | ||
| 80 | # TEST_D - Binary test file output directory | ||
| 81 | # LIB_D - library output directory | ||
| 82 | BIN_D=$(OUT_D) | ||
| 83 | TEST_D=$(OUT_D) | ||
| 84 | LIB_D=$(OUT_D) | ||
| 85 | |||
| 86 | # INCL_D - local library directory | ||
| 87 | # OBJ_D - temp object file directory | ||
| 88 | OBJ_D=$(TMP_D) | ||
| 89 | INCL_D=$(TMP_D) | ||
| 90 | |||
| 91 | O_SSL= $(LIB_D)/lib$(SSL).a | ||
| 92 | O_CRYPTO= $(LIB_D)/lib$(CRYPTO).a | ||
| 93 | O_RSAGLUE= $(LIB_D)/lib$(RSAGLUE).a | ||
| 94 | SO_SSL= lib$(SSL) | ||
| 95 | SO_CRYPTO= lib$(CRYPTO) | ||
| 96 | L_SSL= $(LIB_D)/$(SSL).a | ||
| 97 | L_CRYPTO= $(LIB_D)/$(CRYPTO).a | ||
| 98 | |||
| 99 | L_LIBS= $(L_SSL) $(L_CRYPTO) | ||
| 100 | #L_LIBS= $(O_SSL) $(O_RSAGLUE) -lrsaref $(O_CRYPTO) | ||
| 101 | |||
| 102 | ###################################################### | ||
| 103 | # Don't touch anything below this point | ||
| 104 | ###################################################### | ||
| 105 | |||
| 106 | INC=-I$(INC_D) -I$(INCL_D) | ||
| 107 | APP_CFLAGS=$(INC) $(CFLAG) $(APP_CFLAG) | ||
| 108 | LIB_CFLAGS=$(INC) $(CFLAG) $(LIB_CFLAG) | ||
| 109 | SHLIB_CFLAGS=$(INC) $(CFLAG) $(LIB_CFLAG) $(SHLIB_CFLAG) | ||
| 110 | LIBS_DEP=$(O_CRYPTO) $(O_RSAGLUE) $(O_SSL) | ||
| 111 | |||
| 112 | ############################################# | ||
| 113 | HEADER=$(INCL_D)/cryptlib.h \ | ||
| 114 | $(INCL_D)/date.h $(INCL_D)/md5_locl.h $(INCL_D)/sha_locl.h \ | ||
| 115 | $(INCL_D)/rmd_locl.h $(INCL_D)/rmdconst.h $(INCL_D)/des_locl.h \ | ||
| 116 | $(INCL_D)/rpc_des.h $(INCL_D)/podd.h $(INCL_D)/sk.h \ | ||
| 117 | $(INCL_D)/spr.h $(INCL_D)/des_ver.h $(INCL_D)/rc2_locl.h \ | ||
| 118 | $(INCL_D)/rc4_locl.h $(INCL_D)/rc5_locl.h $(INCL_D)/idea_lcl.h \ | ||
| 119 | $(INCL_D)/bf_pi.h $(INCL_D)/bf_locl.h $(INCL_D)/cast_s.h \ | ||
| 120 | $(INCL_D)/cast_lcl.h $(INCL_D)/bn_lcl.h $(INCL_D)/bn_prime.h \ | ||
| 121 | $(INCL_D)/obj_dat.h $(INCL_D)/conf_lcl.h $(INCL_D)/ssl_locl.h \ | ||
| 122 | $(INCL_D)/rsaref.h $(INCL_D)/apps.h $(INCL_D)/progs.h \ | ||
| 123 | $(INCL_D)/s_apps.h $(INCL_D)/testdsa.h $(INCL_D)/testrsa.h | ||
| 124 | |||
| 125 | EXHEADER=$(INC_D)/e_os.h \ | ||
| 126 | $(INC_D)/crypto.h $(INC_D)/cryptall.h $(INC_D)/md2.h \ | ||
| 127 | $(INC_D)/md5.h $(INC_D)/sha.h $(INC_D)/mdc2.h \ | ||
| 128 | $(INC_D)/hmac.h $(INC_D)/ripemd.h $(INC_D)/des.h \ | ||
| 129 | $(INC_D)/rc2.h $(INC_D)/rc4.h $(INC_D)/rc5.h \ | ||
| 130 | $(INC_D)/idea.h $(INC_D)/blowfish.h $(INC_D)/cast.h \ | ||
| 131 | $(INC_D)/bn.h $(INC_D)/rsa.h $(INC_D)/dsa.h \ | ||
| 132 | $(INC_D)/dh.h $(INC_D)/buffer.h $(INC_D)/bio.h \ | ||
| 133 | $(INC_D)/bss_file.c $(INC_D)/stack.h $(INC_D)/lhash.h \ | ||
| 134 | $(INC_D)/rand.h $(INC_D)/err.h $(INC_D)/objects.h \ | ||
| 135 | $(INC_D)/evp.h $(INC_D)/pem.h $(INC_D)/asn1.h \ | ||
| 136 | $(INC_D)/asn1_mac.h $(INC_D)/x509.h $(INC_D)/x509_vfy.h \ | ||
| 137 | $(INC_D)/conf.h $(INC_D)/txt_db.h $(INC_D)/pkcs7.h \ | ||
| 138 | $(INC_D)/ssl.h $(INC_D)/ssl2.h $(INC_D)/ssl3.h \ | ||
| 139 | $(INC_D)/ssl23.h $(INC_D)/tls1.h | ||
| 140 | |||
| 141 | T_OBJ=$(OBJ_D)/md2test.o \ | ||
| 142 | $(OBJ_D)/md5test.o $(OBJ_D)/shatest.o $(OBJ_D)/sha1test.o \ | ||
| 143 | $(OBJ_D)/mdc2test.o $(OBJ_D)/hmactest.o $(OBJ_D)/rmdtest.o \ | ||
| 144 | $(OBJ_D)/destest.o $(OBJ_D)/rc2test.o $(OBJ_D)/rc4test.o \ | ||
| 145 | $(OBJ_D)/rc5test.o $(OBJ_D)/ideatest.o $(OBJ_D)/bftest.o \ | ||
| 146 | $(OBJ_D)/casttest.o $(OBJ_D)/bntest.o $(OBJ_D)/exptest.o \ | ||
| 147 | $(OBJ_D)/dsatest.o $(OBJ_D)/dhtest.o $(OBJ_D)/randtest.o \ | ||
| 148 | $(OBJ_D)/ssltest.o | ||
| 149 | |||
| 150 | E_OBJ=$(OBJ_D)/verify.o \ | ||
| 151 | $(OBJ_D)/asn1pars.o $(OBJ_D)/req.o $(OBJ_D)/dgst.o \ | ||
| 152 | $(OBJ_D)/dh.o $(OBJ_D)/enc.o $(OBJ_D)/gendh.o \ | ||
| 153 | $(OBJ_D)/errstr.o $(OBJ_D)/ca.o $(OBJ_D)/pkcs7.o \ | ||
| 154 | $(OBJ_D)/crl2p7.o $(OBJ_D)/crl.o $(OBJ_D)/rsa.o \ | ||
| 155 | $(OBJ_D)/dsa.o $(OBJ_D)/dsaparam.o $(OBJ_D)/x509.o \ | ||
| 156 | $(OBJ_D)/genrsa.o $(OBJ_D)/s_server.o $(OBJ_D)/s_client.o \ | ||
| 157 | $(OBJ_D)/speed.o $(OBJ_D)/s_time.o $(OBJ_D)/apps.o \ | ||
| 158 | $(OBJ_D)/s_cb.o $(OBJ_D)/s_socket.o $(OBJ_D)/version.o \ | ||
| 159 | $(OBJ_D)/sess_id.o $(OBJ_D)/ciphers.o $(OBJ_D)/ssleay.o | ||
| 160 | |||
| 161 | CRYPTOOBJ=$(OBJ_D)/cryptlib.o \ | ||
| 162 | $(OBJ_D)/mem.o $(OBJ_D)/cversion.o $(OBJ_D)/ex_data.o \ | ||
| 163 | $(OBJ_D)/cpt_err.o $(OBJ_D)/md2_dgst.o $(OBJ_D)/md2_one.o \ | ||
| 164 | $(OBJ_D)/md5_dgst.o $(OBJ_D)/md5_one.o $(OBJ_D)/sha_dgst.o \ | ||
| 165 | $(OBJ_D)/sha1dgst.o $(OBJ_D)/sha_one.o $(OBJ_D)/sha1_one.o \ | ||
| 166 | $(OBJ_D)/mdc2dgst.o $(OBJ_D)/mdc2_one.o $(OBJ_D)/hmac.o \ | ||
| 167 | $(OBJ_D)/rmd_dgst.o $(OBJ_D)/rmd_one.o $(OBJ_D)/set_key.o \ | ||
| 168 | $(OBJ_D)/ecb_enc.o $(OBJ_D)/cbc_enc.o $(OBJ_D)/ecb3_enc.o \ | ||
| 169 | $(OBJ_D)/cfb64enc.o $(OBJ_D)/cfb64ede.o $(OBJ_D)/cfb_enc.o \ | ||
| 170 | $(OBJ_D)/ofb64ede.o $(OBJ_D)/enc_read.o $(OBJ_D)/enc_writ.o \ | ||
| 171 | $(OBJ_D)/ofb64enc.o $(OBJ_D)/ofb_enc.o $(OBJ_D)/str2key.o \ | ||
| 172 | $(OBJ_D)/pcbc_enc.o $(OBJ_D)/qud_cksm.o $(OBJ_D)/rand_key.o \ | ||
| 173 | $(OBJ_D)/des_enc.o $(OBJ_D)/fcrypt_b.o $(OBJ_D)/read2pwd.o \ | ||
| 174 | $(OBJ_D)/fcrypt.o $(OBJ_D)/xcbc_enc.o $(OBJ_D)/read_pwd.o \ | ||
| 175 | $(OBJ_D)/rpc_enc.o $(OBJ_D)/cbc_cksm.o $(OBJ_D)/supp.o \ | ||
| 176 | $(OBJ_D)/rc2_ecb.o $(OBJ_D)/rc2_skey.o $(OBJ_D)/rc2_cbc.o \ | ||
| 177 | $(OBJ_D)/rc2cfb64.o $(OBJ_D)/rc2ofb64.o $(OBJ_D)/rc4_skey.o \ | ||
| 178 | $(OBJ_D)/rc4_enc.o $(OBJ_D)/rc5_skey.o $(OBJ_D)/rc5_ecb.o \ | ||
| 179 | $(OBJ_D)/rc5_enc.o $(OBJ_D)/rc5cfb64.o $(OBJ_D)/rc5ofb64.o \ | ||
| 180 | $(OBJ_D)/i_cbc.o $(OBJ_D)/i_cfb64.o $(OBJ_D)/i_ofb64.o \ | ||
| 181 | $(OBJ_D)/i_ecb.o $(OBJ_D)/i_skey.o $(OBJ_D)/bf_skey.o \ | ||
| 182 | $(OBJ_D)/bf_ecb.o $(OBJ_D)/bf_enc.o $(OBJ_D)/bf_cfb64.o \ | ||
| 183 | $(OBJ_D)/bf_ofb64.o $(OBJ_D)/c_skey.o $(OBJ_D)/c_ecb.o \ | ||
| 184 | $(OBJ_D)/c_enc.o $(OBJ_D)/c_cfb64.o $(OBJ_D)/c_ofb64.o \ | ||
| 185 | $(OBJ_D)/bn_add.o $(OBJ_D)/bn_div.o $(OBJ_D)/bn_exp.o \ | ||
| 186 | $(OBJ_D)/bn_lib.o $(OBJ_D)/bn_mod.o $(OBJ_D)/bn_mul.o \ | ||
| 187 | $(OBJ_D)/bn_print.o $(OBJ_D)/bn_rand.o $(OBJ_D)/bn_shift.o \ | ||
| 188 | $(OBJ_D)/bn_sub.o $(OBJ_D)/bn_word.o $(OBJ_D)/bn_blind.o \ | ||
| 189 | $(OBJ_D)/bn_gcd.o $(OBJ_D)/bn_prime.o $(OBJ_D)/bn_err.o \ | ||
| 190 | $(OBJ_D)/bn_sqr.o $(OBJ_D)/bn_mulw.o $(OBJ_D)/bn_recp.o \ | ||
| 191 | $(OBJ_D)/bn_mont.o $(OBJ_D)/bn_mpi.o $(OBJ_D)/rsa_eay.o \ | ||
| 192 | $(OBJ_D)/rsa_gen.o $(OBJ_D)/rsa_lib.o $(OBJ_D)/rsa_sign.o \ | ||
| 193 | $(OBJ_D)/rsa_saos.o $(OBJ_D)/rsa_err.o $(OBJ_D)/rsa_pk1.o \ | ||
| 194 | $(OBJ_D)/rsa_ssl.o $(OBJ_D)/rsa_none.o $(OBJ_D)/dsa_gen.o \ | ||
| 195 | $(OBJ_D)/dsa_key.o $(OBJ_D)/dsa_lib.o $(OBJ_D)/dsa_vrf.o \ | ||
| 196 | $(OBJ_D)/dsa_sign.o $(OBJ_D)/dsa_err.o $(OBJ_D)/dh_gen.o \ | ||
| 197 | $(OBJ_D)/dh_key.o $(OBJ_D)/dh_lib.o $(OBJ_D)/dh_check.o \ | ||
| 198 | $(OBJ_D)/dh_err.o $(OBJ_D)/buffer.o $(OBJ_D)/buf_err.o \ | ||
| 199 | $(OBJ_D)/bio_lib.o $(OBJ_D)/bio_cb.o $(OBJ_D)/bio_err.o \ | ||
| 200 | $(OBJ_D)/bss_mem.o $(OBJ_D)/bss_null.o $(OBJ_D)/bss_fd.o \ | ||
| 201 | $(OBJ_D)/bss_file.o $(OBJ_D)/bss_sock.o $(OBJ_D)/bss_conn.o \ | ||
| 202 | $(OBJ_D)/bf_null.o $(OBJ_D)/bf_buff.o $(OBJ_D)/b_print.o \ | ||
| 203 | $(OBJ_D)/b_dump.o $(OBJ_D)/b_sock.o $(OBJ_D)/bss_acpt.o \ | ||
| 204 | $(OBJ_D)/bf_nbio.o $(OBJ_D)/stack.o $(OBJ_D)/lhash.o \ | ||
| 205 | $(OBJ_D)/lh_stats.o $(OBJ_D)/md_rand.o $(OBJ_D)/randfile.o \ | ||
| 206 | $(OBJ_D)/err.o $(OBJ_D)/err_all.o $(OBJ_D)/err_prn.o \ | ||
| 207 | $(OBJ_D)/obj_dat.o $(OBJ_D)/obj_lib.o $(OBJ_D)/obj_err.o \ | ||
| 208 | $(OBJ_D)/encode.o $(OBJ_D)/digest.o $(OBJ_D)/evp_enc.o \ | ||
| 209 | $(OBJ_D)/evp_key.o $(OBJ_D)/e_ecb_d.o $(OBJ_D)/e_cbc_d.o \ | ||
| 210 | $(OBJ_D)/e_cfb_d.o $(OBJ_D)/e_ofb_d.o $(OBJ_D)/e_ecb_i.o \ | ||
| 211 | $(OBJ_D)/e_cbc_i.o $(OBJ_D)/e_cfb_i.o $(OBJ_D)/e_ofb_i.o \ | ||
| 212 | $(OBJ_D)/e_ecb_3d.o $(OBJ_D)/e_cbc_3d.o $(OBJ_D)/e_rc4.o \ | ||
| 213 | $(OBJ_D)/names.o $(OBJ_D)/e_cfb_3d.o $(OBJ_D)/e_ofb_3d.o \ | ||
| 214 | $(OBJ_D)/e_xcbc_d.o $(OBJ_D)/e_ecb_r2.o $(OBJ_D)/e_cbc_r2.o \ | ||
| 215 | $(OBJ_D)/e_cfb_r2.o $(OBJ_D)/e_ofb_r2.o $(OBJ_D)/e_ecb_bf.o \ | ||
| 216 | $(OBJ_D)/e_cbc_bf.o $(OBJ_D)/e_cfb_bf.o $(OBJ_D)/e_ofb_bf.o \ | ||
| 217 | $(OBJ_D)/e_ecb_c.o $(OBJ_D)/e_cbc_c.o $(OBJ_D)/e_cfb_c.o \ | ||
| 218 | $(OBJ_D)/e_ofb_c.o $(OBJ_D)/e_ecb_r5.o $(OBJ_D)/e_cbc_r5.o \ | ||
| 219 | $(OBJ_D)/e_cfb_r5.o $(OBJ_D)/e_ofb_r5.o $(OBJ_D)/m_null.o \ | ||
| 220 | $(OBJ_D)/m_md2.o $(OBJ_D)/m_md5.o $(OBJ_D)/m_sha.o \ | ||
| 221 | $(OBJ_D)/m_sha1.o $(OBJ_D)/m_dss.o $(OBJ_D)/m_dss1.o \ | ||
| 222 | $(OBJ_D)/m_mdc2.o $(OBJ_D)/m_ripemd.o $(OBJ_D)/p_open.o \ | ||
| 223 | $(OBJ_D)/p_seal.o $(OBJ_D)/p_sign.o $(OBJ_D)/p_verify.o \ | ||
| 224 | $(OBJ_D)/p_lib.o $(OBJ_D)/p_enc.o $(OBJ_D)/p_dec.o \ | ||
| 225 | $(OBJ_D)/bio_md.o $(OBJ_D)/bio_b64.o $(OBJ_D)/bio_enc.o \ | ||
| 226 | $(OBJ_D)/evp_err.o $(OBJ_D)/e_null.o $(OBJ_D)/c_all.o \ | ||
| 227 | $(OBJ_D)/evp_lib.o $(OBJ_D)/pem_sign.o $(OBJ_D)/pem_seal.o \ | ||
| 228 | $(OBJ_D)/pem_info.o $(OBJ_D)/pem_lib.o $(OBJ_D)/pem_all.o \ | ||
| 229 | $(OBJ_D)/pem_err.o $(OBJ_D)/a_object.o $(OBJ_D)/a_bitstr.o \ | ||
| 230 | $(OBJ_D)/a_utctm.o $(OBJ_D)/a_int.o $(OBJ_D)/a_octet.o \ | ||
| 231 | $(OBJ_D)/a_print.o $(OBJ_D)/a_type.o $(OBJ_D)/a_set.o \ | ||
| 232 | $(OBJ_D)/a_dup.o $(OBJ_D)/a_d2i_fp.o $(OBJ_D)/a_i2d_fp.o \ | ||
| 233 | $(OBJ_D)/a_sign.o $(OBJ_D)/a_digest.o $(OBJ_D)/a_verify.o \ | ||
| 234 | $(OBJ_D)/x_algor.o $(OBJ_D)/x_val.o $(OBJ_D)/x_pubkey.o \ | ||
| 235 | $(OBJ_D)/x_sig.o $(OBJ_D)/x_req.o $(OBJ_D)/x_attrib.o \ | ||
| 236 | $(OBJ_D)/x_name.o $(OBJ_D)/x_cinf.o $(OBJ_D)/x_x509.o \ | ||
| 237 | $(OBJ_D)/x_crl.o $(OBJ_D)/x_info.o $(OBJ_D)/x_spki.o \ | ||
| 238 | $(OBJ_D)/d2i_r_pr.o $(OBJ_D)/i2d_r_pr.o $(OBJ_D)/d2i_r_pu.o \ | ||
| 239 | $(OBJ_D)/i2d_r_pu.o $(OBJ_D)/d2i_s_pr.o $(OBJ_D)/i2d_s_pr.o \ | ||
| 240 | $(OBJ_D)/d2i_s_pu.o $(OBJ_D)/i2d_s_pu.o $(OBJ_D)/d2i_pu.o \ | ||
| 241 | $(OBJ_D)/d2i_pr.o $(OBJ_D)/i2d_pu.o $(OBJ_D)/i2d_pr.o \ | ||
| 242 | $(OBJ_D)/t_req.o $(OBJ_D)/t_x509.o $(OBJ_D)/t_pkey.o \ | ||
| 243 | $(OBJ_D)/p7_i_s.o $(OBJ_D)/p7_signi.o $(OBJ_D)/p7_signd.o \ | ||
| 244 | $(OBJ_D)/p7_recip.o $(OBJ_D)/p7_enc_c.o $(OBJ_D)/p7_evp.o \ | ||
| 245 | $(OBJ_D)/p7_dgst.o $(OBJ_D)/p7_s_e.o $(OBJ_D)/p7_enc.o \ | ||
| 246 | $(OBJ_D)/p7_lib.o $(OBJ_D)/f_int.o $(OBJ_D)/f_string.o \ | ||
| 247 | $(OBJ_D)/i2d_dhp.o $(OBJ_D)/i2d_dsap.o $(OBJ_D)/d2i_dhp.o \ | ||
| 248 | $(OBJ_D)/d2i_dsap.o $(OBJ_D)/n_pkey.o $(OBJ_D)/a_hdr.o \ | ||
| 249 | $(OBJ_D)/x_pkey.o $(OBJ_D)/a_bool.o $(OBJ_D)/x_exten.o \ | ||
| 250 | $(OBJ_D)/asn1_par.o $(OBJ_D)/asn1_lib.o $(OBJ_D)/asn1_err.o \ | ||
| 251 | $(OBJ_D)/a_meth.o $(OBJ_D)/a_bytes.o $(OBJ_D)/evp_asn1.o \ | ||
| 252 | $(OBJ_D)/x509_def.o $(OBJ_D)/x509_d2.o $(OBJ_D)/x509_r2x.o \ | ||
| 253 | $(OBJ_D)/x509_cmp.o $(OBJ_D)/x509_obj.o $(OBJ_D)/x509_req.o \ | ||
| 254 | $(OBJ_D)/x509_vfy.o $(OBJ_D)/x509_set.o $(OBJ_D)/x509rset.o \ | ||
| 255 | $(OBJ_D)/x509_err.o $(OBJ_D)/x509name.o $(OBJ_D)/x509_v3.o \ | ||
| 256 | $(OBJ_D)/x509_ext.o $(OBJ_D)/x509pack.o $(OBJ_D)/x509type.o \ | ||
| 257 | $(OBJ_D)/x509_lu.o $(OBJ_D)/x_all.o $(OBJ_D)/x509_txt.o \ | ||
| 258 | $(OBJ_D)/by_file.o $(OBJ_D)/by_dir.o $(OBJ_D)/v3_net.o \ | ||
| 259 | $(OBJ_D)/v3_x509.o $(OBJ_D)/conf.o $(OBJ_D)/conf_err.o \ | ||
| 260 | $(OBJ_D)/txt_db.o $(OBJ_D)/pk7_lib.o $(OBJ_D)/pkcs7err.o \ | ||
| 261 | $(OBJ_D)/pk7_doit.o | ||
| 262 | |||
| 263 | SSLOBJ=$(OBJ_D)/s2_meth.o \ | ||
| 264 | $(OBJ_D)/s2_srvr.o $(OBJ_D)/s2_clnt.o $(OBJ_D)/s2_lib.o \ | ||
| 265 | $(OBJ_D)/s2_enc.o $(OBJ_D)/s2_pkt.o $(OBJ_D)/s3_meth.o \ | ||
| 266 | $(OBJ_D)/s3_srvr.o $(OBJ_D)/s3_clnt.o $(OBJ_D)/s3_lib.o \ | ||
| 267 | $(OBJ_D)/s3_enc.o $(OBJ_D)/s3_pkt.o $(OBJ_D)/s3_both.o \ | ||
| 268 | $(OBJ_D)/s23_meth.o $(OBJ_D)/s23_srvr.o $(OBJ_D)/s23_clnt.o \ | ||
| 269 | $(OBJ_D)/s23_lib.o $(OBJ_D)/s23_pkt.o $(OBJ_D)/t1_meth.o \ | ||
| 270 | $(OBJ_D)/t1_srvr.o $(OBJ_D)/t1_clnt.o $(OBJ_D)/t1_lib.o \ | ||
| 271 | $(OBJ_D)/t1_enc.o $(OBJ_D)/ssl_lib.o $(OBJ_D)/ssl_err2.o \ | ||
| 272 | $(OBJ_D)/ssl_cert.o $(OBJ_D)/ssl_sess.o $(OBJ_D)/ssl_ciph.o \ | ||
| 273 | $(OBJ_D)/ssl_stat.o $(OBJ_D)/ssl_rsa.o $(OBJ_D)/ssl_asn1.o \ | ||
| 274 | $(OBJ_D)/ssl_txt.o $(OBJ_D)/ssl_algs.o $(OBJ_D)/bio_ssl.o \ | ||
| 275 | $(OBJ_D)/ssl_err.o | ||
| 276 | |||
| 277 | RSAGLUEOBJ=$(OBJ_D)/rsaref.o \ | ||
| 278 | $(OBJ_D)/rsar_err.o | ||
| 279 | |||
| 280 | T_EXE=$(TEST_D)/md2test \ | ||
| 281 | $(TEST_D)/md5test $(TEST_D)/shatest $(TEST_D)/sha1test \ | ||
| 282 | $(TEST_D)/mdc2test $(TEST_D)/hmactest $(TEST_D)/rmdtest \ | ||
| 283 | $(TEST_D)/destest $(TEST_D)/rc2test $(TEST_D)/rc4test \ | ||
| 284 | $(TEST_D)/rc5test $(TEST_D)/ideatest $(TEST_D)/bftest \ | ||
| 285 | $(TEST_D)/casttest $(TEST_D)/bntest $(TEST_D)/exptest \ | ||
| 286 | $(TEST_D)/dsatest $(TEST_D)/dhtest $(TEST_D)/randtest \ | ||
| 287 | $(TEST_D)/ssltest | ||
| 288 | |||
| 289 | ################################################################### | ||
| 290 | all: banner $(TMP_D) $(BIN_D) $(TEST_D) $(LIB_D) $(INC_D) headers lib exe | ||
| 291 | |||
| 292 | banner: | ||
| 293 | |||
| 294 | |||
| 295 | $(TMP_D): | ||
| 296 | $(MKDIR) $(TMP_D) | ||
| 297 | |||
| 298 | $(BIN_D): | ||
| 299 | $(MKDIR) $(BIN_D) | ||
| 300 | |||
| 301 | $(TEST_D): | ||
| 302 | $(MKDIR) $(TEST_D) | ||
| 303 | |||
| 304 | $(LIB_D): | ||
| 305 | $(MKDIR) $(LIB_D) | ||
| 306 | |||
| 307 | $(INC_D): | ||
| 308 | $(MKDIR) $(INC_D) | ||
| 309 | |||
| 310 | headers: $(HEADER) $(EXHEADER) | ||
| 311 | |||
| 312 | lib: $(LIBS_DEP) | ||
| 313 | |||
| 314 | exe: $(T_EXE) $(BIN_D)/$(E_EXE) | ||
| 315 | |||
| 316 | install: | ||
| 317 | $(MKDIR) $(INSTALLTOP) | ||
| 318 | $(MKDIR) $(INSTALLTOP)/bin | ||
| 319 | $(MKDIR) $(INSTALLTOP)/include | ||
| 320 | $(MKDIR) $(INSTALLTOP)/lib | ||
| 321 | $(CP) $(INC_D)/*.[ch] $(INSTALLTOP)/include | ||
| 322 | $(CP) $(BIN_D)/$(E_EXE) $(INSTALLTOP)/bin | ||
| 323 | $(CP) $(O_SSL) $(INSTALLTOP)/lib | ||
| 324 | $(CP) $(O_CRYPTO) $(INSTALLTOP)/lib | ||
| 325 | |||
| 326 | clean: | ||
| 327 | $(RM) $(TMP_D)/*.* | ||
| 328 | |||
| 329 | vclean: | ||
| 330 | $(RM) $(TMP_D)/*.* | ||
| 331 | $(RM) $(OUT_D)/*.* | ||
| 332 | |||
| 333 | $(INCL_D)/cryptlib.h: $(SRC_D)/crypto/cryptlib.h | ||
| 334 | $(CP) $(SRC_D)/crypto/cryptlib.h $(INCL_D)/cryptlib.h | ||
| 335 | |||
| 336 | $(INCL_D)/date.h: $(SRC_D)/crypto/date.h | ||
| 337 | $(CP) $(SRC_D)/crypto/date.h $(INCL_D)/date.h | ||
| 338 | |||
| 339 | $(INCL_D)/md5_locl.h: $(SRC_D)/crypto/md5/md5_locl.h | ||
| 340 | $(CP) $(SRC_D)/crypto/md5/md5_locl.h $(INCL_D)/md5_locl.h | ||
| 341 | |||
| 342 | $(INCL_D)/sha_locl.h: $(SRC_D)/crypto/sha/sha_locl.h | ||
| 343 | $(CP) $(SRC_D)/crypto/sha/sha_locl.h $(INCL_D)/sha_locl.h | ||
| 344 | |||
| 345 | $(INCL_D)/rmd_locl.h: $(SRC_D)/crypto/ripemd/rmd_locl.h | ||
| 346 | $(CP) $(SRC_D)/crypto/ripemd/rmd_locl.h $(INCL_D)/rmd_locl.h | ||
| 347 | |||
| 348 | $(INCL_D)/rmdconst.h: $(SRC_D)/crypto/ripemd/rmdconst.h | ||
| 349 | $(CP) $(SRC_D)/crypto/ripemd/rmdconst.h $(INCL_D)/rmdconst.h | ||
| 350 | |||
| 351 | $(INCL_D)/des_locl.h: $(SRC_D)/crypto/des/des_locl.h | ||
| 352 | $(CP) $(SRC_D)/crypto/des/des_locl.h $(INCL_D)/des_locl.h | ||
| 353 | |||
| 354 | $(INCL_D)/rpc_des.h: $(SRC_D)/crypto/des/rpc_des.h | ||
| 355 | $(CP) $(SRC_D)/crypto/des/rpc_des.h $(INCL_D)/rpc_des.h | ||
| 356 | |||
| 357 | $(INCL_D)/podd.h: $(SRC_D)/crypto/des/podd.h | ||
| 358 | $(CP) $(SRC_D)/crypto/des/podd.h $(INCL_D)/podd.h | ||
| 359 | |||
| 360 | $(INCL_D)/sk.h: $(SRC_D)/crypto/des/sk.h | ||
| 361 | $(CP) $(SRC_D)/crypto/des/sk.h $(INCL_D)/sk.h | ||
| 362 | |||
| 363 | $(INCL_D)/spr.h: $(SRC_D)/crypto/des/spr.h | ||
| 364 | $(CP) $(SRC_D)/crypto/des/spr.h $(INCL_D)/spr.h | ||
| 365 | |||
| 366 | $(INCL_D)/des_ver.h: $(SRC_D)/crypto/des/des_ver.h | ||
| 367 | $(CP) $(SRC_D)/crypto/des/des_ver.h $(INCL_D)/des_ver.h | ||
| 368 | |||
| 369 | $(INCL_D)/rc2_locl.h: $(SRC_D)/crypto/rc2/rc2_locl.h | ||
| 370 | $(CP) $(SRC_D)/crypto/rc2/rc2_locl.h $(INCL_D)/rc2_locl.h | ||
| 371 | |||
| 372 | $(INCL_D)/rc4_locl.h: $(SRC_D)/crypto/rc4/rc4_locl.h | ||
| 373 | $(CP) $(SRC_D)/crypto/rc4/rc4_locl.h $(INCL_D)/rc4_locl.h | ||
| 374 | |||
| 375 | $(INCL_D)/rc5_locl.h: $(SRC_D)/crypto/rc5/rc5_locl.h | ||
| 376 | $(CP) $(SRC_D)/crypto/rc5/rc5_locl.h $(INCL_D)/rc5_locl.h | ||
| 377 | |||
| 378 | $(INCL_D)/idea_lcl.h: $(SRC_D)/crypto/idea/idea_lcl.h | ||
| 379 | $(CP) $(SRC_D)/crypto/idea/idea_lcl.h $(INCL_D)/idea_lcl.h | ||
| 380 | |||
| 381 | $(INCL_D)/bf_pi.h: $(SRC_D)/crypto/bf/bf_pi.h | ||
| 382 | $(CP) $(SRC_D)/crypto/bf/bf_pi.h $(INCL_D)/bf_pi.h | ||
| 383 | |||
| 384 | $(INCL_D)/bf_locl.h: $(SRC_D)/crypto/bf/bf_locl.h | ||
| 385 | $(CP) $(SRC_D)/crypto/bf/bf_locl.h $(INCL_D)/bf_locl.h | ||
| 386 | |||
| 387 | $(INCL_D)/cast_s.h: $(SRC_D)/crypto/cast/cast_s.h | ||
| 388 | $(CP) $(SRC_D)/crypto/cast/cast_s.h $(INCL_D)/cast_s.h | ||
| 389 | |||
| 390 | $(INCL_D)/cast_lcl.h: $(SRC_D)/crypto/cast/cast_lcl.h | ||
| 391 | $(CP) $(SRC_D)/crypto/cast/cast_lcl.h $(INCL_D)/cast_lcl.h | ||
| 392 | |||
| 393 | $(INCL_D)/bn_lcl.h: $(SRC_D)/crypto/bn/bn_lcl.h | ||
| 394 | $(CP) $(SRC_D)/crypto/bn/bn_lcl.h $(INCL_D)/bn_lcl.h | ||
| 395 | |||
| 396 | $(INCL_D)/bn_prime.h: $(SRC_D)/crypto/bn/bn_prime.h | ||
| 397 | $(CP) $(SRC_D)/crypto/bn/bn_prime.h $(INCL_D)/bn_prime.h | ||
| 398 | |||
| 399 | $(INCL_D)/obj_dat.h: $(SRC_D)/crypto/objects/obj_dat.h | ||
| 400 | $(CP) $(SRC_D)/crypto/objects/obj_dat.h $(INCL_D)/obj_dat.h | ||
| 401 | |||
| 402 | $(INCL_D)/conf_lcl.h: $(SRC_D)/crypto/conf/conf_lcl.h | ||
| 403 | $(CP) $(SRC_D)/crypto/conf/conf_lcl.h $(INCL_D)/conf_lcl.h | ||
| 404 | |||
| 405 | $(INCL_D)/ssl_locl.h: $(SRC_D)/ssl/ssl_locl.h | ||
| 406 | $(CP) $(SRC_D)/ssl/ssl_locl.h $(INCL_D)/ssl_locl.h | ||
| 407 | |||
| 408 | $(INCL_D)/rsaref.h: $(SRC_D)/rsaref/rsaref.h | ||
| 409 | $(CP) $(SRC_D)/rsaref/rsaref.h $(INCL_D)/rsaref.h | ||
| 410 | |||
| 411 | $(INCL_D)/apps.h: $(SRC_D)/apps/apps.h | ||
| 412 | $(CP) $(SRC_D)/apps/apps.h $(INCL_D)/apps.h | ||
| 413 | |||
| 414 | $(INCL_D)/progs.h: $(SRC_D)/apps/progs.h | ||
| 415 | $(CP) $(SRC_D)/apps/progs.h $(INCL_D)/progs.h | ||
| 416 | |||
| 417 | $(INCL_D)/s_apps.h: $(SRC_D)/apps/s_apps.h | ||
| 418 | $(CP) $(SRC_D)/apps/s_apps.h $(INCL_D)/s_apps.h | ||
| 419 | |||
| 420 | $(INCL_D)/testdsa.h: $(SRC_D)/apps/testdsa.h | ||
| 421 | $(CP) $(SRC_D)/apps/testdsa.h $(INCL_D)/testdsa.h | ||
| 422 | |||
| 423 | $(INCL_D)/testrsa.h: $(SRC_D)/apps/testrsa.h | ||
| 424 | $(CP) $(SRC_D)/apps/testrsa.h $(INCL_D)/testrsa.h | ||
| 425 | |||
| 426 | $(INC_D)/e_os.h: $(SRC_D)/./e_os.h | ||
| 427 | $(CP) $(SRC_D)/./e_os.h $(INC_D)/e_os.h | ||
| 428 | |||
| 429 | $(INC_D)/crypto.h: $(SRC_D)/crypto/crypto.h | ||
| 430 | $(CP) $(SRC_D)/crypto/crypto.h $(INC_D)/crypto.h | ||
| 431 | |||
| 432 | $(INC_D)/cryptall.h: $(SRC_D)/crypto/cryptall.h | ||
| 433 | $(CP) $(SRC_D)/crypto/cryptall.h $(INC_D)/cryptall.h | ||
| 434 | |||
| 435 | $(INC_D)/md2.h: $(SRC_D)/crypto/md2/md2.h | ||
| 436 | $(CP) $(SRC_D)/crypto/md2/md2.h $(INC_D)/md2.h | ||
| 437 | |||
| 438 | $(INC_D)/md5.h: $(SRC_D)/crypto/md5/md5.h | ||
| 439 | $(CP) $(SRC_D)/crypto/md5/md5.h $(INC_D)/md5.h | ||
| 440 | |||
| 441 | $(INC_D)/sha.h: $(SRC_D)/crypto/sha/sha.h | ||
| 442 | $(CP) $(SRC_D)/crypto/sha/sha.h $(INC_D)/sha.h | ||
| 443 | |||
| 444 | $(INC_D)/mdc2.h: $(SRC_D)/crypto/mdc2/mdc2.h | ||
| 445 | $(CP) $(SRC_D)/crypto/mdc2/mdc2.h $(INC_D)/mdc2.h | ||
| 446 | |||
| 447 | $(INC_D)/hmac.h: $(SRC_D)/crypto/hmac/hmac.h | ||
| 448 | $(CP) $(SRC_D)/crypto/hmac/hmac.h $(INC_D)/hmac.h | ||
| 449 | |||
| 450 | $(INC_D)/ripemd.h: $(SRC_D)/crypto/ripemd/ripemd.h | ||
| 451 | $(CP) $(SRC_D)/crypto/ripemd/ripemd.h $(INC_D)/ripemd.h | ||
| 452 | |||
| 453 | $(INC_D)/des.h: $(SRC_D)/crypto/des/des.h | ||
| 454 | $(CP) $(SRC_D)/crypto/des/des.h $(INC_D)/des.h | ||
| 455 | |||
| 456 | $(INC_D)/rc2.h: $(SRC_D)/crypto/rc2/rc2.h | ||
| 457 | $(CP) $(SRC_D)/crypto/rc2/rc2.h $(INC_D)/rc2.h | ||
| 458 | |||
| 459 | $(INC_D)/rc4.h: $(SRC_D)/crypto/rc4/rc4.h | ||
| 460 | $(CP) $(SRC_D)/crypto/rc4/rc4.h $(INC_D)/rc4.h | ||
| 461 | |||
| 462 | $(INC_D)/rc5.h: $(SRC_D)/crypto/rc5/rc5.h | ||
| 463 | $(CP) $(SRC_D)/crypto/rc5/rc5.h $(INC_D)/rc5.h | ||
| 464 | |||
| 465 | $(INC_D)/idea.h: $(SRC_D)/crypto/idea/idea.h | ||
| 466 | $(CP) $(SRC_D)/crypto/idea/idea.h $(INC_D)/idea.h | ||
| 467 | |||
| 468 | $(INC_D)/blowfish.h: $(SRC_D)/crypto/bf/blowfish.h | ||
| 469 | $(CP) $(SRC_D)/crypto/bf/blowfish.h $(INC_D)/blowfish.h | ||
| 470 | |||
| 471 | $(INC_D)/cast.h: $(SRC_D)/crypto/cast/cast.h | ||
| 472 | $(CP) $(SRC_D)/crypto/cast/cast.h $(INC_D)/cast.h | ||
| 473 | |||
| 474 | $(INC_D)/bn.h: $(SRC_D)/crypto/bn/bn.h | ||
| 475 | $(CP) $(SRC_D)/crypto/bn/bn.h $(INC_D)/bn.h | ||
| 476 | |||
| 477 | $(INC_D)/rsa.h: $(SRC_D)/crypto/rsa/rsa.h | ||
| 478 | $(CP) $(SRC_D)/crypto/rsa/rsa.h $(INC_D)/rsa.h | ||
| 479 | |||
| 480 | $(INC_D)/dsa.h: $(SRC_D)/crypto/dsa/dsa.h | ||
| 481 | $(CP) $(SRC_D)/crypto/dsa/dsa.h $(INC_D)/dsa.h | ||
| 482 | |||
| 483 | $(INC_D)/dh.h: $(SRC_D)/crypto/dh/dh.h | ||
| 484 | $(CP) $(SRC_D)/crypto/dh/dh.h $(INC_D)/dh.h | ||
| 485 | |||
| 486 | $(INC_D)/buffer.h: $(SRC_D)/crypto/buffer/buffer.h | ||
| 487 | $(CP) $(SRC_D)/crypto/buffer/buffer.h $(INC_D)/buffer.h | ||
| 488 | |||
| 489 | $(INC_D)/bio.h: $(SRC_D)/crypto/bio/bio.h | ||
| 490 | $(CP) $(SRC_D)/crypto/bio/bio.h $(INC_D)/bio.h | ||
| 491 | |||
| 492 | $(INC_D)/bss_file.c: $(SRC_D)/crypto/bio/bss_file.c | ||
| 493 | $(CP) $(SRC_D)/crypto/bio/bss_file.c $(INC_D)/bss_file.c | ||
| 494 | |||
| 495 | $(INC_D)/stack.h: $(SRC_D)/crypto/stack/stack.h | ||
| 496 | $(CP) $(SRC_D)/crypto/stack/stack.h $(INC_D)/stack.h | ||
| 497 | |||
| 498 | $(INC_D)/lhash.h: $(SRC_D)/crypto/lhash/lhash.h | ||
| 499 | $(CP) $(SRC_D)/crypto/lhash/lhash.h $(INC_D)/lhash.h | ||
| 500 | |||
| 501 | $(INC_D)/rand.h: $(SRC_D)/crypto/rand/rand.h | ||
| 502 | $(CP) $(SRC_D)/crypto/rand/rand.h $(INC_D)/rand.h | ||
| 503 | |||
| 504 | $(INC_D)/err.h: $(SRC_D)/crypto/err/err.h | ||
| 505 | $(CP) $(SRC_D)/crypto/err/err.h $(INC_D)/err.h | ||
| 506 | |||
| 507 | $(INC_D)/objects.h: $(SRC_D)/crypto/objects/objects.h | ||
| 508 | $(CP) $(SRC_D)/crypto/objects/objects.h $(INC_D)/objects.h | ||
| 509 | |||
| 510 | $(INC_D)/evp.h: $(SRC_D)/crypto/evp/evp.h | ||
| 511 | $(CP) $(SRC_D)/crypto/evp/evp.h $(INC_D)/evp.h | ||
| 512 | |||
| 513 | $(INC_D)/pem.h: $(SRC_D)/crypto/pem/pem.h | ||
| 514 | $(CP) $(SRC_D)/crypto/pem/pem.h $(INC_D)/pem.h | ||
| 515 | |||
| 516 | $(INC_D)/asn1.h: $(SRC_D)/crypto/asn1/asn1.h | ||
| 517 | $(CP) $(SRC_D)/crypto/asn1/asn1.h $(INC_D)/asn1.h | ||
| 518 | |||
| 519 | $(INC_D)/asn1_mac.h: $(SRC_D)/crypto/asn1/asn1_mac.h | ||
| 520 | $(CP) $(SRC_D)/crypto/asn1/asn1_mac.h $(INC_D)/asn1_mac.h | ||
| 521 | |||
| 522 | $(INC_D)/x509.h: $(SRC_D)/crypto/x509/x509.h | ||
| 523 | $(CP) $(SRC_D)/crypto/x509/x509.h $(INC_D)/x509.h | ||
| 524 | |||
| 525 | $(INC_D)/x509_vfy.h: $(SRC_D)/crypto/x509/x509_vfy.h | ||
| 526 | $(CP) $(SRC_D)/crypto/x509/x509_vfy.h $(INC_D)/x509_vfy.h | ||
| 527 | |||
| 528 | $(INC_D)/conf.h: $(SRC_D)/crypto/conf/conf.h | ||
| 529 | $(CP) $(SRC_D)/crypto/conf/conf.h $(INC_D)/conf.h | ||
| 530 | |||
| 531 | $(INC_D)/txt_db.h: $(SRC_D)/crypto/txt_db/txt_db.h | ||
| 532 | $(CP) $(SRC_D)/crypto/txt_db/txt_db.h $(INC_D)/txt_db.h | ||
| 533 | |||
| 534 | $(INC_D)/pkcs7.h: $(SRC_D)/crypto/pkcs7/pkcs7.h | ||
| 535 | $(CP) $(SRC_D)/crypto/pkcs7/pkcs7.h $(INC_D)/pkcs7.h | ||
| 536 | |||
| 537 | $(INC_D)/ssl.h: $(SRC_D)/ssl/ssl.h | ||
| 538 | $(CP) $(SRC_D)/ssl/ssl.h $(INC_D)/ssl.h | ||
| 539 | |||
| 540 | $(INC_D)/ssl2.h: $(SRC_D)/ssl/ssl2.h | ||
| 541 | $(CP) $(SRC_D)/ssl/ssl2.h $(INC_D)/ssl2.h | ||
| 542 | |||
| 543 | $(INC_D)/ssl3.h: $(SRC_D)/ssl/ssl3.h | ||
| 544 | $(CP) $(SRC_D)/ssl/ssl3.h $(INC_D)/ssl3.h | ||
| 545 | |||
| 546 | $(INC_D)/ssl23.h: $(SRC_D)/ssl/ssl23.h | ||
| 547 | $(CP) $(SRC_D)/ssl/ssl23.h $(INC_D)/ssl23.h | ||
| 548 | |||
| 549 | $(INC_D)/tls1.h: $(SRC_D)/ssl/tls1.h | ||
| 550 | $(CP) $(SRC_D)/ssl/tls1.h $(INC_D)/tls1.h | ||
| 551 | |||
| 552 | $(OBJ_D)/md2test.o: $(SRC_D)/crypto/md2/md2test.c | ||
| 553 | $(CC) -o $(OBJ_D)/md2test.o $(APP_CFLAGS) -c $(SRC_D)/crypto/md2/md2test.c | ||
| 554 | |||
| 555 | $(OBJ_D)/md5test.o: $(SRC_D)/crypto/md5/md5test.c | ||
| 556 | $(CC) -o $(OBJ_D)/md5test.o $(APP_CFLAGS) -c $(SRC_D)/crypto/md5/md5test.c | ||
| 557 | |||
| 558 | $(OBJ_D)/shatest.o: $(SRC_D)/crypto/sha/shatest.c | ||
| 559 | $(CC) -o $(OBJ_D)/shatest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/sha/shatest.c | ||
| 560 | |||
| 561 | $(OBJ_D)/sha1test.o: $(SRC_D)/crypto/sha/sha1test.c | ||
| 562 | $(CC) -o $(OBJ_D)/sha1test.o $(APP_CFLAGS) -c $(SRC_D)/crypto/sha/sha1test.c | ||
| 563 | |||
| 564 | $(OBJ_D)/mdc2test.o: $(SRC_D)/crypto/mdc2/mdc2test.c | ||
| 565 | $(CC) -o $(OBJ_D)/mdc2test.o $(APP_CFLAGS) -c $(SRC_D)/crypto/mdc2/mdc2test.c | ||
| 566 | |||
| 567 | $(OBJ_D)/hmactest.o: $(SRC_D)/crypto/hmac/hmactest.c | ||
| 568 | $(CC) -o $(OBJ_D)/hmactest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/hmac/hmactest.c | ||
| 569 | |||
| 570 | $(OBJ_D)/rmdtest.o: $(SRC_D)/crypto/ripemd/rmdtest.c | ||
| 571 | $(CC) -o $(OBJ_D)/rmdtest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/ripemd/rmdtest.c | ||
| 572 | |||
| 573 | $(OBJ_D)/destest.o: $(SRC_D)/crypto/des/destest.c | ||
| 574 | $(CC) -o $(OBJ_D)/destest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/des/destest.c | ||
| 575 | |||
| 576 | $(OBJ_D)/rc2test.o: $(SRC_D)/crypto/rc2/rc2test.c | ||
| 577 | $(CC) -o $(OBJ_D)/rc2test.o $(APP_CFLAGS) -c $(SRC_D)/crypto/rc2/rc2test.c | ||
| 578 | |||
| 579 | $(OBJ_D)/rc4test.o: $(SRC_D)/crypto/rc4/rc4test.c | ||
| 580 | $(CC) -o $(OBJ_D)/rc4test.o $(APP_CFLAGS) -c $(SRC_D)/crypto/rc4/rc4test.c | ||
| 581 | |||
| 582 | $(OBJ_D)/rc5test.o: $(SRC_D)/crypto/rc5/rc5test.c | ||
| 583 | $(CC) -o $(OBJ_D)/rc5test.o $(APP_CFLAGS) -c $(SRC_D)/crypto/rc5/rc5test.c | ||
| 584 | |||
| 585 | $(OBJ_D)/ideatest.o: $(SRC_D)/crypto/idea/ideatest.c | ||
| 586 | $(CC) -o $(OBJ_D)/ideatest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/idea/ideatest.c | ||
| 587 | |||
| 588 | $(OBJ_D)/bftest.o: $(SRC_D)/crypto/bf/bftest.c | ||
| 589 | $(CC) -o $(OBJ_D)/bftest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/bf/bftest.c | ||
| 590 | |||
| 591 | $(OBJ_D)/casttest.o: $(SRC_D)/crypto/cast/casttest.c | ||
| 592 | $(CC) -o $(OBJ_D)/casttest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/cast/casttest.c | ||
| 593 | |||
| 594 | $(OBJ_D)/bntest.o: $(SRC_D)/crypto/bn/bntest.c | ||
| 595 | $(CC) -o $(OBJ_D)/bntest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/bn/bntest.c | ||
| 596 | |||
| 597 | $(OBJ_D)/exptest.o: $(SRC_D)/crypto/bn/exptest.c | ||
| 598 | $(CC) -o $(OBJ_D)/exptest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/bn/exptest.c | ||
| 599 | |||
| 600 | $(OBJ_D)/dsatest.o: $(SRC_D)/crypto/dsa/dsatest.c | ||
| 601 | $(CC) -o $(OBJ_D)/dsatest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/dsa/dsatest.c | ||
| 602 | |||
| 603 | $(OBJ_D)/dhtest.o: $(SRC_D)/crypto/dh/dhtest.c | ||
| 604 | $(CC) -o $(OBJ_D)/dhtest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/dh/dhtest.c | ||
| 605 | |||
| 606 | $(OBJ_D)/randtest.o: $(SRC_D)/crypto/rand/randtest.c | ||
| 607 | $(CC) -o $(OBJ_D)/randtest.o $(APP_CFLAGS) -c $(SRC_D)/crypto/rand/randtest.c | ||
| 608 | |||
| 609 | $(OBJ_D)/ssltest.o: $(SRC_D)/ssl/ssltest.c | ||
| 610 | $(CC) -o $(OBJ_D)/ssltest.o $(APP_CFLAGS) -c $(SRC_D)/ssl/ssltest.c | ||
| 611 | |||
| 612 | $(OBJ_D)/verify.o: $(SRC_D)/apps/verify.c | ||
| 613 | $(CC) -o $(OBJ_D)/verify.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/verify.c | ||
| 614 | |||
| 615 | $(OBJ_D)/asn1pars.o: $(SRC_D)/apps/asn1pars.c | ||
| 616 | $(CC) -o $(OBJ_D)/asn1pars.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/asn1pars.c | ||
| 617 | |||
| 618 | $(OBJ_D)/req.o: $(SRC_D)/apps/req.c | ||
| 619 | $(CC) -o $(OBJ_D)/req.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/req.c | ||
| 620 | |||
| 621 | $(OBJ_D)/dgst.o: $(SRC_D)/apps/dgst.c | ||
| 622 | $(CC) -o $(OBJ_D)/dgst.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/dgst.c | ||
| 623 | |||
| 624 | $(OBJ_D)/dh.o: $(SRC_D)/apps/dh.c | ||
| 625 | $(CC) -o $(OBJ_D)/dh.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/dh.c | ||
| 626 | |||
| 627 | $(OBJ_D)/enc.o: $(SRC_D)/apps/enc.c | ||
| 628 | $(CC) -o $(OBJ_D)/enc.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/enc.c | ||
| 629 | |||
| 630 | $(OBJ_D)/gendh.o: $(SRC_D)/apps/gendh.c | ||
| 631 | $(CC) -o $(OBJ_D)/gendh.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/gendh.c | ||
| 632 | |||
| 633 | $(OBJ_D)/errstr.o: $(SRC_D)/apps/errstr.c | ||
| 634 | $(CC) -o $(OBJ_D)/errstr.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/errstr.c | ||
| 635 | |||
| 636 | $(OBJ_D)/ca.o: $(SRC_D)/apps/ca.c | ||
| 637 | $(CC) -o $(OBJ_D)/ca.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/ca.c | ||
| 638 | |||
| 639 | $(OBJ_D)/pkcs7.o: $(SRC_D)/apps/pkcs7.c | ||
| 640 | $(CC) -o $(OBJ_D)/pkcs7.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/pkcs7.c | ||
| 641 | |||
| 642 | $(OBJ_D)/crl2p7.o: $(SRC_D)/apps/crl2p7.c | ||
| 643 | $(CC) -o $(OBJ_D)/crl2p7.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/crl2p7.c | ||
| 644 | |||
| 645 | $(OBJ_D)/crl.o: $(SRC_D)/apps/crl.c | ||
| 646 | $(CC) -o $(OBJ_D)/crl.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/crl.c | ||
| 647 | |||
| 648 | $(OBJ_D)/rsa.o: $(SRC_D)/apps/rsa.c | ||
| 649 | $(CC) -o $(OBJ_D)/rsa.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/rsa.c | ||
| 650 | |||
| 651 | $(OBJ_D)/dsa.o: $(SRC_D)/apps/dsa.c | ||
| 652 | $(CC) -o $(OBJ_D)/dsa.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/dsa.c | ||
| 653 | |||
| 654 | $(OBJ_D)/dsaparam.o: $(SRC_D)/apps/dsaparam.c | ||
| 655 | $(CC) -o $(OBJ_D)/dsaparam.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/dsaparam.c | ||
| 656 | |||
| 657 | $(OBJ_D)/x509.o: $(SRC_D)/apps/x509.c | ||
| 658 | $(CC) -o $(OBJ_D)/x509.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/x509.c | ||
| 659 | |||
| 660 | $(OBJ_D)/genrsa.o: $(SRC_D)/apps/genrsa.c | ||
| 661 | $(CC) -o $(OBJ_D)/genrsa.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/genrsa.c | ||
| 662 | |||
| 663 | $(OBJ_D)/s_server.o: $(SRC_D)/apps/s_server.c | ||
| 664 | $(CC) -o $(OBJ_D)/s_server.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/s_server.c | ||
| 665 | |||
| 666 | $(OBJ_D)/s_client.o: $(SRC_D)/apps/s_client.c | ||
| 667 | $(CC) -o $(OBJ_D)/s_client.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/s_client.c | ||
| 668 | |||
| 669 | $(OBJ_D)/speed.o: $(SRC_D)/apps/speed.c | ||
| 670 | $(CC) -o $(OBJ_D)/speed.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/speed.c | ||
| 671 | |||
| 672 | $(OBJ_D)/s_time.o: $(SRC_D)/apps/s_time.c | ||
| 673 | $(CC) -o $(OBJ_D)/s_time.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/s_time.c | ||
| 674 | |||
| 675 | $(OBJ_D)/apps.o: $(SRC_D)/apps/apps.c | ||
| 676 | $(CC) -o $(OBJ_D)/apps.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/apps.c | ||
| 677 | |||
| 678 | $(OBJ_D)/s_cb.o: $(SRC_D)/apps/s_cb.c | ||
| 679 | $(CC) -o $(OBJ_D)/s_cb.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/s_cb.c | ||
| 680 | |||
| 681 | $(OBJ_D)/s_socket.o: $(SRC_D)/apps/s_socket.c | ||
| 682 | $(CC) -o $(OBJ_D)/s_socket.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/s_socket.c | ||
| 683 | |||
| 684 | $(OBJ_D)/version.o: $(SRC_D)/apps/version.c | ||
| 685 | $(CC) -o $(OBJ_D)/version.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/version.c | ||
| 686 | |||
| 687 | $(OBJ_D)/sess_id.o: $(SRC_D)/apps/sess_id.c | ||
| 688 | $(CC) -o $(OBJ_D)/sess_id.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/sess_id.c | ||
| 689 | |||
| 690 | $(OBJ_D)/ciphers.o: $(SRC_D)/apps/ciphers.c | ||
| 691 | $(CC) -o $(OBJ_D)/ciphers.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/ciphers.c | ||
| 692 | |||
| 693 | $(OBJ_D)/ssleay.o: $(SRC_D)/apps/ssleay.c | ||
| 694 | $(CC) -o $(OBJ_D)/ssleay.o -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)/apps/ssleay.c | ||
| 695 | |||
| 696 | $(OBJ_D)/cryptlib.o: $(SRC_D)/crypto/cryptlib.c | ||
| 697 | $(CC) -o $(OBJ_D)/cryptlib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/cryptlib.c | ||
| 698 | |||
| 699 | $(OBJ_D)/mem.o: $(SRC_D)/crypto/mem.c | ||
| 700 | $(CC) -o $(OBJ_D)/mem.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/mem.c | ||
| 701 | |||
| 702 | $(OBJ_D)/cversion.o: $(SRC_D)/crypto/cversion.c | ||
| 703 | $(CC) -o $(OBJ_D)/cversion.o $(LIB_CFLAGS) -DCFLAGS="\"$(CC) $(CFLAG)\"" -c $(SRC_D)/crypto/cversion.c | ||
| 704 | |||
| 705 | $(OBJ_D)/ex_data.o: $(SRC_D)/crypto/ex_data.c | ||
| 706 | $(CC) -o $(OBJ_D)/ex_data.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/ex_data.c | ||
| 707 | |||
| 708 | $(OBJ_D)/cpt_err.o: $(SRC_D)/crypto/cpt_err.c | ||
| 709 | $(CC) -o $(OBJ_D)/cpt_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/cpt_err.c | ||
| 710 | |||
| 711 | $(OBJ_D)/md2_dgst.o: $(SRC_D)/crypto/md2/md2_dgst.c | ||
| 712 | $(CC) -o $(OBJ_D)/md2_dgst.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/md2/md2_dgst.c | ||
| 713 | |||
| 714 | $(OBJ_D)/md2_one.o: $(SRC_D)/crypto/md2/md2_one.c | ||
| 715 | $(CC) -o $(OBJ_D)/md2_one.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/md2/md2_one.c | ||
| 716 | |||
| 717 | $(OBJ_D)/md5_dgst.o: $(SRC_D)/crypto/md5/md5_dgst.c | ||
| 718 | $(CC) -o $(OBJ_D)/md5_dgst.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/md5/md5_dgst.c | ||
| 719 | |||
| 720 | $(OBJ_D)/md5_one.o: $(SRC_D)/crypto/md5/md5_one.c | ||
| 721 | $(CC) -o $(OBJ_D)/md5_one.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/md5/md5_one.c | ||
| 722 | |||
| 723 | $(OBJ_D)/sha_dgst.o: $(SRC_D)/crypto/sha/sha_dgst.c | ||
| 724 | $(CC) -o $(OBJ_D)/sha_dgst.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/sha/sha_dgst.c | ||
| 725 | |||
| 726 | $(OBJ_D)/sha1dgst.o: $(SRC_D)/crypto/sha/sha1dgst.c | ||
| 727 | $(CC) -o $(OBJ_D)/sha1dgst.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/sha/sha1dgst.c | ||
| 728 | |||
| 729 | $(OBJ_D)/sha_one.o: $(SRC_D)/crypto/sha/sha_one.c | ||
| 730 | $(CC) -o $(OBJ_D)/sha_one.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/sha/sha_one.c | ||
| 731 | |||
| 732 | $(OBJ_D)/sha1_one.o: $(SRC_D)/crypto/sha/sha1_one.c | ||
| 733 | $(CC) -o $(OBJ_D)/sha1_one.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/sha/sha1_one.c | ||
| 734 | |||
| 735 | $(OBJ_D)/mdc2dgst.o: $(SRC_D)/crypto/mdc2/mdc2dgst.c | ||
| 736 | $(CC) -o $(OBJ_D)/mdc2dgst.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/mdc2/mdc2dgst.c | ||
| 737 | |||
| 738 | $(OBJ_D)/mdc2_one.o: $(SRC_D)/crypto/mdc2/mdc2_one.c | ||
| 739 | $(CC) -o $(OBJ_D)/mdc2_one.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/mdc2/mdc2_one.c | ||
| 740 | |||
| 741 | $(OBJ_D)/hmac.o: $(SRC_D)/crypto/hmac/hmac.c | ||
| 742 | $(CC) -o $(OBJ_D)/hmac.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/hmac/hmac.c | ||
| 743 | |||
| 744 | $(OBJ_D)/rmd_dgst.o: $(SRC_D)/crypto/ripemd/rmd_dgst.c | ||
| 745 | $(CC) -o $(OBJ_D)/rmd_dgst.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/ripemd/rmd_dgst.c | ||
| 746 | |||
| 747 | $(OBJ_D)/rmd_one.o: $(SRC_D)/crypto/ripemd/rmd_one.c | ||
| 748 | $(CC) -o $(OBJ_D)/rmd_one.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/ripemd/rmd_one.c | ||
| 749 | |||
| 750 | $(OBJ_D)/set_key.o: $(SRC_D)/crypto/des/set_key.c | ||
| 751 | $(CC) -o $(OBJ_D)/set_key.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/set_key.c | ||
| 752 | |||
| 753 | $(OBJ_D)/ecb_enc.o: $(SRC_D)/crypto/des/ecb_enc.c | ||
| 754 | $(CC) -o $(OBJ_D)/ecb_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/ecb_enc.c | ||
| 755 | |||
| 756 | $(OBJ_D)/cbc_enc.o: $(SRC_D)/crypto/des/cbc_enc.c | ||
| 757 | $(CC) -o $(OBJ_D)/cbc_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/cbc_enc.c | ||
| 758 | |||
| 759 | $(OBJ_D)/ecb3_enc.o: $(SRC_D)/crypto/des/ecb3_enc.c | ||
| 760 | $(CC) -o $(OBJ_D)/ecb3_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/ecb3_enc.c | ||
| 761 | |||
| 762 | $(OBJ_D)/cfb64enc.o: $(SRC_D)/crypto/des/cfb64enc.c | ||
| 763 | $(CC) -o $(OBJ_D)/cfb64enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/cfb64enc.c | ||
| 764 | |||
| 765 | $(OBJ_D)/cfb64ede.o: $(SRC_D)/crypto/des/cfb64ede.c | ||
| 766 | $(CC) -o $(OBJ_D)/cfb64ede.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/cfb64ede.c | ||
| 767 | |||
| 768 | $(OBJ_D)/cfb_enc.o: $(SRC_D)/crypto/des/cfb_enc.c | ||
| 769 | $(CC) -o $(OBJ_D)/cfb_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/cfb_enc.c | ||
| 770 | |||
| 771 | $(OBJ_D)/ofb64ede.o: $(SRC_D)/crypto/des/ofb64ede.c | ||
| 772 | $(CC) -o $(OBJ_D)/ofb64ede.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/ofb64ede.c | ||
| 773 | |||
| 774 | $(OBJ_D)/enc_read.o: $(SRC_D)/crypto/des/enc_read.c | ||
| 775 | $(CC) -o $(OBJ_D)/enc_read.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/enc_read.c | ||
| 776 | |||
| 777 | $(OBJ_D)/enc_writ.o: $(SRC_D)/crypto/des/enc_writ.c | ||
| 778 | $(CC) -o $(OBJ_D)/enc_writ.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/enc_writ.c | ||
| 779 | |||
| 780 | $(OBJ_D)/ofb64enc.o: $(SRC_D)/crypto/des/ofb64enc.c | ||
| 781 | $(CC) -o $(OBJ_D)/ofb64enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/ofb64enc.c | ||
| 782 | |||
| 783 | $(OBJ_D)/ofb_enc.o: $(SRC_D)/crypto/des/ofb_enc.c | ||
| 784 | $(CC) -o $(OBJ_D)/ofb_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/ofb_enc.c | ||
| 785 | |||
| 786 | $(OBJ_D)/str2key.o: $(SRC_D)/crypto/des/str2key.c | ||
| 787 | $(CC) -o $(OBJ_D)/str2key.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/str2key.c | ||
| 788 | |||
| 789 | $(OBJ_D)/pcbc_enc.o: $(SRC_D)/crypto/des/pcbc_enc.c | ||
| 790 | $(CC) -o $(OBJ_D)/pcbc_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/pcbc_enc.c | ||
| 791 | |||
| 792 | $(OBJ_D)/qud_cksm.o: $(SRC_D)/crypto/des/qud_cksm.c | ||
| 793 | $(CC) -o $(OBJ_D)/qud_cksm.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/qud_cksm.c | ||
| 794 | |||
| 795 | $(OBJ_D)/rand_key.o: $(SRC_D)/crypto/des/rand_key.c | ||
| 796 | $(CC) -o $(OBJ_D)/rand_key.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/rand_key.c | ||
| 797 | |||
| 798 | $(OBJ_D)/des_enc.o: $(SRC_D)/crypto/des/des_enc.c | ||
| 799 | $(CC) -o $(OBJ_D)/des_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/des_enc.c | ||
| 800 | |||
| 801 | $(OBJ_D)/fcrypt_b.o: $(SRC_D)/crypto/des/fcrypt_b.c | ||
| 802 | $(CC) -o $(OBJ_D)/fcrypt_b.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/fcrypt_b.c | ||
| 803 | |||
| 804 | $(OBJ_D)/read2pwd.o: $(SRC_D)/crypto/des/read2pwd.c | ||
| 805 | $(CC) -o $(OBJ_D)/read2pwd.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/read2pwd.c | ||
| 806 | |||
| 807 | $(OBJ_D)/fcrypt.o: $(SRC_D)/crypto/des/fcrypt.c | ||
| 808 | $(CC) -o $(OBJ_D)/fcrypt.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/fcrypt.c | ||
| 809 | |||
| 810 | $(OBJ_D)/xcbc_enc.o: $(SRC_D)/crypto/des/xcbc_enc.c | ||
| 811 | $(CC) -o $(OBJ_D)/xcbc_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/xcbc_enc.c | ||
| 812 | |||
| 813 | $(OBJ_D)/read_pwd.o: $(SRC_D)/crypto/des/read_pwd.c | ||
| 814 | $(CC) -o $(OBJ_D)/read_pwd.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/read_pwd.c | ||
| 815 | |||
| 816 | $(OBJ_D)/rpc_enc.o: $(SRC_D)/crypto/des/rpc_enc.c | ||
| 817 | $(CC) -o $(OBJ_D)/rpc_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/rpc_enc.c | ||
| 818 | |||
| 819 | $(OBJ_D)/cbc_cksm.o: $(SRC_D)/crypto/des/cbc_cksm.c | ||
| 820 | $(CC) -o $(OBJ_D)/cbc_cksm.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/cbc_cksm.c | ||
| 821 | |||
| 822 | $(OBJ_D)/supp.o: $(SRC_D)/crypto/des/supp.c | ||
| 823 | $(CC) -o $(OBJ_D)/supp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/des/supp.c | ||
| 824 | |||
| 825 | $(OBJ_D)/rc2_ecb.o: $(SRC_D)/crypto/rc2/rc2_ecb.c | ||
| 826 | $(CC) -o $(OBJ_D)/rc2_ecb.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc2/rc2_ecb.c | ||
| 827 | |||
| 828 | $(OBJ_D)/rc2_skey.o: $(SRC_D)/crypto/rc2/rc2_skey.c | ||
| 829 | $(CC) -o $(OBJ_D)/rc2_skey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc2/rc2_skey.c | ||
| 830 | |||
| 831 | $(OBJ_D)/rc2_cbc.o: $(SRC_D)/crypto/rc2/rc2_cbc.c | ||
| 832 | $(CC) -o $(OBJ_D)/rc2_cbc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc2/rc2_cbc.c | ||
| 833 | |||
| 834 | $(OBJ_D)/rc2cfb64.o: $(SRC_D)/crypto/rc2/rc2cfb64.c | ||
| 835 | $(CC) -o $(OBJ_D)/rc2cfb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc2/rc2cfb64.c | ||
| 836 | |||
| 837 | $(OBJ_D)/rc2ofb64.o: $(SRC_D)/crypto/rc2/rc2ofb64.c | ||
| 838 | $(CC) -o $(OBJ_D)/rc2ofb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc2/rc2ofb64.c | ||
| 839 | |||
| 840 | $(OBJ_D)/rc4_skey.o: $(SRC_D)/crypto/rc4/rc4_skey.c | ||
| 841 | $(CC) -o $(OBJ_D)/rc4_skey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc4/rc4_skey.c | ||
| 842 | |||
| 843 | $(OBJ_D)/rc4_enc.o: $(SRC_D)/crypto/rc4/rc4_enc.c | ||
| 844 | $(CC) -o $(OBJ_D)/rc4_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc4/rc4_enc.c | ||
| 845 | |||
| 846 | $(OBJ_D)/rc5_skey.o: $(SRC_D)/crypto/rc5/rc5_skey.c | ||
| 847 | $(CC) -o $(OBJ_D)/rc5_skey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc5/rc5_skey.c | ||
| 848 | |||
| 849 | $(OBJ_D)/rc5_ecb.o: $(SRC_D)/crypto/rc5/rc5_ecb.c | ||
| 850 | $(CC) -o $(OBJ_D)/rc5_ecb.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc5/rc5_ecb.c | ||
| 851 | |||
| 852 | $(OBJ_D)/rc5_enc.o: $(SRC_D)/crypto/rc5/rc5_enc.c | ||
| 853 | $(CC) -o $(OBJ_D)/rc5_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc5/rc5_enc.c | ||
| 854 | |||
| 855 | $(OBJ_D)/rc5cfb64.o: $(SRC_D)/crypto/rc5/rc5cfb64.c | ||
| 856 | $(CC) -o $(OBJ_D)/rc5cfb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc5/rc5cfb64.c | ||
| 857 | |||
| 858 | $(OBJ_D)/rc5ofb64.o: $(SRC_D)/crypto/rc5/rc5ofb64.c | ||
| 859 | $(CC) -o $(OBJ_D)/rc5ofb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rc5/rc5ofb64.c | ||
| 860 | |||
| 861 | $(OBJ_D)/i_cbc.o: $(SRC_D)/crypto/idea/i_cbc.c | ||
| 862 | $(CC) -o $(OBJ_D)/i_cbc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/idea/i_cbc.c | ||
| 863 | |||
| 864 | $(OBJ_D)/i_cfb64.o: $(SRC_D)/crypto/idea/i_cfb64.c | ||
| 865 | $(CC) -o $(OBJ_D)/i_cfb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/idea/i_cfb64.c | ||
| 866 | |||
| 867 | $(OBJ_D)/i_ofb64.o: $(SRC_D)/crypto/idea/i_ofb64.c | ||
| 868 | $(CC) -o $(OBJ_D)/i_ofb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/idea/i_ofb64.c | ||
| 869 | |||
| 870 | $(OBJ_D)/i_ecb.o: $(SRC_D)/crypto/idea/i_ecb.c | ||
| 871 | $(CC) -o $(OBJ_D)/i_ecb.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/idea/i_ecb.c | ||
| 872 | |||
| 873 | $(OBJ_D)/i_skey.o: $(SRC_D)/crypto/idea/i_skey.c | ||
| 874 | $(CC) -o $(OBJ_D)/i_skey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/idea/i_skey.c | ||
| 875 | |||
| 876 | $(OBJ_D)/bf_skey.o: $(SRC_D)/crypto/bf/bf_skey.c | ||
| 877 | $(CC) -o $(OBJ_D)/bf_skey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bf/bf_skey.c | ||
| 878 | |||
| 879 | $(OBJ_D)/bf_ecb.o: $(SRC_D)/crypto/bf/bf_ecb.c | ||
| 880 | $(CC) -o $(OBJ_D)/bf_ecb.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bf/bf_ecb.c | ||
| 881 | |||
| 882 | $(OBJ_D)/bf_enc.o: $(SRC_D)/crypto/bf/bf_enc.c | ||
| 883 | $(CC) -o $(OBJ_D)/bf_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bf/bf_enc.c | ||
| 884 | |||
| 885 | $(OBJ_D)/bf_cfb64.o: $(SRC_D)/crypto/bf/bf_cfb64.c | ||
| 886 | $(CC) -o $(OBJ_D)/bf_cfb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bf/bf_cfb64.c | ||
| 887 | |||
| 888 | $(OBJ_D)/bf_ofb64.o: $(SRC_D)/crypto/bf/bf_ofb64.c | ||
| 889 | $(CC) -o $(OBJ_D)/bf_ofb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bf/bf_ofb64.c | ||
| 890 | |||
| 891 | $(OBJ_D)/c_skey.o: $(SRC_D)/crypto/cast/c_skey.c | ||
| 892 | $(CC) -o $(OBJ_D)/c_skey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/cast/c_skey.c | ||
| 893 | |||
| 894 | $(OBJ_D)/c_ecb.o: $(SRC_D)/crypto/cast/c_ecb.c | ||
| 895 | $(CC) -o $(OBJ_D)/c_ecb.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/cast/c_ecb.c | ||
| 896 | |||
| 897 | $(OBJ_D)/c_enc.o: $(SRC_D)/crypto/cast/c_enc.c | ||
| 898 | $(CC) -o $(OBJ_D)/c_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/cast/c_enc.c | ||
| 899 | |||
| 900 | $(OBJ_D)/c_cfb64.o: $(SRC_D)/crypto/cast/c_cfb64.c | ||
| 901 | $(CC) -o $(OBJ_D)/c_cfb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/cast/c_cfb64.c | ||
| 902 | |||
| 903 | $(OBJ_D)/c_ofb64.o: $(SRC_D)/crypto/cast/c_ofb64.c | ||
| 904 | $(CC) -o $(OBJ_D)/c_ofb64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/cast/c_ofb64.c | ||
| 905 | |||
| 906 | $(OBJ_D)/bn_add.o: $(SRC_D)/crypto/bn/bn_add.c | ||
| 907 | $(CC) -o $(OBJ_D)/bn_add.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_add.c | ||
| 908 | |||
| 909 | $(OBJ_D)/bn_div.o: $(SRC_D)/crypto/bn/bn_div.c | ||
| 910 | $(CC) -o $(OBJ_D)/bn_div.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_div.c | ||
| 911 | |||
| 912 | $(OBJ_D)/bn_exp.o: $(SRC_D)/crypto/bn/bn_exp.c | ||
| 913 | $(CC) -o $(OBJ_D)/bn_exp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_exp.c | ||
| 914 | |||
| 915 | $(OBJ_D)/bn_lib.o: $(SRC_D)/crypto/bn/bn_lib.c | ||
| 916 | $(CC) -o $(OBJ_D)/bn_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_lib.c | ||
| 917 | |||
| 918 | $(OBJ_D)/bn_mod.o: $(SRC_D)/crypto/bn/bn_mod.c | ||
| 919 | $(CC) -o $(OBJ_D)/bn_mod.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_mod.c | ||
| 920 | |||
| 921 | $(OBJ_D)/bn_mul.o: $(SRC_D)/crypto/bn/bn_mul.c | ||
| 922 | $(CC) -o $(OBJ_D)/bn_mul.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_mul.c | ||
| 923 | |||
| 924 | $(OBJ_D)/bn_print.o: $(SRC_D)/crypto/bn/bn_print.c | ||
| 925 | $(CC) -o $(OBJ_D)/bn_print.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_print.c | ||
| 926 | |||
| 927 | $(OBJ_D)/bn_rand.o: $(SRC_D)/crypto/bn/bn_rand.c | ||
| 928 | $(CC) -o $(OBJ_D)/bn_rand.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_rand.c | ||
| 929 | |||
| 930 | $(OBJ_D)/bn_shift.o: $(SRC_D)/crypto/bn/bn_shift.c | ||
| 931 | $(CC) -o $(OBJ_D)/bn_shift.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_shift.c | ||
| 932 | |||
| 933 | $(OBJ_D)/bn_sub.o: $(SRC_D)/crypto/bn/bn_sub.c | ||
| 934 | $(CC) -o $(OBJ_D)/bn_sub.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_sub.c | ||
| 935 | |||
| 936 | $(OBJ_D)/bn_word.o: $(SRC_D)/crypto/bn/bn_word.c | ||
| 937 | $(CC) -o $(OBJ_D)/bn_word.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_word.c | ||
| 938 | |||
| 939 | $(OBJ_D)/bn_blind.o: $(SRC_D)/crypto/bn/bn_blind.c | ||
| 940 | $(CC) -o $(OBJ_D)/bn_blind.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_blind.c | ||
| 941 | |||
| 942 | $(OBJ_D)/bn_gcd.o: $(SRC_D)/crypto/bn/bn_gcd.c | ||
| 943 | $(CC) -o $(OBJ_D)/bn_gcd.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_gcd.c | ||
| 944 | |||
| 945 | $(OBJ_D)/bn_prime.o: $(SRC_D)/crypto/bn/bn_prime.c | ||
| 946 | $(CC) -o $(OBJ_D)/bn_prime.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_prime.c | ||
| 947 | |||
| 948 | $(OBJ_D)/bn_err.o: $(SRC_D)/crypto/bn/bn_err.c | ||
| 949 | $(CC) -o $(OBJ_D)/bn_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_err.c | ||
| 950 | |||
| 951 | $(OBJ_D)/bn_sqr.o: $(SRC_D)/crypto/bn/bn_sqr.c | ||
| 952 | $(CC) -o $(OBJ_D)/bn_sqr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_sqr.c | ||
| 953 | |||
| 954 | $(OBJ_D)/bn_mulw.o: $(SRC_D)/crypto/bn/bn_mulw.c | ||
| 955 | $(CC) -o $(OBJ_D)/bn_mulw.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_mulw.c | ||
| 956 | |||
| 957 | $(OBJ_D)/bn_recp.o: $(SRC_D)/crypto/bn/bn_recp.c | ||
| 958 | $(CC) -o $(OBJ_D)/bn_recp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_recp.c | ||
| 959 | |||
| 960 | $(OBJ_D)/bn_mont.o: $(SRC_D)/crypto/bn/bn_mont.c | ||
| 961 | $(CC) -o $(OBJ_D)/bn_mont.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_mont.c | ||
| 962 | |||
| 963 | $(OBJ_D)/bn_mpi.o: $(SRC_D)/crypto/bn/bn_mpi.c | ||
| 964 | $(CC) -o $(OBJ_D)/bn_mpi.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bn/bn_mpi.c | ||
| 965 | |||
| 966 | $(OBJ_D)/rsa_eay.o: $(SRC_D)/crypto/rsa/rsa_eay.c | ||
| 967 | $(CC) -o $(OBJ_D)/rsa_eay.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_eay.c | ||
| 968 | |||
| 969 | $(OBJ_D)/rsa_gen.o: $(SRC_D)/crypto/rsa/rsa_gen.c | ||
| 970 | $(CC) -o $(OBJ_D)/rsa_gen.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_gen.c | ||
| 971 | |||
| 972 | $(OBJ_D)/rsa_lib.o: $(SRC_D)/crypto/rsa/rsa_lib.c | ||
| 973 | $(CC) -o $(OBJ_D)/rsa_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_lib.c | ||
| 974 | |||
| 975 | $(OBJ_D)/rsa_sign.o: $(SRC_D)/crypto/rsa/rsa_sign.c | ||
| 976 | $(CC) -o $(OBJ_D)/rsa_sign.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_sign.c | ||
| 977 | |||
| 978 | $(OBJ_D)/rsa_saos.o: $(SRC_D)/crypto/rsa/rsa_saos.c | ||
| 979 | $(CC) -o $(OBJ_D)/rsa_saos.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_saos.c | ||
| 980 | |||
| 981 | $(OBJ_D)/rsa_err.o: $(SRC_D)/crypto/rsa/rsa_err.c | ||
| 982 | $(CC) -o $(OBJ_D)/rsa_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_err.c | ||
| 983 | |||
| 984 | $(OBJ_D)/rsa_pk1.o: $(SRC_D)/crypto/rsa/rsa_pk1.c | ||
| 985 | $(CC) -o $(OBJ_D)/rsa_pk1.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_pk1.c | ||
| 986 | |||
| 987 | $(OBJ_D)/rsa_ssl.o: $(SRC_D)/crypto/rsa/rsa_ssl.c | ||
| 988 | $(CC) -o $(OBJ_D)/rsa_ssl.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_ssl.c | ||
| 989 | |||
| 990 | $(OBJ_D)/rsa_none.o: $(SRC_D)/crypto/rsa/rsa_none.c | ||
| 991 | $(CC) -o $(OBJ_D)/rsa_none.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rsa/rsa_none.c | ||
| 992 | |||
| 993 | $(OBJ_D)/dsa_gen.o: $(SRC_D)/crypto/dsa/dsa_gen.c | ||
| 994 | $(CC) -o $(OBJ_D)/dsa_gen.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dsa/dsa_gen.c | ||
| 995 | |||
| 996 | $(OBJ_D)/dsa_key.o: $(SRC_D)/crypto/dsa/dsa_key.c | ||
| 997 | $(CC) -o $(OBJ_D)/dsa_key.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dsa/dsa_key.c | ||
| 998 | |||
| 999 | $(OBJ_D)/dsa_lib.o: $(SRC_D)/crypto/dsa/dsa_lib.c | ||
| 1000 | $(CC) -o $(OBJ_D)/dsa_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dsa/dsa_lib.c | ||
| 1001 | |||
| 1002 | $(OBJ_D)/dsa_vrf.o: $(SRC_D)/crypto/dsa/dsa_vrf.c | ||
| 1003 | $(CC) -o $(OBJ_D)/dsa_vrf.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dsa/dsa_vrf.c | ||
| 1004 | |||
| 1005 | $(OBJ_D)/dsa_sign.o: $(SRC_D)/crypto/dsa/dsa_sign.c | ||
| 1006 | $(CC) -o $(OBJ_D)/dsa_sign.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dsa/dsa_sign.c | ||
| 1007 | |||
| 1008 | $(OBJ_D)/dsa_err.o: $(SRC_D)/crypto/dsa/dsa_err.c | ||
| 1009 | $(CC) -o $(OBJ_D)/dsa_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dsa/dsa_err.c | ||
| 1010 | |||
| 1011 | $(OBJ_D)/dh_gen.o: $(SRC_D)/crypto/dh/dh_gen.c | ||
| 1012 | $(CC) -o $(OBJ_D)/dh_gen.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dh/dh_gen.c | ||
| 1013 | |||
| 1014 | $(OBJ_D)/dh_key.o: $(SRC_D)/crypto/dh/dh_key.c | ||
| 1015 | $(CC) -o $(OBJ_D)/dh_key.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dh/dh_key.c | ||
| 1016 | |||
| 1017 | $(OBJ_D)/dh_lib.o: $(SRC_D)/crypto/dh/dh_lib.c | ||
| 1018 | $(CC) -o $(OBJ_D)/dh_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dh/dh_lib.c | ||
| 1019 | |||
| 1020 | $(OBJ_D)/dh_check.o: $(SRC_D)/crypto/dh/dh_check.c | ||
| 1021 | $(CC) -o $(OBJ_D)/dh_check.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dh/dh_check.c | ||
| 1022 | |||
| 1023 | $(OBJ_D)/dh_err.o: $(SRC_D)/crypto/dh/dh_err.c | ||
| 1024 | $(CC) -o $(OBJ_D)/dh_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/dh/dh_err.c | ||
| 1025 | |||
| 1026 | $(OBJ_D)/buffer.o: $(SRC_D)/crypto/buffer/buffer.c | ||
| 1027 | $(CC) -o $(OBJ_D)/buffer.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/buffer/buffer.c | ||
| 1028 | |||
| 1029 | $(OBJ_D)/buf_err.o: $(SRC_D)/crypto/buffer/buf_err.c | ||
| 1030 | $(CC) -o $(OBJ_D)/buf_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/buffer/buf_err.c | ||
| 1031 | |||
| 1032 | $(OBJ_D)/bio_lib.o: $(SRC_D)/crypto/bio/bio_lib.c | ||
| 1033 | $(CC) -o $(OBJ_D)/bio_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bio_lib.c | ||
| 1034 | |||
| 1035 | $(OBJ_D)/bio_cb.o: $(SRC_D)/crypto/bio/bio_cb.c | ||
| 1036 | $(CC) -o $(OBJ_D)/bio_cb.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bio_cb.c | ||
| 1037 | |||
| 1038 | $(OBJ_D)/bio_err.o: $(SRC_D)/crypto/bio/bio_err.c | ||
| 1039 | $(CC) -o $(OBJ_D)/bio_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bio_err.c | ||
| 1040 | |||
| 1041 | $(OBJ_D)/bss_mem.o: $(SRC_D)/crypto/bio/bss_mem.c | ||
| 1042 | $(CC) -o $(OBJ_D)/bss_mem.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bss_mem.c | ||
| 1043 | |||
| 1044 | $(OBJ_D)/bss_null.o: $(SRC_D)/crypto/bio/bss_null.c | ||
| 1045 | $(CC) -o $(OBJ_D)/bss_null.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bss_null.c | ||
| 1046 | |||
| 1047 | $(OBJ_D)/bss_fd.o: $(SRC_D)/crypto/bio/bss_fd.c | ||
| 1048 | $(CC) -o $(OBJ_D)/bss_fd.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bss_fd.c | ||
| 1049 | |||
| 1050 | $(OBJ_D)/bss_file.o: $(SRC_D)/crypto/bio/bss_file.c | ||
| 1051 | $(CC) -o $(OBJ_D)/bss_file.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bss_file.c | ||
| 1052 | |||
| 1053 | $(OBJ_D)/bss_sock.o: $(SRC_D)/crypto/bio/bss_sock.c | ||
| 1054 | $(CC) -o $(OBJ_D)/bss_sock.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bss_sock.c | ||
| 1055 | |||
| 1056 | $(OBJ_D)/bss_conn.o: $(SRC_D)/crypto/bio/bss_conn.c | ||
| 1057 | $(CC) -o $(OBJ_D)/bss_conn.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bss_conn.c | ||
| 1058 | |||
| 1059 | $(OBJ_D)/bf_null.o: $(SRC_D)/crypto/bio/bf_null.c | ||
| 1060 | $(CC) -o $(OBJ_D)/bf_null.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bf_null.c | ||
| 1061 | |||
| 1062 | $(OBJ_D)/bf_buff.o: $(SRC_D)/crypto/bio/bf_buff.c | ||
| 1063 | $(CC) -o $(OBJ_D)/bf_buff.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bf_buff.c | ||
| 1064 | |||
| 1065 | $(OBJ_D)/b_print.o: $(SRC_D)/crypto/bio/b_print.c | ||
| 1066 | $(CC) -o $(OBJ_D)/b_print.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/b_print.c | ||
| 1067 | |||
| 1068 | $(OBJ_D)/b_dump.o: $(SRC_D)/crypto/bio/b_dump.c | ||
| 1069 | $(CC) -o $(OBJ_D)/b_dump.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/b_dump.c | ||
| 1070 | |||
| 1071 | $(OBJ_D)/b_sock.o: $(SRC_D)/crypto/bio/b_sock.c | ||
| 1072 | $(CC) -o $(OBJ_D)/b_sock.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/b_sock.c | ||
| 1073 | |||
| 1074 | $(OBJ_D)/bss_acpt.o: $(SRC_D)/crypto/bio/bss_acpt.c | ||
| 1075 | $(CC) -o $(OBJ_D)/bss_acpt.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bss_acpt.c | ||
| 1076 | |||
| 1077 | $(OBJ_D)/bf_nbio.o: $(SRC_D)/crypto/bio/bf_nbio.c | ||
| 1078 | $(CC) -o $(OBJ_D)/bf_nbio.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/bio/bf_nbio.c | ||
| 1079 | |||
| 1080 | $(OBJ_D)/stack.o: $(SRC_D)/crypto/stack/stack.c | ||
| 1081 | $(CC) -o $(OBJ_D)/stack.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/stack/stack.c | ||
| 1082 | |||
| 1083 | $(OBJ_D)/lhash.o: $(SRC_D)/crypto/lhash/lhash.c | ||
| 1084 | $(CC) -o $(OBJ_D)/lhash.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/lhash/lhash.c | ||
| 1085 | |||
| 1086 | $(OBJ_D)/lh_stats.o: $(SRC_D)/crypto/lhash/lh_stats.c | ||
| 1087 | $(CC) -o $(OBJ_D)/lh_stats.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/lhash/lh_stats.c | ||
| 1088 | |||
| 1089 | $(OBJ_D)/md_rand.o: $(SRC_D)/crypto/rand/md_rand.c | ||
| 1090 | $(CC) -o $(OBJ_D)/md_rand.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rand/md_rand.c | ||
| 1091 | |||
| 1092 | $(OBJ_D)/randfile.o: $(SRC_D)/crypto/rand/randfile.c | ||
| 1093 | $(CC) -o $(OBJ_D)/randfile.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/rand/randfile.c | ||
| 1094 | |||
| 1095 | $(OBJ_D)/err.o: $(SRC_D)/crypto/err/err.c | ||
| 1096 | $(CC) -o $(OBJ_D)/err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/err/err.c | ||
| 1097 | |||
| 1098 | $(OBJ_D)/err_all.o: $(SRC_D)/crypto/err/err_all.c | ||
| 1099 | $(CC) -o $(OBJ_D)/err_all.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/err/err_all.c | ||
| 1100 | |||
| 1101 | $(OBJ_D)/err_prn.o: $(SRC_D)/crypto/err/err_prn.c | ||
| 1102 | $(CC) -o $(OBJ_D)/err_prn.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/err/err_prn.c | ||
| 1103 | |||
| 1104 | $(OBJ_D)/obj_dat.o: $(SRC_D)/crypto/objects/obj_dat.c | ||
| 1105 | $(CC) -o $(OBJ_D)/obj_dat.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/objects/obj_dat.c | ||
| 1106 | |||
| 1107 | $(OBJ_D)/obj_lib.o: $(SRC_D)/crypto/objects/obj_lib.c | ||
| 1108 | $(CC) -o $(OBJ_D)/obj_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/objects/obj_lib.c | ||
| 1109 | |||
| 1110 | $(OBJ_D)/obj_err.o: $(SRC_D)/crypto/objects/obj_err.c | ||
| 1111 | $(CC) -o $(OBJ_D)/obj_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/objects/obj_err.c | ||
| 1112 | |||
| 1113 | $(OBJ_D)/encode.o: $(SRC_D)/crypto/evp/encode.c | ||
| 1114 | $(CC) -o $(OBJ_D)/encode.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/encode.c | ||
| 1115 | |||
| 1116 | $(OBJ_D)/digest.o: $(SRC_D)/crypto/evp/digest.c | ||
| 1117 | $(CC) -o $(OBJ_D)/digest.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/digest.c | ||
| 1118 | |||
| 1119 | $(OBJ_D)/evp_enc.o: $(SRC_D)/crypto/evp/evp_enc.c | ||
| 1120 | $(CC) -o $(OBJ_D)/evp_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/evp_enc.c | ||
| 1121 | |||
| 1122 | $(OBJ_D)/evp_key.o: $(SRC_D)/crypto/evp/evp_key.c | ||
| 1123 | $(CC) -o $(OBJ_D)/evp_key.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/evp_key.c | ||
| 1124 | |||
| 1125 | $(OBJ_D)/e_ecb_d.o: $(SRC_D)/crypto/evp/e_ecb_d.c | ||
| 1126 | $(CC) -o $(OBJ_D)/e_ecb_d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ecb_d.c | ||
| 1127 | |||
| 1128 | $(OBJ_D)/e_cbc_d.o: $(SRC_D)/crypto/evp/e_cbc_d.c | ||
| 1129 | $(CC) -o $(OBJ_D)/e_cbc_d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cbc_d.c | ||
| 1130 | |||
| 1131 | $(OBJ_D)/e_cfb_d.o: $(SRC_D)/crypto/evp/e_cfb_d.c | ||
| 1132 | $(CC) -o $(OBJ_D)/e_cfb_d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cfb_d.c | ||
| 1133 | |||
| 1134 | $(OBJ_D)/e_ofb_d.o: $(SRC_D)/crypto/evp/e_ofb_d.c | ||
| 1135 | $(CC) -o $(OBJ_D)/e_ofb_d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ofb_d.c | ||
| 1136 | |||
| 1137 | $(OBJ_D)/e_ecb_i.o: $(SRC_D)/crypto/evp/e_ecb_i.c | ||
| 1138 | $(CC) -o $(OBJ_D)/e_ecb_i.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ecb_i.c | ||
| 1139 | |||
| 1140 | $(OBJ_D)/e_cbc_i.o: $(SRC_D)/crypto/evp/e_cbc_i.c | ||
| 1141 | $(CC) -o $(OBJ_D)/e_cbc_i.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cbc_i.c | ||
| 1142 | |||
| 1143 | $(OBJ_D)/e_cfb_i.o: $(SRC_D)/crypto/evp/e_cfb_i.c | ||
| 1144 | $(CC) -o $(OBJ_D)/e_cfb_i.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cfb_i.c | ||
| 1145 | |||
| 1146 | $(OBJ_D)/e_ofb_i.o: $(SRC_D)/crypto/evp/e_ofb_i.c | ||
| 1147 | $(CC) -o $(OBJ_D)/e_ofb_i.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ofb_i.c | ||
| 1148 | |||
| 1149 | $(OBJ_D)/e_ecb_3d.o: $(SRC_D)/crypto/evp/e_ecb_3d.c | ||
| 1150 | $(CC) -o $(OBJ_D)/e_ecb_3d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ecb_3d.c | ||
| 1151 | |||
| 1152 | $(OBJ_D)/e_cbc_3d.o: $(SRC_D)/crypto/evp/e_cbc_3d.c | ||
| 1153 | $(CC) -o $(OBJ_D)/e_cbc_3d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cbc_3d.c | ||
| 1154 | |||
| 1155 | $(OBJ_D)/e_rc4.o: $(SRC_D)/crypto/evp/e_rc4.c | ||
| 1156 | $(CC) -o $(OBJ_D)/e_rc4.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_rc4.c | ||
| 1157 | |||
| 1158 | $(OBJ_D)/names.o: $(SRC_D)/crypto/evp/names.c | ||
| 1159 | $(CC) -o $(OBJ_D)/names.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/names.c | ||
| 1160 | |||
| 1161 | $(OBJ_D)/e_cfb_3d.o: $(SRC_D)/crypto/evp/e_cfb_3d.c | ||
| 1162 | $(CC) -o $(OBJ_D)/e_cfb_3d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cfb_3d.c | ||
| 1163 | |||
| 1164 | $(OBJ_D)/e_ofb_3d.o: $(SRC_D)/crypto/evp/e_ofb_3d.c | ||
| 1165 | $(CC) -o $(OBJ_D)/e_ofb_3d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ofb_3d.c | ||
| 1166 | |||
| 1167 | $(OBJ_D)/e_xcbc_d.o: $(SRC_D)/crypto/evp/e_xcbc_d.c | ||
| 1168 | $(CC) -o $(OBJ_D)/e_xcbc_d.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_xcbc_d.c | ||
| 1169 | |||
| 1170 | $(OBJ_D)/e_ecb_r2.o: $(SRC_D)/crypto/evp/e_ecb_r2.c | ||
| 1171 | $(CC) -o $(OBJ_D)/e_ecb_r2.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ecb_r2.c | ||
| 1172 | |||
| 1173 | $(OBJ_D)/e_cbc_r2.o: $(SRC_D)/crypto/evp/e_cbc_r2.c | ||
| 1174 | $(CC) -o $(OBJ_D)/e_cbc_r2.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cbc_r2.c | ||
| 1175 | |||
| 1176 | $(OBJ_D)/e_cfb_r2.o: $(SRC_D)/crypto/evp/e_cfb_r2.c | ||
| 1177 | $(CC) -o $(OBJ_D)/e_cfb_r2.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cfb_r2.c | ||
| 1178 | |||
| 1179 | $(OBJ_D)/e_ofb_r2.o: $(SRC_D)/crypto/evp/e_ofb_r2.c | ||
| 1180 | $(CC) -o $(OBJ_D)/e_ofb_r2.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ofb_r2.c | ||
| 1181 | |||
| 1182 | $(OBJ_D)/e_ecb_bf.o: $(SRC_D)/crypto/evp/e_ecb_bf.c | ||
| 1183 | $(CC) -o $(OBJ_D)/e_ecb_bf.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ecb_bf.c | ||
| 1184 | |||
| 1185 | $(OBJ_D)/e_cbc_bf.o: $(SRC_D)/crypto/evp/e_cbc_bf.c | ||
| 1186 | $(CC) -o $(OBJ_D)/e_cbc_bf.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cbc_bf.c | ||
| 1187 | |||
| 1188 | $(OBJ_D)/e_cfb_bf.o: $(SRC_D)/crypto/evp/e_cfb_bf.c | ||
| 1189 | $(CC) -o $(OBJ_D)/e_cfb_bf.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cfb_bf.c | ||
| 1190 | |||
| 1191 | $(OBJ_D)/e_ofb_bf.o: $(SRC_D)/crypto/evp/e_ofb_bf.c | ||
| 1192 | $(CC) -o $(OBJ_D)/e_ofb_bf.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ofb_bf.c | ||
| 1193 | |||
| 1194 | $(OBJ_D)/e_ecb_c.o: $(SRC_D)/crypto/evp/e_ecb_c.c | ||
| 1195 | $(CC) -o $(OBJ_D)/e_ecb_c.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ecb_c.c | ||
| 1196 | |||
| 1197 | $(OBJ_D)/e_cbc_c.o: $(SRC_D)/crypto/evp/e_cbc_c.c | ||
| 1198 | $(CC) -o $(OBJ_D)/e_cbc_c.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cbc_c.c | ||
| 1199 | |||
| 1200 | $(OBJ_D)/e_cfb_c.o: $(SRC_D)/crypto/evp/e_cfb_c.c | ||
| 1201 | $(CC) -o $(OBJ_D)/e_cfb_c.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cfb_c.c | ||
| 1202 | |||
| 1203 | $(OBJ_D)/e_ofb_c.o: $(SRC_D)/crypto/evp/e_ofb_c.c | ||
| 1204 | $(CC) -o $(OBJ_D)/e_ofb_c.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ofb_c.c | ||
| 1205 | |||
| 1206 | $(OBJ_D)/e_ecb_r5.o: $(SRC_D)/crypto/evp/e_ecb_r5.c | ||
| 1207 | $(CC) -o $(OBJ_D)/e_ecb_r5.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ecb_r5.c | ||
| 1208 | |||
| 1209 | $(OBJ_D)/e_cbc_r5.o: $(SRC_D)/crypto/evp/e_cbc_r5.c | ||
| 1210 | $(CC) -o $(OBJ_D)/e_cbc_r5.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cbc_r5.c | ||
| 1211 | |||
| 1212 | $(OBJ_D)/e_cfb_r5.o: $(SRC_D)/crypto/evp/e_cfb_r5.c | ||
| 1213 | $(CC) -o $(OBJ_D)/e_cfb_r5.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_cfb_r5.c | ||
| 1214 | |||
| 1215 | $(OBJ_D)/e_ofb_r5.o: $(SRC_D)/crypto/evp/e_ofb_r5.c | ||
| 1216 | $(CC) -o $(OBJ_D)/e_ofb_r5.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_ofb_r5.c | ||
| 1217 | |||
| 1218 | $(OBJ_D)/m_null.o: $(SRC_D)/crypto/evp/m_null.c | ||
| 1219 | $(CC) -o $(OBJ_D)/m_null.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_null.c | ||
| 1220 | |||
| 1221 | $(OBJ_D)/m_md2.o: $(SRC_D)/crypto/evp/m_md2.c | ||
| 1222 | $(CC) -o $(OBJ_D)/m_md2.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_md2.c | ||
| 1223 | |||
| 1224 | $(OBJ_D)/m_md5.o: $(SRC_D)/crypto/evp/m_md5.c | ||
| 1225 | $(CC) -o $(OBJ_D)/m_md5.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_md5.c | ||
| 1226 | |||
| 1227 | $(OBJ_D)/m_sha.o: $(SRC_D)/crypto/evp/m_sha.c | ||
| 1228 | $(CC) -o $(OBJ_D)/m_sha.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_sha.c | ||
| 1229 | |||
| 1230 | $(OBJ_D)/m_sha1.o: $(SRC_D)/crypto/evp/m_sha1.c | ||
| 1231 | $(CC) -o $(OBJ_D)/m_sha1.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_sha1.c | ||
| 1232 | |||
| 1233 | $(OBJ_D)/m_dss.o: $(SRC_D)/crypto/evp/m_dss.c | ||
| 1234 | $(CC) -o $(OBJ_D)/m_dss.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_dss.c | ||
| 1235 | |||
| 1236 | $(OBJ_D)/m_dss1.o: $(SRC_D)/crypto/evp/m_dss1.c | ||
| 1237 | $(CC) -o $(OBJ_D)/m_dss1.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_dss1.c | ||
| 1238 | |||
| 1239 | $(OBJ_D)/m_mdc2.o: $(SRC_D)/crypto/evp/m_mdc2.c | ||
| 1240 | $(CC) -o $(OBJ_D)/m_mdc2.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_mdc2.c | ||
| 1241 | |||
| 1242 | $(OBJ_D)/m_ripemd.o: $(SRC_D)/crypto/evp/m_ripemd.c | ||
| 1243 | $(CC) -o $(OBJ_D)/m_ripemd.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/m_ripemd.c | ||
| 1244 | |||
| 1245 | $(OBJ_D)/p_open.o: $(SRC_D)/crypto/evp/p_open.c | ||
| 1246 | $(CC) -o $(OBJ_D)/p_open.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/p_open.c | ||
| 1247 | |||
| 1248 | $(OBJ_D)/p_seal.o: $(SRC_D)/crypto/evp/p_seal.c | ||
| 1249 | $(CC) -o $(OBJ_D)/p_seal.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/p_seal.c | ||
| 1250 | |||
| 1251 | $(OBJ_D)/p_sign.o: $(SRC_D)/crypto/evp/p_sign.c | ||
| 1252 | $(CC) -o $(OBJ_D)/p_sign.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/p_sign.c | ||
| 1253 | |||
| 1254 | $(OBJ_D)/p_verify.o: $(SRC_D)/crypto/evp/p_verify.c | ||
| 1255 | $(CC) -o $(OBJ_D)/p_verify.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/p_verify.c | ||
| 1256 | |||
| 1257 | $(OBJ_D)/p_lib.o: $(SRC_D)/crypto/evp/p_lib.c | ||
| 1258 | $(CC) -o $(OBJ_D)/p_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/p_lib.c | ||
| 1259 | |||
| 1260 | $(OBJ_D)/p_enc.o: $(SRC_D)/crypto/evp/p_enc.c | ||
| 1261 | $(CC) -o $(OBJ_D)/p_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/p_enc.c | ||
| 1262 | |||
| 1263 | $(OBJ_D)/p_dec.o: $(SRC_D)/crypto/evp/p_dec.c | ||
| 1264 | $(CC) -o $(OBJ_D)/p_dec.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/p_dec.c | ||
| 1265 | |||
| 1266 | $(OBJ_D)/bio_md.o: $(SRC_D)/crypto/evp/bio_md.c | ||
| 1267 | $(CC) -o $(OBJ_D)/bio_md.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/bio_md.c | ||
| 1268 | |||
| 1269 | $(OBJ_D)/bio_b64.o: $(SRC_D)/crypto/evp/bio_b64.c | ||
| 1270 | $(CC) -o $(OBJ_D)/bio_b64.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/bio_b64.c | ||
| 1271 | |||
| 1272 | $(OBJ_D)/bio_enc.o: $(SRC_D)/crypto/evp/bio_enc.c | ||
| 1273 | $(CC) -o $(OBJ_D)/bio_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/bio_enc.c | ||
| 1274 | |||
| 1275 | $(OBJ_D)/evp_err.o: $(SRC_D)/crypto/evp/evp_err.c | ||
| 1276 | $(CC) -o $(OBJ_D)/evp_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/evp_err.c | ||
| 1277 | |||
| 1278 | $(OBJ_D)/e_null.o: $(SRC_D)/crypto/evp/e_null.c | ||
| 1279 | $(CC) -o $(OBJ_D)/e_null.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/e_null.c | ||
| 1280 | |||
| 1281 | $(OBJ_D)/c_all.o: $(SRC_D)/crypto/evp/c_all.c | ||
| 1282 | $(CC) -o $(OBJ_D)/c_all.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/c_all.c | ||
| 1283 | |||
| 1284 | $(OBJ_D)/evp_lib.o: $(SRC_D)/crypto/evp/evp_lib.c | ||
| 1285 | $(CC) -o $(OBJ_D)/evp_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/evp/evp_lib.c | ||
| 1286 | |||
| 1287 | $(OBJ_D)/pem_sign.o: $(SRC_D)/crypto/pem/pem_sign.c | ||
| 1288 | $(CC) -o $(OBJ_D)/pem_sign.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pem/pem_sign.c | ||
| 1289 | |||
| 1290 | $(OBJ_D)/pem_seal.o: $(SRC_D)/crypto/pem/pem_seal.c | ||
| 1291 | $(CC) -o $(OBJ_D)/pem_seal.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pem/pem_seal.c | ||
| 1292 | |||
| 1293 | $(OBJ_D)/pem_info.o: $(SRC_D)/crypto/pem/pem_info.c | ||
| 1294 | $(CC) -o $(OBJ_D)/pem_info.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pem/pem_info.c | ||
| 1295 | |||
| 1296 | $(OBJ_D)/pem_lib.o: $(SRC_D)/crypto/pem/pem_lib.c | ||
| 1297 | $(CC) -o $(OBJ_D)/pem_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pem/pem_lib.c | ||
| 1298 | |||
| 1299 | $(OBJ_D)/pem_all.o: $(SRC_D)/crypto/pem/pem_all.c | ||
| 1300 | $(CC) -o $(OBJ_D)/pem_all.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pem/pem_all.c | ||
| 1301 | |||
| 1302 | $(OBJ_D)/pem_err.o: $(SRC_D)/crypto/pem/pem_err.c | ||
| 1303 | $(CC) -o $(OBJ_D)/pem_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pem/pem_err.c | ||
| 1304 | |||
| 1305 | $(OBJ_D)/a_object.o: $(SRC_D)/crypto/asn1/a_object.c | ||
| 1306 | $(CC) -o $(OBJ_D)/a_object.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_object.c | ||
| 1307 | |||
| 1308 | $(OBJ_D)/a_bitstr.o: $(SRC_D)/crypto/asn1/a_bitstr.c | ||
| 1309 | $(CC) -o $(OBJ_D)/a_bitstr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_bitstr.c | ||
| 1310 | |||
| 1311 | $(OBJ_D)/a_utctm.o: $(SRC_D)/crypto/asn1/a_utctm.c | ||
| 1312 | $(CC) -o $(OBJ_D)/a_utctm.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_utctm.c | ||
| 1313 | |||
| 1314 | $(OBJ_D)/a_int.o: $(SRC_D)/crypto/asn1/a_int.c | ||
| 1315 | $(CC) -o $(OBJ_D)/a_int.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_int.c | ||
| 1316 | |||
| 1317 | $(OBJ_D)/a_octet.o: $(SRC_D)/crypto/asn1/a_octet.c | ||
| 1318 | $(CC) -o $(OBJ_D)/a_octet.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_octet.c | ||
| 1319 | |||
| 1320 | $(OBJ_D)/a_print.o: $(SRC_D)/crypto/asn1/a_print.c | ||
| 1321 | $(CC) -o $(OBJ_D)/a_print.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_print.c | ||
| 1322 | |||
| 1323 | $(OBJ_D)/a_type.o: $(SRC_D)/crypto/asn1/a_type.c | ||
| 1324 | $(CC) -o $(OBJ_D)/a_type.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_type.c | ||
| 1325 | |||
| 1326 | $(OBJ_D)/a_set.o: $(SRC_D)/crypto/asn1/a_set.c | ||
| 1327 | $(CC) -o $(OBJ_D)/a_set.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_set.c | ||
| 1328 | |||
| 1329 | $(OBJ_D)/a_dup.o: $(SRC_D)/crypto/asn1/a_dup.c | ||
| 1330 | $(CC) -o $(OBJ_D)/a_dup.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_dup.c | ||
| 1331 | |||
| 1332 | $(OBJ_D)/a_d2i_fp.o: $(SRC_D)/crypto/asn1/a_d2i_fp.c | ||
| 1333 | $(CC) -o $(OBJ_D)/a_d2i_fp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_d2i_fp.c | ||
| 1334 | |||
| 1335 | $(OBJ_D)/a_i2d_fp.o: $(SRC_D)/crypto/asn1/a_i2d_fp.c | ||
| 1336 | $(CC) -o $(OBJ_D)/a_i2d_fp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_i2d_fp.c | ||
| 1337 | |||
| 1338 | $(OBJ_D)/a_sign.o: $(SRC_D)/crypto/asn1/a_sign.c | ||
| 1339 | $(CC) -o $(OBJ_D)/a_sign.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_sign.c | ||
| 1340 | |||
| 1341 | $(OBJ_D)/a_digest.o: $(SRC_D)/crypto/asn1/a_digest.c | ||
| 1342 | $(CC) -o $(OBJ_D)/a_digest.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_digest.c | ||
| 1343 | |||
| 1344 | $(OBJ_D)/a_verify.o: $(SRC_D)/crypto/asn1/a_verify.c | ||
| 1345 | $(CC) -o $(OBJ_D)/a_verify.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_verify.c | ||
| 1346 | |||
| 1347 | $(OBJ_D)/x_algor.o: $(SRC_D)/crypto/asn1/x_algor.c | ||
| 1348 | $(CC) -o $(OBJ_D)/x_algor.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_algor.c | ||
| 1349 | |||
| 1350 | $(OBJ_D)/x_val.o: $(SRC_D)/crypto/asn1/x_val.c | ||
| 1351 | $(CC) -o $(OBJ_D)/x_val.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_val.c | ||
| 1352 | |||
| 1353 | $(OBJ_D)/x_pubkey.o: $(SRC_D)/crypto/asn1/x_pubkey.c | ||
| 1354 | $(CC) -o $(OBJ_D)/x_pubkey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_pubkey.c | ||
| 1355 | |||
| 1356 | $(OBJ_D)/x_sig.o: $(SRC_D)/crypto/asn1/x_sig.c | ||
| 1357 | $(CC) -o $(OBJ_D)/x_sig.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_sig.c | ||
| 1358 | |||
| 1359 | $(OBJ_D)/x_req.o: $(SRC_D)/crypto/asn1/x_req.c | ||
| 1360 | $(CC) -o $(OBJ_D)/x_req.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_req.c | ||
| 1361 | |||
| 1362 | $(OBJ_D)/x_attrib.o: $(SRC_D)/crypto/asn1/x_attrib.c | ||
| 1363 | $(CC) -o $(OBJ_D)/x_attrib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_attrib.c | ||
| 1364 | |||
| 1365 | $(OBJ_D)/x_name.o: $(SRC_D)/crypto/asn1/x_name.c | ||
| 1366 | $(CC) -o $(OBJ_D)/x_name.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_name.c | ||
| 1367 | |||
| 1368 | $(OBJ_D)/x_cinf.o: $(SRC_D)/crypto/asn1/x_cinf.c | ||
| 1369 | $(CC) -o $(OBJ_D)/x_cinf.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_cinf.c | ||
| 1370 | |||
| 1371 | $(OBJ_D)/x_x509.o: $(SRC_D)/crypto/asn1/x_x509.c | ||
| 1372 | $(CC) -o $(OBJ_D)/x_x509.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_x509.c | ||
| 1373 | |||
| 1374 | $(OBJ_D)/x_crl.o: $(SRC_D)/crypto/asn1/x_crl.c | ||
| 1375 | $(CC) -o $(OBJ_D)/x_crl.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_crl.c | ||
| 1376 | |||
| 1377 | $(OBJ_D)/x_info.o: $(SRC_D)/crypto/asn1/x_info.c | ||
| 1378 | $(CC) -o $(OBJ_D)/x_info.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_info.c | ||
| 1379 | |||
| 1380 | $(OBJ_D)/x_spki.o: $(SRC_D)/crypto/asn1/x_spki.c | ||
| 1381 | $(CC) -o $(OBJ_D)/x_spki.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_spki.c | ||
| 1382 | |||
| 1383 | $(OBJ_D)/d2i_r_pr.o: $(SRC_D)/crypto/asn1/d2i_r_pr.c | ||
| 1384 | $(CC) -o $(OBJ_D)/d2i_r_pr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/d2i_r_pr.c | ||
| 1385 | |||
| 1386 | $(OBJ_D)/i2d_r_pr.o: $(SRC_D)/crypto/asn1/i2d_r_pr.c | ||
| 1387 | $(CC) -o $(OBJ_D)/i2d_r_pr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/i2d_r_pr.c | ||
| 1388 | |||
| 1389 | $(OBJ_D)/d2i_r_pu.o: $(SRC_D)/crypto/asn1/d2i_r_pu.c | ||
| 1390 | $(CC) -o $(OBJ_D)/d2i_r_pu.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/d2i_r_pu.c | ||
| 1391 | |||
| 1392 | $(OBJ_D)/i2d_r_pu.o: $(SRC_D)/crypto/asn1/i2d_r_pu.c | ||
| 1393 | $(CC) -o $(OBJ_D)/i2d_r_pu.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/i2d_r_pu.c | ||
| 1394 | |||
| 1395 | $(OBJ_D)/d2i_s_pr.o: $(SRC_D)/crypto/asn1/d2i_s_pr.c | ||
| 1396 | $(CC) -o $(OBJ_D)/d2i_s_pr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/d2i_s_pr.c | ||
| 1397 | |||
| 1398 | $(OBJ_D)/i2d_s_pr.o: $(SRC_D)/crypto/asn1/i2d_s_pr.c | ||
| 1399 | $(CC) -o $(OBJ_D)/i2d_s_pr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/i2d_s_pr.c | ||
| 1400 | |||
| 1401 | $(OBJ_D)/d2i_s_pu.o: $(SRC_D)/crypto/asn1/d2i_s_pu.c | ||
| 1402 | $(CC) -o $(OBJ_D)/d2i_s_pu.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/d2i_s_pu.c | ||
| 1403 | |||
| 1404 | $(OBJ_D)/i2d_s_pu.o: $(SRC_D)/crypto/asn1/i2d_s_pu.c | ||
| 1405 | $(CC) -o $(OBJ_D)/i2d_s_pu.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/i2d_s_pu.c | ||
| 1406 | |||
| 1407 | $(OBJ_D)/d2i_pu.o: $(SRC_D)/crypto/asn1/d2i_pu.c | ||
| 1408 | $(CC) -o $(OBJ_D)/d2i_pu.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/d2i_pu.c | ||
| 1409 | |||
| 1410 | $(OBJ_D)/d2i_pr.o: $(SRC_D)/crypto/asn1/d2i_pr.c | ||
| 1411 | $(CC) -o $(OBJ_D)/d2i_pr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/d2i_pr.c | ||
| 1412 | |||
| 1413 | $(OBJ_D)/i2d_pu.o: $(SRC_D)/crypto/asn1/i2d_pu.c | ||
| 1414 | $(CC) -o $(OBJ_D)/i2d_pu.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/i2d_pu.c | ||
| 1415 | |||
| 1416 | $(OBJ_D)/i2d_pr.o: $(SRC_D)/crypto/asn1/i2d_pr.c | ||
| 1417 | $(CC) -o $(OBJ_D)/i2d_pr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/i2d_pr.c | ||
| 1418 | |||
| 1419 | $(OBJ_D)/t_req.o: $(SRC_D)/crypto/asn1/t_req.c | ||
| 1420 | $(CC) -o $(OBJ_D)/t_req.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/t_req.c | ||
| 1421 | |||
| 1422 | $(OBJ_D)/t_x509.o: $(SRC_D)/crypto/asn1/t_x509.c | ||
| 1423 | $(CC) -o $(OBJ_D)/t_x509.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/t_x509.c | ||
| 1424 | |||
| 1425 | $(OBJ_D)/t_pkey.o: $(SRC_D)/crypto/asn1/t_pkey.c | ||
| 1426 | $(CC) -o $(OBJ_D)/t_pkey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/t_pkey.c | ||
| 1427 | |||
| 1428 | $(OBJ_D)/p7_i_s.o: $(SRC_D)/crypto/asn1/p7_i_s.c | ||
| 1429 | $(CC) -o $(OBJ_D)/p7_i_s.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_i_s.c | ||
| 1430 | |||
| 1431 | $(OBJ_D)/p7_signi.o: $(SRC_D)/crypto/asn1/p7_signi.c | ||
| 1432 | $(CC) -o $(OBJ_D)/p7_signi.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_signi.c | ||
| 1433 | |||
| 1434 | $(OBJ_D)/p7_signd.o: $(SRC_D)/crypto/asn1/p7_signd.c | ||
| 1435 | $(CC) -o $(OBJ_D)/p7_signd.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_signd.c | ||
| 1436 | |||
| 1437 | $(OBJ_D)/p7_recip.o: $(SRC_D)/crypto/asn1/p7_recip.c | ||
| 1438 | $(CC) -o $(OBJ_D)/p7_recip.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_recip.c | ||
| 1439 | |||
| 1440 | $(OBJ_D)/p7_enc_c.o: $(SRC_D)/crypto/asn1/p7_enc_c.c | ||
| 1441 | $(CC) -o $(OBJ_D)/p7_enc_c.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_enc_c.c | ||
| 1442 | |||
| 1443 | $(OBJ_D)/p7_evp.o: $(SRC_D)/crypto/asn1/p7_evp.c | ||
| 1444 | $(CC) -o $(OBJ_D)/p7_evp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_evp.c | ||
| 1445 | |||
| 1446 | $(OBJ_D)/p7_dgst.o: $(SRC_D)/crypto/asn1/p7_dgst.c | ||
| 1447 | $(CC) -o $(OBJ_D)/p7_dgst.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_dgst.c | ||
| 1448 | |||
| 1449 | $(OBJ_D)/p7_s_e.o: $(SRC_D)/crypto/asn1/p7_s_e.c | ||
| 1450 | $(CC) -o $(OBJ_D)/p7_s_e.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_s_e.c | ||
| 1451 | |||
| 1452 | $(OBJ_D)/p7_enc.o: $(SRC_D)/crypto/asn1/p7_enc.c | ||
| 1453 | $(CC) -o $(OBJ_D)/p7_enc.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_enc.c | ||
| 1454 | |||
| 1455 | $(OBJ_D)/p7_lib.o: $(SRC_D)/crypto/asn1/p7_lib.c | ||
| 1456 | $(CC) -o $(OBJ_D)/p7_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/p7_lib.c | ||
| 1457 | |||
| 1458 | $(OBJ_D)/f_int.o: $(SRC_D)/crypto/asn1/f_int.c | ||
| 1459 | $(CC) -o $(OBJ_D)/f_int.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/f_int.c | ||
| 1460 | |||
| 1461 | $(OBJ_D)/f_string.o: $(SRC_D)/crypto/asn1/f_string.c | ||
| 1462 | $(CC) -o $(OBJ_D)/f_string.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/f_string.c | ||
| 1463 | |||
| 1464 | $(OBJ_D)/i2d_dhp.o: $(SRC_D)/crypto/asn1/i2d_dhp.c | ||
| 1465 | $(CC) -o $(OBJ_D)/i2d_dhp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/i2d_dhp.c | ||
| 1466 | |||
| 1467 | $(OBJ_D)/i2d_dsap.o: $(SRC_D)/crypto/asn1/i2d_dsap.c | ||
| 1468 | $(CC) -o $(OBJ_D)/i2d_dsap.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/i2d_dsap.c | ||
| 1469 | |||
| 1470 | $(OBJ_D)/d2i_dhp.o: $(SRC_D)/crypto/asn1/d2i_dhp.c | ||
| 1471 | $(CC) -o $(OBJ_D)/d2i_dhp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/d2i_dhp.c | ||
| 1472 | |||
| 1473 | $(OBJ_D)/d2i_dsap.o: $(SRC_D)/crypto/asn1/d2i_dsap.c | ||
| 1474 | $(CC) -o $(OBJ_D)/d2i_dsap.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/d2i_dsap.c | ||
| 1475 | |||
| 1476 | $(OBJ_D)/n_pkey.o: $(SRC_D)/crypto/asn1/n_pkey.c | ||
| 1477 | $(CC) -o $(OBJ_D)/n_pkey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/n_pkey.c | ||
| 1478 | |||
| 1479 | $(OBJ_D)/a_hdr.o: $(SRC_D)/crypto/asn1/a_hdr.c | ||
| 1480 | $(CC) -o $(OBJ_D)/a_hdr.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_hdr.c | ||
| 1481 | |||
| 1482 | $(OBJ_D)/x_pkey.o: $(SRC_D)/crypto/asn1/x_pkey.c | ||
| 1483 | $(CC) -o $(OBJ_D)/x_pkey.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_pkey.c | ||
| 1484 | |||
| 1485 | $(OBJ_D)/a_bool.o: $(SRC_D)/crypto/asn1/a_bool.c | ||
| 1486 | $(CC) -o $(OBJ_D)/a_bool.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_bool.c | ||
| 1487 | |||
| 1488 | $(OBJ_D)/x_exten.o: $(SRC_D)/crypto/asn1/x_exten.c | ||
| 1489 | $(CC) -o $(OBJ_D)/x_exten.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/x_exten.c | ||
| 1490 | |||
| 1491 | $(OBJ_D)/asn1_par.o: $(SRC_D)/crypto/asn1/asn1_par.c | ||
| 1492 | $(CC) -o $(OBJ_D)/asn1_par.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/asn1_par.c | ||
| 1493 | |||
| 1494 | $(OBJ_D)/asn1_lib.o: $(SRC_D)/crypto/asn1/asn1_lib.c | ||
| 1495 | $(CC) -o $(OBJ_D)/asn1_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/asn1_lib.c | ||
| 1496 | |||
| 1497 | $(OBJ_D)/asn1_err.o: $(SRC_D)/crypto/asn1/asn1_err.c | ||
| 1498 | $(CC) -o $(OBJ_D)/asn1_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/asn1_err.c | ||
| 1499 | |||
| 1500 | $(OBJ_D)/a_meth.o: $(SRC_D)/crypto/asn1/a_meth.c | ||
| 1501 | $(CC) -o $(OBJ_D)/a_meth.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_meth.c | ||
| 1502 | |||
| 1503 | $(OBJ_D)/a_bytes.o: $(SRC_D)/crypto/asn1/a_bytes.c | ||
| 1504 | $(CC) -o $(OBJ_D)/a_bytes.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/a_bytes.c | ||
| 1505 | |||
| 1506 | $(OBJ_D)/evp_asn1.o: $(SRC_D)/crypto/asn1/evp_asn1.c | ||
| 1507 | $(CC) -o $(OBJ_D)/evp_asn1.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/asn1/evp_asn1.c | ||
| 1508 | |||
| 1509 | $(OBJ_D)/x509_def.o: $(SRC_D)/crypto/x509/x509_def.c | ||
| 1510 | $(CC) -o $(OBJ_D)/x509_def.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_def.c | ||
| 1511 | |||
| 1512 | $(OBJ_D)/x509_d2.o: $(SRC_D)/crypto/x509/x509_d2.c | ||
| 1513 | $(CC) -o $(OBJ_D)/x509_d2.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_d2.c | ||
| 1514 | |||
| 1515 | $(OBJ_D)/x509_r2x.o: $(SRC_D)/crypto/x509/x509_r2x.c | ||
| 1516 | $(CC) -o $(OBJ_D)/x509_r2x.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_r2x.c | ||
| 1517 | |||
| 1518 | $(OBJ_D)/x509_cmp.o: $(SRC_D)/crypto/x509/x509_cmp.c | ||
| 1519 | $(CC) -o $(OBJ_D)/x509_cmp.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_cmp.c | ||
| 1520 | |||
| 1521 | $(OBJ_D)/x509_obj.o: $(SRC_D)/crypto/x509/x509_obj.c | ||
| 1522 | $(CC) -o $(OBJ_D)/x509_obj.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_obj.c | ||
| 1523 | |||
| 1524 | $(OBJ_D)/x509_req.o: $(SRC_D)/crypto/x509/x509_req.c | ||
| 1525 | $(CC) -o $(OBJ_D)/x509_req.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_req.c | ||
| 1526 | |||
| 1527 | $(OBJ_D)/x509_vfy.o: $(SRC_D)/crypto/x509/x509_vfy.c | ||
| 1528 | $(CC) -o $(OBJ_D)/x509_vfy.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_vfy.c | ||
| 1529 | |||
| 1530 | $(OBJ_D)/x509_set.o: $(SRC_D)/crypto/x509/x509_set.c | ||
| 1531 | $(CC) -o $(OBJ_D)/x509_set.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_set.c | ||
| 1532 | |||
| 1533 | $(OBJ_D)/x509rset.o: $(SRC_D)/crypto/x509/x509rset.c | ||
| 1534 | $(CC) -o $(OBJ_D)/x509rset.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509rset.c | ||
| 1535 | |||
| 1536 | $(OBJ_D)/x509_err.o: $(SRC_D)/crypto/x509/x509_err.c | ||
| 1537 | $(CC) -o $(OBJ_D)/x509_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_err.c | ||
| 1538 | |||
| 1539 | $(OBJ_D)/x509name.o: $(SRC_D)/crypto/x509/x509name.c | ||
| 1540 | $(CC) -o $(OBJ_D)/x509name.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509name.c | ||
| 1541 | |||
| 1542 | $(OBJ_D)/x509_v3.o: $(SRC_D)/crypto/x509/x509_v3.c | ||
| 1543 | $(CC) -o $(OBJ_D)/x509_v3.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_v3.c | ||
| 1544 | |||
| 1545 | $(OBJ_D)/x509_ext.o: $(SRC_D)/crypto/x509/x509_ext.c | ||
| 1546 | $(CC) -o $(OBJ_D)/x509_ext.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_ext.c | ||
| 1547 | |||
| 1548 | $(OBJ_D)/x509pack.o: $(SRC_D)/crypto/x509/x509pack.c | ||
| 1549 | $(CC) -o $(OBJ_D)/x509pack.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509pack.c | ||
| 1550 | |||
| 1551 | $(OBJ_D)/x509type.o: $(SRC_D)/crypto/x509/x509type.c | ||
| 1552 | $(CC) -o $(OBJ_D)/x509type.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509type.c | ||
| 1553 | |||
| 1554 | $(OBJ_D)/x509_lu.o: $(SRC_D)/crypto/x509/x509_lu.c | ||
| 1555 | $(CC) -o $(OBJ_D)/x509_lu.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_lu.c | ||
| 1556 | |||
| 1557 | $(OBJ_D)/x_all.o: $(SRC_D)/crypto/x509/x_all.c | ||
| 1558 | $(CC) -o $(OBJ_D)/x_all.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x_all.c | ||
| 1559 | |||
| 1560 | $(OBJ_D)/x509_txt.o: $(SRC_D)/crypto/x509/x509_txt.c | ||
| 1561 | $(CC) -o $(OBJ_D)/x509_txt.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/x509_txt.c | ||
| 1562 | |||
| 1563 | $(OBJ_D)/by_file.o: $(SRC_D)/crypto/x509/by_file.c | ||
| 1564 | $(CC) -o $(OBJ_D)/by_file.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/by_file.c | ||
| 1565 | |||
| 1566 | $(OBJ_D)/by_dir.o: $(SRC_D)/crypto/x509/by_dir.c | ||
| 1567 | $(CC) -o $(OBJ_D)/by_dir.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/by_dir.c | ||
| 1568 | |||
| 1569 | $(OBJ_D)/v3_net.o: $(SRC_D)/crypto/x509/v3_net.c | ||
| 1570 | $(CC) -o $(OBJ_D)/v3_net.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/v3_net.c | ||
| 1571 | |||
| 1572 | $(OBJ_D)/v3_x509.o: $(SRC_D)/crypto/x509/v3_x509.c | ||
| 1573 | $(CC) -o $(OBJ_D)/v3_x509.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/x509/v3_x509.c | ||
| 1574 | |||
| 1575 | $(OBJ_D)/conf.o: $(SRC_D)/crypto/conf/conf.c | ||
| 1576 | $(CC) -o $(OBJ_D)/conf.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/conf/conf.c | ||
| 1577 | |||
| 1578 | $(OBJ_D)/conf_err.o: $(SRC_D)/crypto/conf/conf_err.c | ||
| 1579 | $(CC) -o $(OBJ_D)/conf_err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/conf/conf_err.c | ||
| 1580 | |||
| 1581 | $(OBJ_D)/txt_db.o: $(SRC_D)/crypto/txt_db/txt_db.c | ||
| 1582 | $(CC) -o $(OBJ_D)/txt_db.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/txt_db/txt_db.c | ||
| 1583 | |||
| 1584 | $(OBJ_D)/pk7_lib.o: $(SRC_D)/crypto/pkcs7/pk7_lib.c | ||
| 1585 | $(CC) -o $(OBJ_D)/pk7_lib.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pkcs7/pk7_lib.c | ||
| 1586 | |||
| 1587 | $(OBJ_D)/pkcs7err.o: $(SRC_D)/crypto/pkcs7/pkcs7err.c | ||
| 1588 | $(CC) -o $(OBJ_D)/pkcs7err.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pkcs7/pkcs7err.c | ||
| 1589 | |||
| 1590 | $(OBJ_D)/pk7_doit.o: $(SRC_D)/crypto/pkcs7/pk7_doit.c | ||
| 1591 | $(CC) -o $(OBJ_D)/pk7_doit.o $(LIB_CFLAGS) -c $(SRC_D)/crypto/pkcs7/pk7_doit.c | ||
| 1592 | |||
| 1593 | $(OBJ_D)/s2_meth.o: $(SRC_D)/ssl/s2_meth.c | ||
| 1594 | $(CC) -o $(OBJ_D)/s2_meth.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s2_meth.c | ||
| 1595 | |||
| 1596 | $(OBJ_D)/s2_srvr.o: $(SRC_D)/ssl/s2_srvr.c | ||
| 1597 | $(CC) -o $(OBJ_D)/s2_srvr.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s2_srvr.c | ||
| 1598 | |||
| 1599 | $(OBJ_D)/s2_clnt.o: $(SRC_D)/ssl/s2_clnt.c | ||
| 1600 | $(CC) -o $(OBJ_D)/s2_clnt.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s2_clnt.c | ||
| 1601 | |||
| 1602 | $(OBJ_D)/s2_lib.o: $(SRC_D)/ssl/s2_lib.c | ||
| 1603 | $(CC) -o $(OBJ_D)/s2_lib.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s2_lib.c | ||
| 1604 | |||
| 1605 | $(OBJ_D)/s2_enc.o: $(SRC_D)/ssl/s2_enc.c | ||
| 1606 | $(CC) -o $(OBJ_D)/s2_enc.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s2_enc.c | ||
| 1607 | |||
| 1608 | $(OBJ_D)/s2_pkt.o: $(SRC_D)/ssl/s2_pkt.c | ||
| 1609 | $(CC) -o $(OBJ_D)/s2_pkt.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s2_pkt.c | ||
| 1610 | |||
| 1611 | $(OBJ_D)/s3_meth.o: $(SRC_D)/ssl/s3_meth.c | ||
| 1612 | $(CC) -o $(OBJ_D)/s3_meth.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s3_meth.c | ||
| 1613 | |||
| 1614 | $(OBJ_D)/s3_srvr.o: $(SRC_D)/ssl/s3_srvr.c | ||
| 1615 | $(CC) -o $(OBJ_D)/s3_srvr.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s3_srvr.c | ||
| 1616 | |||
| 1617 | $(OBJ_D)/s3_clnt.o: $(SRC_D)/ssl/s3_clnt.c | ||
| 1618 | $(CC) -o $(OBJ_D)/s3_clnt.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s3_clnt.c | ||
| 1619 | |||
| 1620 | $(OBJ_D)/s3_lib.o: $(SRC_D)/ssl/s3_lib.c | ||
| 1621 | $(CC) -o $(OBJ_D)/s3_lib.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s3_lib.c | ||
| 1622 | |||
| 1623 | $(OBJ_D)/s3_enc.o: $(SRC_D)/ssl/s3_enc.c | ||
| 1624 | $(CC) -o $(OBJ_D)/s3_enc.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s3_enc.c | ||
| 1625 | |||
| 1626 | $(OBJ_D)/s3_pkt.o: $(SRC_D)/ssl/s3_pkt.c | ||
| 1627 | $(CC) -o $(OBJ_D)/s3_pkt.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s3_pkt.c | ||
| 1628 | |||
| 1629 | $(OBJ_D)/s3_both.o: $(SRC_D)/ssl/s3_both.c | ||
| 1630 | $(CC) -o $(OBJ_D)/s3_both.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s3_both.c | ||
| 1631 | |||
| 1632 | $(OBJ_D)/s23_meth.o: $(SRC_D)/ssl/s23_meth.c | ||
| 1633 | $(CC) -o $(OBJ_D)/s23_meth.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s23_meth.c | ||
| 1634 | |||
| 1635 | $(OBJ_D)/s23_srvr.o: $(SRC_D)/ssl/s23_srvr.c | ||
| 1636 | $(CC) -o $(OBJ_D)/s23_srvr.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s23_srvr.c | ||
| 1637 | |||
| 1638 | $(OBJ_D)/s23_clnt.o: $(SRC_D)/ssl/s23_clnt.c | ||
| 1639 | $(CC) -o $(OBJ_D)/s23_clnt.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s23_clnt.c | ||
| 1640 | |||
| 1641 | $(OBJ_D)/s23_lib.o: $(SRC_D)/ssl/s23_lib.c | ||
| 1642 | $(CC) -o $(OBJ_D)/s23_lib.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s23_lib.c | ||
| 1643 | |||
| 1644 | $(OBJ_D)/s23_pkt.o: $(SRC_D)/ssl/s23_pkt.c | ||
| 1645 | $(CC) -o $(OBJ_D)/s23_pkt.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/s23_pkt.c | ||
| 1646 | |||
| 1647 | $(OBJ_D)/t1_meth.o: $(SRC_D)/ssl/t1_meth.c | ||
| 1648 | $(CC) -o $(OBJ_D)/t1_meth.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/t1_meth.c | ||
| 1649 | |||
| 1650 | $(OBJ_D)/t1_srvr.o: $(SRC_D)/ssl/t1_srvr.c | ||
| 1651 | $(CC) -o $(OBJ_D)/t1_srvr.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/t1_srvr.c | ||
| 1652 | |||
| 1653 | $(OBJ_D)/t1_clnt.o: $(SRC_D)/ssl/t1_clnt.c | ||
| 1654 | $(CC) -o $(OBJ_D)/t1_clnt.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/t1_clnt.c | ||
| 1655 | |||
| 1656 | $(OBJ_D)/t1_lib.o: $(SRC_D)/ssl/t1_lib.c | ||
| 1657 | $(CC) -o $(OBJ_D)/t1_lib.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/t1_lib.c | ||
| 1658 | |||
| 1659 | $(OBJ_D)/t1_enc.o: $(SRC_D)/ssl/t1_enc.c | ||
| 1660 | $(CC) -o $(OBJ_D)/t1_enc.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/t1_enc.c | ||
| 1661 | |||
| 1662 | $(OBJ_D)/ssl_lib.o: $(SRC_D)/ssl/ssl_lib.c | ||
| 1663 | $(CC) -o $(OBJ_D)/ssl_lib.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_lib.c | ||
| 1664 | |||
| 1665 | $(OBJ_D)/ssl_err2.o: $(SRC_D)/ssl/ssl_err2.c | ||
| 1666 | $(CC) -o $(OBJ_D)/ssl_err2.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_err2.c | ||
| 1667 | |||
| 1668 | $(OBJ_D)/ssl_cert.o: $(SRC_D)/ssl/ssl_cert.c | ||
| 1669 | $(CC) -o $(OBJ_D)/ssl_cert.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_cert.c | ||
| 1670 | |||
| 1671 | $(OBJ_D)/ssl_sess.o: $(SRC_D)/ssl/ssl_sess.c | ||
| 1672 | $(CC) -o $(OBJ_D)/ssl_sess.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_sess.c | ||
| 1673 | |||
| 1674 | $(OBJ_D)/ssl_ciph.o: $(SRC_D)/ssl/ssl_ciph.c | ||
| 1675 | $(CC) -o $(OBJ_D)/ssl_ciph.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_ciph.c | ||
| 1676 | |||
| 1677 | $(OBJ_D)/ssl_stat.o: $(SRC_D)/ssl/ssl_stat.c | ||
| 1678 | $(CC) -o $(OBJ_D)/ssl_stat.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_stat.c | ||
| 1679 | |||
| 1680 | $(OBJ_D)/ssl_rsa.o: $(SRC_D)/ssl/ssl_rsa.c | ||
| 1681 | $(CC) -o $(OBJ_D)/ssl_rsa.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_rsa.c | ||
| 1682 | |||
| 1683 | $(OBJ_D)/ssl_asn1.o: $(SRC_D)/ssl/ssl_asn1.c | ||
| 1684 | $(CC) -o $(OBJ_D)/ssl_asn1.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_asn1.c | ||
| 1685 | |||
| 1686 | $(OBJ_D)/ssl_txt.o: $(SRC_D)/ssl/ssl_txt.c | ||
| 1687 | $(CC) -o $(OBJ_D)/ssl_txt.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_txt.c | ||
| 1688 | |||
| 1689 | $(OBJ_D)/ssl_algs.o: $(SRC_D)/ssl/ssl_algs.c | ||
| 1690 | $(CC) -o $(OBJ_D)/ssl_algs.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_algs.c | ||
| 1691 | |||
| 1692 | $(OBJ_D)/bio_ssl.o: $(SRC_D)/ssl/bio_ssl.c | ||
| 1693 | $(CC) -o $(OBJ_D)/bio_ssl.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/bio_ssl.c | ||
| 1694 | |||
| 1695 | $(OBJ_D)/ssl_err.o: $(SRC_D)/ssl/ssl_err.c | ||
| 1696 | $(CC) -o $(OBJ_D)/ssl_err.o $(LIB_CFLAGS) -c $(SRC_D)/ssl/ssl_err.c | ||
| 1697 | |||
| 1698 | $(OBJ_D)/rsaref.o: $(SRC_D)/rsaref/rsaref.c | ||
| 1699 | $(CC) -o $(OBJ_D)/rsaref.o $(LIB_CFLAGS) -c $(SRC_D)/rsaref/rsaref.c | ||
| 1700 | |||
| 1701 | $(OBJ_D)/rsar_err.o: $(SRC_D)/rsaref/rsar_err.c | ||
| 1702 | $(CC) -o $(OBJ_D)/rsar_err.o $(LIB_CFLAGS) -c $(SRC_D)/rsaref/rsar_err.c | ||
| 1703 | |||
| 1704 | $(TEST_D)/md2test: $(OBJ_D)/md2test.o $(LIBS_DEP) | ||
| 1705 | $(LINK) -o $(TEST_D)/md2test $(LFLAGS) $(OBJ_D)/md2test.o $(L_LIBS) $(EX_LIBS) | ||
| 1706 | |||
| 1707 | $(TEST_D)/md5test: $(OBJ_D)/md5test.o $(LIBS_DEP) | ||
| 1708 | $(LINK) -o $(TEST_D)/md5test $(LFLAGS) $(OBJ_D)/md5test.o $(L_LIBS) $(EX_LIBS) | ||
| 1709 | |||
| 1710 | $(TEST_D)/shatest: $(OBJ_D)/shatest.o $(LIBS_DEP) | ||
| 1711 | $(LINK) -o $(TEST_D)/shatest $(LFLAGS) $(OBJ_D)/shatest.o $(L_LIBS) $(EX_LIBS) | ||
| 1712 | |||
| 1713 | $(TEST_D)/sha1test: $(OBJ_D)/sha1test.o $(LIBS_DEP) | ||
| 1714 | $(LINK) -o $(TEST_D)/sha1test $(LFLAGS) $(OBJ_D)/sha1test.o $(L_LIBS) $(EX_LIBS) | ||
| 1715 | |||
| 1716 | $(TEST_D)/mdc2test: $(OBJ_D)/mdc2test.o $(LIBS_DEP) | ||
| 1717 | $(LINK) -o $(TEST_D)/mdc2test $(LFLAGS) $(OBJ_D)/mdc2test.o $(L_LIBS) $(EX_LIBS) | ||
| 1718 | |||
| 1719 | $(TEST_D)/hmactest: $(OBJ_D)/hmactest.o $(LIBS_DEP) | ||
| 1720 | $(LINK) -o $(TEST_D)/hmactest $(LFLAGS) $(OBJ_D)/hmactest.o $(L_LIBS) $(EX_LIBS) | ||
| 1721 | |||
| 1722 | $(TEST_D)/rmdtest: $(OBJ_D)/rmdtest.o $(LIBS_DEP) | ||
| 1723 | $(LINK) -o $(TEST_D)/rmdtest $(LFLAGS) $(OBJ_D)/rmdtest.o $(L_LIBS) $(EX_LIBS) | ||
| 1724 | |||
| 1725 | $(TEST_D)/destest: $(OBJ_D)/destest.o $(LIBS_DEP) | ||
| 1726 | $(LINK) -o $(TEST_D)/destest $(LFLAGS) $(OBJ_D)/destest.o $(L_LIBS) $(EX_LIBS) | ||
| 1727 | |||
| 1728 | $(TEST_D)/rc2test: $(OBJ_D)/rc2test.o $(LIBS_DEP) | ||
| 1729 | $(LINK) -o $(TEST_D)/rc2test $(LFLAGS) $(OBJ_D)/rc2test.o $(L_LIBS) $(EX_LIBS) | ||
| 1730 | |||
| 1731 | $(TEST_D)/rc4test: $(OBJ_D)/rc4test.o $(LIBS_DEP) | ||
| 1732 | $(LINK) -o $(TEST_D)/rc4test $(LFLAGS) $(OBJ_D)/rc4test.o $(L_LIBS) $(EX_LIBS) | ||
| 1733 | |||
| 1734 | $(TEST_D)/rc5test: $(OBJ_D)/rc5test.o $(LIBS_DEP) | ||
| 1735 | $(LINK) -o $(TEST_D)/rc5test $(LFLAGS) $(OBJ_D)/rc5test.o $(L_LIBS) $(EX_LIBS) | ||
| 1736 | |||
| 1737 | $(TEST_D)/ideatest: $(OBJ_D)/ideatest.o $(LIBS_DEP) | ||
| 1738 | $(LINK) -o $(TEST_D)/ideatest $(LFLAGS) $(OBJ_D)/ideatest.o $(L_LIBS) $(EX_LIBS) | ||
| 1739 | |||
| 1740 | $(TEST_D)/bftest: $(OBJ_D)/bftest.o $(LIBS_DEP) | ||
| 1741 | $(LINK) -o $(TEST_D)/bftest $(LFLAGS) $(OBJ_D)/bftest.o $(L_LIBS) $(EX_LIBS) | ||
| 1742 | |||
| 1743 | $(TEST_D)/casttest: $(OBJ_D)/casttest.o $(LIBS_DEP) | ||
| 1744 | $(LINK) -o $(TEST_D)/casttest $(LFLAGS) $(OBJ_D)/casttest.o $(L_LIBS) $(EX_LIBS) | ||
| 1745 | |||
| 1746 | $(TEST_D)/bntest: $(OBJ_D)/bntest.o $(LIBS_DEP) | ||
| 1747 | $(LINK) -o $(TEST_D)/bntest $(LFLAGS) $(OBJ_D)/bntest.o $(L_LIBS) $(EX_LIBS) | ||
| 1748 | |||
| 1749 | $(TEST_D)/exptest: $(OBJ_D)/exptest.o $(LIBS_DEP) | ||
| 1750 | $(LINK) -o $(TEST_D)/exptest $(LFLAGS) $(OBJ_D)/exptest.o $(L_LIBS) $(EX_LIBS) | ||
| 1751 | |||
| 1752 | $(TEST_D)/dsatest: $(OBJ_D)/dsatest.o $(LIBS_DEP) | ||
| 1753 | $(LINK) -o $(TEST_D)/dsatest $(LFLAGS) $(OBJ_D)/dsatest.o $(L_LIBS) $(EX_LIBS) | ||
| 1754 | |||
| 1755 | $(TEST_D)/dhtest: $(OBJ_D)/dhtest.o $(LIBS_DEP) | ||
| 1756 | $(LINK) -o $(TEST_D)/dhtest $(LFLAGS) $(OBJ_D)/dhtest.o $(L_LIBS) $(EX_LIBS) | ||
| 1757 | |||
| 1758 | $(TEST_D)/randtest: $(OBJ_D)/randtest.o $(LIBS_DEP) | ||
| 1759 | $(LINK) -o $(TEST_D)/randtest $(LFLAGS) $(OBJ_D)/randtest.o $(L_LIBS) $(EX_LIBS) | ||
| 1760 | |||
| 1761 | $(TEST_D)/ssltest: $(OBJ_D)/ssltest.o $(LIBS_DEP) | ||
| 1762 | $(LINK) -o $(TEST_D)/ssltest $(LFLAGS) $(OBJ_D)/ssltest.o $(L_LIBS) $(EX_LIBS) | ||
| 1763 | |||
| 1764 | $(LIB_D)/$(O_SSL): $(SSLOBJ) | ||
| 1765 | $(RM) $(LIB_D)/$(O_SSL) | ||
| 1766 | $(MKLIB) $(LIB_D)/$(O_SSL) $(SSLOBJ) | ||
| 1767 | $(RANLIB) $(LIB_D)/$(O_SSL) | ||
| 1768 | |||
| 1769 | $(LIB_D)/$(O_RSAGLUE): $(RSAGLUEOBJ) | ||
| 1770 | $(RM) $(LIB_D)/$(O_RSAGLUE) | ||
| 1771 | $(MKLIB) $(LIB_D)/$(O_RSAGLUE) $(RSAGLUEOBJ) | ||
| 1772 | $(RANLIB) $(LIB_D)/$(O_RSAGLUE) | ||
| 1773 | |||
| 1774 | $(LIB_D)/$(O_CRYPTO): $(CRYPTOOBJ) | ||
| 1775 | $(RM) $(LIB_D)/$(O_CRYPTO) | ||
| 1776 | $(MKLIB) $(LIB_D)/$(O_CRYPTO) $(CRYPTOOBJ) | ||
| 1777 | $(RANLIB) $(LIB_D)/$(O_CRYPTO) | ||
| 1778 | |||
| 1779 | $(BIN_D)/$(E_EXE): $(E_OBJ) $(LIBS_DEP) | ||
| 1780 | $(LINK) -o $(BIN_D)/$(E_EXE) $(LFLAGS) $(E_OBJ) $(L_LIBS) $(EX_LIBS) | ||
| 1781 | |||
diff --git a/src/lib/libssl/src/ms/cipher.out b/src/lib/libssl/src/ms/cipher.out new file mode 100644 index 0000000000..2c73bb7d1c --- /dev/null +++ b/src/lib/libssl/src/ms/cipher.out | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | echo=off | ||
| 2 | |||
| 3 | echo start testenc | ||
| 4 | path=..\ms;%path% | ||
| 5 | set ssleay=%1% | ||
| 6 | set input=..\ms\testenc.bat | ||
| 7 | set tmp1=..\ms\cipher.out | ||
| 8 | set out1=..\ms\clear.out | ||
| 9 | set cmp=perl ..\ms\cmp.pl | ||
| 10 | |||
| 11 | call tenc.bat enc | ||
| 12 | if errorlevel 1 goto err | ||
| 13 | |||
| 14 | call tenc.bat rc4 | ||
| 15 | if errorlevel 1 goto err | ||
| 16 | |||
| 17 | call tenc.bat des-cfb | ||
| 18 | if errorlevel 1 goto err | ||
| 19 | |||
| 20 | call tenc.bat des-ede-cfb | ||
| 21 | if errorlevel 1 goto err | ||
| 22 | |||
| 23 | call tenc.bat des-ede3-cfb | ||
| 24 | if errorlevel 1 goto err | ||
| 25 | |||
| 26 | call tenc.bat des-ofb | ||
| 27 | if errorlevel 1 goto err | ||
| 28 | |||
| 29 | call tenc.bat des-ede-ofb | ||
| 30 | if errorlevel 1 goto err | ||
| 31 | |||
| 32 | call tenc.bat des-ede3-ofb | ||
| 33 | if errorlevel 1 goto err | ||
| 34 | |||
| 35 | call tenc.bat des-ecb | ||
| 36 | if errorlevel 1 goto err | ||
| 37 | |||
| 38 | call tenc.bat des-ede | ||
| 39 | if errorlevel 1 goto err | ||
| 40 | |||
| 41 | call tenc.bat des-ede3 | ||
| 42 | if errorlevel 1 goto err | ||
| 43 | |||
| 44 | call tenc.bat des-cbc | ||
| 45 | if errorlevel 1 goto err | ||
| 46 | |||
| 47 | call tenc.bat des-ede-cbc | ||
| 48 | if errorlevel 1 goto err | ||
| 49 | |||
| 50 | call tenc.bat des-ede3-cbc | ||
| 51 | if errorlevel 1 goto err | ||
| 52 | |||
| 53 | call tenc.bat idea-ecb | ||
| 54 | if errorlevel 1 goto err | ||
| 55 | |||
| 56 | call tenc.bat idea-cfb | ||
| 57 | if errorlevel 1 goto err | ||
| 58 | |||
| 59 | call tenc.bat idea-ofb | ||
| 60 | if errorlevel 1 goto err | ||
| 61 | |||
| 62 | call tenc.bat idea-cbc | ||
| 63 | if errorlevel 1 goto err | ||
| 64 | |||
| 65 | call tenc.bat rc2-ecb | ||
| 66 | if errorlevel 1 goto err | ||
| 67 | |||
| 68 | call tenc.bat rc2-cfb | ||
| 69 | if errorlevel 1 goto err | ||
| 70 | |||
| 71 | call tenc.bat rc2-ofb | ||
| 72 | if errorlevel 1 goto err | ||
| 73 | |||
| 74 | call tenc.bat rc2-cbc | ||
| 75 | if errorlevel 1 goto err | ||
| 76 | |||
| 77 | call tenc.bat bf-ecb | ||
| 78 | if errorlevel 1 goto err | ||
| 79 | |||
| 80 | call tenc.bat bf-cfb | ||
| 81 | if errorlevel 1 goto err | ||
| 82 | |||
| 83 | call tenc.bat bf-ofb | ||
| 84 | if errorlevel 1 goto err | ||
| 85 | |||
| 86 | call tenc.bat bf-cbc | ||
| 87 | if errorlevel 1 goto err | ||
| 88 | |||
| 89 | echo OK | ||
| 90 | del %out1% | ||
| 91 | del %tmp1% | ||
| 92 | :err | ||
| 93 | |||
diff --git a/src/lib/libssl/src/ms/clear.out b/src/lib/libssl/src/ms/clear.out new file mode 100644 index 0000000000..2c73bb7d1c --- /dev/null +++ b/src/lib/libssl/src/ms/clear.out | |||
| @@ -0,0 +1,93 @@ | |||
| 1 | echo=off | ||
| 2 | |||
| 3 | echo start testenc | ||
| 4 | path=..\ms;%path% | ||
| 5 | set ssleay=%1% | ||
| 6 | set input=..\ms\testenc.bat | ||
| 7 | set tmp1=..\ms\cipher.out | ||
| 8 | set out1=..\ms\clear.out | ||
| 9 | set cmp=perl ..\ms\cmp.pl | ||
| 10 | |||
| 11 | call tenc.bat enc | ||
| 12 | if errorlevel 1 goto err | ||
| 13 | |||
| 14 | call tenc.bat rc4 | ||
| 15 | if errorlevel 1 goto err | ||
| 16 | |||
| 17 | call tenc.bat des-cfb | ||
| 18 | if errorlevel 1 goto err | ||
| 19 | |||
| 20 | call tenc.bat des-ede-cfb | ||
| 21 | if errorlevel 1 goto err | ||
| 22 | |||
| 23 | call tenc.bat des-ede3-cfb | ||
| 24 | if errorlevel 1 goto err | ||
| 25 | |||
| 26 | call tenc.bat des-ofb | ||
| 27 | if errorlevel 1 goto err | ||
| 28 | |||
| 29 | call tenc.bat des-ede-ofb | ||
| 30 | if errorlevel 1 goto err | ||
| 31 | |||
| 32 | call tenc.bat des-ede3-ofb | ||
| 33 | if errorlevel 1 goto err | ||
| 34 | |||
| 35 | call tenc.bat des-ecb | ||
| 36 | if errorlevel 1 goto err | ||
| 37 | |||
| 38 | call tenc.bat des-ede | ||
| 39 | if errorlevel 1 goto err | ||
| 40 | |||
| 41 | call tenc.bat des-ede3 | ||
| 42 | if errorlevel 1 goto err | ||
| 43 | |||
| 44 | call tenc.bat des-cbc | ||
| 45 | if errorlevel 1 goto err | ||
| 46 | |||
| 47 | call tenc.bat des-ede-cbc | ||
| 48 | if errorlevel 1 goto err | ||
| 49 | |||
| 50 | call tenc.bat des-ede3-cbc | ||
| 51 | if errorlevel 1 goto err | ||
| 52 | |||
| 53 | call tenc.bat idea-ecb | ||
| 54 | if errorlevel 1 goto err | ||
| 55 | |||
| 56 | call tenc.bat idea-cfb | ||
| 57 | if errorlevel 1 goto err | ||
| 58 | |||
| 59 | call tenc.bat idea-ofb | ||
| 60 | if errorlevel 1 goto err | ||
| 61 | |||
| 62 | call tenc.bat idea-cbc | ||
| 63 | if errorlevel 1 goto err | ||
| 64 | |||
| 65 | call tenc.bat rc2-ecb | ||
| 66 | if errorlevel 1 goto err | ||
| 67 | |||
| 68 | call tenc.bat rc2-cfb | ||
| 69 | if errorlevel 1 goto err | ||
| 70 | |||
| 71 | call tenc.bat rc2-ofb | ||
| 72 | if errorlevel 1 goto err | ||
| 73 | |||
| 74 | call tenc.bat rc2-cbc | ||
| 75 | if errorlevel 1 goto err | ||
| 76 | |||
| 77 | call tenc.bat bf-ecb | ||
| 78 | if errorlevel 1 goto err | ||
| 79 | |||
| 80 | call tenc.bat bf-cfb | ||
| 81 | if errorlevel 1 goto err | ||
| 82 | |||
| 83 | call tenc.bat bf-ofb | ||
| 84 | if errorlevel 1 goto err | ||
| 85 | |||
| 86 | call tenc.bat bf-cbc | ||
| 87 | if errorlevel 1 goto err | ||
| 88 | |||
| 89 | echo OK | ||
| 90 | del %out1% | ||
| 91 | del %tmp1% | ||
| 92 | :err | ||
| 93 | |||
diff --git a/src/lib/libssl/src/ms/libeay16.def b/src/lib/libssl/src/ms/libeay16.def new file mode 100644 index 0000000000..65bbad629e --- /dev/null +++ b/src/lib/libssl/src/ms/libeay16.def | |||
| @@ -0,0 +1,987 @@ | |||
| 1 | ; | ||
| 2 | ; Definition file for the DDL version of the LIBEAY16 library from SSLeay | ||
| 3 | ; | ||
| 4 | |||
| 5 | LIBRARY LIBEAY16 | ||
| 6 | |||
| 7 | DESCRIPTION 'SSLeay LIBEAY16 - eay@cryptsoft.com' | ||
| 8 | |||
| 9 | CODE PRELOAD MOVEABLE | ||
| 10 | DATA PRELOAD MOVEABLE SINGLE | ||
| 11 | |||
| 12 | EXETYPE WINDOWS | ||
| 13 | |||
| 14 | HEAPSIZE 4096 | ||
| 15 | STACKSIZE 8192 | ||
| 16 | |||
| 17 | EXPORTS | ||
| 18 | _SSLeay @1 | ||
| 19 | _SSLeay_add_all_algorithms @508 | ||
| 20 | _SSLeay_add_all_ciphers @509 | ||
| 21 | _SSLeay_add_all_digests @510 | ||
| 22 | _SSLeay_version @2 | ||
| 23 | _ASN1_BIT_STRING_asn1_meth @3 | ||
| 24 | _ASN1_BIT_STRING_get_bit @1060 | ||
| 25 | _ASN1_BIT_STRING_set_bit @1061 | ||
| 26 | _ASN1_HEADER_free @4 | ||
| 27 | _ASN1_HEADER_new @5 | ||
| 28 | _ASN1_IA5STRING_asn1_meth @6 | ||
| 29 | _ASN1_INTEGER_get @7 | ||
| 30 | _ASN1_INTEGER_set @8 | ||
| 31 | _ASN1_INTEGER_to_BN @9 | ||
| 32 | _ASN1_OBJECT_create @10 | ||
| 33 | _ASN1_OBJECT_free @11 | ||
| 34 | _ASN1_OBJECT_new @12 | ||
| 35 | _ASN1_PRINTABLE_type @13 | ||
| 36 | _ASN1_STRING_cmp @14 | ||
| 37 | _ASN1_STRING_dup @15 | ||
| 38 | _ASN1_STRING_free @16 | ||
| 39 | _ASN1_STRING_new @17 | ||
| 40 | _ASN1_STRING_print @18 | ||
| 41 | _ASN1_STRING_set @19 | ||
| 42 | _ASN1_STRING_type_new @20 | ||
| 43 | _ASN1_TYPE_free @21 | ||
| 44 | _ASN1_TYPE_get @916 | ||
| 45 | _ASN1_TYPE_get_int_octetstring @1076 | ||
| 46 | _ASN1_TYPE_get_octetstring @1077 | ||
| 47 | _ASN1_TYPE_new @22 | ||
| 48 | _ASN1_TYPE_set @917 | ||
| 49 | _ASN1_TYPE_set_int_octetstring @1078 | ||
| 50 | _ASN1_TYPE_set_octetstring @1079 | ||
| 51 | _ASN1_UNIVERSALSTRING_to_string @23 | ||
| 52 | _ASN1_UTCTIME_check @24 | ||
| 53 | _ASN1_UTCTIME_print @25 | ||
| 54 | _ASN1_UTCTIME_set @26 | ||
| 55 | _ASN1_UTCTIME_set_string @1080 | ||
| 56 | _ASN1_check_infinite_end @27 | ||
| 57 | _ASN1_d2i_bio @28 | ||
| 58 | _ASN1_digest @30 | ||
| 59 | _ASN1_dup @31 | ||
| 60 | _ASN1_get_object @32 | ||
| 61 | _ASN1_i2d_bio @33 | ||
| 62 | _ASN1_object_size @35 | ||
| 63 | _ASN1_parse @36 | ||
| 64 | _ASN1_put_object @37 | ||
| 65 | _ASN1_sign @38 | ||
| 66 | _ASN1_verify @39 | ||
| 67 | _BF_cbc_encrypt @40 | ||
| 68 | _BF_cfb64_encrypt @41 | ||
| 69 | _BF_decrypt @987 | ||
| 70 | _BF_ecb_encrypt @42 | ||
| 71 | _BF_encrypt @43 | ||
| 72 | _BF_ofb64_encrypt @44 | ||
| 73 | _BF_options @45 | ||
| 74 | _BF_set_key @46 | ||
| 75 | _BIO_accept @51 | ||
| 76 | _BIO_copy_next_retry @955 | ||
| 77 | _BIO_ctrl @52 | ||
| 78 | _BIO_debug_callback @54 | ||
| 79 | _BIO_dump @55 | ||
| 80 | _BIO_dup_chain @56 | ||
| 81 | _BIO_f_base64 @57 | ||
| 82 | _BIO_f_buffer @58 | ||
| 83 | _BIO_f_cipher @59 | ||
| 84 | _BIO_f_md @60 | ||
| 85 | _BIO_f_nbio_test @915 | ||
| 86 | _BIO_f_null @61 | ||
| 87 | _BIO_fd_non_fatal_error @63 | ||
| 88 | _BIO_fd_should_retry @64 | ||
| 89 | _BIO_find_type @65 | ||
| 90 | _BIO_free @66 | ||
| 91 | _BIO_free_all @67 | ||
| 92 | _BIO_get_accept_socket @69 | ||
| 93 | _BIO_get_host_ip @71 | ||
| 94 | _BIO_get_port @72 | ||
| 95 | _BIO_get_retry_BIO @73 | ||
| 96 | _BIO_get_retry_reason @74 | ||
| 97 | _BIO_gethostbyname @75 | ||
| 98 | _BIO_gets @76 | ||
| 99 | _BIO_ghbn_ctrl @1003 | ||
| 100 | _BIO_int_ctrl @53 | ||
| 101 | _BIO_new @78 | ||
| 102 | _BIO_new_accept @79 | ||
| 103 | _BIO_new_connect @80 | ||
| 104 | _BIO_new_fd @81 | ||
| 105 | _BIO_new_socket @84 | ||
| 106 | _BIO_pop @85 | ||
| 107 | _BIO_printf @86 | ||
| 108 | _BIO_ptr_ctrl @969 | ||
| 109 | _BIO_push @87 | ||
| 110 | _BIO_puts @88 | ||
| 111 | _BIO_read @89 | ||
| 112 | _BIO_s_accept @90 | ||
| 113 | _BIO_s_connect @91 | ||
| 114 | _BIO_s_fd @92 | ||
| 115 | _BIO_s_mem @95 | ||
| 116 | _BIO_s_null @96 | ||
| 117 | _BIO_s_socket @98 | ||
| 118 | _BIO_set @100 | ||
| 119 | _BIO_set_cipher @101 | ||
| 120 | _BIO_set_tcp_ndelay @102 | ||
| 121 | _BIO_sock_cleanup @103 | ||
| 122 | _BIO_sock_error @104 | ||
| 123 | _BIO_sock_init @105 | ||
| 124 | _BIO_sock_non_fatal_error @106 | ||
| 125 | _BIO_sock_should_retry @107 | ||
| 126 | _BIO_socket_ioctl @108 | ||
| 127 | _BIO_write @109 | ||
| 128 | _BN_BLINDING_convert @973 | ||
| 129 | _BN_BLINDING_free @981 | ||
| 130 | _BN_BLINDING_invert @974 | ||
| 131 | _BN_BLINDING_new @980 | ||
| 132 | _BN_BLINDING_update @975 | ||
| 133 | _BN_CTX_free @110 | ||
| 134 | _BN_CTX_new @111 | ||
| 135 | _BN_MONT_CTX_free @112 | ||
| 136 | _BN_MONT_CTX_new @113 | ||
| 137 | _BN_MONT_CTX_set @114 | ||
| 138 | _BN_add @115 | ||
| 139 | _BN_add_word @116 | ||
| 140 | _BN_bin2bn @118 | ||
| 141 | _BN_bn2bin @120 | ||
| 142 | _BN_bn2dec @1002 | ||
| 143 | _BN_bn2hex @119 | ||
| 144 | _BN_bn2mpi @1058 | ||
| 145 | _BN_clear @121 | ||
| 146 | _BN_clear_bit @122 | ||
| 147 | _BN_clear_free @123 | ||
| 148 | _BN_cmp @124 | ||
| 149 | _BN_copy @125 | ||
| 150 | _BN_dec2bn @1001 | ||
| 151 | _BN_div @126 | ||
| 152 | _BN_div_word @127 | ||
| 153 | _BN_dup @128 | ||
| 154 | _BN_exp @998 | ||
| 155 | _BN_free @129 | ||
| 156 | _BN_from_montgomery @130 | ||
| 157 | _BN_gcd @131 | ||
| 158 | _BN_generate_prime @132 | ||
| 159 | _BN_get_word @133 | ||
| 160 | _BN_hex2bn @117 | ||
| 161 | _BN_is_bit_set @134 | ||
| 162 | _BN_is_prime @135 | ||
| 163 | _BN_lshift @136 | ||
| 164 | _BN_lshift1 @137 | ||
| 165 | _BN_mask_bits @138 | ||
| 166 | _BN_mod @139 | ||
| 167 | _BN_mod_exp @140 | ||
| 168 | _BN_mod_exp_mont @141 | ||
| 169 | _BN_mod_exp_recp @142 | ||
| 170 | _BN_mod_exp_simple @143 | ||
| 171 | _BN_mod_inverse @144 | ||
| 172 | _BN_mod_mul @145 | ||
| 173 | _BN_mod_mul_montgomery @146 | ||
| 174 | _BN_mod_mul_reciprocal @147 | ||
| 175 | _BN_mod_word @148 | ||
| 176 | _BN_mpi2bn @1059 | ||
| 177 | _BN_mul @149 | ||
| 178 | _BN_mul_word @999 | ||
| 179 | _BN_new @150 | ||
| 180 | _BN_num_bits @151 | ||
| 181 | _BN_num_bits_word @152 | ||
| 182 | _BN_options @153 | ||
| 183 | _BN_print @154 | ||
| 184 | _BN_rand @156 | ||
| 185 | _BN_reciprocal @157 | ||
| 186 | _BN_rshift @158 | ||
| 187 | _BN_rshift1 @159 | ||
| 188 | _BN_set_bit @160 | ||
| 189 | _BN_set_word @161 | ||
| 190 | _BN_sqr @162 | ||
| 191 | _BN_sub @163 | ||
| 192 | _BN_sub_word @1000 | ||
| 193 | _BN_to_ASN1_INTEGER @164 | ||
| 194 | _BN_ucmp @165 | ||
| 195 | _BN_value_one @166 | ||
| 196 | _BUF_MEM_free @167 | ||
| 197 | _BUF_MEM_grow @168 | ||
| 198 | _BUF_MEM_new @169 | ||
| 199 | _BUF_strdup @170 | ||
| 200 | _CAST_cbc_encrypt @992 | ||
| 201 | _CAST_cfb64_encrypt @993 | ||
| 202 | _CAST_decrypt @990 | ||
| 203 | _CAST_ecb_encrypt @991 | ||
| 204 | _CAST_encrypt @989 | ||
| 205 | _CAST_ofb64_encrypt @994 | ||
| 206 | _CAST_set_key @988 | ||
| 207 | _CONF_free @171 | ||
| 208 | _CONF_get_number @172 | ||
| 209 | _CONF_get_section @173 | ||
| 210 | _CONF_get_string @174 | ||
| 211 | _CONF_load @175 | ||
| 212 | _CRYPTO_add_lock @176 | ||
| 213 | _CRYPTO_dbg_free @177 | ||
| 214 | _CRYPTO_dbg_malloc @178 | ||
| 215 | _CRYPTO_dbg_realloc @179 | ||
| 216 | _CRYPTO_dbg_remalloc @180 | ||
| 217 | _CRYPTO_dup_ex_data @1025 | ||
| 218 | _CRYPTO_free @181 | ||
| 219 | _CRYPTO_free_ex_data @1004 | ||
| 220 | _CRYPTO_get_add_lock_callback @182 | ||
| 221 | _CRYPTO_get_ex_data @1005 | ||
| 222 | _CRYPTO_get_ex_new_index @1041 | ||
| 223 | _CRYPTO_get_id_callback @183 | ||
| 224 | _CRYPTO_get_lock_name @184 | ||
| 225 | _CRYPTO_get_locking_callback @185 | ||
| 226 | _CRYPTO_get_mem_functions @186 | ||
| 227 | _CRYPTO_get_new_lockid @1026 | ||
| 228 | _CRYPTO_lock @187 | ||
| 229 | _CRYPTO_malloc @188 | ||
| 230 | _CRYPTO_mem_ctrl @189 | ||
| 231 | _CRYPTO_mem_leaks @190 | ||
| 232 | _CRYPTO_mem_leaks_cb @191 | ||
| 233 | _CRYPTO_new_ex_data @1027 | ||
| 234 | _CRYPTO_realloc @193 | ||
| 235 | _CRYPTO_remalloc @194 | ||
| 236 | _CRYPTO_set_add_lock_callback @195 | ||
| 237 | _CRYPTO_set_ex_data @1007 | ||
| 238 | _CRYPTO_set_id_callback @196 | ||
| 239 | _CRYPTO_set_locking_callback @197 | ||
| 240 | _CRYPTO_set_mem_functions @198 | ||
| 241 | _CRYPTO_thread_id @199 | ||
| 242 | _DH_check @200 | ||
| 243 | _DH_compute_key @201 | ||
| 244 | _DH_free @202 | ||
| 245 | _DH_generate_key @203 | ||
| 246 | _DH_generate_parameters @204 | ||
| 247 | _DH_new @205 | ||
| 248 | _DH_size @206 | ||
| 249 | _DHparams_print @207 | ||
| 250 | _DSA_free @209 | ||
| 251 | _DSA_generate_key @210 | ||
| 252 | _DSA_generate_parameters @211 | ||
| 253 | _DSA_is_prime @212 | ||
| 254 | _DSA_new @213 | ||
| 255 | _DSA_print @214 | ||
| 256 | _DSA_sign @216 | ||
| 257 | _DSA_sign_setup @217 | ||
| 258 | _DSA_size @218 | ||
| 259 | _DSA_verify @219 | ||
| 260 | _DSAparams_print @220 | ||
| 261 | _ERR_add_error_data @1081 | ||
| 262 | _ERR_clear_error @222 | ||
| 263 | _ERR_error_string @223 | ||
| 264 | _ERR_free_strings @224 | ||
| 265 | _ERR_func_error_string @225 | ||
| 266 | _ERR_get_err_state_table @226 | ||
| 267 | _ERR_get_error @227 | ||
| 268 | _ERR_get_error_line @228 | ||
| 269 | _ERR_get_next_error_library @966 | ||
| 270 | _ERR_get_state @229 | ||
| 271 | _ERR_get_string_table @230 | ||
| 272 | _ERR_lib_error_string @231 | ||
| 273 | _ERR_load_ASN1_strings @232 | ||
| 274 | _ERR_load_BIO_strings @233 | ||
| 275 | _ERR_load_BN_strings @234 | ||
| 276 | _ERR_load_BUF_strings @235 | ||
| 277 | _ERR_load_CONF_strings @236 | ||
| 278 | _ERR_load_CRYPTOlib_strings @1009 | ||
| 279 | _ERR_load_DH_strings @237 | ||
| 280 | _ERR_load_DSA_strings @238 | ||
| 281 | _ERR_load_ERR_strings @239 | ||
| 282 | _ERR_load_EVP_strings @240 | ||
| 283 | _ERR_load_OBJ_strings @241 | ||
| 284 | _ERR_load_PEM_strings @242 | ||
| 285 | _ERR_load_PKCS7_strings @919 | ||
| 286 | _ERR_load_RSA_strings @244 | ||
| 287 | _ERR_load_X509_strings @245 | ||
| 288 | _ERR_load_crypto_strings @246 | ||
| 289 | _ERR_load_strings @247 | ||
| 290 | _ERR_peek_error @248 | ||
| 291 | _ERR_peek_error_line @249 | ||
| 292 | _ERR_print_errors @250 | ||
| 293 | _ERR_put_error @252 | ||
| 294 | _ERR_reason_error_string @253 | ||
| 295 | _ERR_remove_state @254 | ||
| 296 | _ERR_set_error_data @1082 | ||
| 297 | _EVP_BytesToKey @255 | ||
| 298 | _EVP_CIPHER_CTX_cleanup @256 | ||
| 299 | _EVP_CIPHER_CTX_init @961 | ||
| 300 | _EVP_CIPHER_asn1_to_param @1083 | ||
| 301 | _EVP_CIPHER_get_asn1_iv @1085 | ||
| 302 | _EVP_CIPHER_param_to_asn1 @1084 | ||
| 303 | _EVP_CIPHER_set_asn1_iv @1086 | ||
| 304 | _EVP_CipherFinal @257 | ||
| 305 | _EVP_CipherInit @258 | ||
| 306 | _EVP_CipherUpdate @259 | ||
| 307 | _EVP_DecodeBlock @260 | ||
| 308 | _EVP_DecodeFinal @261 | ||
| 309 | _EVP_DecodeInit @262 | ||
| 310 | _EVP_DecodeUpdate @263 | ||
| 311 | _EVP_DecryptFinal @264 | ||
| 312 | _EVP_DecryptInit @265 | ||
| 313 | _EVP_DecryptUpdate @266 | ||
| 314 | _EVP_DigestFinal @267 | ||
| 315 | _EVP_DigestInit @268 | ||
| 316 | _EVP_DigestUpdate @269 | ||
| 317 | _EVP_EncodeBlock @270 | ||
| 318 | _EVP_EncodeFinal @271 | ||
| 319 | _EVP_EncodeInit @272 | ||
| 320 | _EVP_EncodeUpdate @273 | ||
| 321 | _EVP_EncryptFinal @274 | ||
| 322 | _EVP_EncryptInit @275 | ||
| 323 | _EVP_EncryptUpdate @276 | ||
| 324 | _EVP_OpenFinal @277 | ||
| 325 | _EVP_OpenInit @278 | ||
| 326 | _EVP_PKEY_assign @279 | ||
| 327 | _EVP_PKEY_bits @1010 | ||
| 328 | _EVP_PKEY_cmp_parameters @967 | ||
| 329 | _EVP_PKEY_copy_parameters @280 | ||
| 330 | _EVP_PKEY_decrypt @1070 | ||
| 331 | _EVP_PKEY_encrypt @1071 | ||
| 332 | _EVP_PKEY_free @281 | ||
| 333 | _EVP_PKEY_missing_parameters @282 | ||
| 334 | _EVP_PKEY_new @283 | ||
| 335 | _EVP_PKEY_save_parameters @284 | ||
| 336 | _EVP_PKEY_size @285 | ||
| 337 | _EVP_PKEY_type @286 | ||
| 338 | _EVP_SealFinal @287 | ||
| 339 | _EVP_SealInit @288 | ||
| 340 | _EVP_SignFinal @289 | ||
| 341 | _EVP_VerifyFinal @290 | ||
| 342 | _EVP_add_alias @291 | ||
| 343 | _EVP_add_cipher @292 | ||
| 344 | _EVP_add_digest @293 | ||
| 345 | _EVP_bf_cbc @294 | ||
| 346 | _EVP_bf_cfb @295 | ||
| 347 | _EVP_bf_ecb @296 | ||
| 348 | _EVP_bf_ofb @297 | ||
| 349 | _EVP_cast5_cbc @983 | ||
| 350 | _EVP_cast5_cfb @984 | ||
| 351 | _EVP_cast5_ecb @985 | ||
| 352 | _EVP_cast5_ofb @986 | ||
| 353 | _EVP_cleanup @298 | ||
| 354 | _EVP_delete_alias @941 | ||
| 355 | _EVP_des_cbc @299 | ||
| 356 | _EVP_des_cfb @300 | ||
| 357 | _EVP_des_ecb @301 | ||
| 358 | _EVP_des_ede @302 | ||
| 359 | _EVP_des_ede3 @303 | ||
| 360 | _EVP_des_ede3_cbc @304 | ||
| 361 | _EVP_des_ede3_cfb @305 | ||
| 362 | _EVP_des_ede3_ofb @306 | ||
| 363 | _EVP_des_ede_cbc @307 | ||
| 364 | _EVP_des_ede_cfb @308 | ||
| 365 | _EVP_des_ede_ofb @309 | ||
| 366 | _EVP_des_ofb @310 | ||
| 367 | _EVP_desx_cbc @311 | ||
| 368 | _EVP_dss @312 | ||
| 369 | _EVP_dss1 @313 | ||
| 370 | _EVP_enc_null @314 | ||
| 371 | _EVP_get_cipherbyname @315 | ||
| 372 | _EVP_get_digestbyname @316 | ||
| 373 | _EVP_get_pw_prompt @317 | ||
| 374 | _EVP_idea_cbc @318 | ||
| 375 | _EVP_idea_cfb @319 | ||
| 376 | _EVP_idea_ecb @320 | ||
| 377 | _EVP_idea_ofb @321 | ||
| 378 | _EVP_md2 @322 | ||
| 379 | _EVP_md5 @323 | ||
| 380 | _EVP_md_null @324 | ||
| 381 | _EVP_mdc2 @942 | ||
| 382 | _EVP_rc2_40_cbc @959 | ||
| 383 | _EVP_rc2_cbc @325 | ||
| 384 | _EVP_rc2_cfb @326 | ||
| 385 | _EVP_rc2_ecb @327 | ||
| 386 | _EVP_rc2_ofb @328 | ||
| 387 | _EVP_rc4 @329 | ||
| 388 | _EVP_rc4_40 @960 | ||
| 389 | _EVP_rc5_32_12_16_cbc @1087 | ||
| 390 | _EVP_rc5_32_12_16_cfb @1088 | ||
| 391 | _EVP_rc5_32_12_16_ecb @1089 | ||
| 392 | _EVP_rc5_32_12_16_ofb @1090 | ||
| 393 | _EVP_read_pw_string @330 | ||
| 394 | _EVP_set_pw_prompt @331 | ||
| 395 | _EVP_sha @332 | ||
| 396 | _EVP_sha1 @333 | ||
| 397 | _HMAC @962 | ||
| 398 | _HMAC_Final @965 | ||
| 399 | _HMAC_Init @963 | ||
| 400 | _HMAC_Update @964 | ||
| 401 | _HMAC_cleanup @968 | ||
| 402 | _MD2 @334 | ||
| 403 | _MD2_Final @335 | ||
| 404 | _MD2_Init @336 | ||
| 405 | _MD2_Update @337 | ||
| 406 | _MD2_options @338 | ||
| 407 | _MD5 @339 | ||
| 408 | _MD5_Final @340 | ||
| 409 | _MD5_Init @341 | ||
| 410 | _MD5_Transform @1011 | ||
| 411 | _MD5_Update @342 | ||
| 412 | _MDC2 @343 | ||
| 413 | _MDC2_Final @344 | ||
| 414 | _MDC2_Init @345 | ||
| 415 | _MDC2_Update @346 | ||
| 416 | _NETSCAPE_SPKAC_free @347 | ||
| 417 | _NETSCAPE_SPKAC_new @348 | ||
| 418 | _NETSCAPE_SPKI_free @349 | ||
| 419 | _NETSCAPE_SPKI_new @350 | ||
| 420 | _NETSCAPE_SPKI_sign @351 | ||
| 421 | _NETSCAPE_SPKI_verify @352 | ||
| 422 | _OBJ_add_object @353 | ||
| 423 | _OBJ_bsearch @354 | ||
| 424 | _OBJ_cleanup @355 | ||
| 425 | _OBJ_cmp @356 | ||
| 426 | _OBJ_create @357 | ||
| 427 | _OBJ_create_objects @997 | ||
| 428 | _OBJ_dup @358 | ||
| 429 | _OBJ_ln2nid @359 | ||
| 430 | _OBJ_new_nid @360 | ||
| 431 | _OBJ_nid2ln @361 | ||
| 432 | _OBJ_nid2obj @362 | ||
| 433 | _OBJ_nid2sn @363 | ||
| 434 | _OBJ_obj2nid @364 | ||
| 435 | _OBJ_sn2nid @365 | ||
| 436 | _OBJ_txt2nid @366 | ||
| 437 | _PEM_ASN1_read_bio @368 | ||
| 438 | _PEM_ASN1_write_bio @370 | ||
| 439 | _PEM_SealFinal @371 | ||
| 440 | _PEM_SealInit @372 | ||
| 441 | _PEM_SealUpdate @373 | ||
| 442 | _PEM_SignFinal @374 | ||
| 443 | _PEM_X509_INFO_read_bio @378 | ||
| 444 | _PEM_X509_INFO_write_bio @379 | ||
| 445 | _PEM_dek_info @380 | ||
| 446 | _PEM_do_header @381 | ||
| 447 | _PEM_get_EVP_CIPHER_INFO @382 | ||
| 448 | _PEM_proc_type @383 | ||
| 449 | _PEM_read_bio @394 | ||
| 450 | _PEM_read_bio_DHparams @395 | ||
| 451 | _PEM_read_bio_DSAPrivateKey @396 | ||
| 452 | _PEM_read_bio_DSAparams @397 | ||
| 453 | _PEM_read_bio_PKCS7 @398 | ||
| 454 | _PEM_read_bio_PrivateKey @399 | ||
| 455 | _PEM_read_bio_RSAPrivateKey @400 | ||
| 456 | _PEM_read_bio_RSAPublicKey @943 | ||
| 457 | _PEM_read_bio_X509 @401 | ||
| 458 | _PEM_read_bio_X509_CRL @402 | ||
| 459 | _PEM_read_bio_X509_REQ @403 | ||
| 460 | _PEM_write_bio @414 | ||
| 461 | _PEM_write_bio_DHparams @415 | ||
| 462 | _PEM_write_bio_DSAPrivateKey @416 | ||
| 463 | _PEM_write_bio_DSAparams @417 | ||
| 464 | _PEM_write_bio_PKCS7 @418 | ||
| 465 | _PEM_write_bio_PrivateKey @419 | ||
| 466 | _PEM_write_bio_RSAPrivateKey @420 | ||
| 467 | _PEM_write_bio_RSAPublicKey @944 | ||
| 468 | _PEM_write_bio_X509 @421 | ||
| 469 | _PEM_write_bio_X509_CRL @422 | ||
| 470 | _PEM_write_bio_X509_REQ @423 | ||
| 471 | _PKCS7_DIGEST_free @424 | ||
| 472 | _PKCS7_DIGEST_new @425 | ||
| 473 | _PKCS7_ENCRYPT_free @426 | ||
| 474 | _PKCS7_ENCRYPT_new @427 | ||
| 475 | _PKCS7_ENC_CONTENT_free @428 | ||
| 476 | _PKCS7_ENC_CONTENT_new @429 | ||
| 477 | _PKCS7_ENVELOPE_free @430 | ||
| 478 | _PKCS7_ENVELOPE_new @431 | ||
| 479 | _PKCS7_ISSUER_AND_SERIAL_digest @432 | ||
| 480 | _PKCS7_ISSUER_AND_SERIAL_free @433 | ||
| 481 | _PKCS7_ISSUER_AND_SERIAL_new @434 | ||
| 482 | _PKCS7_RECIP_INFO_free @435 | ||
| 483 | _PKCS7_RECIP_INFO_new @436 | ||
| 484 | _PKCS7_RECIP_INFO_set @1072 | ||
| 485 | _PKCS7_SIGNED_free @437 | ||
| 486 | _PKCS7_SIGNED_new @438 | ||
| 487 | _PKCS7_SIGNER_INFO_free @439 | ||
| 488 | _PKCS7_SIGNER_INFO_new @440 | ||
| 489 | _PKCS7_SIGNER_INFO_set @930 | ||
| 490 | _PKCS7_SIGN_ENVELOPE_free @441 | ||
| 491 | _PKCS7_SIGN_ENVELOPE_new @442 | ||
| 492 | _PKCS7_add_certificate @932 | ||
| 493 | _PKCS7_add_crl @933 | ||
| 494 | _PKCS7_add_recipient @1073 | ||
| 495 | _PKCS7_add_recipient_info @1074 | ||
| 496 | _PKCS7_add_signature @938 | ||
| 497 | _PKCS7_add_signer @931 | ||
| 498 | _PKCS7_cert_from_signer_info @939 | ||
| 499 | _PKCS7_content_free @918 | ||
| 500 | _PKCS7_content_new @934 | ||
| 501 | _PKCS7_ctrl @927 | ||
| 502 | _PKCS7_dataInit @937 | ||
| 503 | _PKCS7_dataSign @935 | ||
| 504 | _PKCS7_dataVerify @936 | ||
| 505 | _PKCS7_dup @443 | ||
| 506 | _PKCS7_free @444 | ||
| 507 | _PKCS7_get_signer_info @940 | ||
| 508 | _PKCS7_new @445 | ||
| 509 | _PKCS7_set_cipher @1075 | ||
| 510 | _PKCS7_set_content @929 | ||
| 511 | _PKCS7_set_type @928 | ||
| 512 | _RAND_bytes @464 | ||
| 513 | _RAND_cleanup @465 | ||
| 514 | _RAND_file_name @466 | ||
| 515 | _RAND_load_file @467 | ||
| 516 | _RAND_screen @468 | ||
| 517 | _RAND_seed @469 | ||
| 518 | _RAND_write_file @470 | ||
| 519 | _RC2_cbc_encrypt @471 | ||
| 520 | _RC2_cfb64_encrypt @472 | ||
| 521 | _RC2_decrypt @995 | ||
| 522 | _RC2_ecb_encrypt @473 | ||
| 523 | _RC2_encrypt @474 | ||
| 524 | _RC2_ofb64_encrypt @475 | ||
| 525 | _RC2_set_key @476 | ||
| 526 | _RC4 @477 | ||
| 527 | _RC4_options @478 | ||
| 528 | _RC4_set_key @479 | ||
| 529 | _RC5_32_cbc_encrypt @1051 | ||
| 530 | _RC5_32_cfb64_encrypt @1052 | ||
| 531 | _RC5_32_decrypt @1050 | ||
| 532 | _RC5_32_ecb_encrypt @1048 | ||
| 533 | _RC5_32_encrypt @1049 | ||
| 534 | _RC5_32_ofb64_encrypt @1053 | ||
| 535 | _RC5_32_set_key @1047 | ||
| 536 | _RIPEMD160 @1045 | ||
| 537 | _RIPEMD160_Final @1044 | ||
| 538 | _RIPEMD160_Init @1042 | ||
| 539 | _RIPEMD160_Transform @1046 | ||
| 540 | _RIPEMD160_Update @1043 | ||
| 541 | _RSAPrivateKey_asn1_meth @480 | ||
| 542 | _RSAPrivateKey_dup @481 | ||
| 543 | _RSAPublicKey_dup @482 | ||
| 544 | _RSA_PKCS1_SSLeay @483 | ||
| 545 | _RSA_blinding_off @978 | ||
| 546 | _RSA_blinding_on @977 | ||
| 547 | _RSA_flags @956 | ||
| 548 | _RSA_free @484 | ||
| 549 | _RSA_generate_key @485 | ||
| 550 | _RSA_get_ex_data @1029 | ||
| 551 | _RSA_get_ex_new_index @1030 | ||
| 552 | _RSA_new @486 | ||
| 553 | _RSA_new_method @487 | ||
| 554 | _RSA_padding_add_PKCS1_type_1 @1031 | ||
| 555 | _RSA_padding_add_PKCS1_type_2 @1032 | ||
| 556 | _RSA_padding_add_SSLv23 @1033 | ||
| 557 | _RSA_padding_add_none @1034 | ||
| 558 | _RSA_padding_check_PKCS1_type_1 @1035 | ||
| 559 | _RSA_padding_check_PKCS1_type_2 @1036 | ||
| 560 | _RSA_padding_check_SSLv23 @1037 | ||
| 561 | _RSA_padding_check_none @1038 | ||
| 562 | _RSA_print @488 | ||
| 563 | _RSA_private_decrypt @490 | ||
| 564 | _RSA_private_encrypt @491 | ||
| 565 | _RSA_public_decrypt @492 | ||
| 566 | _RSA_public_encrypt @493 | ||
| 567 | _RSA_set_default_method @494 | ||
| 568 | _RSA_set_ex_data @1028 | ||
| 569 | _RSA_sign @495 | ||
| 570 | _RSA_sign_ASN1_OCTET_STRING @496 | ||
| 571 | _RSA_size @497 | ||
| 572 | _RSA_verify @498 | ||
| 573 | _RSA_verify_ASN1_OCTET_STRING @499 | ||
| 574 | _SHA @500 | ||
| 575 | _SHA1 @501 | ||
| 576 | _SHA1_Final @502 | ||
| 577 | _SHA1_Init @503 | ||
| 578 | _SHA1_Transform @1012 | ||
| 579 | _SHA1_Update @504 | ||
| 580 | _SHA_Final @505 | ||
| 581 | _SHA_Init @506 | ||
| 582 | _SHA_Transform @1013 | ||
| 583 | _SHA_Update @507 | ||
| 584 | _TXT_DB_create_index @511 | ||
| 585 | _TXT_DB_free @512 | ||
| 586 | _TXT_DB_get_by_index @513 | ||
| 587 | _TXT_DB_insert @514 | ||
| 588 | _TXT_DB_read @515 | ||
| 589 | _TXT_DB_write @516 | ||
| 590 | _X509_ALGOR_free @517 | ||
| 591 | _X509_ALGOR_new @518 | ||
| 592 | _X509_ATTRIBUTE_free @519 | ||
| 593 | _X509_ATTRIBUTE_new @520 | ||
| 594 | _X509_CINF_free @521 | ||
| 595 | _X509_CINF_new @522 | ||
| 596 | _X509_CRL_INFO_free @523 | ||
| 597 | _X509_CRL_INFO_new @524 | ||
| 598 | _X509_CRL_add_ext @525 | ||
| 599 | _X509_CRL_cmp @526 | ||
| 600 | _X509_CRL_delete_ext @527 | ||
| 601 | _X509_CRL_dup @528 | ||
| 602 | _X509_CRL_free @529 | ||
| 603 | _X509_CRL_get_ext @530 | ||
| 604 | _X509_CRL_get_ext_by_NID @531 | ||
| 605 | _X509_CRL_get_ext_by_OBJ @532 | ||
| 606 | _X509_CRL_get_ext_by_critical @533 | ||
| 607 | _X509_CRL_get_ext_count @534 | ||
| 608 | _X509_CRL_new @535 | ||
| 609 | _X509_CRL_sign @536 | ||
| 610 | _X509_CRL_verify @537 | ||
| 611 | _X509_EXTENSION_create_by_NID @538 | ||
| 612 | _X509_EXTENSION_create_by_OBJ @539 | ||
| 613 | _X509_EXTENSION_dup @540 | ||
| 614 | _X509_EXTENSION_free @541 | ||
| 615 | _X509_EXTENSION_get_critical @542 | ||
| 616 | _X509_EXTENSION_get_data @543 | ||
| 617 | _X509_EXTENSION_get_object @544 | ||
| 618 | _X509_EXTENSION_new @545 | ||
| 619 | _X509_EXTENSION_set_critical @546 | ||
| 620 | _X509_EXTENSION_set_data @547 | ||
| 621 | _X509_EXTENSION_set_object @548 | ||
| 622 | _X509_INFO_free @549 | ||
| 623 | _X509_INFO_new @550 | ||
| 624 | _X509_LOOKUP_by_alias @551 | ||
| 625 | _X509_LOOKUP_by_fingerprint @552 | ||
| 626 | _X509_LOOKUP_by_issuer_serial @553 | ||
| 627 | _X509_LOOKUP_by_subject @554 | ||
| 628 | _X509_LOOKUP_ctrl @555 | ||
| 629 | _X509_LOOKUP_file @556 | ||
| 630 | _X509_LOOKUP_free @557 | ||
| 631 | _X509_LOOKUP_hash_dir @558 | ||
| 632 | _X509_LOOKUP_init @559 | ||
| 633 | _X509_LOOKUP_new @560 | ||
| 634 | _X509_LOOKUP_shutdown @561 | ||
| 635 | _X509_NAME_ENTRY_create_by_NID @562 | ||
| 636 | _X509_NAME_ENTRY_create_by_OBJ @563 | ||
| 637 | _X509_NAME_ENTRY_dup @564 | ||
| 638 | _X509_NAME_ENTRY_free @565 | ||
| 639 | _X509_NAME_ENTRY_get_data @566 | ||
| 640 | _X509_NAME_ENTRY_get_object @567 | ||
| 641 | _X509_NAME_ENTRY_new @568 | ||
| 642 | _X509_NAME_ENTRY_set_data @569 | ||
| 643 | _X509_NAME_ENTRY_set_object @570 | ||
| 644 | _X509_NAME_add_entry @571 | ||
| 645 | _X509_NAME_cmp @572 | ||
| 646 | _X509_NAME_delete_entry @573 | ||
| 647 | _X509_NAME_digest @574 | ||
| 648 | _X509_NAME_dup @575 | ||
| 649 | _X509_NAME_entry_count @576 | ||
| 650 | _X509_NAME_free @577 | ||
| 651 | _X509_NAME_get_entry @578 | ||
| 652 | _X509_NAME_get_index_by_NID @579 | ||
| 653 | _X509_NAME_get_index_by_OBJ @580 | ||
| 654 | _X509_NAME_get_text_by_NID @581 | ||
| 655 | _X509_NAME_get_text_by_OBJ @582 | ||
| 656 | _X509_NAME_hash @583 | ||
| 657 | _X509_NAME_new @584 | ||
| 658 | _X509_NAME_oneline @585 | ||
| 659 | _X509_NAME_print @586 | ||
| 660 | _X509_NAME_set @587 | ||
| 661 | _X509_OBJECT_free_contents @588 | ||
| 662 | _X509_OBJECT_retrive_by_subject @589 | ||
| 663 | _X509_OBJECT_up_ref_count @590 | ||
| 664 | _X509_PKEY_free @591 | ||
| 665 | _X509_PKEY_new @592 | ||
| 666 | _X509_PUBKEY_free @593 | ||
| 667 | _X509_PUBKEY_get @594 | ||
| 668 | _X509_PUBKEY_new @595 | ||
| 669 | _X509_PUBKEY_set @596 | ||
| 670 | _X509_REQ_INFO_free @597 | ||
| 671 | _X509_REQ_INFO_new @598 | ||
| 672 | _X509_REQ_dup @599 | ||
| 673 | _X509_REQ_free @600 | ||
| 674 | _X509_REQ_get_pubkey @601 | ||
| 675 | _X509_REQ_new @602 | ||
| 676 | _X509_REQ_print @603 | ||
| 677 | _X509_REQ_set_pubkey @605 | ||
| 678 | _X509_REQ_set_subject_name @606 | ||
| 679 | _X509_REQ_set_version @607 | ||
| 680 | _X509_REQ_sign @608 | ||
| 681 | _X509_REQ_to_X509 @609 | ||
| 682 | _X509_REQ_verify @610 | ||
| 683 | _X509_REVOKED_add_ext @611 | ||
| 684 | _X509_REVOKED_delete_ext @612 | ||
| 685 | _X509_REVOKED_free @613 | ||
| 686 | _X509_REVOKED_get_ext @614 | ||
| 687 | _X509_REVOKED_get_ext_by_NID @615 | ||
| 688 | _X509_REVOKED_get_ext_by_OBJ @616 | ||
| 689 | _X509_REVOKED_get_ext_by_critical @617 | ||
| 690 | _X509_REVOKED_get_ext_count @618 | ||
| 691 | _X509_REVOKED_new @619 | ||
| 692 | _X509_SIG_free @620 | ||
| 693 | _X509_SIG_new @621 | ||
| 694 | _X509_STORE_CTX_cleanup @622 | ||
| 695 | _X509_STORE_CTX_get_chain @1014 | ||
| 696 | _X509_STORE_CTX_get_current_cert @1015 | ||
| 697 | _X509_STORE_CTX_get_error @1016 | ||
| 698 | _X509_STORE_CTX_get_error_depth @1017 | ||
| 699 | _X509_STORE_CTX_get_ex_data @1018 | ||
| 700 | _X509_STORE_CTX_init @623 | ||
| 701 | _X509_STORE_CTX_set_cert @1020 | ||
| 702 | _X509_STORE_CTX_set_chain @1021 | ||
| 703 | _X509_STORE_CTX_set_error @1022 | ||
| 704 | _X509_STORE_CTX_set_ex_data @1023 | ||
| 705 | _X509_STORE_add_cert @624 | ||
| 706 | _X509_STORE_add_crl @957 | ||
| 707 | _X509_STORE_add_lookup @625 | ||
| 708 | _X509_STORE_free @626 | ||
| 709 | _X509_STORE_get_by_subject @627 | ||
| 710 | _X509_STORE_load_locations @628 | ||
| 711 | _X509_STORE_new @629 | ||
| 712 | _X509_STORE_set_default_paths @630 | ||
| 713 | _X509_VAL_free @631 | ||
| 714 | _X509_VAL_new @632 | ||
| 715 | _X509_add_ext @633 | ||
| 716 | _X509_asn1_meth @634 | ||
| 717 | _X509_certificate_type @635 | ||
| 718 | _X509_check_private_key @636 | ||
| 719 | _X509_cmp_current_time @637 | ||
| 720 | _X509_delete_ext @638 | ||
| 721 | _X509_digest @639 | ||
| 722 | _X509_dup @640 | ||
| 723 | _X509_find_by_issuer_and_serial @920 | ||
| 724 | _X509_find_by_subject @921 | ||
| 725 | _X509_free @641 | ||
| 726 | _X509_get_default_cert_area @642 | ||
| 727 | _X509_get_default_cert_dir @643 | ||
| 728 | _X509_get_default_cert_dir_env @644 | ||
| 729 | _X509_get_default_cert_file @645 | ||
| 730 | _X509_get_default_cert_file_env @646 | ||
| 731 | _X509_get_default_private_dir @647 | ||
| 732 | _X509_get_ext @648 | ||
| 733 | _X509_get_ext_by_NID @649 | ||
| 734 | _X509_get_ext_by_OBJ @650 | ||
| 735 | _X509_get_ext_by_critical @651 | ||
| 736 | _X509_get_ext_count @652 | ||
| 737 | _X509_get_issuer_name @653 | ||
| 738 | _X509_get_pubkey @654 | ||
| 739 | _X509_get_pubkey_parameters @655 | ||
| 740 | _X509_get_serialNumber @656 | ||
| 741 | _X509_get_subject_name @657 | ||
| 742 | _X509_gmtime_adj @658 | ||
| 743 | _X509_issuer_and_serial_cmp @659 | ||
| 744 | _X509_issuer_and_serial_hash @660 | ||
| 745 | _X509_issuer_name_cmp @661 | ||
| 746 | _X509_issuer_name_hash @662 | ||
| 747 | _X509_load_cert_file @663 | ||
| 748 | _X509_load_crl_file @958 | ||
| 749 | _X509_new @664 | ||
| 750 | _X509_print @665 | ||
| 751 | _X509_set_issuer_name @667 | ||
| 752 | _X509_set_notAfter @668 | ||
| 753 | _X509_set_notBefore @669 | ||
| 754 | _X509_set_pubkey @670 | ||
| 755 | _X509_set_serialNumber @671 | ||
| 756 | _X509_set_subject_name @672 | ||
| 757 | _X509_set_version @673 | ||
| 758 | _X509_sign @674 | ||
| 759 | _X509_subject_name_cmp @675 | ||
| 760 | _X509_subject_name_hash @676 | ||
| 761 | _X509_to_X509_REQ @677 | ||
| 762 | _X509_verify @678 | ||
| 763 | _X509_verify_cert @679 | ||
| 764 | _X509_verify_cert_error_string @680 | ||
| 765 | _X509v3_add_ext @681 | ||
| 766 | _X509v3_add_extension @682 | ||
| 767 | _X509v3_add_netscape_extensions @683 | ||
| 768 | _X509v3_add_standard_extensions @684 | ||
| 769 | _X509v3_cleanup_extensions @685 | ||
| 770 | _X509v3_data_type_by_NID @686 | ||
| 771 | _X509v3_data_type_by_OBJ @687 | ||
| 772 | _X509v3_delete_ext @688 | ||
| 773 | _X509v3_get_ext @689 | ||
| 774 | _X509v3_get_ext_by_NID @690 | ||
| 775 | _X509v3_get_ext_by_OBJ @691 | ||
| 776 | _X509v3_get_ext_by_critical @692 | ||
| 777 | _X509v3_get_ext_count @693 | ||
| 778 | _X509v3_pack_string @694 | ||
| 779 | _X509v3_pack_type_by_NID @695 | ||
| 780 | _X509v3_pack_type_by_OBJ @696 | ||
| 781 | _X509v3_unpack_string @697 | ||
| 782 | _a2d_ASN1_OBJECT @699 | ||
| 783 | _a2i_ASN1_INTEGER @700 | ||
| 784 | _a2i_ASN1_STRING @701 | ||
| 785 | _asn1_Finish @702 | ||
| 786 | _asn1_GetSequence @703 | ||
| 787 | _asn1_add_error @1091 | ||
| 788 | _bn_add_words @1039 | ||
| 789 | _bn_div64 @704 | ||
| 790 | _bn_expand2 @705 | ||
| 791 | _bn_mul_add_words @706 | ||
| 792 | _bn_mul_words @707 | ||
| 793 | _bn_qadd @708 | ||
| 794 | _bn_qsub @709 | ||
| 795 | _bn_sqr_words @710 | ||
| 796 | _crypt @711 | ||
| 797 | _d2i_ASN1_BIT_STRING @712 | ||
| 798 | _d2i_ASN1_BOOLEAN @713 | ||
| 799 | _d2i_ASN1_HEADER @714 | ||
| 800 | _d2i_ASN1_IA5STRING @715 | ||
| 801 | _d2i_ASN1_INTEGER @716 | ||
| 802 | _d2i_ASN1_OBJECT @717 | ||
| 803 | _d2i_ASN1_OCTET_STRING @718 | ||
| 804 | _d2i_ASN1_PRINTABLE @719 | ||
| 805 | _d2i_ASN1_PRINTABLESTRING @720 | ||
| 806 | _d2i_ASN1_SET @721 | ||
| 807 | _d2i_ASN1_T61STRING @722 | ||
| 808 | _d2i_ASN1_TYPE @723 | ||
| 809 | _d2i_ASN1_UTCTIME @724 | ||
| 810 | _d2i_ASN1_bytes @725 | ||
| 811 | _d2i_ASN1_type_bytes @726 | ||
| 812 | _d2i_DHparams @727 | ||
| 813 | _d2i_DSAPrivateKey @728 | ||
| 814 | _d2i_DSAPrivateKey_bio @729 | ||
| 815 | _d2i_DSAPublicKey @731 | ||
| 816 | _d2i_DSAparams @732 | ||
| 817 | _d2i_NETSCAPE_SPKAC @733 | ||
| 818 | _d2i_NETSCAPE_SPKI @734 | ||
| 819 | _d2i_Netscape_RSA @735 | ||
| 820 | _d2i_Netscape_RSA_2 @1040 | ||
| 821 | _d2i_PKCS7 @736 | ||
| 822 | _d2i_PKCS7_DIGEST @737 | ||
| 823 | _d2i_PKCS7_ENCRYPT @738 | ||
| 824 | _d2i_PKCS7_ENC_CONTENT @739 | ||
| 825 | _d2i_PKCS7_ENVELOPE @740 | ||
| 826 | _d2i_PKCS7_ISSUER_AND_SERIAL @741 | ||
| 827 | _d2i_PKCS7_RECIP_INFO @742 | ||
| 828 | _d2i_PKCS7_SIGNED @743 | ||
| 829 | _d2i_PKCS7_SIGNER_INFO @744 | ||
| 830 | _d2i_PKCS7_SIGN_ENVELOPE @745 | ||
| 831 | _d2i_PKCS7_bio @746 | ||
| 832 | _d2i_PrivateKey @748 | ||
| 833 | _d2i_PublicKey @749 | ||
| 834 | _d2i_RSAPrivateKey @750 | ||
| 835 | _d2i_RSAPrivateKey_bio @751 | ||
| 836 | _d2i_RSAPublicKey @753 | ||
| 837 | _d2i_RSAPublicKey_bio @945 | ||
| 838 | _d2i_X509 @754 | ||
| 839 | _d2i_X509_ALGOR @755 | ||
| 840 | _d2i_X509_ATTRIBUTE @756 | ||
| 841 | _d2i_X509_CINF @757 | ||
| 842 | _d2i_X509_CRL @758 | ||
| 843 | _d2i_X509_CRL_INFO @759 | ||
| 844 | _d2i_X509_CRL_bio @760 | ||
| 845 | _d2i_X509_EXTENSION @762 | ||
| 846 | _d2i_X509_NAME @763 | ||
| 847 | _d2i_X509_NAME_ENTRY @764 | ||
| 848 | _d2i_X509_PKEY @765 | ||
| 849 | _d2i_X509_PUBKEY @766 | ||
| 850 | _d2i_X509_REQ @767 | ||
| 851 | _d2i_X509_REQ_INFO @768 | ||
| 852 | _d2i_X509_REQ_bio @769 | ||
| 853 | _d2i_X509_REVOKED @771 | ||
| 854 | _d2i_X509_SIG @772 | ||
| 855 | _d2i_X509_VAL @773 | ||
| 856 | _d2i_X509_bio @774 | ||
| 857 | _des_cbc_cksum @777 | ||
| 858 | _des_cbc_encrypt @778 | ||
| 859 | _des_cblock_print_file @779 | ||
| 860 | _des_cfb64_encrypt @780 | ||
| 861 | _des_cfb_encrypt @781 | ||
| 862 | _des_decrypt3 @782 | ||
| 863 | _des_ecb3_encrypt @783 | ||
| 864 | _des_ecb_encrypt @784 | ||
| 865 | _des_ede3_cbc_encrypt @785 | ||
| 866 | _des_ede3_cfb64_encrypt @786 | ||
| 867 | _des_ede3_ofb64_encrypt @787 | ||
| 868 | _des_enc_read @788 | ||
| 869 | _des_enc_write @789 | ||
| 870 | _des_encrypt @790 | ||
| 871 | _des_encrypt2 @791 | ||
| 872 | _des_encrypt3 @792 | ||
| 873 | _des_fcrypt @793 | ||
| 874 | _des_is_weak_key @794 | ||
| 875 | _des_key_sched @795 | ||
| 876 | _des_ncbc_encrypt @796 | ||
| 877 | _des_ofb64_encrypt @797 | ||
| 878 | _des_ofb_encrypt @798 | ||
| 879 | _des_options @799 | ||
| 880 | _des_pcbc_encrypt @800 | ||
| 881 | _des_quad_cksum @801 | ||
| 882 | _des_random_key @802 | ||
| 883 | _des_random_seed @803 | ||
| 884 | _des_read_2passwords @804 | ||
| 885 | _des_read_password @805 | ||
| 886 | _des_read_pw @806 | ||
| 887 | _des_read_pw_string @807 | ||
| 888 | _des_set_key @808 | ||
| 889 | _des_set_odd_parity @809 | ||
| 890 | _des_string_to_2keys @810 | ||
| 891 | _des_string_to_key @811 | ||
| 892 | _des_xcbc_encrypt @812 | ||
| 893 | _des_xwhite_in2out @813 | ||
| 894 | _i2a_ASN1_INTEGER @815 | ||
| 895 | _i2a_ASN1_OBJECT @816 | ||
| 896 | _i2a_ASN1_STRING @817 | ||
| 897 | _i2d_ASN1_BIT_STRING @818 | ||
| 898 | _i2d_ASN1_BOOLEAN @819 | ||
| 899 | _i2d_ASN1_HEADER @820 | ||
| 900 | _i2d_ASN1_IA5STRING @821 | ||
| 901 | _i2d_ASN1_INTEGER @822 | ||
| 902 | _i2d_ASN1_OBJECT @823 | ||
| 903 | _i2d_ASN1_OCTET_STRING @824 | ||
| 904 | _i2d_ASN1_PRINTABLE @825 | ||
| 905 | _i2d_ASN1_SET @826 | ||
| 906 | _i2d_ASN1_TYPE @827 | ||
| 907 | _i2d_ASN1_UTCTIME @828 | ||
| 908 | _i2d_ASN1_bytes @829 | ||
| 909 | _i2d_DHparams @830 | ||
| 910 | _i2d_DSAPrivateKey @831 | ||
| 911 | _i2d_DSAPrivateKey_bio @832 | ||
| 912 | _i2d_DSAPublicKey @834 | ||
| 913 | _i2d_DSAparams @835 | ||
| 914 | _i2d_NETSCAPE_SPKAC @836 | ||
| 915 | _i2d_NETSCAPE_SPKI @837 | ||
| 916 | _i2d_Netscape_RSA @838 | ||
| 917 | _i2d_PKCS7 @839 | ||
| 918 | _i2d_PKCS7_DIGEST @840 | ||
| 919 | _i2d_PKCS7_ENCRYPT @841 | ||
| 920 | _i2d_PKCS7_ENC_CONTENT @842 | ||
| 921 | _i2d_PKCS7_ENVELOPE @843 | ||
| 922 | _i2d_PKCS7_ISSUER_AND_SERIAL @844 | ||
| 923 | _i2d_PKCS7_RECIP_INFO @845 | ||
| 924 | _i2d_PKCS7_SIGNED @846 | ||
| 925 | _i2d_PKCS7_SIGNER_INFO @847 | ||
| 926 | _i2d_PKCS7_SIGN_ENVELOPE @848 | ||
| 927 | _i2d_PKCS7_bio @849 | ||
| 928 | _i2d_PrivateKey @851 | ||
| 929 | _i2d_PublicKey @852 | ||
| 930 | _i2d_RSAPrivateKey @853 | ||
| 931 | _i2d_RSAPrivateKey_bio @854 | ||
| 932 | _i2d_RSAPublicKey @856 | ||
| 933 | _i2d_RSAPublicKey_bio @946 | ||
| 934 | _i2d_X509 @857 | ||
| 935 | _i2d_X509_ALGOR @858 | ||
| 936 | _i2d_X509_ATTRIBUTE @859 | ||
| 937 | _i2d_X509_CINF @860 | ||
| 938 | _i2d_X509_CRL @861 | ||
| 939 | _i2d_X509_CRL_INFO @862 | ||
| 940 | _i2d_X509_CRL_bio @863 | ||
| 941 | _i2d_X509_EXTENSION @865 | ||
| 942 | _i2d_X509_NAME @866 | ||
| 943 | _i2d_X509_NAME_ENTRY @867 | ||
| 944 | _i2d_X509_PKEY @868 | ||
| 945 | _i2d_X509_PUBKEY @869 | ||
| 946 | _i2d_X509_REQ @870 | ||
| 947 | _i2d_X509_REQ_INFO @871 | ||
| 948 | _i2d_X509_REQ_bio @872 | ||
| 949 | _i2d_X509_REVOKED @874 | ||
| 950 | _i2d_X509_SIG @875 | ||
| 951 | _i2d_X509_VAL @876 | ||
| 952 | _i2d_X509_bio @877 | ||
| 953 | _i2t_ASN1_OBJECT @979 | ||
| 954 | _idea_cbc_encrypt @879 | ||
| 955 | _idea_cfb64_encrypt @880 | ||
| 956 | _idea_ecb_encrypt @881 | ||
| 957 | _idea_encrypt @882 | ||
| 958 | _idea_ofb64_encrypt @883 | ||
| 959 | _idea_options @884 | ||
| 960 | _idea_set_decrypt_key @885 | ||
| 961 | _idea_set_encrypt_key @886 | ||
| 962 | _lh_delete @887 | ||
| 963 | _lh_doall @888 | ||
| 964 | _lh_doall_arg @889 | ||
| 965 | _lh_free @890 | ||
| 966 | _lh_insert @891 | ||
| 967 | _lh_new @892 | ||
| 968 | _lh_node_stats_bio @894 | ||
| 969 | _lh_node_usage_stats_bio @896 | ||
| 970 | _lh_retrieve @897 | ||
| 971 | _lh_stats_bio @899 | ||
| 972 | _lh_strhash @900 | ||
| 973 | _sk_delete @901 | ||
| 974 | _sk_delete_ptr @902 | ||
| 975 | _sk_dup @903 | ||
| 976 | _sk_find @904 | ||
| 977 | _sk_free @905 | ||
| 978 | _sk_insert @906 | ||
| 979 | _sk_new @907 | ||
| 980 | _sk_pop @908 | ||
| 981 | _sk_pop_free @909 | ||
| 982 | _sk_push @910 | ||
| 983 | _sk_set_cmp_func @911 | ||
| 984 | _sk_shift @912 | ||
| 985 | _sk_unshift @913 | ||
| 986 | _sk_zero @914 | ||
| 987 | |||
diff --git a/src/lib/libssl/src/ms/libeay32.def b/src/lib/libssl/src/ms/libeay32.def new file mode 100644 index 0000000000..196c52216e --- /dev/null +++ b/src/lib/libssl/src/ms/libeay32.def | |||
| @@ -0,0 +1,1035 @@ | |||
| 1 | ; | ||
| 2 | ; Definition file for the DDL version of the LIBEAY32 library from SSLeay | ||
| 3 | ; | ||
| 4 | |||
| 5 | LIBRARY LIBEAY32 | ||
| 6 | |||
| 7 | DESCRIPTION 'SSLeay LIBEAY32 - eay@cryptsoft.com' | ||
| 8 | |||
| 9 | EXPORTS | ||
| 10 | SSLeay @1 | ||
| 11 | SSLeay_add_all_algorithms @508 | ||
| 12 | SSLeay_add_all_ciphers @509 | ||
| 13 | SSLeay_add_all_digests @510 | ||
| 14 | SSLeay_version @2 | ||
| 15 | ASN1_BIT_STRING_asn1_meth @3 | ||
| 16 | ASN1_BIT_STRING_get_bit @1060 | ||
| 17 | ASN1_BIT_STRING_set_bit @1061 | ||
| 18 | ASN1_HEADER_free @4 | ||
| 19 | ASN1_HEADER_new @5 | ||
| 20 | ASN1_IA5STRING_asn1_meth @6 | ||
| 21 | ASN1_INTEGER_get @7 | ||
| 22 | ASN1_INTEGER_set @8 | ||
| 23 | ASN1_INTEGER_to_BN @9 | ||
| 24 | ASN1_OBJECT_create @10 | ||
| 25 | ASN1_OBJECT_free @11 | ||
| 26 | ASN1_OBJECT_new @12 | ||
| 27 | ASN1_PRINTABLE_type @13 | ||
| 28 | ASN1_STRING_cmp @14 | ||
| 29 | ASN1_STRING_dup @15 | ||
| 30 | ASN1_STRING_free @16 | ||
| 31 | ASN1_STRING_new @17 | ||
| 32 | ASN1_STRING_print @18 | ||
| 33 | ASN1_STRING_set @19 | ||
| 34 | ASN1_STRING_type_new @20 | ||
| 35 | ASN1_TYPE_free @21 | ||
| 36 | ASN1_TYPE_get @916 | ||
| 37 | ASN1_TYPE_get_int_octetstring @1076 | ||
| 38 | ASN1_TYPE_get_octetstring @1077 | ||
| 39 | ASN1_TYPE_new @22 | ||
| 40 | ASN1_TYPE_set @917 | ||
| 41 | ASN1_TYPE_set_int_octetstring @1078 | ||
| 42 | ASN1_TYPE_set_octetstring @1079 | ||
| 43 | ASN1_UNIVERSALSTRING_to_string @23 | ||
| 44 | ASN1_UTCTIME_check @24 | ||
| 45 | ASN1_UTCTIME_print @25 | ||
| 46 | ASN1_UTCTIME_set @26 | ||
| 47 | ASN1_UTCTIME_set_string @1080 | ||
| 48 | ASN1_check_infinite_end @27 | ||
| 49 | ASN1_d2i_bio @28 | ||
| 50 | ASN1_d2i_fp @29 | ||
| 51 | ASN1_digest @30 | ||
| 52 | ASN1_dup @31 | ||
| 53 | ASN1_get_object @32 | ||
| 54 | ASN1_i2d_bio @33 | ||
| 55 | ASN1_i2d_fp @34 | ||
| 56 | ASN1_object_size @35 | ||
| 57 | ASN1_parse @36 | ||
| 58 | ASN1_put_object @37 | ||
| 59 | ASN1_sign @38 | ||
| 60 | ASN1_verify @39 | ||
| 61 | BF_cbc_encrypt @40 | ||
| 62 | BF_cfb64_encrypt @41 | ||
| 63 | BF_decrypt @987 | ||
| 64 | BF_ecb_encrypt @42 | ||
| 65 | BF_encrypt @43 | ||
| 66 | BF_ofb64_encrypt @44 | ||
| 67 | BF_options @45 | ||
| 68 | BF_set_key @46 | ||
| 69 | BIO_accept @51 | ||
| 70 | BIO_copy_next_retry @955 | ||
| 71 | BIO_ctrl @52 | ||
| 72 | BIO_debug_callback @54 | ||
| 73 | BIO_dump @55 | ||
| 74 | BIO_dup_chain @56 | ||
| 75 | BIO_f_base64 @57 | ||
| 76 | BIO_f_buffer @58 | ||
| 77 | BIO_f_cipher @59 | ||
| 78 | BIO_f_md @60 | ||
| 79 | BIO_f_nbio_test @915 | ||
| 80 | BIO_f_null @61 | ||
| 81 | BIO_fd_non_fatal_error @63 | ||
| 82 | BIO_fd_should_retry @64 | ||
| 83 | BIO_find_type @65 | ||
| 84 | BIO_free @66 | ||
| 85 | BIO_free_all @67 | ||
| 86 | BIO_get_accept_socket @69 | ||
| 87 | BIO_get_host_ip @71 | ||
| 88 | BIO_get_port @72 | ||
| 89 | BIO_get_retry_BIO @73 | ||
| 90 | BIO_get_retry_reason @74 | ||
| 91 | BIO_gethostbyname @75 | ||
| 92 | BIO_gets @76 | ||
| 93 | BIO_ghbn_ctrl @1003 | ||
| 94 | BIO_int_ctrl @53 | ||
| 95 | BIO_new @78 | ||
| 96 | BIO_new_accept @79 | ||
| 97 | BIO_new_connect @80 | ||
| 98 | BIO_new_fd @81 | ||
| 99 | BIO_new_file @82 | ||
| 100 | BIO_new_fp @83 | ||
| 101 | BIO_new_socket @84 | ||
| 102 | BIO_pop @85 | ||
| 103 | BIO_printf @86 | ||
| 104 | BIO_ptr_ctrl @969 | ||
| 105 | BIO_push @87 | ||
| 106 | BIO_puts @88 | ||
| 107 | BIO_read @89 | ||
| 108 | BIO_s_accept @90 | ||
| 109 | BIO_s_connect @91 | ||
| 110 | BIO_s_fd @92 | ||
| 111 | BIO_s_file @93 | ||
| 112 | BIO_s_mem @95 | ||
| 113 | BIO_s_null @96 | ||
| 114 | BIO_s_socket @98 | ||
| 115 | BIO_set @100 | ||
| 116 | BIO_set_cipher @101 | ||
| 117 | BIO_set_tcp_ndelay @102 | ||
| 118 | BIO_sock_cleanup @103 | ||
| 119 | BIO_sock_error @104 | ||
| 120 | BIO_sock_init @105 | ||
| 121 | BIO_sock_non_fatal_error @106 | ||
| 122 | BIO_sock_should_retry @107 | ||
| 123 | BIO_socket_ioctl @108 | ||
| 124 | BIO_write @109 | ||
| 125 | BN_BLINDING_convert @973 | ||
| 126 | BN_BLINDING_free @981 | ||
| 127 | BN_BLINDING_invert @974 | ||
| 128 | BN_BLINDING_new @980 | ||
| 129 | BN_BLINDING_update @975 | ||
| 130 | BN_CTX_free @110 | ||
| 131 | BN_CTX_new @111 | ||
| 132 | BN_MONT_CTX_free @112 | ||
| 133 | BN_MONT_CTX_new @113 | ||
| 134 | BN_MONT_CTX_set @114 | ||
| 135 | BN_add @115 | ||
| 136 | BN_add_word @116 | ||
| 137 | BN_bin2bn @118 | ||
| 138 | BN_bn2bin @120 | ||
| 139 | BN_bn2dec @1002 | ||
| 140 | BN_bn2hex @119 | ||
| 141 | BN_bn2mpi @1058 | ||
| 142 | BN_clear @121 | ||
| 143 | BN_clear_bit @122 | ||
| 144 | BN_clear_free @123 | ||
| 145 | BN_cmp @124 | ||
| 146 | BN_copy @125 | ||
| 147 | BN_dec2bn @1001 | ||
| 148 | BN_div @126 | ||
| 149 | BN_div_word @127 | ||
| 150 | BN_dup @128 | ||
| 151 | BN_exp @998 | ||
| 152 | BN_free @129 | ||
| 153 | BN_from_montgomery @130 | ||
| 154 | BN_gcd @131 | ||
| 155 | BN_generate_prime @132 | ||
| 156 | BN_get_word @133 | ||
| 157 | BN_hex2bn @117 | ||
| 158 | BN_is_bit_set @134 | ||
| 159 | BN_is_prime @135 | ||
| 160 | BN_lshift @136 | ||
| 161 | BN_lshift1 @137 | ||
| 162 | BN_mask_bits @138 | ||
| 163 | BN_mod @139 | ||
| 164 | BN_mod_exp @140 | ||
| 165 | BN_mod_exp_mont @141 | ||
| 166 | BN_mod_exp_recp @142 | ||
| 167 | BN_mod_exp_simple @143 | ||
| 168 | BN_mod_inverse @144 | ||
| 169 | BN_mod_mul @145 | ||
| 170 | BN_mod_mul_montgomery @146 | ||
| 171 | BN_mod_mul_reciprocal @147 | ||
| 172 | BN_mod_word @148 | ||
| 173 | BN_mpi2bn @1059 | ||
| 174 | BN_mul @149 | ||
| 175 | BN_mul_word @999 | ||
| 176 | BN_new @150 | ||
| 177 | BN_num_bits @151 | ||
| 178 | BN_num_bits_word @152 | ||
| 179 | BN_options @153 | ||
| 180 | BN_print @154 | ||
| 181 | BN_print_fp @155 | ||
| 182 | BN_rand @156 | ||
| 183 | BN_reciprocal @157 | ||
| 184 | BN_rshift @158 | ||
| 185 | BN_rshift1 @159 | ||
| 186 | BN_set_bit @160 | ||
| 187 | BN_set_word @161 | ||
| 188 | BN_sqr @162 | ||
| 189 | BN_sub @163 | ||
| 190 | BN_sub_word @1000 | ||
| 191 | BN_to_ASN1_INTEGER @164 | ||
| 192 | BN_ucmp @165 | ||
| 193 | BN_value_one @166 | ||
| 194 | BUF_MEM_free @167 | ||
| 195 | BUF_MEM_grow @168 | ||
| 196 | BUF_MEM_new @169 | ||
| 197 | BUF_strdup @170 | ||
| 198 | CAST_cbc_encrypt @992 | ||
| 199 | CAST_cfb64_encrypt @993 | ||
| 200 | CAST_decrypt @990 | ||
| 201 | CAST_ecb_encrypt @991 | ||
| 202 | CAST_encrypt @989 | ||
| 203 | CAST_ofb64_encrypt @994 | ||
| 204 | CAST_set_key @988 | ||
| 205 | CONF_free @171 | ||
| 206 | CONF_get_number @172 | ||
| 207 | CONF_get_section @173 | ||
| 208 | CONF_get_string @174 | ||
| 209 | CONF_load @175 | ||
| 210 | CRYPTO_add_lock @176 | ||
| 211 | CRYPTO_dbg_free @177 | ||
| 212 | CRYPTO_dbg_malloc @178 | ||
| 213 | CRYPTO_dbg_realloc @179 | ||
| 214 | CRYPTO_dbg_remalloc @180 | ||
| 215 | CRYPTO_dup_ex_data @1025 | ||
| 216 | CRYPTO_free @181 | ||
| 217 | CRYPTO_free_ex_data @1004 | ||
| 218 | CRYPTO_get_add_lock_callback @182 | ||
| 219 | CRYPTO_get_ex_data @1005 | ||
| 220 | CRYPTO_get_ex_new_index @1041 | ||
| 221 | CRYPTO_get_id_callback @183 | ||
| 222 | CRYPTO_get_lock_name @184 | ||
| 223 | CRYPTO_get_locking_callback @185 | ||
| 224 | CRYPTO_get_mem_functions @186 | ||
| 225 | CRYPTO_get_new_lockid @1026 | ||
| 226 | CRYPTO_lock @187 | ||
| 227 | CRYPTO_malloc @188 | ||
| 228 | CRYPTO_mem_ctrl @189 | ||
| 229 | CRYPTO_mem_leaks @190 | ||
| 230 | CRYPTO_mem_leaks_cb @191 | ||
| 231 | CRYPTO_mem_leaks_fp @192 | ||
| 232 | CRYPTO_new_ex_data @1027 | ||
| 233 | CRYPTO_realloc @193 | ||
| 234 | CRYPTO_remalloc @194 | ||
| 235 | CRYPTO_set_add_lock_callback @195 | ||
| 236 | CRYPTO_set_ex_data @1007 | ||
| 237 | CRYPTO_set_id_callback @196 | ||
| 238 | CRYPTO_set_locking_callback @197 | ||
| 239 | CRYPTO_set_mem_functions @198 | ||
| 240 | CRYPTO_thread_id @199 | ||
| 241 | DH_check @200 | ||
| 242 | DH_compute_key @201 | ||
| 243 | DH_free @202 | ||
| 244 | DH_generate_key @203 | ||
| 245 | DH_generate_parameters @204 | ||
| 246 | DH_new @205 | ||
| 247 | DH_size @206 | ||
| 248 | DHparams_print @207 | ||
| 249 | DHparams_print_fp @208 | ||
| 250 | DSA_free @209 | ||
| 251 | DSA_generate_key @210 | ||
| 252 | DSA_generate_parameters @211 | ||
| 253 | DSA_is_prime @212 | ||
| 254 | DSA_new @213 | ||
| 255 | DSA_print @214 | ||
| 256 | DSA_print_fp @215 | ||
| 257 | DSA_sign @216 | ||
| 258 | DSA_sign_setup @217 | ||
| 259 | DSA_size @218 | ||
| 260 | DSA_verify @219 | ||
| 261 | DSAparams_print @220 | ||
| 262 | DSAparams_print_fp @221 | ||
| 263 | ERR_add_error_data @1081 | ||
| 264 | ERR_clear_error @222 | ||
| 265 | ERR_error_string @223 | ||
| 266 | ERR_free_strings @224 | ||
| 267 | ERR_func_error_string @225 | ||
| 268 | ERR_get_err_state_table @226 | ||
| 269 | ERR_get_error @227 | ||
| 270 | ERR_get_error_line @228 | ||
| 271 | ERR_get_next_error_library @966 | ||
| 272 | ERR_get_state @229 | ||
| 273 | ERR_get_string_table @230 | ||
| 274 | ERR_lib_error_string @231 | ||
| 275 | ERR_load_ASN1_strings @232 | ||
| 276 | ERR_load_BIO_strings @233 | ||
| 277 | ERR_load_BN_strings @234 | ||
| 278 | ERR_load_BUF_strings @235 | ||
| 279 | ERR_load_CONF_strings @236 | ||
| 280 | ERR_load_CRYPTO_strings @1009 | ||
| 281 | ERR_load_DH_strings @237 | ||
| 282 | ERR_load_DSA_strings @238 | ||
| 283 | ERR_load_ERR_strings @239 | ||
| 284 | ERR_load_EVP_strings @240 | ||
| 285 | ERR_load_OBJ_strings @241 | ||
| 286 | ERR_load_PEM_strings @242 | ||
| 287 | ERR_load_PKCS7_strings @919 | ||
| 288 | ERR_load_RSA_strings @244 | ||
| 289 | ERR_load_X509_strings @245 | ||
| 290 | ERR_load_crypto_strings @246 | ||
| 291 | ERR_load_strings @247 | ||
| 292 | ERR_peek_error @248 | ||
| 293 | ERR_peek_error_line @249 | ||
| 294 | ERR_print_errors @250 | ||
| 295 | ERR_print_errors_fp @251 | ||
| 296 | ERR_put_error @252 | ||
| 297 | ERR_reason_error_string @253 | ||
| 298 | ERR_remove_state @254 | ||
| 299 | ERR_set_error_data @1082 | ||
| 300 | EVP_BytesToKey @255 | ||
| 301 | EVP_CIPHER_CTX_cleanup @256 | ||
| 302 | EVP_CIPHER_CTX_init @961 | ||
| 303 | EVP_CIPHER_asn1_to_param @1083 | ||
| 304 | EVP_CIPHER_get_asn1_iv @1085 | ||
| 305 | EVP_CIPHER_param_to_asn1 @1084 | ||
| 306 | EVP_CIPHER_set_asn1_iv @1086 | ||
| 307 | EVP_CipherFinal @257 | ||
| 308 | EVP_CipherInit @258 | ||
| 309 | EVP_CipherUpdate @259 | ||
| 310 | EVP_DecodeBlock @260 | ||
| 311 | EVP_DecodeFinal @261 | ||
| 312 | EVP_DecodeInit @262 | ||
| 313 | EVP_DecodeUpdate @263 | ||
| 314 | EVP_DecryptFinal @264 | ||
| 315 | EVP_DecryptInit @265 | ||
| 316 | EVP_DecryptUpdate @266 | ||
| 317 | EVP_DigestFinal @267 | ||
| 318 | EVP_DigestInit @268 | ||
| 319 | EVP_DigestUpdate @269 | ||
| 320 | EVP_EncodeBlock @270 | ||
| 321 | EVP_EncodeFinal @271 | ||
| 322 | EVP_EncodeInit @272 | ||
| 323 | EVP_EncodeUpdate @273 | ||
| 324 | EVP_EncryptFinal @274 | ||
| 325 | EVP_EncryptInit @275 | ||
| 326 | EVP_EncryptUpdate @276 | ||
| 327 | EVP_OpenFinal @277 | ||
| 328 | EVP_OpenInit @278 | ||
| 329 | EVP_PKEY_assign @279 | ||
| 330 | EVP_PKEY_bits @1010 | ||
| 331 | EVP_PKEY_cmp_parameters @967 | ||
| 332 | EVP_PKEY_copy_parameters @280 | ||
| 333 | EVP_PKEY_decrypt @1070 | ||
| 334 | EVP_PKEY_encrypt @1071 | ||
| 335 | EVP_PKEY_free @281 | ||
| 336 | EVP_PKEY_missing_parameters @282 | ||
| 337 | EVP_PKEY_new @283 | ||
| 338 | EVP_PKEY_save_parameters @284 | ||
| 339 | EVP_PKEY_size @285 | ||
| 340 | EVP_PKEY_type @286 | ||
| 341 | EVP_SealFinal @287 | ||
| 342 | EVP_SealInit @288 | ||
| 343 | EVP_SignFinal @289 | ||
| 344 | EVP_VerifyFinal @290 | ||
| 345 | EVP_add_alias @291 | ||
| 346 | EVP_add_cipher @292 | ||
| 347 | EVP_add_digest @293 | ||
| 348 | EVP_bf_cbc @294 | ||
| 349 | EVP_bf_cfb @295 | ||
| 350 | EVP_bf_ecb @296 | ||
| 351 | EVP_bf_ofb @297 | ||
| 352 | EVP_cast5_cbc @983 | ||
| 353 | EVP_cast5_cfb @984 | ||
| 354 | EVP_cast5_ecb @985 | ||
| 355 | EVP_cast5_ofb @986 | ||
| 356 | EVP_cleanup @298 | ||
| 357 | EVP_delete_alias @941 | ||
| 358 | EVP_des_cbc @299 | ||
| 359 | EVP_des_cfb @300 | ||
| 360 | EVP_des_ecb @301 | ||
| 361 | EVP_des_ede @302 | ||
| 362 | EVP_des_ede3 @303 | ||
| 363 | EVP_des_ede3_cbc @304 | ||
| 364 | EVP_des_ede3_cfb @305 | ||
| 365 | EVP_des_ede3_ofb @306 | ||
| 366 | EVP_des_ede_cbc @307 | ||
| 367 | EVP_des_ede_cfb @308 | ||
| 368 | EVP_des_ede_ofb @309 | ||
| 369 | EVP_des_ofb @310 | ||
| 370 | EVP_desx_cbc @311 | ||
| 371 | EVP_dss @312 | ||
| 372 | EVP_dss1 @313 | ||
| 373 | EVP_enc_null @314 | ||
| 374 | EVP_get_cipherbyname @315 | ||
| 375 | EVP_get_digestbyname @316 | ||
| 376 | EVP_get_pw_prompt @317 | ||
| 377 | EVP_idea_cbc @318 | ||
| 378 | EVP_idea_cfb @319 | ||
| 379 | EVP_idea_ecb @320 | ||
| 380 | EVP_idea_ofb @321 | ||
| 381 | EVP_md2 @322 | ||
| 382 | EVP_md5 @323 | ||
| 383 | EVP_md_null @324 | ||
| 384 | EVP_mdc2 @942 | ||
| 385 | EVP_rc2_40_cbc @959 | ||
| 386 | EVP_rc2_cbc @325 | ||
| 387 | EVP_rc2_cfb @326 | ||
| 388 | EVP_rc2_ecb @327 | ||
| 389 | EVP_rc2_ofb @328 | ||
| 390 | EVP_rc4 @329 | ||
| 391 | EVP_rc4_40 @960 | ||
| 392 | EVP_rc5_32_12_16_cbc @1087 | ||
| 393 | EVP_rc5_32_12_16_cfb @1088 | ||
| 394 | EVP_rc5_32_12_16_ecb @1089 | ||
| 395 | EVP_rc5_32_12_16_ofb @1090 | ||
| 396 | EVP_read_pw_string @330 | ||
| 397 | EVP_set_pw_prompt @331 | ||
| 398 | EVP_sha @332 | ||
| 399 | EVP_sha1 @333 | ||
| 400 | HMAC @962 | ||
| 401 | HMAC_Final @965 | ||
| 402 | HMAC_Init @963 | ||
| 403 | HMAC_Update @964 | ||
| 404 | HMAC_cleanup @968 | ||
| 405 | MD2 @334 | ||
| 406 | MD2_Final @335 | ||
| 407 | MD2_Init @336 | ||
| 408 | MD2_Update @337 | ||
| 409 | MD2_options @338 | ||
| 410 | MD5 @339 | ||
| 411 | MD5_Final @340 | ||
| 412 | MD5_Init @341 | ||
| 413 | MD5_Transform @1011 | ||
| 414 | MD5_Update @342 | ||
| 415 | MDC2 @343 | ||
| 416 | MDC2_Final @344 | ||
| 417 | MDC2_Init @345 | ||
| 418 | MDC2_Update @346 | ||
| 419 | NETSCAPE_SPKAC_free @347 | ||
| 420 | NETSCAPE_SPKAC_new @348 | ||
| 421 | NETSCAPE_SPKI_free @349 | ||
| 422 | NETSCAPE_SPKI_new @350 | ||
| 423 | NETSCAPE_SPKI_sign @351 | ||
| 424 | NETSCAPE_SPKI_verify @352 | ||
| 425 | OBJ_add_object @353 | ||
| 426 | OBJ_bsearch @354 | ||
| 427 | OBJ_cleanup @355 | ||
| 428 | OBJ_cmp @356 | ||
| 429 | OBJ_create @357 | ||
| 430 | OBJ_create_objects @997 | ||
| 431 | OBJ_dup @358 | ||
| 432 | OBJ_ln2nid @359 | ||
| 433 | OBJ_new_nid @360 | ||
| 434 | OBJ_nid2ln @361 | ||
| 435 | OBJ_nid2obj @362 | ||
| 436 | OBJ_nid2sn @363 | ||
| 437 | OBJ_obj2nid @364 | ||
| 438 | OBJ_sn2nid @365 | ||
| 439 | OBJ_txt2nid @366 | ||
| 440 | PEM_ASN1_read @367 | ||
| 441 | PEM_ASN1_read_bio @368 | ||
| 442 | PEM_ASN1_write @369 | ||
| 443 | PEM_ASN1_write_bio @370 | ||
| 444 | PEM_SealFinal @371 | ||
| 445 | PEM_SealInit @372 | ||
| 446 | PEM_SealUpdate @373 | ||
| 447 | PEM_SignFinal @374 | ||
| 448 | PEM_X509_INFO_read @377 | ||
| 449 | PEM_X509_INFO_read_bio @378 | ||
| 450 | PEM_X509_INFO_write_bio @379 | ||
| 451 | PEM_dek_info @380 | ||
| 452 | PEM_do_header @381 | ||
| 453 | PEM_get_EVP_CIPHER_INFO @382 | ||
| 454 | PEM_proc_type @383 | ||
| 455 | PEM_read @384 | ||
| 456 | PEM_read_DHparams @385 | ||
| 457 | PEM_read_DSAPrivateKey @386 | ||
| 458 | PEM_read_DSAparams @387 | ||
| 459 | PEM_read_PKCS7 @388 | ||
| 460 | PEM_read_PrivateKey @389 | ||
| 461 | PEM_read_RSAPrivateKey @390 | ||
| 462 | PEM_read_RSAPublicKey @947 | ||
| 463 | PEM_read_X509 @391 | ||
| 464 | PEM_read_X509_CRL @392 | ||
| 465 | PEM_read_X509_REQ @393 | ||
| 466 | PEM_read_bio @394 | ||
| 467 | PEM_read_bio_DHparams @395 | ||
| 468 | PEM_read_bio_DSAPrivateKey @396 | ||
| 469 | PEM_read_bio_DSAparams @397 | ||
| 470 | PEM_read_bio_PKCS7 @398 | ||
| 471 | PEM_read_bio_PrivateKey @399 | ||
| 472 | PEM_read_bio_RSAPrivateKey @400 | ||
| 473 | PEM_read_bio_RSAPublicKey @943 | ||
| 474 | PEM_read_bio_X509 @401 | ||
| 475 | PEM_read_bio_X509_CRL @402 | ||
| 476 | PEM_read_bio_X509_REQ @403 | ||
| 477 | PEM_write @404 | ||
| 478 | PEM_write_DHparams @405 | ||
| 479 | PEM_write_DSAPrivateKey @406 | ||
| 480 | PEM_write_DSAparams @407 | ||
| 481 | PEM_write_PKCS7 @408 | ||
| 482 | PEM_write_PrivateKey @409 | ||
| 483 | PEM_write_RSAPrivateKey @410 | ||
| 484 | PEM_write_RSAPublicKey @949 | ||
| 485 | PEM_write_X509 @411 | ||
| 486 | PEM_write_X509_CRL @412 | ||
| 487 | PEM_write_X509_REQ @413 | ||
| 488 | PEM_write_bio @414 | ||
| 489 | PEM_write_bio_DHparams @415 | ||
| 490 | PEM_write_bio_DSAPrivateKey @416 | ||
| 491 | PEM_write_bio_DSAparams @417 | ||
| 492 | PEM_write_bio_PKCS7 @418 | ||
| 493 | PEM_write_bio_PrivateKey @419 | ||
| 494 | PEM_write_bio_RSAPrivateKey @420 | ||
| 495 | PEM_write_bio_RSAPublicKey @944 | ||
| 496 | PEM_write_bio_X509 @421 | ||
| 497 | PEM_write_bio_X509_CRL @422 | ||
| 498 | PEM_write_bio_X509_REQ @423 | ||
| 499 | PKCS7_DIGEST_free @424 | ||
| 500 | PKCS7_DIGEST_new @425 | ||
| 501 | PKCS7_ENCRYPT_free @426 | ||
| 502 | PKCS7_ENCRYPT_new @427 | ||
| 503 | PKCS7_ENC_CONTENT_free @428 | ||
| 504 | PKCS7_ENC_CONTENT_new @429 | ||
| 505 | PKCS7_ENVELOPE_free @430 | ||
| 506 | PKCS7_ENVELOPE_new @431 | ||
| 507 | PKCS7_ISSUER_AND_SERIAL_digest @432 | ||
| 508 | PKCS7_ISSUER_AND_SERIAL_free @433 | ||
| 509 | PKCS7_ISSUER_AND_SERIAL_new @434 | ||
| 510 | PKCS7_RECIP_INFO_free @435 | ||
| 511 | PKCS7_RECIP_INFO_new @436 | ||
| 512 | PKCS7_RECIP_INFO_set @1072 | ||
| 513 | PKCS7_SIGNED_free @437 | ||
| 514 | PKCS7_SIGNED_new @438 | ||
| 515 | PKCS7_SIGNER_INFO_free @439 | ||
| 516 | PKCS7_SIGNER_INFO_new @440 | ||
| 517 | PKCS7_SIGNER_INFO_set @930 | ||
| 518 | PKCS7_SIGN_ENVELOPE_free @441 | ||
| 519 | PKCS7_SIGN_ENVELOPE_new @442 | ||
| 520 | PKCS7_add_certificate @932 | ||
| 521 | PKCS7_add_crl @933 | ||
| 522 | PKCS7_add_recipient @1073 | ||
| 523 | PKCS7_add_recipient_info @1074 | ||
| 524 | PKCS7_add_signature @938 | ||
| 525 | PKCS7_add_signer @931 | ||
| 526 | PKCS7_cert_from_signer_info @939 | ||
| 527 | PKCS7_content_free @918 | ||
| 528 | PKCS7_content_new @934 | ||
| 529 | PKCS7_ctrl @927 | ||
| 530 | PKCS7_dataInit @937 | ||
| 531 | PKCS7_dataSign @935 | ||
| 532 | PKCS7_dataVerify @936 | ||
| 533 | PKCS7_dup @443 | ||
| 534 | PKCS7_free @444 | ||
| 535 | PKCS7_get_signer_info @940 | ||
| 536 | PKCS7_new @445 | ||
| 537 | PKCS7_set_cipher @1075 | ||
| 538 | PKCS7_set_content @929 | ||
| 539 | PKCS7_set_type @928 | ||
| 540 | RAND_bytes @464 | ||
| 541 | RAND_cleanup @465 | ||
| 542 | RAND_file_name @466 | ||
| 543 | RAND_load_file @467 | ||
| 544 | RAND_screen @468 | ||
| 545 | RAND_seed @469 | ||
| 546 | RAND_write_file @470 | ||
| 547 | RC2_cbc_encrypt @471 | ||
| 548 | RC2_cfb64_encrypt @472 | ||
| 549 | RC2_decrypt @995 | ||
| 550 | RC2_ecb_encrypt @473 | ||
| 551 | RC2_encrypt @474 | ||
| 552 | RC2_ofb64_encrypt @475 | ||
| 553 | RC2_set_key @476 | ||
| 554 | RC4 @477 | ||
| 555 | RC4_options @478 | ||
| 556 | RC4_set_key @479 | ||
| 557 | RC5_32_cbc_encrypt @1051 | ||
| 558 | RC5_32_cfb64_encrypt @1052 | ||
| 559 | RC5_32_decrypt @1050 | ||
| 560 | RC5_32_ecb_encrypt @1048 | ||
| 561 | RC5_32_encrypt @1049 | ||
| 562 | RC5_32_ofb64_encrypt @1053 | ||
| 563 | RC5_32_set_key @1047 | ||
| 564 | RIPEMD160 @1045 | ||
| 565 | RIPEMD160_Final @1044 | ||
| 566 | RIPEMD160_Init @1042 | ||
| 567 | RIPEMD160_Transform @1046 | ||
| 568 | RIPEMD160_Update @1043 | ||
| 569 | RSAPrivateKey_asn1_meth @480 | ||
| 570 | RSAPrivateKey_dup @481 | ||
| 571 | RSAPublicKey_dup @482 | ||
| 572 | RSA_PKCS1_SSLeay @483 | ||
| 573 | RSA_blinding_off @978 | ||
| 574 | RSA_blinding_on @977 | ||
| 575 | RSA_flags @956 | ||
| 576 | RSA_free @484 | ||
| 577 | RSA_generate_key @485 | ||
| 578 | RSA_get_ex_data @1029 | ||
| 579 | RSA_get_ex_new_index @1030 | ||
| 580 | RSA_new @486 | ||
| 581 | RSA_new_method @487 | ||
| 582 | RSA_padding_add_PKCS1_type_1 @1031 | ||
| 583 | RSA_padding_add_PKCS1_type_2 @1032 | ||
| 584 | RSA_padding_add_SSLv23 @1033 | ||
| 585 | RSA_padding_add_none @1034 | ||
| 586 | RSA_padding_check_PKCS1_type_1 @1035 | ||
| 587 | RSA_padding_check_PKCS1_type_2 @1036 | ||
| 588 | RSA_padding_check_SSLv23 @1037 | ||
| 589 | RSA_padding_check_none @1038 | ||
| 590 | RSA_print @488 | ||
| 591 | RSA_print_fp @489 | ||
| 592 | RSA_private_decrypt @490 | ||
| 593 | RSA_private_encrypt @491 | ||
| 594 | RSA_public_decrypt @492 | ||
| 595 | RSA_public_encrypt @493 | ||
| 596 | RSA_set_default_method @494 | ||
| 597 | RSA_set_ex_data @1028 | ||
| 598 | RSA_sign @495 | ||
| 599 | RSA_sign_ASN1_OCTET_STRING @496 | ||
| 600 | RSA_size @497 | ||
| 601 | RSA_verify @498 | ||
| 602 | RSA_verify_ASN1_OCTET_STRING @499 | ||
| 603 | SHA @500 | ||
| 604 | SHA1 @501 | ||
| 605 | SHA1_Final @502 | ||
| 606 | SHA1_Init @503 | ||
| 607 | SHA1_Transform @1012 | ||
| 608 | SHA1_Update @504 | ||
| 609 | SHA_Final @505 | ||
| 610 | SHA_Init @506 | ||
| 611 | SHA_Transform @1013 | ||
| 612 | SHA_Update @507 | ||
| 613 | TXT_DB_create_index @511 | ||
| 614 | TXT_DB_free @512 | ||
| 615 | TXT_DB_get_by_index @513 | ||
| 616 | TXT_DB_insert @514 | ||
| 617 | TXT_DB_read @515 | ||
| 618 | TXT_DB_write @516 | ||
| 619 | X509_ALGOR_free @517 | ||
| 620 | X509_ALGOR_new @518 | ||
| 621 | X509_ATTRIBUTE_free @519 | ||
| 622 | X509_ATTRIBUTE_new @520 | ||
| 623 | X509_CINF_free @521 | ||
| 624 | X509_CINF_new @522 | ||
| 625 | X509_CRL_INFO_free @523 | ||
| 626 | X509_CRL_INFO_new @524 | ||
| 627 | X509_CRL_add_ext @525 | ||
| 628 | X509_CRL_cmp @526 | ||
| 629 | X509_CRL_delete_ext @527 | ||
| 630 | X509_CRL_dup @528 | ||
| 631 | X509_CRL_free @529 | ||
| 632 | X509_CRL_get_ext @530 | ||
| 633 | X509_CRL_get_ext_by_NID @531 | ||
| 634 | X509_CRL_get_ext_by_OBJ @532 | ||
| 635 | X509_CRL_get_ext_by_critical @533 | ||
| 636 | X509_CRL_get_ext_count @534 | ||
| 637 | X509_CRL_new @535 | ||
| 638 | X509_CRL_sign @536 | ||
| 639 | X509_CRL_verify @537 | ||
| 640 | X509_EXTENSION_create_by_NID @538 | ||
| 641 | X509_EXTENSION_create_by_OBJ @539 | ||
| 642 | X509_EXTENSION_dup @540 | ||
| 643 | X509_EXTENSION_free @541 | ||
| 644 | X509_EXTENSION_get_critical @542 | ||
| 645 | X509_EXTENSION_get_data @543 | ||
| 646 | X509_EXTENSION_get_object @544 | ||
| 647 | X509_EXTENSION_new @545 | ||
| 648 | X509_EXTENSION_set_critical @546 | ||
| 649 | X509_EXTENSION_set_data @547 | ||
| 650 | X509_EXTENSION_set_object @548 | ||
| 651 | X509_INFO_free @549 | ||
| 652 | X509_INFO_new @550 | ||
| 653 | X509_LOOKUP_by_alias @551 | ||
| 654 | X509_LOOKUP_by_fingerprint @552 | ||
| 655 | X509_LOOKUP_by_issuer_serial @553 | ||
| 656 | X509_LOOKUP_by_subject @554 | ||
| 657 | X509_LOOKUP_ctrl @555 | ||
| 658 | X509_LOOKUP_file @556 | ||
| 659 | X509_LOOKUP_free @557 | ||
| 660 | X509_LOOKUP_hash_dir @558 | ||
| 661 | X509_LOOKUP_init @559 | ||
| 662 | X509_LOOKUP_new @560 | ||
| 663 | X509_LOOKUP_shutdown @561 | ||
| 664 | X509_NAME_ENTRY_create_by_NID @562 | ||
| 665 | X509_NAME_ENTRY_create_by_OBJ @563 | ||
| 666 | X509_NAME_ENTRY_dup @564 | ||
| 667 | X509_NAME_ENTRY_free @565 | ||
| 668 | X509_NAME_ENTRY_get_data @566 | ||
| 669 | X509_NAME_ENTRY_get_object @567 | ||
| 670 | X509_NAME_ENTRY_new @568 | ||
| 671 | X509_NAME_ENTRY_set_data @569 | ||
| 672 | X509_NAME_ENTRY_set_object @570 | ||
| 673 | X509_NAME_add_entry @571 | ||
| 674 | X509_NAME_cmp @572 | ||
| 675 | X509_NAME_delete_entry @573 | ||
| 676 | X509_NAME_digest @574 | ||
| 677 | X509_NAME_dup @575 | ||
| 678 | X509_NAME_entry_count @576 | ||
| 679 | X509_NAME_free @577 | ||
| 680 | X509_NAME_get_entry @578 | ||
| 681 | X509_NAME_get_index_by_NID @579 | ||
| 682 | X509_NAME_get_index_by_OBJ @580 | ||
| 683 | X509_NAME_get_text_by_NID @581 | ||
| 684 | X509_NAME_get_text_by_OBJ @582 | ||
| 685 | X509_NAME_hash @583 | ||
| 686 | X509_NAME_new @584 | ||
| 687 | X509_NAME_oneline @585 | ||
| 688 | X509_NAME_print @586 | ||
| 689 | X509_NAME_set @587 | ||
| 690 | X509_OBJECT_free_contents @588 | ||
| 691 | X509_OBJECT_retrive_by_subject @589 | ||
| 692 | X509_OBJECT_up_ref_count @590 | ||
| 693 | X509_PKEY_free @591 | ||
| 694 | X509_PKEY_new @592 | ||
| 695 | X509_PUBKEY_free @593 | ||
| 696 | X509_PUBKEY_get @594 | ||
| 697 | X509_PUBKEY_new @595 | ||
| 698 | X509_PUBKEY_set @596 | ||
| 699 | X509_REQ_INFO_free @597 | ||
| 700 | X509_REQ_INFO_new @598 | ||
| 701 | X509_REQ_dup @599 | ||
| 702 | X509_REQ_free @600 | ||
| 703 | X509_REQ_get_pubkey @601 | ||
| 704 | X509_REQ_new @602 | ||
| 705 | X509_REQ_print @603 | ||
| 706 | X509_REQ_print_fp @604 | ||
| 707 | X509_REQ_set_pubkey @605 | ||
| 708 | X509_REQ_set_subject_name @606 | ||
| 709 | X509_REQ_set_version @607 | ||
| 710 | X509_REQ_sign @608 | ||
| 711 | X509_REQ_to_X509 @609 | ||
| 712 | X509_REQ_verify @610 | ||
| 713 | X509_REVOKED_add_ext @611 | ||
| 714 | X509_REVOKED_delete_ext @612 | ||
| 715 | X509_REVOKED_free @613 | ||
| 716 | X509_REVOKED_get_ext @614 | ||
| 717 | X509_REVOKED_get_ext_by_NID @615 | ||
| 718 | X509_REVOKED_get_ext_by_OBJ @616 | ||
| 719 | X509_REVOKED_get_ext_by_critical @617 | ||
| 720 | X509_REVOKED_get_ext_count @618 | ||
| 721 | X509_REVOKED_new @619 | ||
| 722 | X509_SIG_free @620 | ||
| 723 | X509_SIG_new @621 | ||
| 724 | X509_STORE_CTX_cleanup @622 | ||
| 725 | X509_STORE_CTX_get_chain @1014 | ||
| 726 | X509_STORE_CTX_get_current_cert @1015 | ||
| 727 | X509_STORE_CTX_get_error @1016 | ||
| 728 | X509_STORE_CTX_get_error_depth @1017 | ||
| 729 | X509_STORE_CTX_get_ex_data @1018 | ||
| 730 | X509_STORE_CTX_init @623 | ||
| 731 | X509_STORE_CTX_set_cert @1020 | ||
| 732 | X509_STORE_CTX_set_chain @1021 | ||
| 733 | X509_STORE_CTX_set_error @1022 | ||
| 734 | X509_STORE_CTX_set_ex_data @1023 | ||
| 735 | X509_STORE_add_cert @624 | ||
| 736 | X509_STORE_add_crl @957 | ||
| 737 | X509_STORE_add_lookup @625 | ||
| 738 | X509_STORE_free @626 | ||
| 739 | X509_STORE_get_by_subject @627 | ||
| 740 | X509_STORE_load_locations @628 | ||
| 741 | X509_STORE_new @629 | ||
| 742 | X509_STORE_set_default_paths @630 | ||
| 743 | X509_VAL_free @631 | ||
| 744 | X509_VAL_new @632 | ||
| 745 | X509_add_ext @633 | ||
| 746 | X509_asn1_meth @634 | ||
| 747 | X509_certificate_type @635 | ||
| 748 | X509_check_private_key @636 | ||
| 749 | X509_cmp_current_time @637 | ||
| 750 | X509_delete_ext @638 | ||
| 751 | X509_digest @639 | ||
| 752 | X509_dup @640 | ||
| 753 | X509_find_by_issuer_and_serial @920 | ||
| 754 | X509_find_by_subject @921 | ||
| 755 | X509_free @641 | ||
| 756 | X509_get_default_cert_area @642 | ||
| 757 | X509_get_default_cert_dir @643 | ||
| 758 | X509_get_default_cert_dir_env @644 | ||
| 759 | X509_get_default_cert_file @645 | ||
| 760 | X509_get_default_cert_file_env @646 | ||
| 761 | X509_get_default_private_dir @647 | ||
| 762 | X509_get_ext @648 | ||
| 763 | X509_get_ext_by_NID @649 | ||
| 764 | X509_get_ext_by_OBJ @650 | ||
| 765 | X509_get_ext_by_critical @651 | ||
| 766 | X509_get_ext_count @652 | ||
| 767 | X509_get_issuer_name @653 | ||
| 768 | X509_get_pubkey @654 | ||
| 769 | X509_get_pubkey_parameters @655 | ||
| 770 | X509_get_serialNumber @656 | ||
| 771 | X509_get_subject_name @657 | ||
| 772 | X509_gmtime_adj @658 | ||
| 773 | X509_issuer_and_serial_cmp @659 | ||
| 774 | X509_issuer_and_serial_hash @660 | ||
| 775 | X509_issuer_name_cmp @661 | ||
| 776 | X509_issuer_name_hash @662 | ||
| 777 | X509_load_cert_file @663 | ||
| 778 | X509_load_crl_file @958 | ||
| 779 | X509_new @664 | ||
| 780 | X509_print @665 | ||
| 781 | X509_print_fp @666 | ||
| 782 | X509_set_issuer_name @667 | ||
| 783 | X509_set_notAfter @668 | ||
| 784 | X509_set_notBefore @669 | ||
| 785 | X509_set_pubkey @670 | ||
| 786 | X509_set_serialNumber @671 | ||
| 787 | X509_set_subject_name @672 | ||
| 788 | X509_set_version @673 | ||
| 789 | X509_sign @674 | ||
| 790 | X509_subject_name_cmp @675 | ||
| 791 | X509_subject_name_hash @676 | ||
| 792 | X509_to_X509_REQ @677 | ||
| 793 | X509_verify @678 | ||
| 794 | X509_verify_cert @679 | ||
| 795 | X509_verify_cert_error_string @680 | ||
| 796 | X509v3_add_ext @681 | ||
| 797 | X509v3_add_extension @682 | ||
| 798 | X509v3_add_netscape_extensions @683 | ||
| 799 | X509v3_add_standard_extensions @684 | ||
| 800 | X509v3_cleanup_extensions @685 | ||
| 801 | X509v3_data_type_by_NID @686 | ||
| 802 | X509v3_data_type_by_OBJ @687 | ||
| 803 | X509v3_delete_ext @688 | ||
| 804 | X509v3_get_ext @689 | ||
| 805 | X509v3_get_ext_by_NID @690 | ||
| 806 | X509v3_get_ext_by_OBJ @691 | ||
| 807 | X509v3_get_ext_by_critical @692 | ||
| 808 | X509v3_get_ext_count @693 | ||
| 809 | X509v3_pack_string @694 | ||
| 810 | X509v3_pack_type_by_NID @695 | ||
| 811 | X509v3_pack_type_by_OBJ @696 | ||
| 812 | X509v3_unpack_string @697 | ||
| 813 | a2d_ASN1_OBJECT @699 | ||
| 814 | a2i_ASN1_INTEGER @700 | ||
| 815 | a2i_ASN1_STRING @701 | ||
| 816 | asn1_Finish @702 | ||
| 817 | asn1_GetSequence @703 | ||
| 818 | asn1_add_error @1091 | ||
| 819 | bn_add_words @1039 | ||
| 820 | bn_div64 @704 | ||
| 821 | bn_expand2 @705 | ||
| 822 | bn_mul_add_words @706 | ||
| 823 | bn_mul_words @707 | ||
| 824 | bn_qadd @708 | ||
| 825 | bn_qsub @709 | ||
| 826 | bn_sqr_words @710 | ||
| 827 | crypt @711 | ||
| 828 | d2i_ASN1_BIT_STRING @712 | ||
| 829 | d2i_ASN1_BOOLEAN @713 | ||
| 830 | d2i_ASN1_HEADER @714 | ||
| 831 | d2i_ASN1_IA5STRING @715 | ||
| 832 | d2i_ASN1_INTEGER @716 | ||
| 833 | d2i_ASN1_OBJECT @717 | ||
| 834 | d2i_ASN1_OCTET_STRING @718 | ||
| 835 | d2i_ASN1_PRINTABLE @719 | ||
| 836 | d2i_ASN1_PRINTABLESTRING @720 | ||
| 837 | d2i_ASN1_SET @721 | ||
| 838 | d2i_ASN1_T61STRING @722 | ||
| 839 | d2i_ASN1_TYPE @723 | ||
| 840 | d2i_ASN1_UTCTIME @724 | ||
| 841 | d2i_ASN1_bytes @725 | ||
| 842 | d2i_ASN1_type_bytes @726 | ||
| 843 | d2i_DHparams @727 | ||
| 844 | d2i_DSAPrivateKey @728 | ||
| 845 | d2i_DSAPrivateKey_bio @729 | ||
| 846 | d2i_DSAPrivateKey_fp @730 | ||
| 847 | d2i_DSAPublicKey @731 | ||
| 848 | d2i_DSAparams @732 | ||
| 849 | d2i_NETSCAPE_SPKAC @733 | ||
| 850 | d2i_NETSCAPE_SPKI @734 | ||
| 851 | d2i_Netscape_RSA @735 | ||
| 852 | d2i_Netscape_RSA_2 @1040 | ||
| 853 | d2i_PKCS7 @736 | ||
| 854 | d2i_PKCS7_DIGEST @737 | ||
| 855 | d2i_PKCS7_ENCRYPT @738 | ||
| 856 | d2i_PKCS7_ENC_CONTENT @739 | ||
| 857 | d2i_PKCS7_ENVELOPE @740 | ||
| 858 | d2i_PKCS7_ISSUER_AND_SERIAL @741 | ||
| 859 | d2i_PKCS7_RECIP_INFO @742 | ||
| 860 | d2i_PKCS7_SIGNED @743 | ||
| 861 | d2i_PKCS7_SIGNER_INFO @744 | ||
| 862 | d2i_PKCS7_SIGN_ENVELOPE @745 | ||
| 863 | d2i_PKCS7_bio @746 | ||
| 864 | d2i_PKCS7_fp @747 | ||
| 865 | d2i_PrivateKey @748 | ||
| 866 | d2i_PublicKey @749 | ||
| 867 | d2i_RSAPrivateKey @750 | ||
| 868 | d2i_RSAPrivateKey_bio @751 | ||
| 869 | d2i_RSAPrivateKey_fp @752 | ||
| 870 | d2i_RSAPublicKey @753 | ||
| 871 | d2i_RSAPublicKey_bio @945 | ||
| 872 | d2i_RSAPublicKey_fp @952 | ||
| 873 | d2i_X509 @754 | ||
| 874 | d2i_X509_ALGOR @755 | ||
| 875 | d2i_X509_ATTRIBUTE @756 | ||
| 876 | d2i_X509_CINF @757 | ||
| 877 | d2i_X509_CRL @758 | ||
| 878 | d2i_X509_CRL_INFO @759 | ||
| 879 | d2i_X509_CRL_bio @760 | ||
| 880 | d2i_X509_CRL_fp @761 | ||
| 881 | d2i_X509_EXTENSION @762 | ||
| 882 | d2i_X509_NAME @763 | ||
| 883 | d2i_X509_NAME_ENTRY @764 | ||
| 884 | d2i_X509_PKEY @765 | ||
| 885 | d2i_X509_PUBKEY @766 | ||
| 886 | d2i_X509_REQ @767 | ||
| 887 | d2i_X509_REQ_INFO @768 | ||
| 888 | d2i_X509_REQ_bio @769 | ||
| 889 | d2i_X509_REQ_fp @770 | ||
| 890 | d2i_X509_REVOKED @771 | ||
| 891 | d2i_X509_SIG @772 | ||
| 892 | d2i_X509_VAL @773 | ||
| 893 | d2i_X509_bio @774 | ||
| 894 | d2i_X509_fp @775 | ||
| 895 | des_cbc_cksum @777 | ||
| 896 | des_cbc_encrypt @778 | ||
| 897 | des_cblock_print_file @779 | ||
| 898 | des_cfb64_encrypt @780 | ||
| 899 | des_cfb_encrypt @781 | ||
| 900 | des_decrypt3 @782 | ||
| 901 | des_ecb3_encrypt @783 | ||
| 902 | des_ecb_encrypt @784 | ||
| 903 | des_ede3_cbc_encrypt @785 | ||
| 904 | des_ede3_cfb64_encrypt @786 | ||
| 905 | des_ede3_ofb64_encrypt @787 | ||
| 906 | des_enc_read @788 | ||
| 907 | des_enc_write @789 | ||
| 908 | des_encrypt @790 | ||
| 909 | des_encrypt2 @791 | ||
| 910 | des_encrypt3 @792 | ||
| 911 | des_fcrypt @793 | ||
| 912 | des_is_weak_key @794 | ||
| 913 | des_key_sched @795 | ||
| 914 | des_ncbc_encrypt @796 | ||
| 915 | des_ofb64_encrypt @797 | ||
| 916 | des_ofb_encrypt @798 | ||
| 917 | des_options @799 | ||
| 918 | des_pcbc_encrypt @800 | ||
| 919 | des_quad_cksum @801 | ||
| 920 | des_random_key @802 | ||
| 921 | des_random_seed @803 | ||
| 922 | des_read_2passwords @804 | ||
| 923 | des_read_password @805 | ||
| 924 | des_read_pw @806 | ||
| 925 | des_read_pw_string @807 | ||
| 926 | des_set_key @808 | ||
| 927 | des_set_odd_parity @809 | ||
| 928 | des_string_to_2keys @810 | ||
| 929 | des_string_to_key @811 | ||
| 930 | des_xcbc_encrypt @812 | ||
| 931 | des_xwhite_in2out @813 | ||
| 932 | i2a_ASN1_INTEGER @815 | ||
| 933 | i2a_ASN1_OBJECT @816 | ||
| 934 | i2a_ASN1_STRING @817 | ||
| 935 | i2d_ASN1_BIT_STRING @818 | ||
| 936 | i2d_ASN1_BOOLEAN @819 | ||
| 937 | i2d_ASN1_HEADER @820 | ||
| 938 | i2d_ASN1_IA5STRING @821 | ||
| 939 | i2d_ASN1_INTEGER @822 | ||
| 940 | i2d_ASN1_OBJECT @823 | ||
| 941 | i2d_ASN1_OCTET_STRING @824 | ||
| 942 | i2d_ASN1_PRINTABLE @825 | ||
| 943 | i2d_ASN1_SET @826 | ||
| 944 | i2d_ASN1_TYPE @827 | ||
| 945 | i2d_ASN1_UTCTIME @828 | ||
| 946 | i2d_ASN1_bytes @829 | ||
| 947 | i2d_DHparams @830 | ||
| 948 | i2d_DSAPrivateKey @831 | ||
| 949 | i2d_DSAPrivateKey_bio @832 | ||
| 950 | i2d_DSAPrivateKey_fp @833 | ||
| 951 | i2d_DSAPublicKey @834 | ||
| 952 | i2d_DSAparams @835 | ||
| 953 | i2d_NETSCAPE_SPKAC @836 | ||
| 954 | i2d_NETSCAPE_SPKI @837 | ||
| 955 | i2d_Netscape_RSA @838 | ||
| 956 | i2d_PKCS7 @839 | ||
| 957 | i2d_PKCS7_DIGEST @840 | ||
| 958 | i2d_PKCS7_ENCRYPT @841 | ||
| 959 | i2d_PKCS7_ENC_CONTENT @842 | ||
| 960 | i2d_PKCS7_ENVELOPE @843 | ||
| 961 | i2d_PKCS7_ISSUER_AND_SERIAL @844 | ||
| 962 | i2d_PKCS7_RECIP_INFO @845 | ||
| 963 | i2d_PKCS7_SIGNED @846 | ||
| 964 | i2d_PKCS7_SIGNER_INFO @847 | ||
| 965 | i2d_PKCS7_SIGN_ENVELOPE @848 | ||
| 966 | i2d_PKCS7_bio @849 | ||
| 967 | i2d_PKCS7_fp @850 | ||
| 968 | i2d_PrivateKey @851 | ||
| 969 | i2d_PublicKey @852 | ||
| 970 | i2d_RSAPrivateKey @853 | ||
| 971 | i2d_RSAPrivateKey_bio @854 | ||
| 972 | i2d_RSAPrivateKey_fp @855 | ||
| 973 | i2d_RSAPublicKey @856 | ||
| 974 | i2d_RSAPublicKey_bio @946 | ||
| 975 | i2d_RSAPublicKey_fp @954 | ||
| 976 | i2d_X509 @857 | ||
| 977 | i2d_X509_ALGOR @858 | ||
| 978 | i2d_X509_ATTRIBUTE @859 | ||
| 979 | i2d_X509_CINF @860 | ||
| 980 | i2d_X509_CRL @861 | ||
| 981 | i2d_X509_CRL_INFO @862 | ||
| 982 | i2d_X509_CRL_bio @863 | ||
| 983 | i2d_X509_CRL_fp @864 | ||
| 984 | i2d_X509_EXTENSION @865 | ||
| 985 | i2d_X509_NAME @866 | ||
| 986 | i2d_X509_NAME_ENTRY @867 | ||
| 987 | i2d_X509_PKEY @868 | ||
| 988 | i2d_X509_PUBKEY @869 | ||
| 989 | i2d_X509_REQ @870 | ||
| 990 | i2d_X509_REQ_INFO @871 | ||
| 991 | i2d_X509_REQ_bio @872 | ||
| 992 | i2d_X509_REQ_fp @873 | ||
| 993 | i2d_X509_REVOKED @874 | ||
| 994 | i2d_X509_SIG @875 | ||
| 995 | i2d_X509_VAL @876 | ||
| 996 | i2d_X509_bio @877 | ||
| 997 | i2d_X509_fp @878 | ||
| 998 | i2t_ASN1_OBJECT @979 | ||
| 999 | idea_cbc_encrypt @879 | ||
| 1000 | idea_cfb64_encrypt @880 | ||
| 1001 | idea_ecb_encrypt @881 | ||
| 1002 | idea_encrypt @882 | ||
| 1003 | idea_ofb64_encrypt @883 | ||
| 1004 | idea_options @884 | ||
| 1005 | idea_set_decrypt_key @885 | ||
| 1006 | idea_set_encrypt_key @886 | ||
| 1007 | lh_delete @887 | ||
| 1008 | lh_doall @888 | ||
| 1009 | lh_doall_arg @889 | ||
| 1010 | lh_free @890 | ||
| 1011 | lh_insert @891 | ||
| 1012 | lh_new @892 | ||
| 1013 | lh_node_stats @893 | ||
| 1014 | lh_node_stats_bio @894 | ||
| 1015 | lh_node_usage_stats @895 | ||
| 1016 | lh_node_usage_stats_bio @896 | ||
| 1017 | lh_retrieve @897 | ||
| 1018 | lh_stats @898 | ||
| 1019 | lh_stats_bio @899 | ||
| 1020 | lh_strhash @900 | ||
| 1021 | sk_delete @901 | ||
| 1022 | sk_delete_ptr @902 | ||
| 1023 | sk_dup @903 | ||
| 1024 | sk_find @904 | ||
| 1025 | sk_free @905 | ||
| 1026 | sk_insert @906 | ||
| 1027 | sk_new @907 | ||
| 1028 | sk_pop @908 | ||
| 1029 | sk_pop_free @909 | ||
| 1030 | sk_push @910 | ||
| 1031 | sk_set_cmp_func @911 | ||
| 1032 | sk_shift @912 | ||
| 1033 | sk_unshift @913 | ||
| 1034 | sk_zero @914 | ||
| 1035 | |||
diff --git a/src/lib/libssl/src/ms/ntdll.mak b/src/lib/libssl/src/ms/ntdll.mak new file mode 100644 index 0000000000..044cd909bc --- /dev/null +++ b/src/lib/libssl/src/ms/ntdll.mak | |||
| @@ -0,0 +1,1853 @@ | |||
| 1 | # This makefile has been automatically generated from the SSLeay distribution. | ||
| 2 | # This single makefile will build the complete SSLeay distribution and | ||
| 3 | # by default leave the 'intertesting' output files in .\out and the stuff | ||
| 4 | # that needs deleting in .\tmp. | ||
| 5 | # The file was generated by running 'make makefile.one', which | ||
| 6 | # does a 'make files', which writes all the environment variables from all | ||
| 7 | # the makefiles to the file call MINFO. This file is used by | ||
| 8 | # util\mk1mf.pl to generate makefile.one. | ||
| 9 | # The 'makefile per directory' system suites me when developing this | ||
| 10 | # library and also so I can 'distribute' indervidual library sections. | ||
| 11 | # The one monster makefile better suits building in non-unix | ||
| 12 | # environments. | ||
| 13 | |||
| 14 | INSTALLTOP=\usr\local\ssl | ||
| 15 | |||
| 16 | # Set your compiler options | ||
| 17 | CC=cl | ||
| 18 | CFLAG= /MD /W3 /WX /G5 /Ox /O2 /Ob2 /Gs0 /GF /Gy /nologo -DWIN32 -DWIN32_LEAN_AND_MEAN -DL_ENDIAN -DBN_ASM -DMD5_ASM -DSHA1_ASM -DRMD160_ASM | ||
| 19 | APP_CFLAG= | ||
| 20 | LIB_CFLAG= /GD -D_WINDLL -D_DLL | ||
| 21 | SHLIB_CFLAG= | ||
| 22 | APP_EX_OBJ=setargv.obj | ||
| 23 | SHLIB_EX_OBJ= | ||
| 24 | # add extra libraries to this define, for solaris -lsocket -lnsl would | ||
| 25 | # be added | ||
| 26 | EX_LIBS=wsock32.lib user32.lib gdi32.lib | ||
| 27 | |||
| 28 | # The SSLeay directory | ||
| 29 | SRC_D=. | ||
| 30 | |||
| 31 | LINK=link | ||
| 32 | LFLAGS=/nologo /subsystem:console /machine:I386 /opt:ref | ||
| 33 | |||
| 34 | BN_MULW_OBJ=crypto\bn\asm\bn-win32.obj | ||
| 35 | BN_MULW_SRC=crypto\bn\asm\bn-win32.asm | ||
| 36 | DES_ENC_OBJ=crypto\des\asm\d-win32.obj crypto\des\asm\y-win32.obj | ||
| 37 | DES_ENC_SRC=crypto\des\asm\d-win32.asm crypto\des\asm\y-win32.asm | ||
| 38 | DES_CRYPT_OBJ= | ||
| 39 | DES_CRYPT_SRC= | ||
| 40 | BF_ENC_OBJ=crypto\bf\asm\b-win32.obj | ||
| 41 | BF_ENC_SRC=crypto\bf\asm\b-win32.asm | ||
| 42 | CAST_ENC_OBJ=crypto\cast\asm\c-win32.obj | ||
| 43 | CAST_ENC_SRC=crypto\cast\asm\c-win32.asm | ||
| 44 | RC4_ENC_OBJ=crypto\rc4\asm\r4-win32.obj | ||
| 45 | RC4_ENC_SRC=crypto\rc4\asm\r4-win32.asm | ||
| 46 | RC5_ENC_OBJ=crypto\rc5\asm\r5-win32.obj | ||
| 47 | RC5_ENC_SRC=crypto\rc5\asm\r5-win32.asm | ||
| 48 | MD5_ASM_OBJ=crypto\md5\asm\m5-win32.obj | ||
| 49 | MD5_ASM_SRC=crypto\md5\asm\m5-win32.asm | ||
| 50 | SHA1_ASM_OBJ=crypto\sha\asm\s1-win32.obj | ||
| 51 | SHA1_ASM_SRC=crypto\sha\asm\s1-win32.asm | ||
| 52 | RMD160_ASM_OBJ=crypto\ripemd\asm\rm-win32.obj | ||
| 53 | RMD160_ASM_SRC=crypto\ripemd\asm\rm-win32.asm | ||
| 54 | |||
| 55 | # The output directory for everything intersting | ||
| 56 | OUT_D=out32dll | ||
| 57 | # The output directory for all the temporary muck | ||
| 58 | TMP_D=tmp32dll | ||
| 59 | # The output directory for the header files | ||
| 60 | INC_D=inc32 | ||
| 61 | |||
| 62 | CP=copy | ||
| 63 | RM=del | ||
| 64 | RANLIB= | ||
| 65 | MKDIR=mkdir | ||
| 66 | MKLIB=lib | ||
| 67 | MLFLAGS= /nologo /subsystem:console /machine:I386 /opt:ref /dll | ||
| 68 | ASM=ml /Cp /coff /c /Cx | ||
| 69 | |||
| 70 | ###################################################### | ||
| 71 | # You should not need to touch anything below this point | ||
| 72 | ###################################################### | ||
| 73 | |||
| 74 | E_EXE=ssleay | ||
| 75 | SSL=ssleay32 | ||
| 76 | CRYPTO=libeay32 | ||
| 77 | RSAGLUE=RSAglue | ||
| 78 | |||
| 79 | # BIN_D - Binary output directory | ||
| 80 | # TEST_D - Binary test file output directory | ||
| 81 | # LIB_D - library output directory | ||
| 82 | BIN_D=$(OUT_D) | ||
| 83 | TEST_D=$(OUT_D) | ||
| 84 | LIB_D=$(OUT_D) | ||
| 85 | |||
| 86 | # INCL_D - local library directory | ||
| 87 | # OBJ_D - temp object file directory | ||
| 88 | OBJ_D=$(TMP_D) | ||
| 89 | INCL_D=$(TMP_D) | ||
| 90 | |||
| 91 | O_SSL= $(LIB_D)\$(SSL).dll | ||
| 92 | O_CRYPTO= $(LIB_D)\$(CRYPTO).dll | ||
| 93 | O_RSAGLUE= $(LIB_D)\$(RSAGLUE).lib | ||
| 94 | SO_SSL= $(SSL) | ||
| 95 | SO_CRYPTO= $(CRYPTO) | ||
| 96 | L_SSL= $(LIB_D)\$(SSL).lib | ||
| 97 | L_CRYPTO= $(LIB_D)\$(CRYPTO).lib | ||
| 98 | |||
| 99 | L_LIBS= $(L_SSL) $(L_CRYPTO) | ||
| 100 | #L_LIBS= $(O_SSL) $(O_RSAGLUE) -lrsaref $(O_CRYPTO) | ||
| 101 | |||
| 102 | ###################################################### | ||
| 103 | # Don't touch anything below this point | ||
| 104 | ###################################################### | ||
| 105 | |||
| 106 | INC=-I$(INC_D) -I$(INCL_D) | ||
| 107 | APP_CFLAGS=$(INC) $(CFLAG) $(APP_CFLAG) | ||
| 108 | LIB_CFLAGS=$(INC) $(CFLAG) $(LIB_CFLAG) | ||
| 109 | SHLIB_CFLAGS=$(INC) $(CFLAG) $(LIB_CFLAG) $(SHLIB_CFLAG) | ||
| 110 | LIBS_DEP=$(O_CRYPTO) $(O_RSAGLUE) $(O_SSL) | ||
| 111 | |||
| 112 | ############################################# | ||
| 113 | HEADER=$(INCL_D)\cryptlib.h \ | ||
| 114 | $(INCL_D)\date.h $(INCL_D)\md5_locl.h $(INCL_D)\sha_locl.h \ | ||
| 115 | $(INCL_D)\rmd_locl.h $(INCL_D)\rmdconst.h $(INCL_D)\des_locl.h \ | ||
| 116 | $(INCL_D)\rpc_des.h $(INCL_D)\podd.h $(INCL_D)\sk.h \ | ||
| 117 | $(INCL_D)\spr.h $(INCL_D)\des_ver.h $(INCL_D)\rc2_locl.h \ | ||
| 118 | $(INCL_D)\rc4_locl.h $(INCL_D)\rc5_locl.h $(INCL_D)\idea_lcl.h \ | ||
| 119 | $(INCL_D)\bf_pi.h $(INCL_D)\bf_locl.h $(INCL_D)\cast_s.h \ | ||
| 120 | $(INCL_D)\cast_lcl.h $(INCL_D)\bn_lcl.h $(INCL_D)\bn_prime.h \ | ||
| 121 | $(INCL_D)\obj_dat.h $(INCL_D)\conf_lcl.h $(INCL_D)\ssl_locl.h \ | ||
| 122 | $(INCL_D)\rsaref.h $(INCL_D)\apps.h $(INCL_D)\progs.h \ | ||
| 123 | $(INCL_D)\s_apps.h $(INCL_D)\testdsa.h $(INCL_D)\testrsa.h | ||
| 124 | |||
| 125 | EXHEADER=$(INC_D)\e_os.h \ | ||
| 126 | $(INC_D)\crypto.h $(INC_D)\cryptall.h $(INC_D)\md2.h \ | ||
| 127 | $(INC_D)\md5.h $(INC_D)\sha.h $(INC_D)\mdc2.h \ | ||
| 128 | $(INC_D)\hmac.h $(INC_D)\ripemd.h $(INC_D)\des.h \ | ||
| 129 | $(INC_D)\rc2.h $(INC_D)\rc4.h $(INC_D)\rc5.h \ | ||
| 130 | $(INC_D)\idea.h $(INC_D)\blowfish.h $(INC_D)\cast.h \ | ||
| 131 | $(INC_D)\bn.h $(INC_D)\rsa.h $(INC_D)\dsa.h \ | ||
| 132 | $(INC_D)\dh.h $(INC_D)\buffer.h $(INC_D)\bio.h \ | ||
| 133 | $(INC_D)\bss_file.c $(INC_D)\stack.h $(INC_D)\lhash.h \ | ||
| 134 | $(INC_D)\rand.h $(INC_D)\err.h $(INC_D)\objects.h \ | ||
| 135 | $(INC_D)\evp.h $(INC_D)\pem.h $(INC_D)\asn1.h \ | ||
| 136 | $(INC_D)\asn1_mac.h $(INC_D)\x509.h $(INC_D)\x509_vfy.h \ | ||
| 137 | $(INC_D)\conf.h $(INC_D)\txt_db.h $(INC_D)\pkcs7.h \ | ||
| 138 | $(INC_D)\ssl.h $(INC_D)\ssl2.h $(INC_D)\ssl3.h \ | ||
| 139 | $(INC_D)\ssl23.h $(INC_D)\tls1.h | ||
| 140 | |||
| 141 | T_OBJ=$(OBJ_D)\md2test.obj \ | ||
| 142 | $(OBJ_D)\md5test.obj $(OBJ_D)\shatest.obj $(OBJ_D)\sha1test.obj \ | ||
| 143 | $(OBJ_D)\mdc2test.obj $(OBJ_D)\hmactest.obj $(OBJ_D)\rmdtest.obj \ | ||
| 144 | $(OBJ_D)\destest.obj $(OBJ_D)\rc2test.obj $(OBJ_D)\rc4test.obj \ | ||
| 145 | $(OBJ_D)\rc5test.obj $(OBJ_D)\ideatest.obj $(OBJ_D)\bftest.obj \ | ||
| 146 | $(OBJ_D)\casttest.obj $(OBJ_D)\bntest.obj $(OBJ_D)\exptest.obj \ | ||
| 147 | $(OBJ_D)\dsatest.obj $(OBJ_D)\dhtest.obj $(OBJ_D)\randtest.obj \ | ||
| 148 | $(OBJ_D)\ssltest.obj | ||
| 149 | |||
| 150 | E_OBJ=$(OBJ_D)\verify.obj \ | ||
| 151 | $(OBJ_D)\asn1pars.obj $(OBJ_D)\req.obj $(OBJ_D)\dgst.obj \ | ||
| 152 | $(OBJ_D)\dh.obj $(OBJ_D)\enc.obj $(OBJ_D)\gendh.obj \ | ||
| 153 | $(OBJ_D)\errstr.obj $(OBJ_D)\ca.obj $(OBJ_D)\pkcs7.obj \ | ||
| 154 | $(OBJ_D)\crl2p7.obj $(OBJ_D)\crl.obj $(OBJ_D)\rsa.obj \ | ||
| 155 | $(OBJ_D)\dsa.obj $(OBJ_D)\dsaparam.obj $(OBJ_D)\x509.obj \ | ||
| 156 | $(OBJ_D)\genrsa.obj $(OBJ_D)\s_server.obj $(OBJ_D)\s_client.obj \ | ||
| 157 | $(OBJ_D)\speed.obj $(OBJ_D)\s_time.obj $(OBJ_D)\apps.obj \ | ||
| 158 | $(OBJ_D)\s_cb.obj $(OBJ_D)\s_socket.obj $(OBJ_D)\version.obj \ | ||
| 159 | $(OBJ_D)\sess_id.obj $(OBJ_D)\ciphers.obj $(OBJ_D)\ssleay.obj | ||
| 160 | |||
| 161 | CRYPTOOBJ=$(OBJ_D)\cryptlib.obj \ | ||
| 162 | $(OBJ_D)\mem.obj $(OBJ_D)\cversion.obj $(OBJ_D)\ex_data.obj \ | ||
| 163 | $(OBJ_D)\cpt_err.obj $(OBJ_D)\md2_dgst.obj $(OBJ_D)\md2_one.obj \ | ||
| 164 | $(OBJ_D)\md5_dgst.obj $(MD5_ASM_OBJ) $(OBJ_D)\md5_one.obj \ | ||
| 165 | $(OBJ_D)\sha_dgst.obj $(OBJ_D)\sha1dgst.obj $(SHA1_ASM_OBJ) \ | ||
| 166 | $(OBJ_D)\sha_one.obj $(OBJ_D)\sha1_one.obj $(OBJ_D)\mdc2dgst.obj \ | ||
| 167 | $(OBJ_D)\mdc2_one.obj $(OBJ_D)\hmac.obj $(OBJ_D)\rmd_dgst.obj \ | ||
| 168 | $(RMD160_ASM_OBJ) $(OBJ_D)\rmd_one.obj $(OBJ_D)\set_key.obj \ | ||
| 169 | $(OBJ_D)\ecb_enc.obj $(OBJ_D)\cbc_enc.obj $(OBJ_D)\ecb3_enc.obj \ | ||
| 170 | $(OBJ_D)\cfb64enc.obj $(OBJ_D)\cfb64ede.obj $(OBJ_D)\cfb_enc.obj \ | ||
| 171 | $(OBJ_D)\ofb64ede.obj $(OBJ_D)\enc_read.obj $(OBJ_D)\enc_writ.obj \ | ||
| 172 | $(OBJ_D)\ofb64enc.obj $(OBJ_D)\ofb_enc.obj $(OBJ_D)\str2key.obj \ | ||
| 173 | $(OBJ_D)\pcbc_enc.obj $(OBJ_D)\qud_cksm.obj $(OBJ_D)\rand_key.obj \ | ||
| 174 | $(DES_ENC_OBJ) $(OBJ_D)\read2pwd.obj $(OBJ_D)\fcrypt.obj \ | ||
| 175 | $(OBJ_D)\xcbc_enc.obj $(OBJ_D)\read_pwd.obj $(OBJ_D)\rpc_enc.obj \ | ||
| 176 | $(OBJ_D)\cbc_cksm.obj $(OBJ_D)\supp.obj $(OBJ_D)\rc2_ecb.obj \ | ||
| 177 | $(OBJ_D)\rc2_skey.obj $(OBJ_D)\rc2_cbc.obj $(OBJ_D)\rc2cfb64.obj \ | ||
| 178 | $(OBJ_D)\rc2ofb64.obj $(OBJ_D)\rc4_skey.obj $(RC4_ENC_OBJ) \ | ||
| 179 | $(OBJ_D)\rc5_skey.obj $(OBJ_D)\rc5_ecb.obj $(RC5_ENC_OBJ) \ | ||
| 180 | $(OBJ_D)\rc5cfb64.obj $(OBJ_D)\rc5ofb64.obj $(OBJ_D)\i_cbc.obj \ | ||
| 181 | $(OBJ_D)\i_cfb64.obj $(OBJ_D)\i_ofb64.obj $(OBJ_D)\i_ecb.obj \ | ||
| 182 | $(OBJ_D)\i_skey.obj $(OBJ_D)\bf_skey.obj $(OBJ_D)\bf_ecb.obj \ | ||
| 183 | $(BF_ENC_OBJ) $(OBJ_D)\bf_cfb64.obj $(OBJ_D)\bf_ofb64.obj \ | ||
| 184 | $(OBJ_D)\c_skey.obj $(OBJ_D)\c_ecb.obj $(CAST_ENC_OBJ) \ | ||
| 185 | $(OBJ_D)\c_cfb64.obj $(OBJ_D)\c_ofb64.obj $(OBJ_D)\bn_add.obj \ | ||
| 186 | $(OBJ_D)\bn_div.obj $(OBJ_D)\bn_exp.obj $(OBJ_D)\bn_lib.obj \ | ||
| 187 | $(OBJ_D)\bn_mod.obj $(OBJ_D)\bn_mul.obj $(OBJ_D)\bn_print.obj \ | ||
| 188 | $(OBJ_D)\bn_rand.obj $(OBJ_D)\bn_shift.obj $(OBJ_D)\bn_sub.obj \ | ||
| 189 | $(OBJ_D)\bn_word.obj $(OBJ_D)\bn_blind.obj $(OBJ_D)\bn_gcd.obj \ | ||
| 190 | $(OBJ_D)\bn_prime.obj $(OBJ_D)\bn_err.obj $(OBJ_D)\bn_sqr.obj \ | ||
| 191 | $(BN_MULW_OBJ) $(OBJ_D)\bn_recp.obj $(OBJ_D)\bn_mont.obj \ | ||
| 192 | $(OBJ_D)\bn_mpi.obj $(OBJ_D)\rsa_eay.obj $(OBJ_D)\rsa_gen.obj \ | ||
| 193 | $(OBJ_D)\rsa_lib.obj $(OBJ_D)\rsa_sign.obj $(OBJ_D)\rsa_saos.obj \ | ||
| 194 | $(OBJ_D)\rsa_err.obj $(OBJ_D)\rsa_pk1.obj $(OBJ_D)\rsa_ssl.obj \ | ||
| 195 | $(OBJ_D)\rsa_none.obj $(OBJ_D)\dsa_gen.obj $(OBJ_D)\dsa_key.obj \ | ||
| 196 | $(OBJ_D)\dsa_lib.obj $(OBJ_D)\dsa_vrf.obj $(OBJ_D)\dsa_sign.obj \ | ||
| 197 | $(OBJ_D)\dsa_err.obj $(OBJ_D)\dh_gen.obj $(OBJ_D)\dh_key.obj \ | ||
| 198 | $(OBJ_D)\dh_lib.obj $(OBJ_D)\dh_check.obj $(OBJ_D)\dh_err.obj \ | ||
| 199 | $(OBJ_D)\buffer.obj $(OBJ_D)\buf_err.obj $(OBJ_D)\bio_lib.obj \ | ||
| 200 | $(OBJ_D)\bio_cb.obj $(OBJ_D)\bio_err.obj $(OBJ_D)\bss_mem.obj \ | ||
| 201 | $(OBJ_D)\bss_null.obj $(OBJ_D)\bss_fd.obj $(OBJ_D)\bss_file.obj \ | ||
| 202 | $(OBJ_D)\bss_sock.obj $(OBJ_D)\bss_conn.obj $(OBJ_D)\bf_null.obj \ | ||
| 203 | $(OBJ_D)\bf_buff.obj $(OBJ_D)\b_print.obj $(OBJ_D)\b_dump.obj \ | ||
| 204 | $(OBJ_D)\b_sock.obj $(OBJ_D)\bss_acpt.obj $(OBJ_D)\bf_nbio.obj \ | ||
| 205 | $(OBJ_D)\stack.obj $(OBJ_D)\lhash.obj $(OBJ_D)\lh_stats.obj \ | ||
| 206 | $(OBJ_D)\md_rand.obj $(OBJ_D)\randfile.obj $(OBJ_D)\err.obj \ | ||
| 207 | $(OBJ_D)\err_all.obj $(OBJ_D)\err_prn.obj $(OBJ_D)\obj_dat.obj \ | ||
| 208 | $(OBJ_D)\obj_lib.obj $(OBJ_D)\obj_err.obj $(OBJ_D)\encode.obj \ | ||
| 209 | $(OBJ_D)\digest.obj $(OBJ_D)\evp_enc.obj $(OBJ_D)\evp_key.obj \ | ||
| 210 | $(OBJ_D)\e_ecb_d.obj $(OBJ_D)\e_cbc_d.obj $(OBJ_D)\e_cfb_d.obj \ | ||
| 211 | $(OBJ_D)\e_ofb_d.obj $(OBJ_D)\e_ecb_i.obj $(OBJ_D)\e_cbc_i.obj \ | ||
| 212 | $(OBJ_D)\e_cfb_i.obj $(OBJ_D)\e_ofb_i.obj $(OBJ_D)\e_ecb_3d.obj \ | ||
| 213 | $(OBJ_D)\e_cbc_3d.obj $(OBJ_D)\e_rc4.obj $(OBJ_D)\names.obj \ | ||
| 214 | $(OBJ_D)\e_cfb_3d.obj $(OBJ_D)\e_ofb_3d.obj $(OBJ_D)\e_xcbc_d.obj \ | ||
| 215 | $(OBJ_D)\e_ecb_r2.obj $(OBJ_D)\e_cbc_r2.obj $(OBJ_D)\e_cfb_r2.obj \ | ||
| 216 | $(OBJ_D)\e_ofb_r2.obj $(OBJ_D)\e_ecb_bf.obj $(OBJ_D)\e_cbc_bf.obj \ | ||
| 217 | $(OBJ_D)\e_cfb_bf.obj $(OBJ_D)\e_ofb_bf.obj $(OBJ_D)\e_ecb_c.obj \ | ||
| 218 | $(OBJ_D)\e_cbc_c.obj $(OBJ_D)\e_cfb_c.obj $(OBJ_D)\e_ofb_c.obj \ | ||
| 219 | $(OBJ_D)\e_ecb_r5.obj $(OBJ_D)\e_cbc_r5.obj $(OBJ_D)\e_cfb_r5.obj \ | ||
| 220 | $(OBJ_D)\e_ofb_r5.obj $(OBJ_D)\m_null.obj $(OBJ_D)\m_md2.obj \ | ||
| 221 | $(OBJ_D)\m_md5.obj $(OBJ_D)\m_sha.obj $(OBJ_D)\m_sha1.obj \ | ||
| 222 | $(OBJ_D)\m_dss.obj $(OBJ_D)\m_dss1.obj $(OBJ_D)\m_mdc2.obj \ | ||
| 223 | $(OBJ_D)\m_ripemd.obj $(OBJ_D)\p_open.obj $(OBJ_D)\p_seal.obj \ | ||
| 224 | $(OBJ_D)\p_sign.obj $(OBJ_D)\p_verify.obj $(OBJ_D)\p_lib.obj \ | ||
| 225 | $(OBJ_D)\p_enc.obj $(OBJ_D)\p_dec.obj $(OBJ_D)\bio_md.obj \ | ||
| 226 | $(OBJ_D)\bio_b64.obj $(OBJ_D)\bio_enc.obj $(OBJ_D)\evp_err.obj \ | ||
| 227 | $(OBJ_D)\e_null.obj $(OBJ_D)\c_all.obj $(OBJ_D)\evp_lib.obj \ | ||
| 228 | $(OBJ_D)\pem_sign.obj $(OBJ_D)\pem_seal.obj $(OBJ_D)\pem_info.obj \ | ||
| 229 | $(OBJ_D)\pem_lib.obj $(OBJ_D)\pem_all.obj $(OBJ_D)\pem_err.obj \ | ||
| 230 | $(OBJ_D)\a_object.obj $(OBJ_D)\a_bitstr.obj $(OBJ_D)\a_utctm.obj \ | ||
| 231 | $(OBJ_D)\a_int.obj $(OBJ_D)\a_octet.obj $(OBJ_D)\a_print.obj \ | ||
| 232 | $(OBJ_D)\a_type.obj $(OBJ_D)\a_set.obj $(OBJ_D)\a_dup.obj \ | ||
| 233 | $(OBJ_D)\a_d2i_fp.obj $(OBJ_D)\a_i2d_fp.obj $(OBJ_D)\a_sign.obj \ | ||
| 234 | $(OBJ_D)\a_digest.obj $(OBJ_D)\a_verify.obj $(OBJ_D)\x_algor.obj \ | ||
| 235 | $(OBJ_D)\x_val.obj $(OBJ_D)\x_pubkey.obj $(OBJ_D)\x_sig.obj \ | ||
| 236 | $(OBJ_D)\x_req.obj $(OBJ_D)\x_attrib.obj $(OBJ_D)\x_name.obj \ | ||
| 237 | $(OBJ_D)\x_cinf.obj $(OBJ_D)\x_x509.obj $(OBJ_D)\x_crl.obj \ | ||
| 238 | $(OBJ_D)\x_info.obj $(OBJ_D)\x_spki.obj $(OBJ_D)\d2i_r_pr.obj \ | ||
| 239 | $(OBJ_D)\i2d_r_pr.obj $(OBJ_D)\d2i_r_pu.obj $(OBJ_D)\i2d_r_pu.obj \ | ||
| 240 | $(OBJ_D)\d2i_s_pr.obj $(OBJ_D)\i2d_s_pr.obj $(OBJ_D)\d2i_s_pu.obj \ | ||
| 241 | $(OBJ_D)\i2d_s_pu.obj $(OBJ_D)\d2i_pu.obj $(OBJ_D)\d2i_pr.obj \ | ||
| 242 | $(OBJ_D)\i2d_pu.obj $(OBJ_D)\i2d_pr.obj $(OBJ_D)\t_req.obj \ | ||
| 243 | $(OBJ_D)\t_x509.obj $(OBJ_D)\t_pkey.obj $(OBJ_D)\p7_i_s.obj \ | ||
| 244 | $(OBJ_D)\p7_signi.obj $(OBJ_D)\p7_signd.obj $(OBJ_D)\p7_recip.obj \ | ||
| 245 | $(OBJ_D)\p7_enc_c.obj $(OBJ_D)\p7_evp.obj $(OBJ_D)\p7_dgst.obj \ | ||
| 246 | $(OBJ_D)\p7_s_e.obj $(OBJ_D)\p7_enc.obj $(OBJ_D)\p7_lib.obj \ | ||
| 247 | $(OBJ_D)\f_int.obj $(OBJ_D)\f_string.obj $(OBJ_D)\i2d_dhp.obj \ | ||
| 248 | $(OBJ_D)\i2d_dsap.obj $(OBJ_D)\d2i_dhp.obj $(OBJ_D)\d2i_dsap.obj \ | ||
| 249 | $(OBJ_D)\n_pkey.obj $(OBJ_D)\a_hdr.obj $(OBJ_D)\x_pkey.obj \ | ||
| 250 | $(OBJ_D)\a_bool.obj $(OBJ_D)\x_exten.obj $(OBJ_D)\asn1_par.obj \ | ||
| 251 | $(OBJ_D)\asn1_lib.obj $(OBJ_D)\asn1_err.obj $(OBJ_D)\a_meth.obj \ | ||
| 252 | $(OBJ_D)\a_bytes.obj $(OBJ_D)\evp_asn1.obj $(OBJ_D)\x509_def.obj \ | ||
| 253 | $(OBJ_D)\x509_d2.obj $(OBJ_D)\x509_r2x.obj $(OBJ_D)\x509_cmp.obj \ | ||
| 254 | $(OBJ_D)\x509_obj.obj $(OBJ_D)\x509_req.obj $(OBJ_D)\x509_vfy.obj \ | ||
| 255 | $(OBJ_D)\x509_set.obj $(OBJ_D)\x509rset.obj $(OBJ_D)\x509_err.obj \ | ||
| 256 | $(OBJ_D)\x509name.obj $(OBJ_D)\x509_v3.obj $(OBJ_D)\x509_ext.obj \ | ||
| 257 | $(OBJ_D)\x509pack.obj $(OBJ_D)\x509type.obj $(OBJ_D)\x509_lu.obj \ | ||
| 258 | $(OBJ_D)\x_all.obj $(OBJ_D)\x509_txt.obj $(OBJ_D)\by_file.obj \ | ||
| 259 | $(OBJ_D)\by_dir.obj $(OBJ_D)\v3_net.obj $(OBJ_D)\v3_x509.obj \ | ||
| 260 | $(OBJ_D)\conf.obj $(OBJ_D)\conf_err.obj $(OBJ_D)\txt_db.obj \ | ||
| 261 | $(OBJ_D)\pk7_lib.obj $(OBJ_D)\pkcs7err.obj $(OBJ_D)\pk7_doit.obj | ||
| 262 | |||
| 263 | SSLOBJ=$(OBJ_D)\s2_meth.obj \ | ||
| 264 | $(OBJ_D)\s2_srvr.obj $(OBJ_D)\s2_clnt.obj $(OBJ_D)\s2_lib.obj \ | ||
| 265 | $(OBJ_D)\s2_enc.obj $(OBJ_D)\s2_pkt.obj $(OBJ_D)\s3_meth.obj \ | ||
| 266 | $(OBJ_D)\s3_srvr.obj $(OBJ_D)\s3_clnt.obj $(OBJ_D)\s3_lib.obj \ | ||
| 267 | $(OBJ_D)\s3_enc.obj $(OBJ_D)\s3_pkt.obj $(OBJ_D)\s3_both.obj \ | ||
| 268 | $(OBJ_D)\s23_meth.obj $(OBJ_D)\s23_srvr.obj $(OBJ_D)\s23_clnt.obj \ | ||
| 269 | $(OBJ_D)\s23_lib.obj $(OBJ_D)\s23_pkt.obj $(OBJ_D)\t1_meth.obj \ | ||
| 270 | $(OBJ_D)\t1_srvr.obj $(OBJ_D)\t1_clnt.obj $(OBJ_D)\t1_lib.obj \ | ||
| 271 | $(OBJ_D)\t1_enc.obj $(OBJ_D)\ssl_lib.obj $(OBJ_D)\ssl_err2.obj \ | ||
| 272 | $(OBJ_D)\ssl_cert.obj $(OBJ_D)\ssl_sess.obj $(OBJ_D)\ssl_ciph.obj \ | ||
| 273 | $(OBJ_D)\ssl_stat.obj $(OBJ_D)\ssl_rsa.obj $(OBJ_D)\ssl_asn1.obj \ | ||
| 274 | $(OBJ_D)\ssl_txt.obj $(OBJ_D)\ssl_algs.obj $(OBJ_D)\bio_ssl.obj \ | ||
| 275 | $(OBJ_D)\ssl_err.obj | ||
| 276 | |||
| 277 | RSAGLUEOBJ=$(OBJ_D)\rsaref.obj \ | ||
| 278 | $(OBJ_D)\rsar_err.obj | ||
| 279 | |||
| 280 | T_EXE=$(TEST_D)\md2test.exe \ | ||
| 281 | $(TEST_D)\md5test.exe $(TEST_D)\shatest.exe $(TEST_D)\sha1test.exe \ | ||
| 282 | $(TEST_D)\mdc2test.exe $(TEST_D)\hmactest.exe $(TEST_D)\rmdtest.exe \ | ||
| 283 | $(TEST_D)\destest.exe $(TEST_D)\rc2test.exe $(TEST_D)\rc4test.exe \ | ||
| 284 | $(TEST_D)\rc5test.exe $(TEST_D)\ideatest.exe $(TEST_D)\bftest.exe \ | ||
| 285 | $(TEST_D)\casttest.exe $(TEST_D)\bntest.exe $(TEST_D)\exptest.exe \ | ||
| 286 | $(TEST_D)\dsatest.exe $(TEST_D)\dhtest.exe $(TEST_D)\randtest.exe \ | ||
| 287 | $(TEST_D)\ssltest.exe | ||
| 288 | |||
| 289 | ################################################################### | ||
| 290 | all: banner $(TMP_D) $(BIN_D) $(TEST_D) $(LIB_D) $(INC_D) headers lib exe | ||
| 291 | |||
| 292 | banner: | ||
| 293 | |||
| 294 | |||
| 295 | $(TMP_D): | ||
| 296 | $(MKDIR) $(TMP_D) | ||
| 297 | |||
| 298 | $(BIN_D): | ||
| 299 | $(MKDIR) $(BIN_D) | ||
| 300 | |||
| 301 | $(TEST_D): | ||
| 302 | $(MKDIR) $(TEST_D) | ||
| 303 | |||
| 304 | $(LIB_D): | ||
| 305 | $(MKDIR) $(LIB_D) | ||
| 306 | |||
| 307 | $(INC_D): | ||
| 308 | $(MKDIR) $(INC_D) | ||
| 309 | |||
| 310 | headers: $(HEADER) $(EXHEADER) | ||
| 311 | |||
| 312 | lib: $(LIBS_DEP) | ||
| 313 | |||
| 314 | exe: $(T_EXE) $(BIN_D)\$(E_EXE).exe | ||
| 315 | |||
| 316 | install: | ||
| 317 | $(MKDIR) $(INSTALLTOP) | ||
| 318 | $(MKDIR) $(INSTALLTOP)\bin | ||
| 319 | $(MKDIR) $(INSTALLTOP)\include | ||
| 320 | $(MKDIR) $(INSTALLTOP)\lib | ||
| 321 | $(CP) $(INC_D)\*.[ch] $(INSTALLTOP)\include | ||
| 322 | $(CP) $(BIN_D)\$(E_EXE).exe $(INSTALLTOP)\bin | ||
| 323 | $(CP) $(O_SSL) $(INSTALLTOP)\lib | ||
| 324 | $(CP) $(O_CRYPTO) $(INSTALLTOP)\lib | ||
| 325 | |||
| 326 | clean: | ||
| 327 | $(RM) $(TMP_D)\*.* | ||
| 328 | |||
| 329 | vclean: | ||
| 330 | $(RM) $(TMP_D)\*.* | ||
| 331 | $(RM) $(OUT_D)\*.* | ||
| 332 | |||
| 333 | $(INCL_D)\cryptlib.h: $(SRC_D)\crypto\cryptlib.h | ||
| 334 | $(CP) $(SRC_D)\crypto\cryptlib.h $(INCL_D)\cryptlib.h | ||
| 335 | |||
| 336 | $(INCL_D)\date.h: $(SRC_D)\crypto\date.h | ||
| 337 | $(CP) $(SRC_D)\crypto\date.h $(INCL_D)\date.h | ||
| 338 | |||
| 339 | $(INCL_D)\md5_locl.h: $(SRC_D)\crypto\md5\md5_locl.h | ||
| 340 | $(CP) $(SRC_D)\crypto\md5\md5_locl.h $(INCL_D)\md5_locl.h | ||
| 341 | |||
| 342 | $(INCL_D)\sha_locl.h: $(SRC_D)\crypto\sha\sha_locl.h | ||
| 343 | $(CP) $(SRC_D)\crypto\sha\sha_locl.h $(INCL_D)\sha_locl.h | ||
| 344 | |||
| 345 | $(INCL_D)\rmd_locl.h: $(SRC_D)\crypto\ripemd\rmd_locl.h | ||
| 346 | $(CP) $(SRC_D)\crypto\ripemd\rmd_locl.h $(INCL_D)\rmd_locl.h | ||
| 347 | |||
| 348 | $(INCL_D)\rmdconst.h: $(SRC_D)\crypto\ripemd\rmdconst.h | ||
| 349 | $(CP) $(SRC_D)\crypto\ripemd\rmdconst.h $(INCL_D)\rmdconst.h | ||
| 350 | |||
| 351 | $(INCL_D)\des_locl.h: $(SRC_D)\crypto\des\des_locl.h | ||
| 352 | $(CP) $(SRC_D)\crypto\des\des_locl.h $(INCL_D)\des_locl.h | ||
| 353 | |||
| 354 | $(INCL_D)\rpc_des.h: $(SRC_D)\crypto\des\rpc_des.h | ||
| 355 | $(CP) $(SRC_D)\crypto\des\rpc_des.h $(INCL_D)\rpc_des.h | ||
| 356 | |||
| 357 | $(INCL_D)\podd.h: $(SRC_D)\crypto\des\podd.h | ||
| 358 | $(CP) $(SRC_D)\crypto\des\podd.h $(INCL_D)\podd.h | ||
| 359 | |||
| 360 | $(INCL_D)\sk.h: $(SRC_D)\crypto\des\sk.h | ||
| 361 | $(CP) $(SRC_D)\crypto\des\sk.h $(INCL_D)\sk.h | ||
| 362 | |||
| 363 | $(INCL_D)\spr.h: $(SRC_D)\crypto\des\spr.h | ||
| 364 | $(CP) $(SRC_D)\crypto\des\spr.h $(INCL_D)\spr.h | ||
| 365 | |||
| 366 | $(INCL_D)\des_ver.h: $(SRC_D)\crypto\des\des_ver.h | ||
| 367 | $(CP) $(SRC_D)\crypto\des\des_ver.h $(INCL_D)\des_ver.h | ||
| 368 | |||
| 369 | $(INCL_D)\rc2_locl.h: $(SRC_D)\crypto\rc2\rc2_locl.h | ||
| 370 | $(CP) $(SRC_D)\crypto\rc2\rc2_locl.h $(INCL_D)\rc2_locl.h | ||
| 371 | |||
| 372 | $(INCL_D)\rc4_locl.h: $(SRC_D)\crypto\rc4\rc4_locl.h | ||
| 373 | $(CP) $(SRC_D)\crypto\rc4\rc4_locl.h $(INCL_D)\rc4_locl.h | ||
| 374 | |||
| 375 | $(INCL_D)\rc5_locl.h: $(SRC_D)\crypto\rc5\rc5_locl.h | ||
| 376 | $(CP) $(SRC_D)\crypto\rc5\rc5_locl.h $(INCL_D)\rc5_locl.h | ||
| 377 | |||
| 378 | $(INCL_D)\idea_lcl.h: $(SRC_D)\crypto\idea\idea_lcl.h | ||
| 379 | $(CP) $(SRC_D)\crypto\idea\idea_lcl.h $(INCL_D)\idea_lcl.h | ||
| 380 | |||
| 381 | $(INCL_D)\bf_pi.h: $(SRC_D)\crypto\bf\bf_pi.h | ||
| 382 | $(CP) $(SRC_D)\crypto\bf\bf_pi.h $(INCL_D)\bf_pi.h | ||
| 383 | |||
| 384 | $(INCL_D)\bf_locl.h: $(SRC_D)\crypto\bf\bf_locl.h | ||
| 385 | $(CP) $(SRC_D)\crypto\bf\bf_locl.h $(INCL_D)\bf_locl.h | ||
| 386 | |||
| 387 | $(INCL_D)\cast_s.h: $(SRC_D)\crypto\cast\cast_s.h | ||
| 388 | $(CP) $(SRC_D)\crypto\cast\cast_s.h $(INCL_D)\cast_s.h | ||
| 389 | |||
| 390 | $(INCL_D)\cast_lcl.h: $(SRC_D)\crypto\cast\cast_lcl.h | ||
| 391 | $(CP) $(SRC_D)\crypto\cast\cast_lcl.h $(INCL_D)\cast_lcl.h | ||
| 392 | |||
| 393 | $(INCL_D)\bn_lcl.h: $(SRC_D)\crypto\bn\bn_lcl.h | ||
| 394 | $(CP) $(SRC_D)\crypto\bn\bn_lcl.h $(INCL_D)\bn_lcl.h | ||
| 395 | |||
| 396 | $(INCL_D)\bn_prime.h: $(SRC_D)\crypto\bn\bn_prime.h | ||
| 397 | $(CP) $(SRC_D)\crypto\bn\bn_prime.h $(INCL_D)\bn_prime.h | ||
| 398 | |||
| 399 | $(INCL_D)\obj_dat.h: $(SRC_D)\crypto\objects\obj_dat.h | ||
| 400 | $(CP) $(SRC_D)\crypto\objects\obj_dat.h $(INCL_D)\obj_dat.h | ||
| 401 | |||
| 402 | $(INCL_D)\conf_lcl.h: $(SRC_D)\crypto\conf\conf_lcl.h | ||
| 403 | $(CP) $(SRC_D)\crypto\conf\conf_lcl.h $(INCL_D)\conf_lcl.h | ||
| 404 | |||
| 405 | $(INCL_D)\ssl_locl.h: $(SRC_D)\ssl\ssl_locl.h | ||
| 406 | $(CP) $(SRC_D)\ssl\ssl_locl.h $(INCL_D)\ssl_locl.h | ||
| 407 | |||
| 408 | $(INCL_D)\rsaref.h: $(SRC_D)\rsaref\rsaref.h | ||
| 409 | $(CP) $(SRC_D)\rsaref\rsaref.h $(INCL_D)\rsaref.h | ||
| 410 | |||
| 411 | $(INCL_D)\apps.h: $(SRC_D)\apps\apps.h | ||
| 412 | $(CP) $(SRC_D)\apps\apps.h $(INCL_D)\apps.h | ||
| 413 | |||
| 414 | $(INCL_D)\progs.h: $(SRC_D)\apps\progs.h | ||
| 415 | $(CP) $(SRC_D)\apps\progs.h $(INCL_D)\progs.h | ||
| 416 | |||
| 417 | $(INCL_D)\s_apps.h: $(SRC_D)\apps\s_apps.h | ||
| 418 | $(CP) $(SRC_D)\apps\s_apps.h $(INCL_D)\s_apps.h | ||
| 419 | |||
| 420 | $(INCL_D)\testdsa.h: $(SRC_D)\apps\testdsa.h | ||
| 421 | $(CP) $(SRC_D)\apps\testdsa.h $(INCL_D)\testdsa.h | ||
| 422 | |||
| 423 | $(INCL_D)\testrsa.h: $(SRC_D)\apps\testrsa.h | ||
| 424 | $(CP) $(SRC_D)\apps\testrsa.h $(INCL_D)\testrsa.h | ||
| 425 | |||
| 426 | $(INC_D)\e_os.h: $(SRC_D)\.\e_os.h | ||
| 427 | $(CP) $(SRC_D)\.\e_os.h $(INC_D)\e_os.h | ||
| 428 | |||
| 429 | $(INC_D)\crypto.h: $(SRC_D)\crypto\crypto.h | ||
| 430 | $(CP) $(SRC_D)\crypto\crypto.h $(INC_D)\crypto.h | ||
| 431 | |||
| 432 | $(INC_D)\cryptall.h: $(SRC_D)\crypto\cryptall.h | ||
| 433 | $(CP) $(SRC_D)\crypto\cryptall.h $(INC_D)\cryptall.h | ||
| 434 | |||
| 435 | $(INC_D)\md2.h: $(SRC_D)\crypto\md2\md2.h | ||
| 436 | $(CP) $(SRC_D)\crypto\md2\md2.h $(INC_D)\md2.h | ||
| 437 | |||
| 438 | $(INC_D)\md5.h: $(SRC_D)\crypto\md5\md5.h | ||
| 439 | $(CP) $(SRC_D)\crypto\md5\md5.h $(INC_D)\md5.h | ||
| 440 | |||
| 441 | $(INC_D)\sha.h: $(SRC_D)\crypto\sha\sha.h | ||
| 442 | $(CP) $(SRC_D)\crypto\sha\sha.h $(INC_D)\sha.h | ||
| 443 | |||
| 444 | $(INC_D)\mdc2.h: $(SRC_D)\crypto\mdc2\mdc2.h | ||
| 445 | $(CP) $(SRC_D)\crypto\mdc2\mdc2.h $(INC_D)\mdc2.h | ||
| 446 | |||
| 447 | $(INC_D)\hmac.h: $(SRC_D)\crypto\hmac\hmac.h | ||
| 448 | $(CP) $(SRC_D)\crypto\hmac\hmac.h $(INC_D)\hmac.h | ||
| 449 | |||
| 450 | $(INC_D)\ripemd.h: $(SRC_D)\crypto\ripemd\ripemd.h | ||
| 451 | $(CP) $(SRC_D)\crypto\ripemd\ripemd.h $(INC_D)\ripemd.h | ||
| 452 | |||
| 453 | $(INC_D)\des.h: $(SRC_D)\crypto\des\des.h | ||
| 454 | $(CP) $(SRC_D)\crypto\des\des.h $(INC_D)\des.h | ||
| 455 | |||
| 456 | $(INC_D)\rc2.h: $(SRC_D)\crypto\rc2\rc2.h | ||
| 457 | $(CP) $(SRC_D)\crypto\rc2\rc2.h $(INC_D)\rc2.h | ||
| 458 | |||
| 459 | $(INC_D)\rc4.h: $(SRC_D)\crypto\rc4\rc4.h | ||
| 460 | $(CP) $(SRC_D)\crypto\rc4\rc4.h $(INC_D)\rc4.h | ||
| 461 | |||
| 462 | $(INC_D)\rc5.h: $(SRC_D)\crypto\rc5\rc5.h | ||
| 463 | $(CP) $(SRC_D)\crypto\rc5\rc5.h $(INC_D)\rc5.h | ||
| 464 | |||
| 465 | $(INC_D)\idea.h: $(SRC_D)\crypto\idea\idea.h | ||
| 466 | $(CP) $(SRC_D)\crypto\idea\idea.h $(INC_D)\idea.h | ||
| 467 | |||
| 468 | $(INC_D)\blowfish.h: $(SRC_D)\crypto\bf\blowfish.h | ||
| 469 | $(CP) $(SRC_D)\crypto\bf\blowfish.h $(INC_D)\blowfish.h | ||
| 470 | |||
| 471 | $(INC_D)\cast.h: $(SRC_D)\crypto\cast\cast.h | ||
| 472 | $(CP) $(SRC_D)\crypto\cast\cast.h $(INC_D)\cast.h | ||
| 473 | |||
| 474 | $(INC_D)\bn.h: $(SRC_D)\crypto\bn\bn.h | ||
| 475 | $(CP) $(SRC_D)\crypto\bn\bn.h $(INC_D)\bn.h | ||
| 476 | |||
| 477 | $(INC_D)\rsa.h: $(SRC_D)\crypto\rsa\rsa.h | ||
| 478 | $(CP) $(SRC_D)\crypto\rsa\rsa.h $(INC_D)\rsa.h | ||
| 479 | |||
| 480 | $(INC_D)\dsa.h: $(SRC_D)\crypto\dsa\dsa.h | ||
| 481 | $(CP) $(SRC_D)\crypto\dsa\dsa.h $(INC_D)\dsa.h | ||
| 482 | |||
| 483 | $(INC_D)\dh.h: $(SRC_D)\crypto\dh\dh.h | ||
| 484 | $(CP) $(SRC_D)\crypto\dh\dh.h $(INC_D)\dh.h | ||
| 485 | |||
| 486 | $(INC_D)\buffer.h: $(SRC_D)\crypto\buffer\buffer.h | ||
| 487 | $(CP) $(SRC_D)\crypto\buffer\buffer.h $(INC_D)\buffer.h | ||
| 488 | |||
| 489 | $(INC_D)\bio.h: $(SRC_D)\crypto\bio\bio.h | ||
| 490 | $(CP) $(SRC_D)\crypto\bio\bio.h $(INC_D)\bio.h | ||
| 491 | |||
| 492 | $(INC_D)\bss_file.c: $(SRC_D)\crypto\bio\bss_file.c | ||
| 493 | $(CP) $(SRC_D)\crypto\bio\bss_file.c $(INC_D)\bss_file.c | ||
| 494 | |||
| 495 | $(INC_D)\stack.h: $(SRC_D)\crypto\stack\stack.h | ||
| 496 | $(CP) $(SRC_D)\crypto\stack\stack.h $(INC_D)\stack.h | ||
| 497 | |||
| 498 | $(INC_D)\lhash.h: $(SRC_D)\crypto\lhash\lhash.h | ||
| 499 | $(CP) $(SRC_D)\crypto\lhash\lhash.h $(INC_D)\lhash.h | ||
| 500 | |||
| 501 | $(INC_D)\rand.h: $(SRC_D)\crypto\rand\rand.h | ||
| 502 | $(CP) $(SRC_D)\crypto\rand\rand.h $(INC_D)\rand.h | ||
| 503 | |||
| 504 | $(INC_D)\err.h: $(SRC_D)\crypto\err\err.h | ||
| 505 | $(CP) $(SRC_D)\crypto\err\err.h $(INC_D)\err.h | ||
| 506 | |||
| 507 | $(INC_D)\objects.h: $(SRC_D)\crypto\objects\objects.h | ||
| 508 | $(CP) $(SRC_D)\crypto\objects\objects.h $(INC_D)\objects.h | ||
| 509 | |||
| 510 | $(INC_D)\evp.h: $(SRC_D)\crypto\evp\evp.h | ||
| 511 | $(CP) $(SRC_D)\crypto\evp\evp.h $(INC_D)\evp.h | ||
| 512 | |||
| 513 | $(INC_D)\pem.h: $(SRC_D)\crypto\pem\pem.h | ||
| 514 | $(CP) $(SRC_D)\crypto\pem\pem.h $(INC_D)\pem.h | ||
| 515 | |||
| 516 | $(INC_D)\asn1.h: $(SRC_D)\crypto\asn1\asn1.h | ||
| 517 | $(CP) $(SRC_D)\crypto\asn1\asn1.h $(INC_D)\asn1.h | ||
| 518 | |||
| 519 | $(INC_D)\asn1_mac.h: $(SRC_D)\crypto\asn1\asn1_mac.h | ||
| 520 | $(CP) $(SRC_D)\crypto\asn1\asn1_mac.h $(INC_D)\asn1_mac.h | ||
| 521 | |||
| 522 | $(INC_D)\x509.h: $(SRC_D)\crypto\x509\x509.h | ||
| 523 | $(CP) $(SRC_D)\crypto\x509\x509.h $(INC_D)\x509.h | ||
| 524 | |||
| 525 | $(INC_D)\x509_vfy.h: $(SRC_D)\crypto\x509\x509_vfy.h | ||
| 526 | $(CP) $(SRC_D)\crypto\x509\x509_vfy.h $(INC_D)\x509_vfy.h | ||
| 527 | |||
| 528 | $(INC_D)\conf.h: $(SRC_D)\crypto\conf\conf.h | ||
| 529 | $(CP) $(SRC_D)\crypto\conf\conf.h $(INC_D)\conf.h | ||
| 530 | |||
| 531 | $(INC_D)\txt_db.h: $(SRC_D)\crypto\txt_db\txt_db.h | ||
| 532 | $(CP) $(SRC_D)\crypto\txt_db\txt_db.h $(INC_D)\txt_db.h | ||
| 533 | |||
| 534 | $(INC_D)\pkcs7.h: $(SRC_D)\crypto\pkcs7\pkcs7.h | ||
| 535 | $(CP) $(SRC_D)\crypto\pkcs7\pkcs7.h $(INC_D)\pkcs7.h | ||
| 536 | |||
| 537 | $(INC_D)\ssl.h: $(SRC_D)\ssl\ssl.h | ||
| 538 | $(CP) $(SRC_D)\ssl\ssl.h $(INC_D)\ssl.h | ||
| 539 | |||
| 540 | $(INC_D)\ssl2.h: $(SRC_D)\ssl\ssl2.h | ||
| 541 | $(CP) $(SRC_D)\ssl\ssl2.h $(INC_D)\ssl2.h | ||
| 542 | |||
| 543 | $(INC_D)\ssl3.h: $(SRC_D)\ssl\ssl3.h | ||
| 544 | $(CP) $(SRC_D)\ssl\ssl3.h $(INC_D)\ssl3.h | ||
| 545 | |||
| 546 | $(INC_D)\ssl23.h: $(SRC_D)\ssl\ssl23.h | ||
| 547 | $(CP) $(SRC_D)\ssl\ssl23.h $(INC_D)\ssl23.h | ||
| 548 | |||
| 549 | $(INC_D)\tls1.h: $(SRC_D)\ssl\tls1.h | ||
| 550 | $(CP) $(SRC_D)\ssl\tls1.h $(INC_D)\tls1.h | ||
| 551 | |||
| 552 | $(OBJ_D)\md2test.obj: $(SRC_D)\crypto\md2\md2test.c | ||
| 553 | $(CC) /Fo$(OBJ_D)\md2test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\md2\md2test.c | ||
| 554 | |||
| 555 | $(OBJ_D)\md5test.obj: $(SRC_D)\crypto\md5\md5test.c | ||
| 556 | $(CC) /Fo$(OBJ_D)\md5test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\md5\md5test.c | ||
| 557 | |||
| 558 | $(OBJ_D)\shatest.obj: $(SRC_D)\crypto\sha\shatest.c | ||
| 559 | $(CC) /Fo$(OBJ_D)\shatest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\sha\shatest.c | ||
| 560 | |||
| 561 | $(OBJ_D)\sha1test.obj: $(SRC_D)\crypto\sha\sha1test.c | ||
| 562 | $(CC) /Fo$(OBJ_D)\sha1test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\sha\sha1test.c | ||
| 563 | |||
| 564 | $(OBJ_D)\mdc2test.obj: $(SRC_D)\crypto\mdc2\mdc2test.c | ||
| 565 | $(CC) /Fo$(OBJ_D)\mdc2test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\mdc2\mdc2test.c | ||
| 566 | |||
| 567 | $(OBJ_D)\hmactest.obj: $(SRC_D)\crypto\hmac\hmactest.c | ||
| 568 | $(CC) /Fo$(OBJ_D)\hmactest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\hmac\hmactest.c | ||
| 569 | |||
| 570 | $(OBJ_D)\rmdtest.obj: $(SRC_D)\crypto\ripemd\rmdtest.c | ||
| 571 | $(CC) /Fo$(OBJ_D)\rmdtest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\ripemd\rmdtest.c | ||
| 572 | |||
| 573 | $(OBJ_D)\destest.obj: $(SRC_D)\crypto\des\destest.c | ||
| 574 | $(CC) /Fo$(OBJ_D)\destest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\des\destest.c | ||
| 575 | |||
| 576 | $(OBJ_D)\rc2test.obj: $(SRC_D)\crypto\rc2\rc2test.c | ||
| 577 | $(CC) /Fo$(OBJ_D)\rc2test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2test.c | ||
| 578 | |||
| 579 | $(OBJ_D)\rc4test.obj: $(SRC_D)\crypto\rc4\rc4test.c | ||
| 580 | $(CC) /Fo$(OBJ_D)\rc4test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\rc4\rc4test.c | ||
| 581 | |||
| 582 | $(OBJ_D)\rc5test.obj: $(SRC_D)\crypto\rc5\rc5test.c | ||
| 583 | $(CC) /Fo$(OBJ_D)\rc5test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5test.c | ||
| 584 | |||
| 585 | $(OBJ_D)\ideatest.obj: $(SRC_D)\crypto\idea\ideatest.c | ||
| 586 | $(CC) /Fo$(OBJ_D)\ideatest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\idea\ideatest.c | ||
| 587 | |||
| 588 | $(OBJ_D)\bftest.obj: $(SRC_D)\crypto\bf\bftest.c | ||
| 589 | $(CC) /Fo$(OBJ_D)\bftest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\bf\bftest.c | ||
| 590 | |||
| 591 | $(OBJ_D)\casttest.obj: $(SRC_D)\crypto\cast\casttest.c | ||
| 592 | $(CC) /Fo$(OBJ_D)\casttest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\cast\casttest.c | ||
| 593 | |||
| 594 | $(OBJ_D)\bntest.obj: $(SRC_D)\crypto\bn\bntest.c | ||
| 595 | $(CC) /Fo$(OBJ_D)\bntest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\bn\bntest.c | ||
| 596 | |||
| 597 | $(OBJ_D)\exptest.obj: $(SRC_D)\crypto\bn\exptest.c | ||
| 598 | $(CC) /Fo$(OBJ_D)\exptest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\bn\exptest.c | ||
| 599 | |||
| 600 | $(OBJ_D)\dsatest.obj: $(SRC_D)\crypto\dsa\dsatest.c | ||
| 601 | $(CC) /Fo$(OBJ_D)\dsatest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\dsa\dsatest.c | ||
| 602 | |||
| 603 | $(OBJ_D)\dhtest.obj: $(SRC_D)\crypto\dh\dhtest.c | ||
| 604 | $(CC) /Fo$(OBJ_D)\dhtest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\dh\dhtest.c | ||
| 605 | |||
| 606 | $(OBJ_D)\randtest.obj: $(SRC_D)\crypto\rand\randtest.c | ||
| 607 | $(CC) /Fo$(OBJ_D)\randtest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\rand\randtest.c | ||
| 608 | |||
| 609 | $(OBJ_D)\ssltest.obj: $(SRC_D)\ssl\ssltest.c | ||
| 610 | $(CC) /Fo$(OBJ_D)\ssltest.obj $(APP_CFLAGS) -c $(SRC_D)\ssl\ssltest.c | ||
| 611 | |||
| 612 | $(OBJ_D)\verify.obj: $(SRC_D)\apps\verify.c | ||
| 613 | $(CC) /Fo$(OBJ_D)\verify.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\verify.c | ||
| 614 | |||
| 615 | $(OBJ_D)\asn1pars.obj: $(SRC_D)\apps\asn1pars.c | ||
| 616 | $(CC) /Fo$(OBJ_D)\asn1pars.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\asn1pars.c | ||
| 617 | |||
| 618 | $(OBJ_D)\req.obj: $(SRC_D)\apps\req.c | ||
| 619 | $(CC) /Fo$(OBJ_D)\req.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\req.c | ||
| 620 | |||
| 621 | $(OBJ_D)\dgst.obj: $(SRC_D)\apps\dgst.c | ||
| 622 | $(CC) /Fo$(OBJ_D)\dgst.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\dgst.c | ||
| 623 | |||
| 624 | $(OBJ_D)\dh.obj: $(SRC_D)\apps\dh.c | ||
| 625 | $(CC) /Fo$(OBJ_D)\dh.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\dh.c | ||
| 626 | |||
| 627 | $(OBJ_D)\enc.obj: $(SRC_D)\apps\enc.c | ||
| 628 | $(CC) /Fo$(OBJ_D)\enc.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\enc.c | ||
| 629 | |||
| 630 | $(OBJ_D)\gendh.obj: $(SRC_D)\apps\gendh.c | ||
| 631 | $(CC) /Fo$(OBJ_D)\gendh.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\gendh.c | ||
| 632 | |||
| 633 | $(OBJ_D)\errstr.obj: $(SRC_D)\apps\errstr.c | ||
| 634 | $(CC) /Fo$(OBJ_D)\errstr.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\errstr.c | ||
| 635 | |||
| 636 | $(OBJ_D)\ca.obj: $(SRC_D)\apps\ca.c | ||
| 637 | $(CC) /Fo$(OBJ_D)\ca.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\ca.c | ||
| 638 | |||
| 639 | $(OBJ_D)\pkcs7.obj: $(SRC_D)\apps\pkcs7.c | ||
| 640 | $(CC) /Fo$(OBJ_D)\pkcs7.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\pkcs7.c | ||
| 641 | |||
| 642 | $(OBJ_D)\crl2p7.obj: $(SRC_D)\apps\crl2p7.c | ||
| 643 | $(CC) /Fo$(OBJ_D)\crl2p7.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\crl2p7.c | ||
| 644 | |||
| 645 | $(OBJ_D)\crl.obj: $(SRC_D)\apps\crl.c | ||
| 646 | $(CC) /Fo$(OBJ_D)\crl.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\crl.c | ||
| 647 | |||
| 648 | $(OBJ_D)\rsa.obj: $(SRC_D)\apps\rsa.c | ||
| 649 | $(CC) /Fo$(OBJ_D)\rsa.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\rsa.c | ||
| 650 | |||
| 651 | $(OBJ_D)\dsa.obj: $(SRC_D)\apps\dsa.c | ||
| 652 | $(CC) /Fo$(OBJ_D)\dsa.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\dsa.c | ||
| 653 | |||
| 654 | $(OBJ_D)\dsaparam.obj: $(SRC_D)\apps\dsaparam.c | ||
| 655 | $(CC) /Fo$(OBJ_D)\dsaparam.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\dsaparam.c | ||
| 656 | |||
| 657 | $(OBJ_D)\x509.obj: $(SRC_D)\apps\x509.c | ||
| 658 | $(CC) /Fo$(OBJ_D)\x509.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\x509.c | ||
| 659 | |||
| 660 | $(OBJ_D)\genrsa.obj: $(SRC_D)\apps\genrsa.c | ||
| 661 | $(CC) /Fo$(OBJ_D)\genrsa.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\genrsa.c | ||
| 662 | |||
| 663 | $(OBJ_D)\s_server.obj: $(SRC_D)\apps\s_server.c | ||
| 664 | $(CC) /Fo$(OBJ_D)\s_server.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_server.c | ||
| 665 | |||
| 666 | $(OBJ_D)\s_client.obj: $(SRC_D)\apps\s_client.c | ||
| 667 | $(CC) /Fo$(OBJ_D)\s_client.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_client.c | ||
| 668 | |||
| 669 | $(OBJ_D)\speed.obj: $(SRC_D)\apps\speed.c | ||
| 670 | $(CC) /Fo$(OBJ_D)\speed.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\speed.c | ||
| 671 | |||
| 672 | $(OBJ_D)\s_time.obj: $(SRC_D)\apps\s_time.c | ||
| 673 | $(CC) /Fo$(OBJ_D)\s_time.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_time.c | ||
| 674 | |||
| 675 | $(OBJ_D)\apps.obj: $(SRC_D)\apps\apps.c | ||
| 676 | $(CC) /Fo$(OBJ_D)\apps.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\apps.c | ||
| 677 | |||
| 678 | $(OBJ_D)\s_cb.obj: $(SRC_D)\apps\s_cb.c | ||
| 679 | $(CC) /Fo$(OBJ_D)\s_cb.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_cb.c | ||
| 680 | |||
| 681 | $(OBJ_D)\s_socket.obj: $(SRC_D)\apps\s_socket.c | ||
| 682 | $(CC) /Fo$(OBJ_D)\s_socket.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_socket.c | ||
| 683 | |||
| 684 | $(OBJ_D)\version.obj: $(SRC_D)\apps\version.c | ||
| 685 | $(CC) /Fo$(OBJ_D)\version.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\version.c | ||
| 686 | |||
| 687 | $(OBJ_D)\sess_id.obj: $(SRC_D)\apps\sess_id.c | ||
| 688 | $(CC) /Fo$(OBJ_D)\sess_id.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\sess_id.c | ||
| 689 | |||
| 690 | $(OBJ_D)\ciphers.obj: $(SRC_D)\apps\ciphers.c | ||
| 691 | $(CC) /Fo$(OBJ_D)\ciphers.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\ciphers.c | ||
| 692 | |||
| 693 | $(OBJ_D)\ssleay.obj: $(SRC_D)\apps\ssleay.c | ||
| 694 | $(CC) /Fo$(OBJ_D)\ssleay.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\ssleay.c | ||
| 695 | |||
| 696 | crypto\bn\asm\bn-win32.obj: crypto\bn\asm\bn-win32.asm | ||
| 697 | $(ASM) /Focrypto\bn\asm\bn-win32.obj $(SRC_D)\crypto\bn\asm\bn-win32.asm | ||
| 698 | |||
| 699 | crypto\des\asm\d-win32.obj: crypto\des\asm\d-win32.asm | ||
| 700 | $(ASM) /Focrypto\des\asm\d-win32.obj $(SRC_D)\crypto\des\asm\d-win32.asm | ||
| 701 | |||
| 702 | crypto\des\asm\y-win32.obj: crypto\des\asm\y-win32.asm | ||
| 703 | $(ASM) /Focrypto\des\asm\y-win32.obj $(SRC_D)\crypto\des\asm\y-win32.asm | ||
| 704 | |||
| 705 | crypto\bf\asm\b-win32.obj: crypto\bf\asm\b-win32.asm | ||
| 706 | $(ASM) /Focrypto\bf\asm\b-win32.obj $(SRC_D)\crypto\bf\asm\b-win32.asm | ||
| 707 | |||
| 708 | crypto\cast\asm\c-win32.obj: crypto\cast\asm\c-win32.asm | ||
| 709 | $(ASM) /Focrypto\cast\asm\c-win32.obj $(SRC_D)\crypto\cast\asm\c-win32.asm | ||
| 710 | |||
| 711 | crypto\rc4\asm\r4-win32.obj: crypto\rc4\asm\r4-win32.asm | ||
| 712 | $(ASM) /Focrypto\rc4\asm\r4-win32.obj $(SRC_D)\crypto\rc4\asm\r4-win32.asm | ||
| 713 | |||
| 714 | crypto\rc5\asm\r5-win32.obj: crypto\rc5\asm\r5-win32.asm | ||
| 715 | $(ASM) /Focrypto\rc5\asm\r5-win32.obj $(SRC_D)\crypto\rc5\asm\r5-win32.asm | ||
| 716 | |||
| 717 | crypto\md5\asm\m5-win32.obj: crypto\md5\asm\m5-win32.asm | ||
| 718 | $(ASM) /Focrypto\md5\asm\m5-win32.obj $(SRC_D)\crypto\md5\asm\m5-win32.asm | ||
| 719 | |||
| 720 | crypto\sha\asm\s1-win32.obj: crypto\sha\asm\s1-win32.asm | ||
| 721 | $(ASM) /Focrypto\sha\asm\s1-win32.obj $(SRC_D)\crypto\sha\asm\s1-win32.asm | ||
| 722 | |||
| 723 | crypto\ripemd\asm\rm-win32.obj: crypto\ripemd\asm\rm-win32.asm | ||
| 724 | $(ASM) /Focrypto\ripemd\asm\rm-win32.obj $(SRC_D)\crypto\ripemd\asm\rm-win32.asm | ||
| 725 | |||
| 726 | $(OBJ_D)\cryptlib.obj: $(SRC_D)\crypto\cryptlib.c | ||
| 727 | $(CC) /Fo$(OBJ_D)\cryptlib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cryptlib.c | ||
| 728 | |||
| 729 | $(OBJ_D)\mem.obj: $(SRC_D)\crypto\mem.c | ||
| 730 | $(CC) /Fo$(OBJ_D)\mem.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\mem.c | ||
| 731 | |||
| 732 | $(OBJ_D)\cversion.obj: $(SRC_D)\crypto\cversion.c | ||
| 733 | $(CC) /Fo$(OBJ_D)\cversion.obj $(SHLIB_CFLAGS) -DCFLAGS="\"$(CC) $(CFLAG)\"" -c $(SRC_D)\crypto\cversion.c | ||
| 734 | |||
| 735 | $(OBJ_D)\ex_data.obj: $(SRC_D)\crypto\ex_data.c | ||
| 736 | $(CC) /Fo$(OBJ_D)\ex_data.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\ex_data.c | ||
| 737 | |||
| 738 | $(OBJ_D)\cpt_err.obj: $(SRC_D)\crypto\cpt_err.c | ||
| 739 | $(CC) /Fo$(OBJ_D)\cpt_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cpt_err.c | ||
| 740 | |||
| 741 | $(OBJ_D)\md2_dgst.obj: $(SRC_D)\crypto\md2\md2_dgst.c | ||
| 742 | $(CC) /Fo$(OBJ_D)\md2_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\md2\md2_dgst.c | ||
| 743 | |||
| 744 | $(OBJ_D)\md2_one.obj: $(SRC_D)\crypto\md2\md2_one.c | ||
| 745 | $(CC) /Fo$(OBJ_D)\md2_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\md2\md2_one.c | ||
| 746 | |||
| 747 | $(OBJ_D)\md5_dgst.obj: $(SRC_D)\crypto\md5\md5_dgst.c | ||
| 748 | $(CC) /Fo$(OBJ_D)\md5_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\md5\md5_dgst.c | ||
| 749 | |||
| 750 | $(OBJ_D)\md5_one.obj: $(SRC_D)\crypto\md5\md5_one.c | ||
| 751 | $(CC) /Fo$(OBJ_D)\md5_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\md5\md5_one.c | ||
| 752 | |||
| 753 | $(OBJ_D)\sha_dgst.obj: $(SRC_D)\crypto\sha\sha_dgst.c | ||
| 754 | $(CC) /Fo$(OBJ_D)\sha_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\sha\sha_dgst.c | ||
| 755 | |||
| 756 | $(OBJ_D)\sha1dgst.obj: $(SRC_D)\crypto\sha\sha1dgst.c | ||
| 757 | $(CC) /Fo$(OBJ_D)\sha1dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\sha\sha1dgst.c | ||
| 758 | |||
| 759 | $(OBJ_D)\sha_one.obj: $(SRC_D)\crypto\sha\sha_one.c | ||
| 760 | $(CC) /Fo$(OBJ_D)\sha_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\sha\sha_one.c | ||
| 761 | |||
| 762 | $(OBJ_D)\sha1_one.obj: $(SRC_D)\crypto\sha\sha1_one.c | ||
| 763 | $(CC) /Fo$(OBJ_D)\sha1_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\sha\sha1_one.c | ||
| 764 | |||
| 765 | $(OBJ_D)\mdc2dgst.obj: $(SRC_D)\crypto\mdc2\mdc2dgst.c | ||
| 766 | $(CC) /Fo$(OBJ_D)\mdc2dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\mdc2\mdc2dgst.c | ||
| 767 | |||
| 768 | $(OBJ_D)\mdc2_one.obj: $(SRC_D)\crypto\mdc2\mdc2_one.c | ||
| 769 | $(CC) /Fo$(OBJ_D)\mdc2_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\mdc2\mdc2_one.c | ||
| 770 | |||
| 771 | $(OBJ_D)\hmac.obj: $(SRC_D)\crypto\hmac\hmac.c | ||
| 772 | $(CC) /Fo$(OBJ_D)\hmac.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\hmac\hmac.c | ||
| 773 | |||
| 774 | $(OBJ_D)\rmd_dgst.obj: $(SRC_D)\crypto\ripemd\rmd_dgst.c | ||
| 775 | $(CC) /Fo$(OBJ_D)\rmd_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\ripemd\rmd_dgst.c | ||
| 776 | |||
| 777 | $(OBJ_D)\rmd_one.obj: $(SRC_D)\crypto\ripemd\rmd_one.c | ||
| 778 | $(CC) /Fo$(OBJ_D)\rmd_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\ripemd\rmd_one.c | ||
| 779 | |||
| 780 | $(OBJ_D)\set_key.obj: $(SRC_D)\crypto\des\set_key.c | ||
| 781 | $(CC) /Fo$(OBJ_D)\set_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\set_key.c | ||
| 782 | |||
| 783 | $(OBJ_D)\ecb_enc.obj: $(SRC_D)\crypto\des\ecb_enc.c | ||
| 784 | $(CC) /Fo$(OBJ_D)\ecb_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ecb_enc.c | ||
| 785 | |||
| 786 | $(OBJ_D)\cbc_enc.obj: $(SRC_D)\crypto\des\cbc_enc.c | ||
| 787 | $(CC) /Fo$(OBJ_D)\cbc_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cbc_enc.c | ||
| 788 | |||
| 789 | $(OBJ_D)\ecb3_enc.obj: $(SRC_D)\crypto\des\ecb3_enc.c | ||
| 790 | $(CC) /Fo$(OBJ_D)\ecb3_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ecb3_enc.c | ||
| 791 | |||
| 792 | $(OBJ_D)\cfb64enc.obj: $(SRC_D)\crypto\des\cfb64enc.c | ||
| 793 | $(CC) /Fo$(OBJ_D)\cfb64enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cfb64enc.c | ||
| 794 | |||
| 795 | $(OBJ_D)\cfb64ede.obj: $(SRC_D)\crypto\des\cfb64ede.c | ||
| 796 | $(CC) /Fo$(OBJ_D)\cfb64ede.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cfb64ede.c | ||
| 797 | |||
| 798 | $(OBJ_D)\cfb_enc.obj: $(SRC_D)\crypto\des\cfb_enc.c | ||
| 799 | $(CC) /Fo$(OBJ_D)\cfb_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cfb_enc.c | ||
| 800 | |||
| 801 | $(OBJ_D)\ofb64ede.obj: $(SRC_D)\crypto\des\ofb64ede.c | ||
| 802 | $(CC) /Fo$(OBJ_D)\ofb64ede.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ofb64ede.c | ||
| 803 | |||
| 804 | $(OBJ_D)\enc_read.obj: $(SRC_D)\crypto\des\enc_read.c | ||
| 805 | $(CC) /Fo$(OBJ_D)\enc_read.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\enc_read.c | ||
| 806 | |||
| 807 | $(OBJ_D)\enc_writ.obj: $(SRC_D)\crypto\des\enc_writ.c | ||
| 808 | $(CC) /Fo$(OBJ_D)\enc_writ.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\enc_writ.c | ||
| 809 | |||
| 810 | $(OBJ_D)\ofb64enc.obj: $(SRC_D)\crypto\des\ofb64enc.c | ||
| 811 | $(CC) /Fo$(OBJ_D)\ofb64enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ofb64enc.c | ||
| 812 | |||
| 813 | $(OBJ_D)\ofb_enc.obj: $(SRC_D)\crypto\des\ofb_enc.c | ||
| 814 | $(CC) /Fo$(OBJ_D)\ofb_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ofb_enc.c | ||
| 815 | |||
| 816 | $(OBJ_D)\str2key.obj: $(SRC_D)\crypto\des\str2key.c | ||
| 817 | $(CC) /Fo$(OBJ_D)\str2key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\str2key.c | ||
| 818 | |||
| 819 | $(OBJ_D)\pcbc_enc.obj: $(SRC_D)\crypto\des\pcbc_enc.c | ||
| 820 | $(CC) /Fo$(OBJ_D)\pcbc_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\pcbc_enc.c | ||
| 821 | |||
| 822 | $(OBJ_D)\qud_cksm.obj: $(SRC_D)\crypto\des\qud_cksm.c | ||
| 823 | $(CC) /Fo$(OBJ_D)\qud_cksm.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\qud_cksm.c | ||
| 824 | |||
| 825 | $(OBJ_D)\rand_key.obj: $(SRC_D)\crypto\des\rand_key.c | ||
| 826 | $(CC) /Fo$(OBJ_D)\rand_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\rand_key.c | ||
| 827 | |||
| 828 | $(OBJ_D)\des_enc.obj: $(SRC_D)\crypto\des\des_enc.c | ||
| 829 | $(CC) /Fo$(OBJ_D)\des_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\des_enc.c | ||
| 830 | |||
| 831 | $(OBJ_D)\fcrypt_b.obj: $(SRC_D)\crypto\des\fcrypt_b.c | ||
| 832 | $(CC) /Fo$(OBJ_D)\fcrypt_b.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\fcrypt_b.c | ||
| 833 | |||
| 834 | $(OBJ_D)\read2pwd.obj: $(SRC_D)\crypto\des\read2pwd.c | ||
| 835 | $(CC) /Fo$(OBJ_D)\read2pwd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\read2pwd.c | ||
| 836 | |||
| 837 | $(OBJ_D)\fcrypt.obj: $(SRC_D)\crypto\des\fcrypt.c | ||
| 838 | $(CC) /Fo$(OBJ_D)\fcrypt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\fcrypt.c | ||
| 839 | |||
| 840 | $(OBJ_D)\xcbc_enc.obj: $(SRC_D)\crypto\des\xcbc_enc.c | ||
| 841 | $(CC) /Fo$(OBJ_D)\xcbc_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\xcbc_enc.c | ||
| 842 | |||
| 843 | $(OBJ_D)\read_pwd.obj: $(SRC_D)\crypto\des\read_pwd.c | ||
| 844 | $(CC) /Fo$(OBJ_D)\read_pwd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\read_pwd.c | ||
| 845 | |||
| 846 | $(OBJ_D)\rpc_enc.obj: $(SRC_D)\crypto\des\rpc_enc.c | ||
| 847 | $(CC) /Fo$(OBJ_D)\rpc_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\rpc_enc.c | ||
| 848 | |||
| 849 | $(OBJ_D)\cbc_cksm.obj: $(SRC_D)\crypto\des\cbc_cksm.c | ||
| 850 | $(CC) /Fo$(OBJ_D)\cbc_cksm.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cbc_cksm.c | ||
| 851 | |||
| 852 | $(OBJ_D)\supp.obj: $(SRC_D)\crypto\des\supp.c | ||
| 853 | $(CC) /Fo$(OBJ_D)\supp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\supp.c | ||
| 854 | |||
| 855 | $(OBJ_D)\rc2_ecb.obj: $(SRC_D)\crypto\rc2\rc2_ecb.c | ||
| 856 | $(CC) /Fo$(OBJ_D)\rc2_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2_ecb.c | ||
| 857 | |||
| 858 | $(OBJ_D)\rc2_skey.obj: $(SRC_D)\crypto\rc2\rc2_skey.c | ||
| 859 | $(CC) /Fo$(OBJ_D)\rc2_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2_skey.c | ||
| 860 | |||
| 861 | $(OBJ_D)\rc2_cbc.obj: $(SRC_D)\crypto\rc2\rc2_cbc.c | ||
| 862 | $(CC) /Fo$(OBJ_D)\rc2_cbc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2_cbc.c | ||
| 863 | |||
| 864 | $(OBJ_D)\rc2cfb64.obj: $(SRC_D)\crypto\rc2\rc2cfb64.c | ||
| 865 | $(CC) /Fo$(OBJ_D)\rc2cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2cfb64.c | ||
| 866 | |||
| 867 | $(OBJ_D)\rc2ofb64.obj: $(SRC_D)\crypto\rc2\rc2ofb64.c | ||
| 868 | $(CC) /Fo$(OBJ_D)\rc2ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2ofb64.c | ||
| 869 | |||
| 870 | $(OBJ_D)\rc4_skey.obj: $(SRC_D)\crypto\rc4\rc4_skey.c | ||
| 871 | $(CC) /Fo$(OBJ_D)\rc4_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc4\rc4_skey.c | ||
| 872 | |||
| 873 | $(OBJ_D)\rc4_enc.obj: $(SRC_D)\crypto\rc4\rc4_enc.c | ||
| 874 | $(CC) /Fo$(OBJ_D)\rc4_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc4\rc4_enc.c | ||
| 875 | |||
| 876 | $(OBJ_D)\rc5_skey.obj: $(SRC_D)\crypto\rc5\rc5_skey.c | ||
| 877 | $(CC) /Fo$(OBJ_D)\rc5_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5_skey.c | ||
| 878 | |||
| 879 | $(OBJ_D)\rc5_ecb.obj: $(SRC_D)\crypto\rc5\rc5_ecb.c | ||
| 880 | $(CC) /Fo$(OBJ_D)\rc5_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5_ecb.c | ||
| 881 | |||
| 882 | $(OBJ_D)\rc5_enc.obj: $(SRC_D)\crypto\rc5\rc5_enc.c | ||
| 883 | $(CC) /Fo$(OBJ_D)\rc5_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5_enc.c | ||
| 884 | |||
| 885 | $(OBJ_D)\rc5cfb64.obj: $(SRC_D)\crypto\rc5\rc5cfb64.c | ||
| 886 | $(CC) /Fo$(OBJ_D)\rc5cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5cfb64.c | ||
| 887 | |||
| 888 | $(OBJ_D)\rc5ofb64.obj: $(SRC_D)\crypto\rc5\rc5ofb64.c | ||
| 889 | $(CC) /Fo$(OBJ_D)\rc5ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5ofb64.c | ||
| 890 | |||
| 891 | $(OBJ_D)\i_cbc.obj: $(SRC_D)\crypto\idea\i_cbc.c | ||
| 892 | $(CC) /Fo$(OBJ_D)\i_cbc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_cbc.c | ||
| 893 | |||
| 894 | $(OBJ_D)\i_cfb64.obj: $(SRC_D)\crypto\idea\i_cfb64.c | ||
| 895 | $(CC) /Fo$(OBJ_D)\i_cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_cfb64.c | ||
| 896 | |||
| 897 | $(OBJ_D)\i_ofb64.obj: $(SRC_D)\crypto\idea\i_ofb64.c | ||
| 898 | $(CC) /Fo$(OBJ_D)\i_ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_ofb64.c | ||
| 899 | |||
| 900 | $(OBJ_D)\i_ecb.obj: $(SRC_D)\crypto\idea\i_ecb.c | ||
| 901 | $(CC) /Fo$(OBJ_D)\i_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_ecb.c | ||
| 902 | |||
| 903 | $(OBJ_D)\i_skey.obj: $(SRC_D)\crypto\idea\i_skey.c | ||
| 904 | $(CC) /Fo$(OBJ_D)\i_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_skey.c | ||
| 905 | |||
| 906 | $(OBJ_D)\bf_skey.obj: $(SRC_D)\crypto\bf\bf_skey.c | ||
| 907 | $(CC) /Fo$(OBJ_D)\bf_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_skey.c | ||
| 908 | |||
| 909 | $(OBJ_D)\bf_ecb.obj: $(SRC_D)\crypto\bf\bf_ecb.c | ||
| 910 | $(CC) /Fo$(OBJ_D)\bf_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_ecb.c | ||
| 911 | |||
| 912 | $(OBJ_D)\bf_enc.obj: $(SRC_D)\crypto\bf\bf_enc.c | ||
| 913 | $(CC) /Fo$(OBJ_D)\bf_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_enc.c | ||
| 914 | |||
| 915 | $(OBJ_D)\bf_cfb64.obj: $(SRC_D)\crypto\bf\bf_cfb64.c | ||
| 916 | $(CC) /Fo$(OBJ_D)\bf_cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_cfb64.c | ||
| 917 | |||
| 918 | $(OBJ_D)\bf_ofb64.obj: $(SRC_D)\crypto\bf\bf_ofb64.c | ||
| 919 | $(CC) /Fo$(OBJ_D)\bf_ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_ofb64.c | ||
| 920 | |||
| 921 | $(OBJ_D)\c_skey.obj: $(SRC_D)\crypto\cast\c_skey.c | ||
| 922 | $(CC) /Fo$(OBJ_D)\c_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_skey.c | ||
| 923 | |||
| 924 | $(OBJ_D)\c_ecb.obj: $(SRC_D)\crypto\cast\c_ecb.c | ||
| 925 | $(CC) /Fo$(OBJ_D)\c_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_ecb.c | ||
| 926 | |||
| 927 | $(OBJ_D)\c_enc.obj: $(SRC_D)\crypto\cast\c_enc.c | ||
| 928 | $(CC) /Fo$(OBJ_D)\c_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_enc.c | ||
| 929 | |||
| 930 | $(OBJ_D)\c_cfb64.obj: $(SRC_D)\crypto\cast\c_cfb64.c | ||
| 931 | $(CC) /Fo$(OBJ_D)\c_cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_cfb64.c | ||
| 932 | |||
| 933 | $(OBJ_D)\c_ofb64.obj: $(SRC_D)\crypto\cast\c_ofb64.c | ||
| 934 | $(CC) /Fo$(OBJ_D)\c_ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_ofb64.c | ||
| 935 | |||
| 936 | $(OBJ_D)\bn_add.obj: $(SRC_D)\crypto\bn\bn_add.c | ||
| 937 | $(CC) /Fo$(OBJ_D)\bn_add.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_add.c | ||
| 938 | |||
| 939 | $(OBJ_D)\bn_div.obj: $(SRC_D)\crypto\bn\bn_div.c | ||
| 940 | $(CC) /Fo$(OBJ_D)\bn_div.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_div.c | ||
| 941 | |||
| 942 | $(OBJ_D)\bn_exp.obj: $(SRC_D)\crypto\bn\bn_exp.c | ||
| 943 | $(CC) /Fo$(OBJ_D)\bn_exp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_exp.c | ||
| 944 | |||
| 945 | $(OBJ_D)\bn_lib.obj: $(SRC_D)\crypto\bn\bn_lib.c | ||
| 946 | $(CC) /Fo$(OBJ_D)\bn_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_lib.c | ||
| 947 | |||
| 948 | $(OBJ_D)\bn_mod.obj: $(SRC_D)\crypto\bn\bn_mod.c | ||
| 949 | $(CC) /Fo$(OBJ_D)\bn_mod.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mod.c | ||
| 950 | |||
| 951 | $(OBJ_D)\bn_mul.obj: $(SRC_D)\crypto\bn\bn_mul.c | ||
| 952 | $(CC) /Fo$(OBJ_D)\bn_mul.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mul.c | ||
| 953 | |||
| 954 | $(OBJ_D)\bn_print.obj: $(SRC_D)\crypto\bn\bn_print.c | ||
| 955 | $(CC) /Fo$(OBJ_D)\bn_print.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_print.c | ||
| 956 | |||
| 957 | $(OBJ_D)\bn_rand.obj: $(SRC_D)\crypto\bn\bn_rand.c | ||
| 958 | $(CC) /Fo$(OBJ_D)\bn_rand.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_rand.c | ||
| 959 | |||
| 960 | $(OBJ_D)\bn_shift.obj: $(SRC_D)\crypto\bn\bn_shift.c | ||
| 961 | $(CC) /Fo$(OBJ_D)\bn_shift.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_shift.c | ||
| 962 | |||
| 963 | $(OBJ_D)\bn_sub.obj: $(SRC_D)\crypto\bn\bn_sub.c | ||
| 964 | $(CC) /Fo$(OBJ_D)\bn_sub.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_sub.c | ||
| 965 | |||
| 966 | $(OBJ_D)\bn_word.obj: $(SRC_D)\crypto\bn\bn_word.c | ||
| 967 | $(CC) /Fo$(OBJ_D)\bn_word.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_word.c | ||
| 968 | |||
| 969 | $(OBJ_D)\bn_blind.obj: $(SRC_D)\crypto\bn\bn_blind.c | ||
| 970 | $(CC) /Fo$(OBJ_D)\bn_blind.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_blind.c | ||
| 971 | |||
| 972 | $(OBJ_D)\bn_gcd.obj: $(SRC_D)\crypto\bn\bn_gcd.c | ||
| 973 | $(CC) /Fo$(OBJ_D)\bn_gcd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_gcd.c | ||
| 974 | |||
| 975 | $(OBJ_D)\bn_prime.obj: $(SRC_D)\crypto\bn\bn_prime.c | ||
| 976 | $(CC) /Fo$(OBJ_D)\bn_prime.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_prime.c | ||
| 977 | |||
| 978 | $(OBJ_D)\bn_err.obj: $(SRC_D)\crypto\bn\bn_err.c | ||
| 979 | $(CC) /Fo$(OBJ_D)\bn_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_err.c | ||
| 980 | |||
| 981 | $(OBJ_D)\bn_sqr.obj: $(SRC_D)\crypto\bn\bn_sqr.c | ||
| 982 | $(CC) /Fo$(OBJ_D)\bn_sqr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_sqr.c | ||
| 983 | |||
| 984 | $(OBJ_D)\bn_mulw.obj: $(SRC_D)\crypto\bn\bn_mulw.c | ||
| 985 | $(CC) /Fo$(OBJ_D)\bn_mulw.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mulw.c | ||
| 986 | |||
| 987 | $(OBJ_D)\bn_recp.obj: $(SRC_D)\crypto\bn\bn_recp.c | ||
| 988 | $(CC) /Fo$(OBJ_D)\bn_recp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_recp.c | ||
| 989 | |||
| 990 | $(OBJ_D)\bn_mont.obj: $(SRC_D)\crypto\bn\bn_mont.c | ||
| 991 | $(CC) /Fo$(OBJ_D)\bn_mont.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mont.c | ||
| 992 | |||
| 993 | $(OBJ_D)\bn_mpi.obj: $(SRC_D)\crypto\bn\bn_mpi.c | ||
| 994 | $(CC) /Fo$(OBJ_D)\bn_mpi.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mpi.c | ||
| 995 | |||
| 996 | $(OBJ_D)\rsa_eay.obj: $(SRC_D)\crypto\rsa\rsa_eay.c | ||
| 997 | $(CC) /Fo$(OBJ_D)\rsa_eay.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_eay.c | ||
| 998 | |||
| 999 | $(OBJ_D)\rsa_gen.obj: $(SRC_D)\crypto\rsa\rsa_gen.c | ||
| 1000 | $(CC) /Fo$(OBJ_D)\rsa_gen.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_gen.c | ||
| 1001 | |||
| 1002 | $(OBJ_D)\rsa_lib.obj: $(SRC_D)\crypto\rsa\rsa_lib.c | ||
| 1003 | $(CC) /Fo$(OBJ_D)\rsa_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_lib.c | ||
| 1004 | |||
| 1005 | $(OBJ_D)\rsa_sign.obj: $(SRC_D)\crypto\rsa\rsa_sign.c | ||
| 1006 | $(CC) /Fo$(OBJ_D)\rsa_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_sign.c | ||
| 1007 | |||
| 1008 | $(OBJ_D)\rsa_saos.obj: $(SRC_D)\crypto\rsa\rsa_saos.c | ||
| 1009 | $(CC) /Fo$(OBJ_D)\rsa_saos.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_saos.c | ||
| 1010 | |||
| 1011 | $(OBJ_D)\rsa_err.obj: $(SRC_D)\crypto\rsa\rsa_err.c | ||
| 1012 | $(CC) /Fo$(OBJ_D)\rsa_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_err.c | ||
| 1013 | |||
| 1014 | $(OBJ_D)\rsa_pk1.obj: $(SRC_D)\crypto\rsa\rsa_pk1.c | ||
| 1015 | $(CC) /Fo$(OBJ_D)\rsa_pk1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_pk1.c | ||
| 1016 | |||
| 1017 | $(OBJ_D)\rsa_ssl.obj: $(SRC_D)\crypto\rsa\rsa_ssl.c | ||
| 1018 | $(CC) /Fo$(OBJ_D)\rsa_ssl.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_ssl.c | ||
| 1019 | |||
| 1020 | $(OBJ_D)\rsa_none.obj: $(SRC_D)\crypto\rsa\rsa_none.c | ||
| 1021 | $(CC) /Fo$(OBJ_D)\rsa_none.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_none.c | ||
| 1022 | |||
| 1023 | $(OBJ_D)\dsa_gen.obj: $(SRC_D)\crypto\dsa\dsa_gen.c | ||
| 1024 | $(CC) /Fo$(OBJ_D)\dsa_gen.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_gen.c | ||
| 1025 | |||
| 1026 | $(OBJ_D)\dsa_key.obj: $(SRC_D)\crypto\dsa\dsa_key.c | ||
| 1027 | $(CC) /Fo$(OBJ_D)\dsa_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_key.c | ||
| 1028 | |||
| 1029 | $(OBJ_D)\dsa_lib.obj: $(SRC_D)\crypto\dsa\dsa_lib.c | ||
| 1030 | $(CC) /Fo$(OBJ_D)\dsa_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_lib.c | ||
| 1031 | |||
| 1032 | $(OBJ_D)\dsa_vrf.obj: $(SRC_D)\crypto\dsa\dsa_vrf.c | ||
| 1033 | $(CC) /Fo$(OBJ_D)\dsa_vrf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_vrf.c | ||
| 1034 | |||
| 1035 | $(OBJ_D)\dsa_sign.obj: $(SRC_D)\crypto\dsa\dsa_sign.c | ||
| 1036 | $(CC) /Fo$(OBJ_D)\dsa_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_sign.c | ||
| 1037 | |||
| 1038 | $(OBJ_D)\dsa_err.obj: $(SRC_D)\crypto\dsa\dsa_err.c | ||
| 1039 | $(CC) /Fo$(OBJ_D)\dsa_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_err.c | ||
| 1040 | |||
| 1041 | $(OBJ_D)\dh_gen.obj: $(SRC_D)\crypto\dh\dh_gen.c | ||
| 1042 | $(CC) /Fo$(OBJ_D)\dh_gen.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_gen.c | ||
| 1043 | |||
| 1044 | $(OBJ_D)\dh_key.obj: $(SRC_D)\crypto\dh\dh_key.c | ||
| 1045 | $(CC) /Fo$(OBJ_D)\dh_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_key.c | ||
| 1046 | |||
| 1047 | $(OBJ_D)\dh_lib.obj: $(SRC_D)\crypto\dh\dh_lib.c | ||
| 1048 | $(CC) /Fo$(OBJ_D)\dh_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_lib.c | ||
| 1049 | |||
| 1050 | $(OBJ_D)\dh_check.obj: $(SRC_D)\crypto\dh\dh_check.c | ||
| 1051 | $(CC) /Fo$(OBJ_D)\dh_check.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_check.c | ||
| 1052 | |||
| 1053 | $(OBJ_D)\dh_err.obj: $(SRC_D)\crypto\dh\dh_err.c | ||
| 1054 | $(CC) /Fo$(OBJ_D)\dh_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_err.c | ||
| 1055 | |||
| 1056 | $(OBJ_D)\buffer.obj: $(SRC_D)\crypto\buffer\buffer.c | ||
| 1057 | $(CC) /Fo$(OBJ_D)\buffer.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\buffer\buffer.c | ||
| 1058 | |||
| 1059 | $(OBJ_D)\buf_err.obj: $(SRC_D)\crypto\buffer\buf_err.c | ||
| 1060 | $(CC) /Fo$(OBJ_D)\buf_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\buffer\buf_err.c | ||
| 1061 | |||
| 1062 | $(OBJ_D)\bio_lib.obj: $(SRC_D)\crypto\bio\bio_lib.c | ||
| 1063 | $(CC) /Fo$(OBJ_D)\bio_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bio_lib.c | ||
| 1064 | |||
| 1065 | $(OBJ_D)\bio_cb.obj: $(SRC_D)\crypto\bio\bio_cb.c | ||
| 1066 | $(CC) /Fo$(OBJ_D)\bio_cb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bio_cb.c | ||
| 1067 | |||
| 1068 | $(OBJ_D)\bio_err.obj: $(SRC_D)\crypto\bio\bio_err.c | ||
| 1069 | $(CC) /Fo$(OBJ_D)\bio_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bio_err.c | ||
| 1070 | |||
| 1071 | $(OBJ_D)\bss_mem.obj: $(SRC_D)\crypto\bio\bss_mem.c | ||
| 1072 | $(CC) /Fo$(OBJ_D)\bss_mem.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_mem.c | ||
| 1073 | |||
| 1074 | $(OBJ_D)\bss_null.obj: $(SRC_D)\crypto\bio\bss_null.c | ||
| 1075 | $(CC) /Fo$(OBJ_D)\bss_null.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_null.c | ||
| 1076 | |||
| 1077 | $(OBJ_D)\bss_fd.obj: $(SRC_D)\crypto\bio\bss_fd.c | ||
| 1078 | $(CC) /Fo$(OBJ_D)\bss_fd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_fd.c | ||
| 1079 | |||
| 1080 | $(OBJ_D)\bss_file.obj: $(SRC_D)\crypto\bio\bss_file.c | ||
| 1081 | $(CC) /Fo$(OBJ_D)\bss_file.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_file.c | ||
| 1082 | |||
| 1083 | $(OBJ_D)\bss_sock.obj: $(SRC_D)\crypto\bio\bss_sock.c | ||
| 1084 | $(CC) /Fo$(OBJ_D)\bss_sock.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_sock.c | ||
| 1085 | |||
| 1086 | $(OBJ_D)\bss_conn.obj: $(SRC_D)\crypto\bio\bss_conn.c | ||
| 1087 | $(CC) /Fo$(OBJ_D)\bss_conn.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_conn.c | ||
| 1088 | |||
| 1089 | $(OBJ_D)\bf_null.obj: $(SRC_D)\crypto\bio\bf_null.c | ||
| 1090 | $(CC) /Fo$(OBJ_D)\bf_null.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bf_null.c | ||
| 1091 | |||
| 1092 | $(OBJ_D)\bf_buff.obj: $(SRC_D)\crypto\bio\bf_buff.c | ||
| 1093 | $(CC) /Fo$(OBJ_D)\bf_buff.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bf_buff.c | ||
| 1094 | |||
| 1095 | $(OBJ_D)\b_print.obj: $(SRC_D)\crypto\bio\b_print.c | ||
| 1096 | $(CC) /Fo$(OBJ_D)\b_print.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\b_print.c | ||
| 1097 | |||
| 1098 | $(OBJ_D)\b_dump.obj: $(SRC_D)\crypto\bio\b_dump.c | ||
| 1099 | $(CC) /Fo$(OBJ_D)\b_dump.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\b_dump.c | ||
| 1100 | |||
| 1101 | $(OBJ_D)\b_sock.obj: $(SRC_D)\crypto\bio\b_sock.c | ||
| 1102 | $(CC) /Fo$(OBJ_D)\b_sock.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\b_sock.c | ||
| 1103 | |||
| 1104 | $(OBJ_D)\bss_acpt.obj: $(SRC_D)\crypto\bio\bss_acpt.c | ||
| 1105 | $(CC) /Fo$(OBJ_D)\bss_acpt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_acpt.c | ||
| 1106 | |||
| 1107 | $(OBJ_D)\bf_nbio.obj: $(SRC_D)\crypto\bio\bf_nbio.c | ||
| 1108 | $(CC) /Fo$(OBJ_D)\bf_nbio.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bf_nbio.c | ||
| 1109 | |||
| 1110 | $(OBJ_D)\stack.obj: $(SRC_D)\crypto\stack\stack.c | ||
| 1111 | $(CC) /Fo$(OBJ_D)\stack.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\stack\stack.c | ||
| 1112 | |||
| 1113 | $(OBJ_D)\lhash.obj: $(SRC_D)\crypto\lhash\lhash.c | ||
| 1114 | $(CC) /Fo$(OBJ_D)\lhash.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\lhash\lhash.c | ||
| 1115 | |||
| 1116 | $(OBJ_D)\lh_stats.obj: $(SRC_D)\crypto\lhash\lh_stats.c | ||
| 1117 | $(CC) /Fo$(OBJ_D)\lh_stats.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\lhash\lh_stats.c | ||
| 1118 | |||
| 1119 | $(OBJ_D)\md_rand.obj: $(SRC_D)\crypto\rand\md_rand.c | ||
| 1120 | $(CC) /Fo$(OBJ_D)\md_rand.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rand\md_rand.c | ||
| 1121 | |||
| 1122 | $(OBJ_D)\randfile.obj: $(SRC_D)\crypto\rand\randfile.c | ||
| 1123 | $(CC) /Fo$(OBJ_D)\randfile.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rand\randfile.c | ||
| 1124 | |||
| 1125 | $(OBJ_D)\err.obj: $(SRC_D)\crypto\err\err.c | ||
| 1126 | $(CC) /Fo$(OBJ_D)\err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\err\err.c | ||
| 1127 | |||
| 1128 | $(OBJ_D)\err_all.obj: $(SRC_D)\crypto\err\err_all.c | ||
| 1129 | $(CC) /Fo$(OBJ_D)\err_all.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\err\err_all.c | ||
| 1130 | |||
| 1131 | $(OBJ_D)\err_prn.obj: $(SRC_D)\crypto\err\err_prn.c | ||
| 1132 | $(CC) /Fo$(OBJ_D)\err_prn.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\err\err_prn.c | ||
| 1133 | |||
| 1134 | $(OBJ_D)\obj_dat.obj: $(SRC_D)\crypto\objects\obj_dat.c | ||
| 1135 | $(CC) /Fo$(OBJ_D)\obj_dat.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\objects\obj_dat.c | ||
| 1136 | |||
| 1137 | $(OBJ_D)\obj_lib.obj: $(SRC_D)\crypto\objects\obj_lib.c | ||
| 1138 | $(CC) /Fo$(OBJ_D)\obj_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\objects\obj_lib.c | ||
| 1139 | |||
| 1140 | $(OBJ_D)\obj_err.obj: $(SRC_D)\crypto\objects\obj_err.c | ||
| 1141 | $(CC) /Fo$(OBJ_D)\obj_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\objects\obj_err.c | ||
| 1142 | |||
| 1143 | $(OBJ_D)\encode.obj: $(SRC_D)\crypto\evp\encode.c | ||
| 1144 | $(CC) /Fo$(OBJ_D)\encode.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\encode.c | ||
| 1145 | |||
| 1146 | $(OBJ_D)\digest.obj: $(SRC_D)\crypto\evp\digest.c | ||
| 1147 | $(CC) /Fo$(OBJ_D)\digest.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\digest.c | ||
| 1148 | |||
| 1149 | $(OBJ_D)\evp_enc.obj: $(SRC_D)\crypto\evp\evp_enc.c | ||
| 1150 | $(CC) /Fo$(OBJ_D)\evp_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\evp_enc.c | ||
| 1151 | |||
| 1152 | $(OBJ_D)\evp_key.obj: $(SRC_D)\crypto\evp\evp_key.c | ||
| 1153 | $(CC) /Fo$(OBJ_D)\evp_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\evp_key.c | ||
| 1154 | |||
| 1155 | $(OBJ_D)\e_ecb_d.obj: $(SRC_D)\crypto\evp\e_ecb_d.c | ||
| 1156 | $(CC) /Fo$(OBJ_D)\e_ecb_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_d.c | ||
| 1157 | |||
| 1158 | $(OBJ_D)\e_cbc_d.obj: $(SRC_D)\crypto\evp\e_cbc_d.c | ||
| 1159 | $(CC) /Fo$(OBJ_D)\e_cbc_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_d.c | ||
| 1160 | |||
| 1161 | $(OBJ_D)\e_cfb_d.obj: $(SRC_D)\crypto\evp\e_cfb_d.c | ||
| 1162 | $(CC) /Fo$(OBJ_D)\e_cfb_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_d.c | ||
| 1163 | |||
| 1164 | $(OBJ_D)\e_ofb_d.obj: $(SRC_D)\crypto\evp\e_ofb_d.c | ||
| 1165 | $(CC) /Fo$(OBJ_D)\e_ofb_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_d.c | ||
| 1166 | |||
| 1167 | $(OBJ_D)\e_ecb_i.obj: $(SRC_D)\crypto\evp\e_ecb_i.c | ||
| 1168 | $(CC) /Fo$(OBJ_D)\e_ecb_i.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_i.c | ||
| 1169 | |||
| 1170 | $(OBJ_D)\e_cbc_i.obj: $(SRC_D)\crypto\evp\e_cbc_i.c | ||
| 1171 | $(CC) /Fo$(OBJ_D)\e_cbc_i.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_i.c | ||
| 1172 | |||
| 1173 | $(OBJ_D)\e_cfb_i.obj: $(SRC_D)\crypto\evp\e_cfb_i.c | ||
| 1174 | $(CC) /Fo$(OBJ_D)\e_cfb_i.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_i.c | ||
| 1175 | |||
| 1176 | $(OBJ_D)\e_ofb_i.obj: $(SRC_D)\crypto\evp\e_ofb_i.c | ||
| 1177 | $(CC) /Fo$(OBJ_D)\e_ofb_i.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_i.c | ||
| 1178 | |||
| 1179 | $(OBJ_D)\e_ecb_3d.obj: $(SRC_D)\crypto\evp\e_ecb_3d.c | ||
| 1180 | $(CC) /Fo$(OBJ_D)\e_ecb_3d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_3d.c | ||
| 1181 | |||
| 1182 | $(OBJ_D)\e_cbc_3d.obj: $(SRC_D)\crypto\evp\e_cbc_3d.c | ||
| 1183 | $(CC) /Fo$(OBJ_D)\e_cbc_3d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_3d.c | ||
| 1184 | |||
| 1185 | $(OBJ_D)\e_rc4.obj: $(SRC_D)\crypto\evp\e_rc4.c | ||
| 1186 | $(CC) /Fo$(OBJ_D)\e_rc4.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_rc4.c | ||
| 1187 | |||
| 1188 | $(OBJ_D)\names.obj: $(SRC_D)\crypto\evp\names.c | ||
| 1189 | $(CC) /Fo$(OBJ_D)\names.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\names.c | ||
| 1190 | |||
| 1191 | $(OBJ_D)\e_cfb_3d.obj: $(SRC_D)\crypto\evp\e_cfb_3d.c | ||
| 1192 | $(CC) /Fo$(OBJ_D)\e_cfb_3d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_3d.c | ||
| 1193 | |||
| 1194 | $(OBJ_D)\e_ofb_3d.obj: $(SRC_D)\crypto\evp\e_ofb_3d.c | ||
| 1195 | $(CC) /Fo$(OBJ_D)\e_ofb_3d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_3d.c | ||
| 1196 | |||
| 1197 | $(OBJ_D)\e_xcbc_d.obj: $(SRC_D)\crypto\evp\e_xcbc_d.c | ||
| 1198 | $(CC) /Fo$(OBJ_D)\e_xcbc_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_xcbc_d.c | ||
| 1199 | |||
| 1200 | $(OBJ_D)\e_ecb_r2.obj: $(SRC_D)\crypto\evp\e_ecb_r2.c | ||
| 1201 | $(CC) /Fo$(OBJ_D)\e_ecb_r2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_r2.c | ||
| 1202 | |||
| 1203 | $(OBJ_D)\e_cbc_r2.obj: $(SRC_D)\crypto\evp\e_cbc_r2.c | ||
| 1204 | $(CC) /Fo$(OBJ_D)\e_cbc_r2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_r2.c | ||
| 1205 | |||
| 1206 | $(OBJ_D)\e_cfb_r2.obj: $(SRC_D)\crypto\evp\e_cfb_r2.c | ||
| 1207 | $(CC) /Fo$(OBJ_D)\e_cfb_r2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_r2.c | ||
| 1208 | |||
| 1209 | $(OBJ_D)\e_ofb_r2.obj: $(SRC_D)\crypto\evp\e_ofb_r2.c | ||
| 1210 | $(CC) /Fo$(OBJ_D)\e_ofb_r2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_r2.c | ||
| 1211 | |||
| 1212 | $(OBJ_D)\e_ecb_bf.obj: $(SRC_D)\crypto\evp\e_ecb_bf.c | ||
| 1213 | $(CC) /Fo$(OBJ_D)\e_ecb_bf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_bf.c | ||
| 1214 | |||
| 1215 | $(OBJ_D)\e_cbc_bf.obj: $(SRC_D)\crypto\evp\e_cbc_bf.c | ||
| 1216 | $(CC) /Fo$(OBJ_D)\e_cbc_bf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_bf.c | ||
| 1217 | |||
| 1218 | $(OBJ_D)\e_cfb_bf.obj: $(SRC_D)\crypto\evp\e_cfb_bf.c | ||
| 1219 | $(CC) /Fo$(OBJ_D)\e_cfb_bf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_bf.c | ||
| 1220 | |||
| 1221 | $(OBJ_D)\e_ofb_bf.obj: $(SRC_D)\crypto\evp\e_ofb_bf.c | ||
| 1222 | $(CC) /Fo$(OBJ_D)\e_ofb_bf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_bf.c | ||
| 1223 | |||
| 1224 | $(OBJ_D)\e_ecb_c.obj: $(SRC_D)\crypto\evp\e_ecb_c.c | ||
| 1225 | $(CC) /Fo$(OBJ_D)\e_ecb_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_c.c | ||
| 1226 | |||
| 1227 | $(OBJ_D)\e_cbc_c.obj: $(SRC_D)\crypto\evp\e_cbc_c.c | ||
| 1228 | $(CC) /Fo$(OBJ_D)\e_cbc_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_c.c | ||
| 1229 | |||
| 1230 | $(OBJ_D)\e_cfb_c.obj: $(SRC_D)\crypto\evp\e_cfb_c.c | ||
| 1231 | $(CC) /Fo$(OBJ_D)\e_cfb_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_c.c | ||
| 1232 | |||
| 1233 | $(OBJ_D)\e_ofb_c.obj: $(SRC_D)\crypto\evp\e_ofb_c.c | ||
| 1234 | $(CC) /Fo$(OBJ_D)\e_ofb_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_c.c | ||
| 1235 | |||
| 1236 | $(OBJ_D)\e_ecb_r5.obj: $(SRC_D)\crypto\evp\e_ecb_r5.c | ||
| 1237 | $(CC) /Fo$(OBJ_D)\e_ecb_r5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_r5.c | ||
| 1238 | |||
| 1239 | $(OBJ_D)\e_cbc_r5.obj: $(SRC_D)\crypto\evp\e_cbc_r5.c | ||
| 1240 | $(CC) /Fo$(OBJ_D)\e_cbc_r5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_r5.c | ||
| 1241 | |||
| 1242 | $(OBJ_D)\e_cfb_r5.obj: $(SRC_D)\crypto\evp\e_cfb_r5.c | ||
| 1243 | $(CC) /Fo$(OBJ_D)\e_cfb_r5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_r5.c | ||
| 1244 | |||
| 1245 | $(OBJ_D)\e_ofb_r5.obj: $(SRC_D)\crypto\evp\e_ofb_r5.c | ||
| 1246 | $(CC) /Fo$(OBJ_D)\e_ofb_r5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_r5.c | ||
| 1247 | |||
| 1248 | $(OBJ_D)\m_null.obj: $(SRC_D)\crypto\evp\m_null.c | ||
| 1249 | $(CC) /Fo$(OBJ_D)\m_null.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_null.c | ||
| 1250 | |||
| 1251 | $(OBJ_D)\m_md2.obj: $(SRC_D)\crypto\evp\m_md2.c | ||
| 1252 | $(CC) /Fo$(OBJ_D)\m_md2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_md2.c | ||
| 1253 | |||
| 1254 | $(OBJ_D)\m_md5.obj: $(SRC_D)\crypto\evp\m_md5.c | ||
| 1255 | $(CC) /Fo$(OBJ_D)\m_md5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_md5.c | ||
| 1256 | |||
| 1257 | $(OBJ_D)\m_sha.obj: $(SRC_D)\crypto\evp\m_sha.c | ||
| 1258 | $(CC) /Fo$(OBJ_D)\m_sha.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_sha.c | ||
| 1259 | |||
| 1260 | $(OBJ_D)\m_sha1.obj: $(SRC_D)\crypto\evp\m_sha1.c | ||
| 1261 | $(CC) /Fo$(OBJ_D)\m_sha1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_sha1.c | ||
| 1262 | |||
| 1263 | $(OBJ_D)\m_dss.obj: $(SRC_D)\crypto\evp\m_dss.c | ||
| 1264 | $(CC) /Fo$(OBJ_D)\m_dss.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_dss.c | ||
| 1265 | |||
| 1266 | $(OBJ_D)\m_dss1.obj: $(SRC_D)\crypto\evp\m_dss1.c | ||
| 1267 | $(CC) /Fo$(OBJ_D)\m_dss1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_dss1.c | ||
| 1268 | |||
| 1269 | $(OBJ_D)\m_mdc2.obj: $(SRC_D)\crypto\evp\m_mdc2.c | ||
| 1270 | $(CC) /Fo$(OBJ_D)\m_mdc2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_mdc2.c | ||
| 1271 | |||
| 1272 | $(OBJ_D)\m_ripemd.obj: $(SRC_D)\crypto\evp\m_ripemd.c | ||
| 1273 | $(CC) /Fo$(OBJ_D)\m_ripemd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_ripemd.c | ||
| 1274 | |||
| 1275 | $(OBJ_D)\p_open.obj: $(SRC_D)\crypto\evp\p_open.c | ||
| 1276 | $(CC) /Fo$(OBJ_D)\p_open.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_open.c | ||
| 1277 | |||
| 1278 | $(OBJ_D)\p_seal.obj: $(SRC_D)\crypto\evp\p_seal.c | ||
| 1279 | $(CC) /Fo$(OBJ_D)\p_seal.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_seal.c | ||
| 1280 | |||
| 1281 | $(OBJ_D)\p_sign.obj: $(SRC_D)\crypto\evp\p_sign.c | ||
| 1282 | $(CC) /Fo$(OBJ_D)\p_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_sign.c | ||
| 1283 | |||
| 1284 | $(OBJ_D)\p_verify.obj: $(SRC_D)\crypto\evp\p_verify.c | ||
| 1285 | $(CC) /Fo$(OBJ_D)\p_verify.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_verify.c | ||
| 1286 | |||
| 1287 | $(OBJ_D)\p_lib.obj: $(SRC_D)\crypto\evp\p_lib.c | ||
| 1288 | $(CC) /Fo$(OBJ_D)\p_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_lib.c | ||
| 1289 | |||
| 1290 | $(OBJ_D)\p_enc.obj: $(SRC_D)\crypto\evp\p_enc.c | ||
| 1291 | $(CC) /Fo$(OBJ_D)\p_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_enc.c | ||
| 1292 | |||
| 1293 | $(OBJ_D)\p_dec.obj: $(SRC_D)\crypto\evp\p_dec.c | ||
| 1294 | $(CC) /Fo$(OBJ_D)\p_dec.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_dec.c | ||
| 1295 | |||
| 1296 | $(OBJ_D)\bio_md.obj: $(SRC_D)\crypto\evp\bio_md.c | ||
| 1297 | $(CC) /Fo$(OBJ_D)\bio_md.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\bio_md.c | ||
| 1298 | |||
| 1299 | $(OBJ_D)\bio_b64.obj: $(SRC_D)\crypto\evp\bio_b64.c | ||
| 1300 | $(CC) /Fo$(OBJ_D)\bio_b64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\bio_b64.c | ||
| 1301 | |||
| 1302 | $(OBJ_D)\bio_enc.obj: $(SRC_D)\crypto\evp\bio_enc.c | ||
| 1303 | $(CC) /Fo$(OBJ_D)\bio_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\bio_enc.c | ||
| 1304 | |||
| 1305 | $(OBJ_D)\evp_err.obj: $(SRC_D)\crypto\evp\evp_err.c | ||
| 1306 | $(CC) /Fo$(OBJ_D)\evp_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\evp_err.c | ||
| 1307 | |||
| 1308 | $(OBJ_D)\e_null.obj: $(SRC_D)\crypto\evp\e_null.c | ||
| 1309 | $(CC) /Fo$(OBJ_D)\e_null.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_null.c | ||
| 1310 | |||
| 1311 | $(OBJ_D)\c_all.obj: $(SRC_D)\crypto\evp\c_all.c | ||
| 1312 | $(CC) /Fo$(OBJ_D)\c_all.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\c_all.c | ||
| 1313 | |||
| 1314 | $(OBJ_D)\evp_lib.obj: $(SRC_D)\crypto\evp\evp_lib.c | ||
| 1315 | $(CC) /Fo$(OBJ_D)\evp_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\evp_lib.c | ||
| 1316 | |||
| 1317 | $(OBJ_D)\pem_sign.obj: $(SRC_D)\crypto\pem\pem_sign.c | ||
| 1318 | $(CC) /Fo$(OBJ_D)\pem_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_sign.c | ||
| 1319 | |||
| 1320 | $(OBJ_D)\pem_seal.obj: $(SRC_D)\crypto\pem\pem_seal.c | ||
| 1321 | $(CC) /Fo$(OBJ_D)\pem_seal.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_seal.c | ||
| 1322 | |||
| 1323 | $(OBJ_D)\pem_info.obj: $(SRC_D)\crypto\pem\pem_info.c | ||
| 1324 | $(CC) /Fo$(OBJ_D)\pem_info.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_info.c | ||
| 1325 | |||
| 1326 | $(OBJ_D)\pem_lib.obj: $(SRC_D)\crypto\pem\pem_lib.c | ||
| 1327 | $(CC) /Fo$(OBJ_D)\pem_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_lib.c | ||
| 1328 | |||
| 1329 | $(OBJ_D)\pem_all.obj: $(SRC_D)\crypto\pem\pem_all.c | ||
| 1330 | $(CC) /Fo$(OBJ_D)\pem_all.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_all.c | ||
| 1331 | |||
| 1332 | $(OBJ_D)\pem_err.obj: $(SRC_D)\crypto\pem\pem_err.c | ||
| 1333 | $(CC) /Fo$(OBJ_D)\pem_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_err.c | ||
| 1334 | |||
| 1335 | $(OBJ_D)\a_object.obj: $(SRC_D)\crypto\asn1\a_object.c | ||
| 1336 | $(CC) /Fo$(OBJ_D)\a_object.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_object.c | ||
| 1337 | |||
| 1338 | $(OBJ_D)\a_bitstr.obj: $(SRC_D)\crypto\asn1\a_bitstr.c | ||
| 1339 | $(CC) /Fo$(OBJ_D)\a_bitstr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_bitstr.c | ||
| 1340 | |||
| 1341 | $(OBJ_D)\a_utctm.obj: $(SRC_D)\crypto\asn1\a_utctm.c | ||
| 1342 | $(CC) /Fo$(OBJ_D)\a_utctm.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_utctm.c | ||
| 1343 | |||
| 1344 | $(OBJ_D)\a_int.obj: $(SRC_D)\crypto\asn1\a_int.c | ||
| 1345 | $(CC) /Fo$(OBJ_D)\a_int.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_int.c | ||
| 1346 | |||
| 1347 | $(OBJ_D)\a_octet.obj: $(SRC_D)\crypto\asn1\a_octet.c | ||
| 1348 | $(CC) /Fo$(OBJ_D)\a_octet.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_octet.c | ||
| 1349 | |||
| 1350 | $(OBJ_D)\a_print.obj: $(SRC_D)\crypto\asn1\a_print.c | ||
| 1351 | $(CC) /Fo$(OBJ_D)\a_print.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_print.c | ||
| 1352 | |||
| 1353 | $(OBJ_D)\a_type.obj: $(SRC_D)\crypto\asn1\a_type.c | ||
| 1354 | $(CC) /Fo$(OBJ_D)\a_type.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_type.c | ||
| 1355 | |||
| 1356 | $(OBJ_D)\a_set.obj: $(SRC_D)\crypto\asn1\a_set.c | ||
| 1357 | $(CC) /Fo$(OBJ_D)\a_set.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_set.c | ||
| 1358 | |||
| 1359 | $(OBJ_D)\a_dup.obj: $(SRC_D)\crypto\asn1\a_dup.c | ||
| 1360 | $(CC) /Fo$(OBJ_D)\a_dup.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_dup.c | ||
| 1361 | |||
| 1362 | $(OBJ_D)\a_d2i_fp.obj: $(SRC_D)\crypto\asn1\a_d2i_fp.c | ||
| 1363 | $(CC) /Fo$(OBJ_D)\a_d2i_fp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_d2i_fp.c | ||
| 1364 | |||
| 1365 | $(OBJ_D)\a_i2d_fp.obj: $(SRC_D)\crypto\asn1\a_i2d_fp.c | ||
| 1366 | $(CC) /Fo$(OBJ_D)\a_i2d_fp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_i2d_fp.c | ||
| 1367 | |||
| 1368 | $(OBJ_D)\a_sign.obj: $(SRC_D)\crypto\asn1\a_sign.c | ||
| 1369 | $(CC) /Fo$(OBJ_D)\a_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_sign.c | ||
| 1370 | |||
| 1371 | $(OBJ_D)\a_digest.obj: $(SRC_D)\crypto\asn1\a_digest.c | ||
| 1372 | $(CC) /Fo$(OBJ_D)\a_digest.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_digest.c | ||
| 1373 | |||
| 1374 | $(OBJ_D)\a_verify.obj: $(SRC_D)\crypto\asn1\a_verify.c | ||
| 1375 | $(CC) /Fo$(OBJ_D)\a_verify.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_verify.c | ||
| 1376 | |||
| 1377 | $(OBJ_D)\x_algor.obj: $(SRC_D)\crypto\asn1\x_algor.c | ||
| 1378 | $(CC) /Fo$(OBJ_D)\x_algor.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_algor.c | ||
| 1379 | |||
| 1380 | $(OBJ_D)\x_val.obj: $(SRC_D)\crypto\asn1\x_val.c | ||
| 1381 | $(CC) /Fo$(OBJ_D)\x_val.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_val.c | ||
| 1382 | |||
| 1383 | $(OBJ_D)\x_pubkey.obj: $(SRC_D)\crypto\asn1\x_pubkey.c | ||
| 1384 | $(CC) /Fo$(OBJ_D)\x_pubkey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_pubkey.c | ||
| 1385 | |||
| 1386 | $(OBJ_D)\x_sig.obj: $(SRC_D)\crypto\asn1\x_sig.c | ||
| 1387 | $(CC) /Fo$(OBJ_D)\x_sig.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_sig.c | ||
| 1388 | |||
| 1389 | $(OBJ_D)\x_req.obj: $(SRC_D)\crypto\asn1\x_req.c | ||
| 1390 | $(CC) /Fo$(OBJ_D)\x_req.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_req.c | ||
| 1391 | |||
| 1392 | $(OBJ_D)\x_attrib.obj: $(SRC_D)\crypto\asn1\x_attrib.c | ||
| 1393 | $(CC) /Fo$(OBJ_D)\x_attrib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_attrib.c | ||
| 1394 | |||
| 1395 | $(OBJ_D)\x_name.obj: $(SRC_D)\crypto\asn1\x_name.c | ||
| 1396 | $(CC) /Fo$(OBJ_D)\x_name.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_name.c | ||
| 1397 | |||
| 1398 | $(OBJ_D)\x_cinf.obj: $(SRC_D)\crypto\asn1\x_cinf.c | ||
| 1399 | $(CC) /Fo$(OBJ_D)\x_cinf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_cinf.c | ||
| 1400 | |||
| 1401 | $(OBJ_D)\x_x509.obj: $(SRC_D)\crypto\asn1\x_x509.c | ||
| 1402 | $(CC) /Fo$(OBJ_D)\x_x509.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_x509.c | ||
| 1403 | |||
| 1404 | $(OBJ_D)\x_crl.obj: $(SRC_D)\crypto\asn1\x_crl.c | ||
| 1405 | $(CC) /Fo$(OBJ_D)\x_crl.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_crl.c | ||
| 1406 | |||
| 1407 | $(OBJ_D)\x_info.obj: $(SRC_D)\crypto\asn1\x_info.c | ||
| 1408 | $(CC) /Fo$(OBJ_D)\x_info.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_info.c | ||
| 1409 | |||
| 1410 | $(OBJ_D)\x_spki.obj: $(SRC_D)\crypto\asn1\x_spki.c | ||
| 1411 | $(CC) /Fo$(OBJ_D)\x_spki.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_spki.c | ||
| 1412 | |||
| 1413 | $(OBJ_D)\d2i_r_pr.obj: $(SRC_D)\crypto\asn1\d2i_r_pr.c | ||
| 1414 | $(CC) /Fo$(OBJ_D)\d2i_r_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_r_pr.c | ||
| 1415 | |||
| 1416 | $(OBJ_D)\i2d_r_pr.obj: $(SRC_D)\crypto\asn1\i2d_r_pr.c | ||
| 1417 | $(CC) /Fo$(OBJ_D)\i2d_r_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_r_pr.c | ||
| 1418 | |||
| 1419 | $(OBJ_D)\d2i_r_pu.obj: $(SRC_D)\crypto\asn1\d2i_r_pu.c | ||
| 1420 | $(CC) /Fo$(OBJ_D)\d2i_r_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_r_pu.c | ||
| 1421 | |||
| 1422 | $(OBJ_D)\i2d_r_pu.obj: $(SRC_D)\crypto\asn1\i2d_r_pu.c | ||
| 1423 | $(CC) /Fo$(OBJ_D)\i2d_r_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_r_pu.c | ||
| 1424 | |||
| 1425 | $(OBJ_D)\d2i_s_pr.obj: $(SRC_D)\crypto\asn1\d2i_s_pr.c | ||
| 1426 | $(CC) /Fo$(OBJ_D)\d2i_s_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_s_pr.c | ||
| 1427 | |||
| 1428 | $(OBJ_D)\i2d_s_pr.obj: $(SRC_D)\crypto\asn1\i2d_s_pr.c | ||
| 1429 | $(CC) /Fo$(OBJ_D)\i2d_s_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_s_pr.c | ||
| 1430 | |||
| 1431 | $(OBJ_D)\d2i_s_pu.obj: $(SRC_D)\crypto\asn1\d2i_s_pu.c | ||
| 1432 | $(CC) /Fo$(OBJ_D)\d2i_s_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_s_pu.c | ||
| 1433 | |||
| 1434 | $(OBJ_D)\i2d_s_pu.obj: $(SRC_D)\crypto\asn1\i2d_s_pu.c | ||
| 1435 | $(CC) /Fo$(OBJ_D)\i2d_s_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_s_pu.c | ||
| 1436 | |||
| 1437 | $(OBJ_D)\d2i_pu.obj: $(SRC_D)\crypto\asn1\d2i_pu.c | ||
| 1438 | $(CC) /Fo$(OBJ_D)\d2i_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_pu.c | ||
| 1439 | |||
| 1440 | $(OBJ_D)\d2i_pr.obj: $(SRC_D)\crypto\asn1\d2i_pr.c | ||
| 1441 | $(CC) /Fo$(OBJ_D)\d2i_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_pr.c | ||
| 1442 | |||
| 1443 | $(OBJ_D)\i2d_pu.obj: $(SRC_D)\crypto\asn1\i2d_pu.c | ||
| 1444 | $(CC) /Fo$(OBJ_D)\i2d_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_pu.c | ||
| 1445 | |||
| 1446 | $(OBJ_D)\i2d_pr.obj: $(SRC_D)\crypto\asn1\i2d_pr.c | ||
| 1447 | $(CC) /Fo$(OBJ_D)\i2d_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_pr.c | ||
| 1448 | |||
| 1449 | $(OBJ_D)\t_req.obj: $(SRC_D)\crypto\asn1\t_req.c | ||
| 1450 | $(CC) /Fo$(OBJ_D)\t_req.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\t_req.c | ||
| 1451 | |||
| 1452 | $(OBJ_D)\t_x509.obj: $(SRC_D)\crypto\asn1\t_x509.c | ||
| 1453 | $(CC) /Fo$(OBJ_D)\t_x509.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\t_x509.c | ||
| 1454 | |||
| 1455 | $(OBJ_D)\t_pkey.obj: $(SRC_D)\crypto\asn1\t_pkey.c | ||
| 1456 | $(CC) /Fo$(OBJ_D)\t_pkey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\t_pkey.c | ||
| 1457 | |||
| 1458 | $(OBJ_D)\p7_i_s.obj: $(SRC_D)\crypto\asn1\p7_i_s.c | ||
| 1459 | $(CC) /Fo$(OBJ_D)\p7_i_s.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_i_s.c | ||
| 1460 | |||
| 1461 | $(OBJ_D)\p7_signi.obj: $(SRC_D)\crypto\asn1\p7_signi.c | ||
| 1462 | $(CC) /Fo$(OBJ_D)\p7_signi.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_signi.c | ||
| 1463 | |||
| 1464 | $(OBJ_D)\p7_signd.obj: $(SRC_D)\crypto\asn1\p7_signd.c | ||
| 1465 | $(CC) /Fo$(OBJ_D)\p7_signd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_signd.c | ||
| 1466 | |||
| 1467 | $(OBJ_D)\p7_recip.obj: $(SRC_D)\crypto\asn1\p7_recip.c | ||
| 1468 | $(CC) /Fo$(OBJ_D)\p7_recip.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_recip.c | ||
| 1469 | |||
| 1470 | $(OBJ_D)\p7_enc_c.obj: $(SRC_D)\crypto\asn1\p7_enc_c.c | ||
| 1471 | $(CC) /Fo$(OBJ_D)\p7_enc_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_enc_c.c | ||
| 1472 | |||
| 1473 | $(OBJ_D)\p7_evp.obj: $(SRC_D)\crypto\asn1\p7_evp.c | ||
| 1474 | $(CC) /Fo$(OBJ_D)\p7_evp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_evp.c | ||
| 1475 | |||
| 1476 | $(OBJ_D)\p7_dgst.obj: $(SRC_D)\crypto\asn1\p7_dgst.c | ||
| 1477 | $(CC) /Fo$(OBJ_D)\p7_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_dgst.c | ||
| 1478 | |||
| 1479 | $(OBJ_D)\p7_s_e.obj: $(SRC_D)\crypto\asn1\p7_s_e.c | ||
| 1480 | $(CC) /Fo$(OBJ_D)\p7_s_e.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_s_e.c | ||
| 1481 | |||
| 1482 | $(OBJ_D)\p7_enc.obj: $(SRC_D)\crypto\asn1\p7_enc.c | ||
| 1483 | $(CC) /Fo$(OBJ_D)\p7_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_enc.c | ||
| 1484 | |||
| 1485 | $(OBJ_D)\p7_lib.obj: $(SRC_D)\crypto\asn1\p7_lib.c | ||
| 1486 | $(CC) /Fo$(OBJ_D)\p7_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_lib.c | ||
| 1487 | |||
| 1488 | $(OBJ_D)\f_int.obj: $(SRC_D)\crypto\asn1\f_int.c | ||
| 1489 | $(CC) /Fo$(OBJ_D)\f_int.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\f_int.c | ||
| 1490 | |||
| 1491 | $(OBJ_D)\f_string.obj: $(SRC_D)\crypto\asn1\f_string.c | ||
| 1492 | $(CC) /Fo$(OBJ_D)\f_string.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\f_string.c | ||
| 1493 | |||
| 1494 | $(OBJ_D)\i2d_dhp.obj: $(SRC_D)\crypto\asn1\i2d_dhp.c | ||
| 1495 | $(CC) /Fo$(OBJ_D)\i2d_dhp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_dhp.c | ||
| 1496 | |||
| 1497 | $(OBJ_D)\i2d_dsap.obj: $(SRC_D)\crypto\asn1\i2d_dsap.c | ||
| 1498 | $(CC) /Fo$(OBJ_D)\i2d_dsap.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_dsap.c | ||
| 1499 | |||
| 1500 | $(OBJ_D)\d2i_dhp.obj: $(SRC_D)\crypto\asn1\d2i_dhp.c | ||
| 1501 | $(CC) /Fo$(OBJ_D)\d2i_dhp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_dhp.c | ||
| 1502 | |||
| 1503 | $(OBJ_D)\d2i_dsap.obj: $(SRC_D)\crypto\asn1\d2i_dsap.c | ||
| 1504 | $(CC) /Fo$(OBJ_D)\d2i_dsap.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_dsap.c | ||
| 1505 | |||
| 1506 | $(OBJ_D)\n_pkey.obj: $(SRC_D)\crypto\asn1\n_pkey.c | ||
| 1507 | $(CC) /Fo$(OBJ_D)\n_pkey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\n_pkey.c | ||
| 1508 | |||
| 1509 | $(OBJ_D)\a_hdr.obj: $(SRC_D)\crypto\asn1\a_hdr.c | ||
| 1510 | $(CC) /Fo$(OBJ_D)\a_hdr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_hdr.c | ||
| 1511 | |||
| 1512 | $(OBJ_D)\x_pkey.obj: $(SRC_D)\crypto\asn1\x_pkey.c | ||
| 1513 | $(CC) /Fo$(OBJ_D)\x_pkey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_pkey.c | ||
| 1514 | |||
| 1515 | $(OBJ_D)\a_bool.obj: $(SRC_D)\crypto\asn1\a_bool.c | ||
| 1516 | $(CC) /Fo$(OBJ_D)\a_bool.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_bool.c | ||
| 1517 | |||
| 1518 | $(OBJ_D)\x_exten.obj: $(SRC_D)\crypto\asn1\x_exten.c | ||
| 1519 | $(CC) /Fo$(OBJ_D)\x_exten.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_exten.c | ||
| 1520 | |||
| 1521 | $(OBJ_D)\asn1_par.obj: $(SRC_D)\crypto\asn1\asn1_par.c | ||
| 1522 | $(CC) /Fo$(OBJ_D)\asn1_par.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\asn1_par.c | ||
| 1523 | |||
| 1524 | $(OBJ_D)\asn1_lib.obj: $(SRC_D)\crypto\asn1\asn1_lib.c | ||
| 1525 | $(CC) /Fo$(OBJ_D)\asn1_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\asn1_lib.c | ||
| 1526 | |||
| 1527 | $(OBJ_D)\asn1_err.obj: $(SRC_D)\crypto\asn1\asn1_err.c | ||
| 1528 | $(CC) /Fo$(OBJ_D)\asn1_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\asn1_err.c | ||
| 1529 | |||
| 1530 | $(OBJ_D)\a_meth.obj: $(SRC_D)\crypto\asn1\a_meth.c | ||
| 1531 | $(CC) /Fo$(OBJ_D)\a_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_meth.c | ||
| 1532 | |||
| 1533 | $(OBJ_D)\a_bytes.obj: $(SRC_D)\crypto\asn1\a_bytes.c | ||
| 1534 | $(CC) /Fo$(OBJ_D)\a_bytes.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_bytes.c | ||
| 1535 | |||
| 1536 | $(OBJ_D)\evp_asn1.obj: $(SRC_D)\crypto\asn1\evp_asn1.c | ||
| 1537 | $(CC) /Fo$(OBJ_D)\evp_asn1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\evp_asn1.c | ||
| 1538 | |||
| 1539 | $(OBJ_D)\x509_def.obj: $(SRC_D)\crypto\x509\x509_def.c | ||
| 1540 | $(CC) /Fo$(OBJ_D)\x509_def.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_def.c | ||
| 1541 | |||
| 1542 | $(OBJ_D)\x509_d2.obj: $(SRC_D)\crypto\x509\x509_d2.c | ||
| 1543 | $(CC) /Fo$(OBJ_D)\x509_d2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_d2.c | ||
| 1544 | |||
| 1545 | $(OBJ_D)\x509_r2x.obj: $(SRC_D)\crypto\x509\x509_r2x.c | ||
| 1546 | $(CC) /Fo$(OBJ_D)\x509_r2x.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_r2x.c | ||
| 1547 | |||
| 1548 | $(OBJ_D)\x509_cmp.obj: $(SRC_D)\crypto\x509\x509_cmp.c | ||
| 1549 | $(CC) /Fo$(OBJ_D)\x509_cmp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_cmp.c | ||
| 1550 | |||
| 1551 | $(OBJ_D)\x509_obj.obj: $(SRC_D)\crypto\x509\x509_obj.c | ||
| 1552 | $(CC) /Fo$(OBJ_D)\x509_obj.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_obj.c | ||
| 1553 | |||
| 1554 | $(OBJ_D)\x509_req.obj: $(SRC_D)\crypto\x509\x509_req.c | ||
| 1555 | $(CC) /Fo$(OBJ_D)\x509_req.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_req.c | ||
| 1556 | |||
| 1557 | $(OBJ_D)\x509_vfy.obj: $(SRC_D)\crypto\x509\x509_vfy.c | ||
| 1558 | $(CC) /Fo$(OBJ_D)\x509_vfy.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_vfy.c | ||
| 1559 | |||
| 1560 | $(OBJ_D)\x509_set.obj: $(SRC_D)\crypto\x509\x509_set.c | ||
| 1561 | $(CC) /Fo$(OBJ_D)\x509_set.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_set.c | ||
| 1562 | |||
| 1563 | $(OBJ_D)\x509rset.obj: $(SRC_D)\crypto\x509\x509rset.c | ||
| 1564 | $(CC) /Fo$(OBJ_D)\x509rset.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509rset.c | ||
| 1565 | |||
| 1566 | $(OBJ_D)\x509_err.obj: $(SRC_D)\crypto\x509\x509_err.c | ||
| 1567 | $(CC) /Fo$(OBJ_D)\x509_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_err.c | ||
| 1568 | |||
| 1569 | $(OBJ_D)\x509name.obj: $(SRC_D)\crypto\x509\x509name.c | ||
| 1570 | $(CC) /Fo$(OBJ_D)\x509name.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509name.c | ||
| 1571 | |||
| 1572 | $(OBJ_D)\x509_v3.obj: $(SRC_D)\crypto\x509\x509_v3.c | ||
| 1573 | $(CC) /Fo$(OBJ_D)\x509_v3.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_v3.c | ||
| 1574 | |||
| 1575 | $(OBJ_D)\x509_ext.obj: $(SRC_D)\crypto\x509\x509_ext.c | ||
| 1576 | $(CC) /Fo$(OBJ_D)\x509_ext.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_ext.c | ||
| 1577 | |||
| 1578 | $(OBJ_D)\x509pack.obj: $(SRC_D)\crypto\x509\x509pack.c | ||
| 1579 | $(CC) /Fo$(OBJ_D)\x509pack.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509pack.c | ||
| 1580 | |||
| 1581 | $(OBJ_D)\x509type.obj: $(SRC_D)\crypto\x509\x509type.c | ||
| 1582 | $(CC) /Fo$(OBJ_D)\x509type.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509type.c | ||
| 1583 | |||
| 1584 | $(OBJ_D)\x509_lu.obj: $(SRC_D)\crypto\x509\x509_lu.c | ||
| 1585 | $(CC) /Fo$(OBJ_D)\x509_lu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_lu.c | ||
| 1586 | |||
| 1587 | $(OBJ_D)\x_all.obj: $(SRC_D)\crypto\x509\x_all.c | ||
| 1588 | $(CC) /Fo$(OBJ_D)\x_all.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x_all.c | ||
| 1589 | |||
| 1590 | $(OBJ_D)\x509_txt.obj: $(SRC_D)\crypto\x509\x509_txt.c | ||
| 1591 | $(CC) /Fo$(OBJ_D)\x509_txt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_txt.c | ||
| 1592 | |||
| 1593 | $(OBJ_D)\by_file.obj: $(SRC_D)\crypto\x509\by_file.c | ||
| 1594 | $(CC) /Fo$(OBJ_D)\by_file.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\by_file.c | ||
| 1595 | |||
| 1596 | $(OBJ_D)\by_dir.obj: $(SRC_D)\crypto\x509\by_dir.c | ||
| 1597 | $(CC) /Fo$(OBJ_D)\by_dir.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\by_dir.c | ||
| 1598 | |||
| 1599 | $(OBJ_D)\v3_net.obj: $(SRC_D)\crypto\x509\v3_net.c | ||
| 1600 | $(CC) /Fo$(OBJ_D)\v3_net.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\v3_net.c | ||
| 1601 | |||
| 1602 | $(OBJ_D)\v3_x509.obj: $(SRC_D)\crypto\x509\v3_x509.c | ||
| 1603 | $(CC) /Fo$(OBJ_D)\v3_x509.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\v3_x509.c | ||
| 1604 | |||
| 1605 | $(OBJ_D)\conf.obj: $(SRC_D)\crypto\conf\conf.c | ||
| 1606 | $(CC) /Fo$(OBJ_D)\conf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\conf\conf.c | ||
| 1607 | |||
| 1608 | $(OBJ_D)\conf_err.obj: $(SRC_D)\crypto\conf\conf_err.c | ||
| 1609 | $(CC) /Fo$(OBJ_D)\conf_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\conf\conf_err.c | ||
| 1610 | |||
| 1611 | $(OBJ_D)\txt_db.obj: $(SRC_D)\crypto\txt_db\txt_db.c | ||
| 1612 | $(CC) /Fo$(OBJ_D)\txt_db.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\txt_db\txt_db.c | ||
| 1613 | |||
| 1614 | $(OBJ_D)\pk7_lib.obj: $(SRC_D)\crypto\pkcs7\pk7_lib.c | ||
| 1615 | $(CC) /Fo$(OBJ_D)\pk7_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pkcs7\pk7_lib.c | ||
| 1616 | |||
| 1617 | $(OBJ_D)\pkcs7err.obj: $(SRC_D)\crypto\pkcs7\pkcs7err.c | ||
| 1618 | $(CC) /Fo$(OBJ_D)\pkcs7err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pkcs7\pkcs7err.c | ||
| 1619 | |||
| 1620 | $(OBJ_D)\pk7_doit.obj: $(SRC_D)\crypto\pkcs7\pk7_doit.c | ||
| 1621 | $(CC) /Fo$(OBJ_D)\pk7_doit.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pkcs7\pk7_doit.c | ||
| 1622 | |||
| 1623 | $(OBJ_D)\s2_meth.obj: $(SRC_D)\ssl\s2_meth.c | ||
| 1624 | $(CC) /Fo$(OBJ_D)\s2_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_meth.c | ||
| 1625 | |||
| 1626 | $(OBJ_D)\s2_srvr.obj: $(SRC_D)\ssl\s2_srvr.c | ||
| 1627 | $(CC) /Fo$(OBJ_D)\s2_srvr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_srvr.c | ||
| 1628 | |||
| 1629 | $(OBJ_D)\s2_clnt.obj: $(SRC_D)\ssl\s2_clnt.c | ||
| 1630 | $(CC) /Fo$(OBJ_D)\s2_clnt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_clnt.c | ||
| 1631 | |||
| 1632 | $(OBJ_D)\s2_lib.obj: $(SRC_D)\ssl\s2_lib.c | ||
| 1633 | $(CC) /Fo$(OBJ_D)\s2_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_lib.c | ||
| 1634 | |||
| 1635 | $(OBJ_D)\s2_enc.obj: $(SRC_D)\ssl\s2_enc.c | ||
| 1636 | $(CC) /Fo$(OBJ_D)\s2_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_enc.c | ||
| 1637 | |||
| 1638 | $(OBJ_D)\s2_pkt.obj: $(SRC_D)\ssl\s2_pkt.c | ||
| 1639 | $(CC) /Fo$(OBJ_D)\s2_pkt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_pkt.c | ||
| 1640 | |||
| 1641 | $(OBJ_D)\s3_meth.obj: $(SRC_D)\ssl\s3_meth.c | ||
| 1642 | $(CC) /Fo$(OBJ_D)\s3_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_meth.c | ||
| 1643 | |||
| 1644 | $(OBJ_D)\s3_srvr.obj: $(SRC_D)\ssl\s3_srvr.c | ||
| 1645 | $(CC) /Fo$(OBJ_D)\s3_srvr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_srvr.c | ||
| 1646 | |||
| 1647 | $(OBJ_D)\s3_clnt.obj: $(SRC_D)\ssl\s3_clnt.c | ||
| 1648 | $(CC) /Fo$(OBJ_D)\s3_clnt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_clnt.c | ||
| 1649 | |||
| 1650 | $(OBJ_D)\s3_lib.obj: $(SRC_D)\ssl\s3_lib.c | ||
| 1651 | $(CC) /Fo$(OBJ_D)\s3_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_lib.c | ||
| 1652 | |||
| 1653 | $(OBJ_D)\s3_enc.obj: $(SRC_D)\ssl\s3_enc.c | ||
| 1654 | $(CC) /Fo$(OBJ_D)\s3_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_enc.c | ||
| 1655 | |||
| 1656 | $(OBJ_D)\s3_pkt.obj: $(SRC_D)\ssl\s3_pkt.c | ||
| 1657 | $(CC) /Fo$(OBJ_D)\s3_pkt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_pkt.c | ||
| 1658 | |||
| 1659 | $(OBJ_D)\s3_both.obj: $(SRC_D)\ssl\s3_both.c | ||
| 1660 | $(CC) /Fo$(OBJ_D)\s3_both.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_both.c | ||
| 1661 | |||
| 1662 | $(OBJ_D)\s23_meth.obj: $(SRC_D)\ssl\s23_meth.c | ||
| 1663 | $(CC) /Fo$(OBJ_D)\s23_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_meth.c | ||
| 1664 | |||
| 1665 | $(OBJ_D)\s23_srvr.obj: $(SRC_D)\ssl\s23_srvr.c | ||
| 1666 | $(CC) /Fo$(OBJ_D)\s23_srvr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_srvr.c | ||
| 1667 | |||
| 1668 | $(OBJ_D)\s23_clnt.obj: $(SRC_D)\ssl\s23_clnt.c | ||
| 1669 | $(CC) /Fo$(OBJ_D)\s23_clnt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_clnt.c | ||
| 1670 | |||
| 1671 | $(OBJ_D)\s23_lib.obj: $(SRC_D)\ssl\s23_lib.c | ||
| 1672 | $(CC) /Fo$(OBJ_D)\s23_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_lib.c | ||
| 1673 | |||
| 1674 | $(OBJ_D)\s23_pkt.obj: $(SRC_D)\ssl\s23_pkt.c | ||
| 1675 | $(CC) /Fo$(OBJ_D)\s23_pkt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_pkt.c | ||
| 1676 | |||
| 1677 | $(OBJ_D)\t1_meth.obj: $(SRC_D)\ssl\t1_meth.c | ||
| 1678 | $(CC) /Fo$(OBJ_D)\t1_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_meth.c | ||
| 1679 | |||
| 1680 | $(OBJ_D)\t1_srvr.obj: $(SRC_D)\ssl\t1_srvr.c | ||
| 1681 | $(CC) /Fo$(OBJ_D)\t1_srvr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_srvr.c | ||
| 1682 | |||
| 1683 | $(OBJ_D)\t1_clnt.obj: $(SRC_D)\ssl\t1_clnt.c | ||
| 1684 | $(CC) /Fo$(OBJ_D)\t1_clnt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_clnt.c | ||
| 1685 | |||
| 1686 | $(OBJ_D)\t1_lib.obj: $(SRC_D)\ssl\t1_lib.c | ||
| 1687 | $(CC) /Fo$(OBJ_D)\t1_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_lib.c | ||
| 1688 | |||
| 1689 | $(OBJ_D)\t1_enc.obj: $(SRC_D)\ssl\t1_enc.c | ||
| 1690 | $(CC) /Fo$(OBJ_D)\t1_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_enc.c | ||
| 1691 | |||
| 1692 | $(OBJ_D)\ssl_lib.obj: $(SRC_D)\ssl\ssl_lib.c | ||
| 1693 | $(CC) /Fo$(OBJ_D)\ssl_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_lib.c | ||
| 1694 | |||
| 1695 | $(OBJ_D)\ssl_err2.obj: $(SRC_D)\ssl\ssl_err2.c | ||
| 1696 | $(CC) /Fo$(OBJ_D)\ssl_err2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_err2.c | ||
| 1697 | |||
| 1698 | $(OBJ_D)\ssl_cert.obj: $(SRC_D)\ssl\ssl_cert.c | ||
| 1699 | $(CC) /Fo$(OBJ_D)\ssl_cert.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_cert.c | ||
| 1700 | |||
| 1701 | $(OBJ_D)\ssl_sess.obj: $(SRC_D)\ssl\ssl_sess.c | ||
| 1702 | $(CC) /Fo$(OBJ_D)\ssl_sess.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_sess.c | ||
| 1703 | |||
| 1704 | $(OBJ_D)\ssl_ciph.obj: $(SRC_D)\ssl\ssl_ciph.c | ||
| 1705 | $(CC) /Fo$(OBJ_D)\ssl_ciph.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_ciph.c | ||
| 1706 | |||
| 1707 | $(OBJ_D)\ssl_stat.obj: $(SRC_D)\ssl\ssl_stat.c | ||
| 1708 | $(CC) /Fo$(OBJ_D)\ssl_stat.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_stat.c | ||
| 1709 | |||
| 1710 | $(OBJ_D)\ssl_rsa.obj: $(SRC_D)\ssl\ssl_rsa.c | ||
| 1711 | $(CC) /Fo$(OBJ_D)\ssl_rsa.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_rsa.c | ||
| 1712 | |||
| 1713 | $(OBJ_D)\ssl_asn1.obj: $(SRC_D)\ssl\ssl_asn1.c | ||
| 1714 | $(CC) /Fo$(OBJ_D)\ssl_asn1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_asn1.c | ||
| 1715 | |||
| 1716 | $(OBJ_D)\ssl_txt.obj: $(SRC_D)\ssl\ssl_txt.c | ||
| 1717 | $(CC) /Fo$(OBJ_D)\ssl_txt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_txt.c | ||
| 1718 | |||
| 1719 | $(OBJ_D)\ssl_algs.obj: $(SRC_D)\ssl\ssl_algs.c | ||
| 1720 | $(CC) /Fo$(OBJ_D)\ssl_algs.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_algs.c | ||
| 1721 | |||
| 1722 | $(OBJ_D)\bio_ssl.obj: $(SRC_D)\ssl\bio_ssl.c | ||
| 1723 | $(CC) /Fo$(OBJ_D)\bio_ssl.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\bio_ssl.c | ||
| 1724 | |||
| 1725 | $(OBJ_D)\ssl_err.obj: $(SRC_D)\ssl\ssl_err.c | ||
| 1726 | $(CC) /Fo$(OBJ_D)\ssl_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_err.c | ||
| 1727 | |||
| 1728 | $(OBJ_D)\rsaref.obj: $(SRC_D)\rsaref\rsaref.c | ||
| 1729 | $(CC) /Fo$(OBJ_D)\rsaref.obj $(LIB_CFLAGS) -c $(SRC_D)\rsaref\rsaref.c | ||
| 1730 | |||
| 1731 | $(OBJ_D)\rsar_err.obj: $(SRC_D)\rsaref\rsar_err.c | ||
| 1732 | $(CC) /Fo$(OBJ_D)\rsar_err.obj $(LIB_CFLAGS) -c $(SRC_D)\rsaref\rsar_err.c | ||
| 1733 | |||
| 1734 | $(TEST_D)\md2test.exe: $(OBJ_D)\md2test.obj $(LIBS_DEP) | ||
| 1735 | $(LINK) $(LFLAGS) /out:$(TEST_D)\md2test.exe @<< | ||
| 1736 | $(APP_EX_OBJ) $(OBJ_D)\md2test.obj $(L_LIBS) $(EX_LIBS) | ||
| 1737 | << | ||
| 1738 | |||
| 1739 | $(TEST_D)\md5test.exe: $(OBJ_D)\md5test.obj $(LIBS_DEP) | ||
| 1740 | $(LINK) $(LFLAGS) /out:$(TEST_D)\md5test.exe @<< | ||
| 1741 | $(APP_EX_OBJ) $(OBJ_D)\md5test.obj $(L_LIBS) $(EX_LIBS) | ||
| 1742 | << | ||
| 1743 | |||
| 1744 | $(TEST_D)\shatest.exe: $(OBJ_D)\shatest.obj $(LIBS_DEP) | ||
| 1745 | $(LINK) $(LFLAGS) /out:$(TEST_D)\shatest.exe @<< | ||
| 1746 | $(APP_EX_OBJ) $(OBJ_D)\shatest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1747 | << | ||
| 1748 | |||
| 1749 | $(TEST_D)\sha1test.exe: $(OBJ_D)\sha1test.obj $(LIBS_DEP) | ||
| 1750 | $(LINK) $(LFLAGS) /out:$(TEST_D)\sha1test.exe @<< | ||
| 1751 | $(APP_EX_OBJ) $(OBJ_D)\sha1test.obj $(L_LIBS) $(EX_LIBS) | ||
| 1752 | << | ||
| 1753 | |||
| 1754 | $(TEST_D)\mdc2test.exe: $(OBJ_D)\mdc2test.obj $(LIBS_DEP) | ||
| 1755 | $(LINK) $(LFLAGS) /out:$(TEST_D)\mdc2test.exe @<< | ||
| 1756 | $(APP_EX_OBJ) $(OBJ_D)\mdc2test.obj $(L_LIBS) $(EX_LIBS) | ||
| 1757 | << | ||
| 1758 | |||
| 1759 | $(TEST_D)\hmactest.exe: $(OBJ_D)\hmactest.obj $(LIBS_DEP) | ||
| 1760 | $(LINK) $(LFLAGS) /out:$(TEST_D)\hmactest.exe @<< | ||
| 1761 | $(APP_EX_OBJ) $(OBJ_D)\hmactest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1762 | << | ||
| 1763 | |||
| 1764 | $(TEST_D)\rmdtest.exe: $(OBJ_D)\rmdtest.obj $(LIBS_DEP) | ||
| 1765 | $(LINK) $(LFLAGS) /out:$(TEST_D)\rmdtest.exe @<< | ||
| 1766 | $(APP_EX_OBJ) $(OBJ_D)\rmdtest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1767 | << | ||
| 1768 | |||
| 1769 | $(TEST_D)\destest.exe: $(OBJ_D)\destest.obj $(LIBS_DEP) | ||
| 1770 | $(LINK) $(LFLAGS) /out:$(TEST_D)\destest.exe @<< | ||
| 1771 | $(APP_EX_OBJ) $(OBJ_D)\destest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1772 | << | ||
| 1773 | |||
| 1774 | $(TEST_D)\rc2test.exe: $(OBJ_D)\rc2test.obj $(LIBS_DEP) | ||
| 1775 | $(LINK) $(LFLAGS) /out:$(TEST_D)\rc2test.exe @<< | ||
| 1776 | $(APP_EX_OBJ) $(OBJ_D)\rc2test.obj $(L_LIBS) $(EX_LIBS) | ||
| 1777 | << | ||
| 1778 | |||
| 1779 | $(TEST_D)\rc4test.exe: $(OBJ_D)\rc4test.obj $(LIBS_DEP) | ||
| 1780 | $(LINK) $(LFLAGS) /out:$(TEST_D)\rc4test.exe @<< | ||
| 1781 | $(APP_EX_OBJ) $(OBJ_D)\rc4test.obj $(L_LIBS) $(EX_LIBS) | ||
| 1782 | << | ||
| 1783 | |||
| 1784 | $(TEST_D)\rc5test.exe: $(OBJ_D)\rc5test.obj $(LIBS_DEP) | ||
| 1785 | $(LINK) $(LFLAGS) /out:$(TEST_D)\rc5test.exe @<< | ||
| 1786 | $(APP_EX_OBJ) $(OBJ_D)\rc5test.obj $(L_LIBS) $(EX_LIBS) | ||
| 1787 | << | ||
| 1788 | |||
| 1789 | $(TEST_D)\ideatest.exe: $(OBJ_D)\ideatest.obj $(LIBS_DEP) | ||
| 1790 | $(LINK) $(LFLAGS) /out:$(TEST_D)\ideatest.exe @<< | ||
| 1791 | $(APP_EX_OBJ) $(OBJ_D)\ideatest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1792 | << | ||
| 1793 | |||
| 1794 | $(TEST_D)\bftest.exe: $(OBJ_D)\bftest.obj $(LIBS_DEP) | ||
| 1795 | $(LINK) $(LFLAGS) /out:$(TEST_D)\bftest.exe @<< | ||
| 1796 | $(APP_EX_OBJ) $(OBJ_D)\bftest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1797 | << | ||
| 1798 | |||
| 1799 | $(TEST_D)\casttest.exe: $(OBJ_D)\casttest.obj $(LIBS_DEP) | ||
| 1800 | $(LINK) $(LFLAGS) /out:$(TEST_D)\casttest.exe @<< | ||
| 1801 | $(APP_EX_OBJ) $(OBJ_D)\casttest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1802 | << | ||
| 1803 | |||
| 1804 | $(TEST_D)\bntest.exe: $(OBJ_D)\bntest.obj $(LIBS_DEP) | ||
| 1805 | $(LINK) $(LFLAGS) /out:$(TEST_D)\bntest.exe @<< | ||
| 1806 | $(APP_EX_OBJ) $(OBJ_D)\bntest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1807 | << | ||
| 1808 | |||
| 1809 | $(TEST_D)\exptest.exe: $(OBJ_D)\exptest.obj $(LIBS_DEP) | ||
| 1810 | $(LINK) $(LFLAGS) /out:$(TEST_D)\exptest.exe @<< | ||
| 1811 | $(APP_EX_OBJ) $(OBJ_D)\exptest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1812 | << | ||
| 1813 | |||
| 1814 | $(TEST_D)\dsatest.exe: $(OBJ_D)\dsatest.obj $(LIBS_DEP) | ||
| 1815 | $(LINK) $(LFLAGS) /out:$(TEST_D)\dsatest.exe @<< | ||
| 1816 | $(APP_EX_OBJ) $(OBJ_D)\dsatest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1817 | << | ||
| 1818 | |||
| 1819 | $(TEST_D)\dhtest.exe: $(OBJ_D)\dhtest.obj $(LIBS_DEP) | ||
| 1820 | $(LINK) $(LFLAGS) /out:$(TEST_D)\dhtest.exe @<< | ||
| 1821 | $(APP_EX_OBJ) $(OBJ_D)\dhtest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1822 | << | ||
| 1823 | |||
| 1824 | $(TEST_D)\randtest.exe: $(OBJ_D)\randtest.obj $(LIBS_DEP) | ||
| 1825 | $(LINK) $(LFLAGS) /out:$(TEST_D)\randtest.exe @<< | ||
| 1826 | $(APP_EX_OBJ) $(OBJ_D)\randtest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1827 | << | ||
| 1828 | |||
| 1829 | $(TEST_D)\ssltest.exe: $(OBJ_D)\ssltest.obj $(LIBS_DEP) | ||
| 1830 | $(LINK) $(LFLAGS) /out:$(TEST_D)\ssltest.exe @<< | ||
| 1831 | $(APP_EX_OBJ) $(OBJ_D)\ssltest.obj $(L_LIBS) $(EX_LIBS) | ||
| 1832 | << | ||
| 1833 | |||
| 1834 | $(O_SSL): $(SSLOBJ) | ||
| 1835 | $(LINK) $(MLFLAGS) /out:$(O_SSL) /def:ms/SSLEAY32.def @<< | ||
| 1836 | $(SHLIB_EX_OBJ) $(SSLOBJ) $(L_CRYPTO) wsock32.lib gdi32.lib | ||
| 1837 | << | ||
| 1838 | |||
| 1839 | $(O_RSAGLUE): $(RSAGLUEOBJ) | ||
| 1840 | $(MKLIB) /out:$(O_RSAGLUE) @<< | ||
| 1841 | $(RSAGLUEOBJ) | ||
| 1842 | << | ||
| 1843 | |||
| 1844 | $(O_CRYPTO): $(CRYPTOOBJ) | ||
| 1845 | $(LINK) $(MLFLAGS) /out:$(O_CRYPTO) /def:ms/LIBEAY32.def @<< | ||
| 1846 | $(SHLIB_EX_OBJ) $(CRYPTOOBJ) wsock32.lib gdi32.lib | ||
| 1847 | << | ||
| 1848 | |||
| 1849 | $(BIN_D)\$(E_EXE).exe: $(E_OBJ) $(LIBS_DEP) | ||
| 1850 | $(LINK) $(LFLAGS) /out:$(BIN_D)\$(E_EXE).exe @<< | ||
| 1851 | $(APP_EX_OBJ) $(E_OBJ) $(L_LIBS) $(EX_LIBS) | ||
| 1852 | << | ||
| 1853 | |||
diff --git a/src/lib/libssl/src/ms/ssleay16.def b/src/lib/libssl/src/ms/ssleay16.def new file mode 100644 index 0000000000..2c61644308 --- /dev/null +++ b/src/lib/libssl/src/ms/ssleay16.def | |||
| @@ -0,0 +1,171 @@ | |||
| 1 | ; | ||
| 2 | ; Definition file for the DDL version of the SSLEAY16 library from SSLeay | ||
| 3 | ; | ||
| 4 | |||
| 5 | LIBRARY SSLEAY16 | ||
| 6 | |||
| 7 | DESCRIPTION 'SSLeay SSLEAY16 - eay@cryptsoft.com' | ||
| 8 | |||
| 9 | CODE PRELOAD MOVEABLE | ||
| 10 | DATA PRELOAD MOVEABLE SINGLE | ||
| 11 | |||
| 12 | EXETYPE WINDOWS | ||
| 13 | |||
| 14 | HEAPSIZE 4096 | ||
| 15 | STACKSIZE 8192 | ||
| 16 | |||
| 17 | EXPORTS | ||
| 18 | _SSLeay_add_ssl_algorithms @109 | ||
| 19 | _BIO_f_ssl @121 | ||
| 20 | _BIO_new_buffer_ssl_connect @173 | ||
| 21 | _BIO_new_ssl @122 | ||
| 22 | _BIO_new_ssl_connect @174 | ||
| 23 | _BIO_ssl_copy_session_id @124 | ||
| 24 | _BIO_ssl_shutdown @131 | ||
| 25 | _ERR_load_SSL_strings @1 | ||
| 26 | _SSL_CIPHER_description @2 | ||
| 27 | _SSL_CIPHER_get_bits @128 | ||
| 28 | _SSL_CIPHER_get_name @130 | ||
| 29 | _SSL_CIPHER_get_version @129 | ||
| 30 | _SSL_CTX_add_client_CA @3 | ||
| 31 | _SSL_CTX_add_session @4 | ||
| 32 | _SSL_CTX_check_private_key @5 | ||
| 33 | _SSL_CTX_ctrl @6 | ||
| 34 | _SSL_CTX_flush_sessions @7 | ||
| 35 | _SSL_CTX_free @8 | ||
| 36 | _SSL_CTX_get_client_CA_list @9 | ||
| 37 | _SSL_CTX_get_ex_data @138 | ||
| 38 | _SSL_CTX_get_ex_new_index @167 | ||
| 39 | _SSL_CTX_get_quiet_shutdown @140 | ||
| 40 | _SSL_CTX_get_verify_callback @10 | ||
| 41 | _SSL_CTX_get_verify_mode @11 | ||
| 42 | _SSL_CTX_load_verify_locations @141 | ||
| 43 | _SSL_CTX_new @12 | ||
| 44 | _SSL_CTX_remove_session @13 | ||
| 45 | _SSL_CTX_set_cert_verify_cb @14 | ||
| 46 | _SSL_CTX_set_cipher_list @15 | ||
| 47 | _SSL_CTX_set_client_CA_list @16 | ||
| 48 | _SSL_CTX_set_default_passwd_cb @17 | ||
| 49 | _SSL_CTX_set_default_verify_paths @142 | ||
| 50 | _SSL_CTX_set_ex_data @143 | ||
| 51 | _SSL_CTX_set_quiet_shutdown @145 | ||
| 52 | _SSL_CTX_set_ssl_version @19 | ||
| 53 | _SSL_CTX_set_verify @21 | ||
| 54 | _SSL_CTX_use_PrivateKey @22 | ||
| 55 | _SSL_CTX_use_PrivateKey_ASN1 @23 | ||
| 56 | _SSL_CTX_use_PrivateKey_file @24 | ||
| 57 | _SSL_CTX_use_RSAPrivateKey @25 | ||
| 58 | _SSL_CTX_use_RSAPrivateKey_ASN1 @26 | ||
| 59 | _SSL_CTX_use_RSAPrivateKey_file @27 | ||
| 60 | _SSL_CTX_use_certificate @28 | ||
| 61 | _SSL_CTX_use_certificate_ASN1 @29 | ||
| 62 | _SSL_CTX_use_certificate_file @30 | ||
| 63 | _SSL_SESSION_cmp @132 | ||
| 64 | _SSL_SESSION_free @31 | ||
| 65 | _SSL_SESSION_get_ex_data @146 | ||
| 66 | _SSL_SESSION_get_ex_new_index @168 | ||
| 67 | _SSL_SESSION_get_time @134 | ||
| 68 | _SSL_SESSION_get_timeout @136 | ||
| 69 | _SSL_SESSION_hash @133 | ||
| 70 | _SSL_SESSION_new @32 | ||
| 71 | _SSL_SESSION_print @33 | ||
| 72 | _SSL_SESSION_set_ex_data @148 | ||
| 73 | _SSL_SESSION_set_time @135 | ||
| 74 | _SSL_SESSION_set_timeout @137 | ||
| 75 | _SSL_accept @35 | ||
| 76 | _SSL_add_client_CA @36 | ||
| 77 | _SSL_alert_desc_string @37 | ||
| 78 | _SSL_alert_desc_string_long @38 | ||
| 79 | _SSL_alert_type_string @39 | ||
| 80 | _SSL_alert_type_string_long @40 | ||
| 81 | _SSL_check_private_key @41 | ||
| 82 | _SSL_clear @42 | ||
| 83 | _SSL_connect @43 | ||
| 84 | _SSL_copy_session_id @44 | ||
| 85 | _SSL_ctrl @45 | ||
| 86 | _SSL_do_handshake @125 | ||
| 87 | _SSL_dup @46 | ||
| 88 | _SSL_dup_CA_list @47 | ||
| 89 | _SSL_free @48 | ||
| 90 | _SSL_get_SSL_CTX @150 | ||
| 91 | _SSL_get_certificate @49 | ||
| 92 | _SSL_get_cipher_list @52 | ||
| 93 | _SSL_get_ciphers @55 | ||
| 94 | _SSL_get_client_CA_list @56 | ||
| 95 | _SSL_get_current_cipher @127 | ||
| 96 | _SSL_get_default_timeout @57 | ||
| 97 | _SSL_get_error @58 | ||
| 98 | _SSL_get_ex_data @151 | ||
| 99 | _SSL_get_ex_new_index @169 | ||
| 100 | _SSL_get_fd @59 | ||
| 101 | _SSL_get_info_callback @165 | ||
| 102 | _SSL_get_peer_cert_chain @60 | ||
| 103 | _SSL_get_peer_certificate @61 | ||
| 104 | _SSL_get_privatekey @126 | ||
| 105 | _SSL_get_quiet_shutdown @153 | ||
| 106 | _SSL_get_rbio @63 | ||
| 107 | _SSL_get_read_ahead @64 | ||
| 108 | _SSL_get_session @154 | ||
| 109 | _SSL_get_shared_ciphers @65 | ||
| 110 | _SSL_get_shutdown @155 | ||
| 111 | _SSL_get_ssl_method @66 | ||
| 112 | _SSL_get_verify_mode @70 | ||
| 113 | _SSL_get_verify_result @157 | ||
| 114 | _SSL_get_version @71 | ||
| 115 | _SSL_get_wbio @72 | ||
| 116 | _SSL_load_client_CA_file @73 | ||
| 117 | _SSL_load_error_strings @74 | ||
| 118 | _SSL_new @75 | ||
| 119 | _SSL_peek @76 | ||
| 120 | _SSL_pending @77 | ||
| 121 | _SSL_read @78 | ||
| 122 | _SSL_renegotiate @79 | ||
| 123 | _SSL_rstate_string @80 | ||
| 124 | _SSL_rstate_string_long @81 | ||
| 125 | _SSL_set_accept_state @82 | ||
| 126 | _SSL_set_bio @83 | ||
| 127 | _SSL_set_cipher_list @84 | ||
| 128 | _SSL_set_client_CA_list @85 | ||
| 129 | _SSL_set_connect_state @86 | ||
| 130 | _SSL_set_ex_data @158 | ||
| 131 | _SSL_set_fd @87 | ||
| 132 | _SSL_set_info_callback @160 | ||
| 133 | _SSL_set_quiet_shutdown @161 | ||
| 134 | _SSL_set_read_ahead @88 | ||
| 135 | _SSL_set_rfd @89 | ||
| 136 | _SSL_set_session @90 | ||
| 137 | _SSL_set_shutdown @162 | ||
| 138 | _SSL_set_ssl_method @91 | ||
| 139 | _SSL_set_verify @94 | ||
| 140 | _SSL_set_verify_result @163 | ||
| 141 | _SSL_set_wfd @95 | ||
| 142 | _SSL_shutdown @96 | ||
| 143 | _SSL_state @166 | ||
| 144 | _SSL_state_string @97 | ||
| 145 | _SSL_state_string_long @98 | ||
| 146 | _SSL_use_PrivateKey @99 | ||
| 147 | _SSL_use_PrivateKey_ASN1 @100 | ||
| 148 | _SSL_use_PrivateKey_file @101 | ||
| 149 | _SSL_use_RSAPrivateKey @102 | ||
| 150 | _SSL_use_RSAPrivateKey_ASN1 @103 | ||
| 151 | _SSL_use_RSAPrivateKey_file @104 | ||
| 152 | _SSL_use_certificate @105 | ||
| 153 | _SSL_use_certificate_ASN1 @106 | ||
| 154 | _SSL_use_certificate_file @107 | ||
| 155 | _SSL_version @164 | ||
| 156 | _SSL_write @108 | ||
| 157 | _SSLv23_client_method @110 | ||
| 158 | _SSLv23_method @111 | ||
| 159 | _SSLv23_server_method @112 | ||
| 160 | _SSLv2_client_method @113 | ||
| 161 | _SSLv2_method @114 | ||
| 162 | _SSLv2_server_method @115 | ||
| 163 | _SSLv3_client_method @116 | ||
| 164 | _SSLv3_method @117 | ||
| 165 | _SSLv3_server_method @118 | ||
| 166 | _TLSv1_client_method @172 | ||
| 167 | _TLSv1_method @170 | ||
| 168 | _TLSv1_server_method @171 | ||
| 169 | _d2i_SSL_SESSION @119 | ||
| 170 | _i2d_SSL_SESSION @120 | ||
| 171 | |||
diff --git a/src/lib/libssl/src/ms/ssleay32.def b/src/lib/libssl/src/ms/ssleay32.def new file mode 100644 index 0000000000..aa823b8069 --- /dev/null +++ b/src/lib/libssl/src/ms/ssleay32.def | |||
| @@ -0,0 +1,164 @@ | |||
| 1 | ; | ||
| 2 | ; Definition file for the DDL version of the SSLEAY32 library from SSLeay | ||
| 3 | ; | ||
| 4 | |||
| 5 | LIBRARY SSLEAY32 | ||
| 6 | |||
| 7 | DESCRIPTION 'SSLeay SSLEAY32 - eay@cryptsoft.com' | ||
| 8 | |||
| 9 | EXPORTS | ||
| 10 | SSLeay_add_ssl_algorithms @109 | ||
| 11 | BIO_f_ssl @121 | ||
| 12 | BIO_new_buffer_ssl_connect @173 | ||
| 13 | BIO_new_ssl @122 | ||
| 14 | BIO_new_ssl_connect @174 | ||
| 15 | BIO_ssl_copy_session_id @124 | ||
| 16 | BIO_ssl_shutdown @131 | ||
| 17 | ERR_load_SSL_strings @1 | ||
| 18 | SSL_CIPHER_description @2 | ||
| 19 | SSL_CIPHER_get_bits @128 | ||
| 20 | SSL_CIPHER_get_name @130 | ||
| 21 | SSL_CIPHER_get_version @129 | ||
| 22 | SSL_CTX_add_client_CA @3 | ||
| 23 | SSL_CTX_add_session @4 | ||
| 24 | SSL_CTX_check_private_key @5 | ||
| 25 | SSL_CTX_ctrl @6 | ||
| 26 | SSL_CTX_flush_sessions @7 | ||
| 27 | SSL_CTX_free @8 | ||
| 28 | SSL_CTX_get_client_CA_list @9 | ||
| 29 | SSL_CTX_get_ex_data @138 | ||
| 30 | SSL_CTX_get_ex_new_index @167 | ||
| 31 | SSL_CTX_get_quiet_shutdown @140 | ||
| 32 | SSL_CTX_get_verify_callback @10 | ||
| 33 | SSL_CTX_get_verify_mode @11 | ||
| 34 | SSL_CTX_load_verify_locations @141 | ||
| 35 | SSL_CTX_new @12 | ||
| 36 | SSL_CTX_remove_session @13 | ||
| 37 | SSL_CTX_set_cert_verify_cb @14 | ||
| 38 | SSL_CTX_set_cipher_list @15 | ||
| 39 | SSL_CTX_set_client_CA_list @16 | ||
| 40 | SSL_CTX_set_default_passwd_cb @17 | ||
| 41 | SSL_CTX_set_default_verify_paths @142 | ||
| 42 | SSL_CTX_set_ex_data @143 | ||
| 43 | SSL_CTX_set_quiet_shutdown @145 | ||
| 44 | SSL_CTX_set_ssl_version @19 | ||
| 45 | SSL_CTX_set_verify @21 | ||
| 46 | SSL_CTX_use_PrivateKey @22 | ||
| 47 | SSL_CTX_use_PrivateKey_ASN1 @23 | ||
| 48 | SSL_CTX_use_PrivateKey_file @24 | ||
| 49 | SSL_CTX_use_RSAPrivateKey @25 | ||
| 50 | SSL_CTX_use_RSAPrivateKey_ASN1 @26 | ||
| 51 | SSL_CTX_use_RSAPrivateKey_file @27 | ||
| 52 | SSL_CTX_use_certificate @28 | ||
| 53 | SSL_CTX_use_certificate_ASN1 @29 | ||
| 54 | SSL_CTX_use_certificate_file @30 | ||
| 55 | SSL_SESSION_cmp @132 | ||
| 56 | SSL_SESSION_free @31 | ||
| 57 | SSL_SESSION_get_ex_data @146 | ||
| 58 | SSL_SESSION_get_ex_new_index @168 | ||
| 59 | SSL_SESSION_get_time @134 | ||
| 60 | SSL_SESSION_get_timeout @136 | ||
| 61 | SSL_SESSION_hash @133 | ||
| 62 | SSL_SESSION_new @32 | ||
| 63 | SSL_SESSION_print @33 | ||
| 64 | SSL_SESSION_print_fp @34 | ||
| 65 | SSL_SESSION_set_ex_data @148 | ||
| 66 | SSL_SESSION_set_time @135 | ||
| 67 | SSL_SESSION_set_timeout @137 | ||
| 68 | SSL_accept @35 | ||
| 69 | SSL_add_client_CA @36 | ||
| 70 | SSL_alert_desc_string @37 | ||
| 71 | SSL_alert_desc_string_long @38 | ||
| 72 | SSL_alert_type_string @39 | ||
| 73 | SSL_alert_type_string_long @40 | ||
| 74 | SSL_check_private_key @41 | ||
| 75 | SSL_clear @42 | ||
| 76 | SSL_connect @43 | ||
| 77 | SSL_copy_session_id @44 | ||
| 78 | SSL_ctrl @45 | ||
| 79 | SSL_do_handshake @125 | ||
| 80 | SSL_dup @46 | ||
| 81 | SSL_dup_CA_list @47 | ||
| 82 | SSL_free @48 | ||
| 83 | SSL_get_SSL_CTX @150 | ||
| 84 | SSL_get_certificate @49 | ||
| 85 | SSL_get_cipher_list @52 | ||
| 86 | SSL_get_ciphers @55 | ||
| 87 | SSL_get_client_CA_list @56 | ||
| 88 | SSL_get_current_cipher @127 | ||
| 89 | SSL_get_default_timeout @57 | ||
| 90 | SSL_get_error @58 | ||
| 91 | SSL_get_ex_data @151 | ||
| 92 | SSL_get_ex_new_index @169 | ||
| 93 | SSL_get_fd @59 | ||
| 94 | SSL_get_info_callback @165 | ||
| 95 | SSL_get_peer_cert_chain @60 | ||
| 96 | SSL_get_peer_certificate @61 | ||
| 97 | SSL_get_privatekey @126 | ||
| 98 | SSL_get_quiet_shutdown @153 | ||
| 99 | SSL_get_rbio @63 | ||
| 100 | SSL_get_read_ahead @64 | ||
| 101 | SSL_get_session @154 | ||
| 102 | SSL_get_shared_ciphers @65 | ||
| 103 | SSL_get_shutdown @155 | ||
| 104 | SSL_get_ssl_method @66 | ||
| 105 | SSL_get_verify_mode @70 | ||
| 106 | SSL_get_verify_result @157 | ||
| 107 | SSL_get_version @71 | ||
| 108 | SSL_get_wbio @72 | ||
| 109 | SSL_load_client_CA_file @73 | ||
| 110 | SSL_load_error_strings @74 | ||
| 111 | SSL_new @75 | ||
| 112 | SSL_peek @76 | ||
| 113 | SSL_pending @77 | ||
| 114 | SSL_read @78 | ||
| 115 | SSL_renegotiate @79 | ||
| 116 | SSL_rstate_string @80 | ||
| 117 | SSL_rstate_string_long @81 | ||
| 118 | SSL_set_accept_state @82 | ||
| 119 | SSL_set_bio @83 | ||
| 120 | SSL_set_cipher_list @84 | ||
| 121 | SSL_set_client_CA_list @85 | ||
| 122 | SSL_set_connect_state @86 | ||
| 123 | SSL_set_ex_data @158 | ||
| 124 | SSL_set_fd @87 | ||
| 125 | SSL_set_info_callback @160 | ||
| 126 | SSL_set_quiet_shutdown @161 | ||
| 127 | SSL_set_read_ahead @88 | ||
| 128 | SSL_set_rfd @89 | ||
| 129 | SSL_set_session @90 | ||
| 130 | SSL_set_shutdown @162 | ||
| 131 | SSL_set_ssl_method @91 | ||
| 132 | SSL_set_verify @94 | ||
| 133 | SSL_set_verify_result @163 | ||
| 134 | SSL_set_wfd @95 | ||
| 135 | SSL_shutdown @96 | ||
| 136 | SSL_state @166 | ||
| 137 | SSL_state_string @97 | ||
| 138 | SSL_state_string_long @98 | ||
| 139 | SSL_use_PrivateKey @99 | ||
| 140 | SSL_use_PrivateKey_ASN1 @100 | ||
| 141 | SSL_use_PrivateKey_file @101 | ||
| 142 | SSL_use_RSAPrivateKey @102 | ||
| 143 | SSL_use_RSAPrivateKey_ASN1 @103 | ||
| 144 | SSL_use_RSAPrivateKey_file @104 | ||
| 145 | SSL_use_certificate @105 | ||
| 146 | SSL_use_certificate_ASN1 @106 | ||
| 147 | SSL_use_certificate_file @107 | ||
| 148 | SSL_version @164 | ||
| 149 | SSL_write @108 | ||
| 150 | SSLv23_client_method @110 | ||
| 151 | SSLv23_method @111 | ||
| 152 | SSLv23_server_method @112 | ||
| 153 | SSLv2_client_method @113 | ||
| 154 | SSLv2_method @114 | ||
| 155 | SSLv2_server_method @115 | ||
| 156 | SSLv3_client_method @116 | ||
| 157 | SSLv3_method @117 | ||
| 158 | SSLv3_server_method @118 | ||
| 159 | TLSv1_client_method @172 | ||
| 160 | TLSv1_method @170 | ||
| 161 | TLSv1_server_method @171 | ||
| 162 | d2i_SSL_SESSION @119 | ||
| 163 | i2d_SSL_SESSION @120 | ||
| 164 | |||
diff --git a/src/lib/libssl/src/ms/w31dll.mak b/src/lib/libssl/src/ms/w31dll.mak new file mode 100644 index 0000000000..6821d82604 --- /dev/null +++ b/src/lib/libssl/src/ms/w31dll.mak | |||
| @@ -0,0 +1,2295 @@ | |||
| 1 | # This makefile has been automatically generated from the SSLeay distribution. | ||
| 2 | # This single makefile will build the complete SSLeay distribution and | ||
| 3 | # by default leave the 'intertesting' output files in .\out and the stuff | ||
| 4 | # that needs deleting in .\tmp. | ||
| 5 | # The file was generated by running 'make makefile.one', which | ||
| 6 | # does a 'make files', which writes all the environment variables from all | ||
| 7 | # the makefiles to the file call MINFO. This file is used by | ||
| 8 | # util\mk1mf.pl to generate makefile.one. | ||
| 9 | # The 'makefile per directory' system suites me when developing this | ||
| 10 | # library and also so I can 'distribute' indervidual library sections. | ||
| 11 | # The one monster makefile better suits building in non-unix | ||
| 12 | # environments. | ||
| 13 | |||
| 14 | INSTALLTOP=\usr\local\ssl | ||
| 15 | |||
| 16 | # Set your compiler options | ||
| 17 | CC=cl | ||
| 18 | CFLAG=/ALw /Gx- /Gt256 /Gf /G2 /f- /Ocgnotb2 /W3 /WX -DL_ENDIAN /nologo -DWINDOWS -DWIN16 | ||
| 19 | APP_CFLAG=/Gw /FPi87 | ||
| 20 | LIB_CFLAG=/Gw -D_WINDLL -D_DLL | ||
| 21 | SHLIB_CFLAG= | ||
| 22 | APP_EX_OBJ=setargv.obj | ||
| 23 | SHLIB_EX_OBJ= | ||
| 24 | # add extra libraries to this define, for solaris -lsocket -lnsl would | ||
| 25 | # be added | ||
| 26 | EX_LIBS=oldnames llibcewq libw winsock | ||
| 27 | |||
| 28 | # The SSLeay directory | ||
| 29 | SRC_D=. | ||
| 30 | |||
| 31 | LINK=link | ||
| 32 | LFLAGS= /FARCALL /NOLOGO /NOD /SEG:1024 /ONERROR:NOEXE /NOE /PACKC:60000 /PACKD:60000 /STACK:20000 /ALIGN:256 | ||
| 33 | |||
| 34 | BN_MULW_OBJ=crypto\bn\asm\x86w32.obj | ||
| 35 | BN_MULW_SRC=crypto\bn\asm\x86w32.asm | ||
| 36 | DES_ENC_OBJ= | ||
| 37 | DES_ENC_SRC= | ||
| 38 | DES_CRYPT_OBJ= | ||
| 39 | DES_CRYPT_SRC= | ||
| 40 | BF_ENC_OBJ= | ||
| 41 | BF_ENC_SRC= | ||
| 42 | CAST_ENC_OBJ= | ||
| 43 | CAST_ENC_SRC= | ||
| 44 | RC4_ENC_OBJ= | ||
| 45 | RC4_ENC_SRC= | ||
| 46 | RC5_ENC_OBJ= | ||
| 47 | RC5_ENC_SRC= | ||
| 48 | MD5_ASM_OBJ= | ||
| 49 | MD5_ASM_SRC= | ||
| 50 | SHA1_ASM_OBJ= | ||
| 51 | SHA1_ASM_SRC= | ||
| 52 | RMD160_ASM_OBJ= | ||
| 53 | RMD160_ASM_SRC= | ||
| 54 | |||
| 55 | # The output directory for everything intersting | ||
| 56 | OUT_D=out16dll | ||
| 57 | # The output directory for all the temporary muck | ||
| 58 | TMP_D=tmp16dll | ||
| 59 | # The output directory for the header files | ||
| 60 | INC_D=inc16 | ||
| 61 | |||
| 62 | CP=copy | ||
| 63 | RM=del | ||
| 64 | RANLIB= | ||
| 65 | MKDIR=mkdir | ||
| 66 | MKLIB=lib /PAGESIZE:1024 | ||
| 67 | MLFLAGS= /FARCALL /NOLOGO /NOD /SEG:1024 /ONERROR:NOEXE /NOE /PACKC:60000 /PACKD:60000 | ||
| 68 | ASM=ml /Cp /c /Cx | ||
| 69 | |||
| 70 | ###################################################### | ||
| 71 | # You should not need to touch anything below this point | ||
| 72 | ###################################################### | ||
| 73 | |||
| 74 | E_EXE=ssleay | ||
| 75 | SSL=ssleay16 | ||
| 76 | CRYPTO=libeay16 | ||
| 77 | RSAGLUE=RSAglue | ||
| 78 | |||
| 79 | # BIN_D - Binary output directory | ||
| 80 | # TEST_D - Binary test file output directory | ||
| 81 | # LIB_D - library output directory | ||
| 82 | BIN_D=$(OUT_D) | ||
| 83 | TEST_D=$(OUT_D) | ||
| 84 | LIB_D=$(OUT_D) | ||
| 85 | |||
| 86 | # INCL_D - local library directory | ||
| 87 | # OBJ_D - temp object file directory | ||
| 88 | OBJ_D=$(TMP_D) | ||
| 89 | INCL_D=$(TMP_D) | ||
| 90 | |||
| 91 | O_SSL= $(LIB_D)\$(SSL).dll | ||
| 92 | O_CRYPTO= $(LIB_D)\$(CRYPTO).dll | ||
| 93 | O_RSAGLUE= $(LIB_D)\$(RSAGLUE).lib | ||
| 94 | SO_SSL= $(SSL) | ||
| 95 | SO_CRYPTO= $(CRYPTO) | ||
| 96 | L_SSL= $(LIB_D)\$(SSL).lib | ||
| 97 | L_CRYPTO= $(LIB_D)\$(CRYPTO).lib | ||
| 98 | |||
| 99 | L_LIBS= $(L_SSL) $(L_CRYPTO) | ||
| 100 | #L_LIBS= $(O_SSL) $(O_RSAGLUE) -lrsaref $(O_CRYPTO) | ||
| 101 | |||
| 102 | ###################################################### | ||
| 103 | # Don't touch anything below this point | ||
| 104 | ###################################################### | ||
| 105 | |||
| 106 | INC=-I$(INC_D) -I$(INCL_D) | ||
| 107 | APP_CFLAGS=$(INC) $(CFLAG) $(APP_CFLAG) | ||
| 108 | LIB_CFLAGS=$(INC) $(CFLAG) $(LIB_CFLAG) | ||
| 109 | SHLIB_CFLAGS=$(INC) $(CFLAG) $(LIB_CFLAG) $(SHLIB_CFLAG) | ||
| 110 | LIBS_DEP=$(O_CRYPTO) $(O_RSAGLUE) $(O_SSL) | ||
| 111 | |||
| 112 | ############################################# | ||
| 113 | HEADER=$(INCL_D)\cryptlib.h \ | ||
| 114 | $(INCL_D)\date.h $(INCL_D)\md5_locl.h $(INCL_D)\sha_locl.h \ | ||
| 115 | $(INCL_D)\rmd_locl.h $(INCL_D)\rmdconst.h $(INCL_D)\des_locl.h \ | ||
| 116 | $(INCL_D)\rpc_des.h $(INCL_D)\podd.h $(INCL_D)\sk.h \ | ||
| 117 | $(INCL_D)\spr.h $(INCL_D)\des_ver.h $(INCL_D)\rc2_locl.h \ | ||
| 118 | $(INCL_D)\rc4_locl.h $(INCL_D)\rc5_locl.h $(INCL_D)\idea_lcl.h \ | ||
| 119 | $(INCL_D)\bf_pi.h $(INCL_D)\bf_locl.h $(INCL_D)\cast_s.h \ | ||
| 120 | $(INCL_D)\cast_lcl.h $(INCL_D)\bn_lcl.h $(INCL_D)\bn_prime.h \ | ||
| 121 | $(INCL_D)\obj_dat.h $(INCL_D)\conf_lcl.h $(INCL_D)\ssl_locl.h \ | ||
| 122 | $(INCL_D)\rsaref.h $(INCL_D)\apps.h $(INCL_D)\progs.h \ | ||
| 123 | $(INCL_D)\s_apps.h $(INCL_D)\testdsa.h $(INCL_D)\testrsa.h | ||
| 124 | |||
| 125 | EXHEADER=$(INC_D)\e_os.h \ | ||
| 126 | $(INC_D)\crypto.h $(INC_D)\cryptall.h $(INC_D)\md2.h \ | ||
| 127 | $(INC_D)\md5.h $(INC_D)\sha.h $(INC_D)\mdc2.h \ | ||
| 128 | $(INC_D)\hmac.h $(INC_D)\ripemd.h $(INC_D)\des.h \ | ||
| 129 | $(INC_D)\rc2.h $(INC_D)\rc4.h $(INC_D)\rc5.h \ | ||
| 130 | $(INC_D)\idea.h $(INC_D)\blowfish.h $(INC_D)\cast.h \ | ||
| 131 | $(INC_D)\bn.h $(INC_D)\rsa.h $(INC_D)\dsa.h \ | ||
| 132 | $(INC_D)\dh.h $(INC_D)\buffer.h $(INC_D)\bio.h \ | ||
| 133 | $(INC_D)\bss_file.c $(INC_D)\stack.h $(INC_D)\lhash.h \ | ||
| 134 | $(INC_D)\rand.h $(INC_D)\err.h $(INC_D)\objects.h \ | ||
| 135 | $(INC_D)\evp.h $(INC_D)\pem.h $(INC_D)\asn1.h \ | ||
| 136 | $(INC_D)\asn1_mac.h $(INC_D)\x509.h $(INC_D)\x509_vfy.h \ | ||
| 137 | $(INC_D)\conf.h $(INC_D)\txt_db.h $(INC_D)\pkcs7.h \ | ||
| 138 | $(INC_D)\ssl.h $(INC_D)\ssl2.h $(INC_D)\ssl3.h \ | ||
| 139 | $(INC_D)\ssl23.h $(INC_D)\tls1.h | ||
| 140 | |||
| 141 | T_OBJ=$(OBJ_D)\md2test.obj \ | ||
| 142 | $(OBJ_D)\md5test.obj $(OBJ_D)\shatest.obj $(OBJ_D)\sha1test.obj \ | ||
| 143 | $(OBJ_D)\mdc2test.obj $(OBJ_D)\hmactest.obj $(OBJ_D)\rmdtest.obj \ | ||
| 144 | $(OBJ_D)\destest.obj $(OBJ_D)\rc2test.obj $(OBJ_D)\rc4test.obj \ | ||
| 145 | $(OBJ_D)\rc5test.obj $(OBJ_D)\ideatest.obj $(OBJ_D)\bftest.obj \ | ||
| 146 | $(OBJ_D)\casttest.obj $(OBJ_D)\bntest.obj $(OBJ_D)\exptest.obj \ | ||
| 147 | $(OBJ_D)\dsatest.obj $(OBJ_D)\dhtest.obj $(OBJ_D)\randtest.obj \ | ||
| 148 | $(OBJ_D)\ssltest.obj | ||
| 149 | |||
| 150 | E_OBJ=$(OBJ_D)\verify.obj \ | ||
| 151 | $(OBJ_D)\asn1pars.obj $(OBJ_D)\req.obj $(OBJ_D)\dgst.obj \ | ||
| 152 | $(OBJ_D)\dh.obj $(OBJ_D)\enc.obj $(OBJ_D)\gendh.obj \ | ||
| 153 | $(OBJ_D)\errstr.obj $(OBJ_D)\ca.obj $(OBJ_D)\pkcs7.obj \ | ||
| 154 | $(OBJ_D)\crl2p7.obj $(OBJ_D)\crl.obj $(OBJ_D)\rsa.obj \ | ||
| 155 | $(OBJ_D)\dsa.obj $(OBJ_D)\dsaparam.obj $(OBJ_D)\x509.obj \ | ||
| 156 | $(OBJ_D)\genrsa.obj $(OBJ_D)\s_server.obj $(OBJ_D)\s_client.obj \ | ||
| 157 | $(OBJ_D)\speed.obj $(OBJ_D)\s_time.obj $(OBJ_D)\apps.obj \ | ||
| 158 | $(OBJ_D)\s_cb.obj $(OBJ_D)\s_socket.obj $(OBJ_D)\version.obj \ | ||
| 159 | $(OBJ_D)\sess_id.obj $(OBJ_D)\ciphers.obj $(OBJ_D)\ssleay.obj | ||
| 160 | |||
| 161 | CRYPTOOBJ=$(OBJ_D)\cryptlib.obj \ | ||
| 162 | $(OBJ_D)\mem.obj $(OBJ_D)\cversion.obj $(OBJ_D)\ex_data.obj \ | ||
| 163 | $(OBJ_D)\cpt_err.obj $(OBJ_D)\md2_dgst.obj $(OBJ_D)\md2_one.obj \ | ||
| 164 | $(OBJ_D)\md5_dgst.obj $(OBJ_D)\md5_one.obj $(OBJ_D)\sha_dgst.obj \ | ||
| 165 | $(OBJ_D)\sha1dgst.obj $(OBJ_D)\sha_one.obj $(OBJ_D)\sha1_one.obj \ | ||
| 166 | $(OBJ_D)\mdc2dgst.obj $(OBJ_D)\mdc2_one.obj $(OBJ_D)\hmac.obj \ | ||
| 167 | $(OBJ_D)\rmd_dgst.obj $(OBJ_D)\rmd_one.obj $(OBJ_D)\set_key.obj \ | ||
| 168 | $(OBJ_D)\ecb_enc.obj $(OBJ_D)\cbc_enc.obj $(OBJ_D)\ecb3_enc.obj \ | ||
| 169 | $(OBJ_D)\cfb64enc.obj $(OBJ_D)\cfb64ede.obj $(OBJ_D)\cfb_enc.obj \ | ||
| 170 | $(OBJ_D)\ofb64ede.obj $(OBJ_D)\enc_read.obj $(OBJ_D)\enc_writ.obj \ | ||
| 171 | $(OBJ_D)\ofb64enc.obj $(OBJ_D)\ofb_enc.obj $(OBJ_D)\str2key.obj \ | ||
| 172 | $(OBJ_D)\pcbc_enc.obj $(OBJ_D)\qud_cksm.obj $(OBJ_D)\rand_key.obj \ | ||
| 173 | $(OBJ_D)\des_enc.obj $(OBJ_D)\fcrypt_b.obj $(OBJ_D)\read2pwd.obj \ | ||
| 174 | $(OBJ_D)\fcrypt.obj $(OBJ_D)\xcbc_enc.obj $(OBJ_D)\read_pwd.obj \ | ||
| 175 | $(OBJ_D)\rpc_enc.obj $(OBJ_D)\cbc_cksm.obj $(OBJ_D)\supp.obj \ | ||
| 176 | $(OBJ_D)\rc2_ecb.obj $(OBJ_D)\rc2_skey.obj $(OBJ_D)\rc2_cbc.obj \ | ||
| 177 | $(OBJ_D)\rc2cfb64.obj $(OBJ_D)\rc2ofb64.obj $(OBJ_D)\rc4_skey.obj \ | ||
| 178 | $(OBJ_D)\rc4_enc.obj $(OBJ_D)\rc5_skey.obj $(OBJ_D)\rc5_ecb.obj \ | ||
| 179 | $(OBJ_D)\rc5_enc.obj $(OBJ_D)\rc5cfb64.obj $(OBJ_D)\rc5ofb64.obj \ | ||
| 180 | $(OBJ_D)\i_cbc.obj $(OBJ_D)\i_cfb64.obj $(OBJ_D)\i_ofb64.obj \ | ||
| 181 | $(OBJ_D)\i_ecb.obj $(OBJ_D)\i_skey.obj $(OBJ_D)\bf_skey.obj \ | ||
| 182 | $(OBJ_D)\bf_ecb.obj $(OBJ_D)\bf_enc.obj $(OBJ_D)\bf_cfb64.obj \ | ||
| 183 | $(OBJ_D)\bf_ofb64.obj $(OBJ_D)\c_skey.obj $(OBJ_D)\c_ecb.obj \ | ||
| 184 | $(OBJ_D)\c_enc.obj $(OBJ_D)\c_cfb64.obj $(OBJ_D)\c_ofb64.obj \ | ||
| 185 | $(OBJ_D)\bn_add.obj $(OBJ_D)\bn_div.obj $(OBJ_D)\bn_exp.obj \ | ||
| 186 | $(OBJ_D)\bn_lib.obj $(OBJ_D)\bn_mod.obj $(OBJ_D)\bn_mul.obj \ | ||
| 187 | $(OBJ_D)\bn_print.obj $(OBJ_D)\bn_rand.obj $(OBJ_D)\bn_shift.obj \ | ||
| 188 | $(OBJ_D)\bn_sub.obj $(OBJ_D)\bn_word.obj $(OBJ_D)\bn_blind.obj \ | ||
| 189 | $(OBJ_D)\bn_gcd.obj $(OBJ_D)\bn_prime.obj $(OBJ_D)\bn_err.obj \ | ||
| 190 | $(OBJ_D)\bn_sqr.obj $(BN_MULW_OBJ) $(OBJ_D)\bn_recp.obj \ | ||
| 191 | $(OBJ_D)\bn_mont.obj $(OBJ_D)\bn_mpi.obj $(OBJ_D)\rsa_eay.obj \ | ||
| 192 | $(OBJ_D)\rsa_gen.obj $(OBJ_D)\rsa_lib.obj $(OBJ_D)\rsa_sign.obj \ | ||
| 193 | $(OBJ_D)\rsa_saos.obj $(OBJ_D)\rsa_err.obj $(OBJ_D)\rsa_pk1.obj \ | ||
| 194 | $(OBJ_D)\rsa_ssl.obj $(OBJ_D)\rsa_none.obj $(OBJ_D)\dsa_gen.obj \ | ||
| 195 | $(OBJ_D)\dsa_key.obj $(OBJ_D)\dsa_lib.obj $(OBJ_D)\dsa_vrf.obj \ | ||
| 196 | $(OBJ_D)\dsa_sign.obj $(OBJ_D)\dsa_err.obj $(OBJ_D)\dh_gen.obj \ | ||
| 197 | $(OBJ_D)\dh_key.obj $(OBJ_D)\dh_lib.obj $(OBJ_D)\dh_check.obj \ | ||
| 198 | $(OBJ_D)\dh_err.obj $(OBJ_D)\buffer.obj $(OBJ_D)\buf_err.obj \ | ||
| 199 | $(OBJ_D)\bio_lib.obj $(OBJ_D)\bio_cb.obj $(OBJ_D)\bio_err.obj \ | ||
| 200 | $(OBJ_D)\bss_mem.obj $(OBJ_D)\bss_null.obj $(OBJ_D)\bss_fd.obj \ | ||
| 201 | $(OBJ_D)\bss_file.obj $(OBJ_D)\bss_sock.obj $(OBJ_D)\bss_conn.obj \ | ||
| 202 | $(OBJ_D)\bf_null.obj $(OBJ_D)\bf_buff.obj $(OBJ_D)\b_print.obj \ | ||
| 203 | $(OBJ_D)\b_dump.obj $(OBJ_D)\b_sock.obj $(OBJ_D)\bss_acpt.obj \ | ||
| 204 | $(OBJ_D)\bf_nbio.obj $(OBJ_D)\stack.obj $(OBJ_D)\lhash.obj \ | ||
| 205 | $(OBJ_D)\lh_stats.obj $(OBJ_D)\md_rand.obj $(OBJ_D)\randfile.obj \ | ||
| 206 | $(OBJ_D)\err.obj $(OBJ_D)\err_all.obj $(OBJ_D)\err_prn.obj \ | ||
| 207 | $(OBJ_D)\obj_dat.obj $(OBJ_D)\obj_lib.obj $(OBJ_D)\obj_err.obj \ | ||
| 208 | $(OBJ_D)\encode.obj $(OBJ_D)\digest.obj $(OBJ_D)\evp_enc.obj \ | ||
| 209 | $(OBJ_D)\evp_key.obj $(OBJ_D)\e_ecb_d.obj $(OBJ_D)\e_cbc_d.obj \ | ||
| 210 | $(OBJ_D)\e_cfb_d.obj $(OBJ_D)\e_ofb_d.obj $(OBJ_D)\e_ecb_i.obj \ | ||
| 211 | $(OBJ_D)\e_cbc_i.obj $(OBJ_D)\e_cfb_i.obj $(OBJ_D)\e_ofb_i.obj \ | ||
| 212 | $(OBJ_D)\e_ecb_3d.obj $(OBJ_D)\e_cbc_3d.obj $(OBJ_D)\e_rc4.obj \ | ||
| 213 | $(OBJ_D)\names.obj $(OBJ_D)\e_cfb_3d.obj $(OBJ_D)\e_ofb_3d.obj \ | ||
| 214 | $(OBJ_D)\e_xcbc_d.obj $(OBJ_D)\e_ecb_r2.obj $(OBJ_D)\e_cbc_r2.obj \ | ||
| 215 | $(OBJ_D)\e_cfb_r2.obj $(OBJ_D)\e_ofb_r2.obj $(OBJ_D)\e_ecb_bf.obj \ | ||
| 216 | $(OBJ_D)\e_cbc_bf.obj $(OBJ_D)\e_cfb_bf.obj $(OBJ_D)\e_ofb_bf.obj \ | ||
| 217 | $(OBJ_D)\e_ecb_c.obj $(OBJ_D)\e_cbc_c.obj $(OBJ_D)\e_cfb_c.obj \ | ||
| 218 | $(OBJ_D)\e_ofb_c.obj $(OBJ_D)\e_ecb_r5.obj $(OBJ_D)\e_cbc_r5.obj \ | ||
| 219 | $(OBJ_D)\e_cfb_r5.obj $(OBJ_D)\e_ofb_r5.obj $(OBJ_D)\m_null.obj \ | ||
| 220 | $(OBJ_D)\m_md2.obj $(OBJ_D)\m_md5.obj $(OBJ_D)\m_sha.obj \ | ||
| 221 | $(OBJ_D)\m_sha1.obj $(OBJ_D)\m_dss.obj $(OBJ_D)\m_dss1.obj \ | ||
| 222 | $(OBJ_D)\m_mdc2.obj $(OBJ_D)\m_ripemd.obj $(OBJ_D)\p_open.obj \ | ||
| 223 | $(OBJ_D)\p_seal.obj $(OBJ_D)\p_sign.obj $(OBJ_D)\p_verify.obj \ | ||
| 224 | $(OBJ_D)\p_lib.obj $(OBJ_D)\p_enc.obj $(OBJ_D)\p_dec.obj \ | ||
| 225 | $(OBJ_D)\bio_md.obj $(OBJ_D)\bio_b64.obj $(OBJ_D)\bio_enc.obj \ | ||
| 226 | $(OBJ_D)\evp_err.obj $(OBJ_D)\e_null.obj $(OBJ_D)\c_all.obj \ | ||
| 227 | $(OBJ_D)\evp_lib.obj $(OBJ_D)\pem_sign.obj $(OBJ_D)\pem_seal.obj \ | ||
| 228 | $(OBJ_D)\pem_info.obj $(OBJ_D)\pem_lib.obj $(OBJ_D)\pem_all.obj \ | ||
| 229 | $(OBJ_D)\pem_err.obj $(OBJ_D)\a_object.obj $(OBJ_D)\a_bitstr.obj \ | ||
| 230 | $(OBJ_D)\a_utctm.obj $(OBJ_D)\a_int.obj $(OBJ_D)\a_octet.obj \ | ||
| 231 | $(OBJ_D)\a_print.obj $(OBJ_D)\a_type.obj $(OBJ_D)\a_set.obj \ | ||
| 232 | $(OBJ_D)\a_dup.obj $(OBJ_D)\a_d2i_fp.obj $(OBJ_D)\a_i2d_fp.obj \ | ||
| 233 | $(OBJ_D)\a_sign.obj $(OBJ_D)\a_digest.obj $(OBJ_D)\a_verify.obj \ | ||
| 234 | $(OBJ_D)\x_algor.obj $(OBJ_D)\x_val.obj $(OBJ_D)\x_pubkey.obj \ | ||
| 235 | $(OBJ_D)\x_sig.obj $(OBJ_D)\x_req.obj $(OBJ_D)\x_attrib.obj \ | ||
| 236 | $(OBJ_D)\x_name.obj $(OBJ_D)\x_cinf.obj $(OBJ_D)\x_x509.obj \ | ||
| 237 | $(OBJ_D)\x_crl.obj $(OBJ_D)\x_info.obj $(OBJ_D)\x_spki.obj \ | ||
| 238 | $(OBJ_D)\d2i_r_pr.obj $(OBJ_D)\i2d_r_pr.obj $(OBJ_D)\d2i_r_pu.obj \ | ||
| 239 | $(OBJ_D)\i2d_r_pu.obj $(OBJ_D)\d2i_s_pr.obj $(OBJ_D)\i2d_s_pr.obj \ | ||
| 240 | $(OBJ_D)\d2i_s_pu.obj $(OBJ_D)\i2d_s_pu.obj $(OBJ_D)\d2i_pu.obj \ | ||
| 241 | $(OBJ_D)\d2i_pr.obj $(OBJ_D)\i2d_pu.obj $(OBJ_D)\i2d_pr.obj \ | ||
| 242 | $(OBJ_D)\t_req.obj $(OBJ_D)\t_x509.obj $(OBJ_D)\t_pkey.obj \ | ||
| 243 | $(OBJ_D)\p7_i_s.obj $(OBJ_D)\p7_signi.obj $(OBJ_D)\p7_signd.obj \ | ||
| 244 | $(OBJ_D)\p7_recip.obj $(OBJ_D)\p7_enc_c.obj $(OBJ_D)\p7_evp.obj \ | ||
| 245 | $(OBJ_D)\p7_dgst.obj $(OBJ_D)\p7_s_e.obj $(OBJ_D)\p7_enc.obj \ | ||
| 246 | $(OBJ_D)\p7_lib.obj $(OBJ_D)\f_int.obj $(OBJ_D)\f_string.obj \ | ||
| 247 | $(OBJ_D)\i2d_dhp.obj $(OBJ_D)\i2d_dsap.obj $(OBJ_D)\d2i_dhp.obj \ | ||
| 248 | $(OBJ_D)\d2i_dsap.obj $(OBJ_D)\n_pkey.obj $(OBJ_D)\a_hdr.obj \ | ||
| 249 | $(OBJ_D)\x_pkey.obj $(OBJ_D)\a_bool.obj $(OBJ_D)\x_exten.obj \ | ||
| 250 | $(OBJ_D)\asn1_par.obj $(OBJ_D)\asn1_lib.obj $(OBJ_D)\asn1_err.obj \ | ||
| 251 | $(OBJ_D)\a_meth.obj $(OBJ_D)\a_bytes.obj $(OBJ_D)\evp_asn1.obj \ | ||
| 252 | $(OBJ_D)\x509_def.obj $(OBJ_D)\x509_d2.obj $(OBJ_D)\x509_r2x.obj \ | ||
| 253 | $(OBJ_D)\x509_cmp.obj $(OBJ_D)\x509_obj.obj $(OBJ_D)\x509_req.obj \ | ||
| 254 | $(OBJ_D)\x509_vfy.obj $(OBJ_D)\x509_set.obj $(OBJ_D)\x509rset.obj \ | ||
| 255 | $(OBJ_D)\x509_err.obj $(OBJ_D)\x509name.obj $(OBJ_D)\x509_v3.obj \ | ||
| 256 | $(OBJ_D)\x509_ext.obj $(OBJ_D)\x509pack.obj $(OBJ_D)\x509type.obj \ | ||
| 257 | $(OBJ_D)\x509_lu.obj $(OBJ_D)\x_all.obj $(OBJ_D)\x509_txt.obj \ | ||
| 258 | $(OBJ_D)\by_file.obj $(OBJ_D)\by_dir.obj $(OBJ_D)\v3_net.obj \ | ||
| 259 | $(OBJ_D)\v3_x509.obj $(OBJ_D)\conf.obj $(OBJ_D)\conf_err.obj \ | ||
| 260 | $(OBJ_D)\txt_db.obj $(OBJ_D)\pk7_lib.obj $(OBJ_D)\pkcs7err.obj \ | ||
| 261 | $(OBJ_D)\pk7_doit.obj | ||
| 262 | |||
| 263 | SSLOBJ=$(OBJ_D)\s2_meth.obj \ | ||
| 264 | $(OBJ_D)\s2_srvr.obj $(OBJ_D)\s2_clnt.obj $(OBJ_D)\s2_lib.obj \ | ||
| 265 | $(OBJ_D)\s2_enc.obj $(OBJ_D)\s2_pkt.obj $(OBJ_D)\s3_meth.obj \ | ||
| 266 | $(OBJ_D)\s3_srvr.obj $(OBJ_D)\s3_clnt.obj $(OBJ_D)\s3_lib.obj \ | ||
| 267 | $(OBJ_D)\s3_enc.obj $(OBJ_D)\s3_pkt.obj $(OBJ_D)\s3_both.obj \ | ||
| 268 | $(OBJ_D)\s23_meth.obj $(OBJ_D)\s23_srvr.obj $(OBJ_D)\s23_clnt.obj \ | ||
| 269 | $(OBJ_D)\s23_lib.obj $(OBJ_D)\s23_pkt.obj $(OBJ_D)\t1_meth.obj \ | ||
| 270 | $(OBJ_D)\t1_srvr.obj $(OBJ_D)\t1_clnt.obj $(OBJ_D)\t1_lib.obj \ | ||
| 271 | $(OBJ_D)\t1_enc.obj $(OBJ_D)\ssl_lib.obj $(OBJ_D)\ssl_err2.obj \ | ||
| 272 | $(OBJ_D)\ssl_cert.obj $(OBJ_D)\ssl_sess.obj $(OBJ_D)\ssl_ciph.obj \ | ||
| 273 | $(OBJ_D)\ssl_stat.obj $(OBJ_D)\ssl_rsa.obj $(OBJ_D)\ssl_asn1.obj \ | ||
| 274 | $(OBJ_D)\ssl_txt.obj $(OBJ_D)\ssl_algs.obj $(OBJ_D)\bio_ssl.obj \ | ||
| 275 | $(OBJ_D)\ssl_err.obj | ||
| 276 | |||
| 277 | RSAGLUEOBJ=$(OBJ_D)\rsaref.obj \ | ||
| 278 | $(OBJ_D)\rsar_err.obj | ||
| 279 | |||
| 280 | T_EXE=$(TEST_D)\md2test.exe \ | ||
| 281 | $(TEST_D)\md5test.exe $(TEST_D)\shatest.exe $(TEST_D)\sha1test.exe \ | ||
| 282 | $(TEST_D)\mdc2test.exe $(TEST_D)\hmactest.exe $(TEST_D)\rmdtest.exe \ | ||
| 283 | $(TEST_D)\destest.exe $(TEST_D)\rc2test.exe $(TEST_D)\rc4test.exe \ | ||
| 284 | $(TEST_D)\rc5test.exe $(TEST_D)\ideatest.exe $(TEST_D)\bftest.exe \ | ||
| 285 | $(TEST_D)\casttest.exe $(TEST_D)\bntest.exe $(TEST_D)\exptest.exe \ | ||
| 286 | $(TEST_D)\dsatest.exe $(TEST_D)\dhtest.exe $(TEST_D)\randtest.exe \ | ||
| 287 | $(TEST_D)\ssltest.exe | ||
| 288 | |||
| 289 | ################################################################### | ||
| 290 | all: banner $(TMP_D) $(BIN_D) $(TEST_D) $(LIB_D) $(INC_D) headers lib exe | ||
| 291 | |||
| 292 | banner: | ||
| 293 | @echo Make sure you have run 'perl Configure VC-WIN16' in the | ||
| 294 | @echo top level directory, if you don't have perl, you will | ||
| 295 | @echo need to probably edit crypto/bn/bn.h, check the | ||
| 296 | @echo documentation for details. | ||
| 297 | |||
| 298 | |||
| 299 | $(TMP_D): | ||
| 300 | $(MKDIR) $(TMP_D) | ||
| 301 | |||
| 302 | $(BIN_D): | ||
| 303 | $(MKDIR) $(BIN_D) | ||
| 304 | |||
| 305 | $(TEST_D): | ||
| 306 | $(MKDIR) $(TEST_D) | ||
| 307 | |||
| 308 | $(LIB_D): | ||
| 309 | $(MKDIR) $(LIB_D) | ||
| 310 | |||
| 311 | $(INC_D): | ||
| 312 | $(MKDIR) $(INC_D) | ||
| 313 | |||
| 314 | headers: $(HEADER) $(EXHEADER) | ||
| 315 | |||
| 316 | lib: $(LIBS_DEP) | ||
| 317 | |||
| 318 | exe: $(T_EXE) $(BIN_D)\$(E_EXE).exe | ||
| 319 | |||
| 320 | install: | ||
| 321 | $(MKDIR) $(INSTALLTOP) | ||
| 322 | $(MKDIR) $(INSTALLTOP)\bin | ||
| 323 | $(MKDIR) $(INSTALLTOP)\include | ||
| 324 | $(MKDIR) $(INSTALLTOP)\lib | ||
| 325 | $(CP) $(INC_D)\*.[ch] $(INSTALLTOP)\include | ||
| 326 | $(CP) $(BIN_D)\$(E_EXE).exe $(INSTALLTOP)\bin | ||
| 327 | $(CP) $(O_SSL) $(INSTALLTOP)\lib | ||
| 328 | $(CP) $(O_CRYPTO) $(INSTALLTOP)\lib | ||
| 329 | |||
| 330 | clean: | ||
| 331 | $(RM) $(TMP_D)\*.* | ||
| 332 | |||
| 333 | vclean: | ||
| 334 | $(RM) $(TMP_D)\*.* | ||
| 335 | $(RM) $(OUT_D)\*.* | ||
| 336 | |||
| 337 | $(INCL_D)\cryptlib.h: $(SRC_D)\crypto\cryptlib.h | ||
| 338 | $(CP) $(SRC_D)\crypto\cryptlib.h $(INCL_D)\cryptlib.h | ||
| 339 | |||
| 340 | $(INCL_D)\date.h: $(SRC_D)\crypto\date.h | ||
| 341 | $(CP) $(SRC_D)\crypto\date.h $(INCL_D)\date.h | ||
| 342 | |||
| 343 | $(INCL_D)\md5_locl.h: $(SRC_D)\crypto\md5\md5_locl.h | ||
| 344 | $(CP) $(SRC_D)\crypto\md5\md5_locl.h $(INCL_D)\md5_locl.h | ||
| 345 | |||
| 346 | $(INCL_D)\sha_locl.h: $(SRC_D)\crypto\sha\sha_locl.h | ||
| 347 | $(CP) $(SRC_D)\crypto\sha\sha_locl.h $(INCL_D)\sha_locl.h | ||
| 348 | |||
| 349 | $(INCL_D)\rmd_locl.h: $(SRC_D)\crypto\ripemd\rmd_locl.h | ||
| 350 | $(CP) $(SRC_D)\crypto\ripemd\rmd_locl.h $(INCL_D)\rmd_locl.h | ||
| 351 | |||
| 352 | $(INCL_D)\rmdconst.h: $(SRC_D)\crypto\ripemd\rmdconst.h | ||
| 353 | $(CP) $(SRC_D)\crypto\ripemd\rmdconst.h $(INCL_D)\rmdconst.h | ||
| 354 | |||
| 355 | $(INCL_D)\des_locl.h: $(SRC_D)\crypto\des\des_locl.h | ||
| 356 | $(CP) $(SRC_D)\crypto\des\des_locl.h $(INCL_D)\des_locl.h | ||
| 357 | |||
| 358 | $(INCL_D)\rpc_des.h: $(SRC_D)\crypto\des\rpc_des.h | ||
| 359 | $(CP) $(SRC_D)\crypto\des\rpc_des.h $(INCL_D)\rpc_des.h | ||
| 360 | |||
| 361 | $(INCL_D)\podd.h: $(SRC_D)\crypto\des\podd.h | ||
| 362 | $(CP) $(SRC_D)\crypto\des\podd.h $(INCL_D)\podd.h | ||
| 363 | |||
| 364 | $(INCL_D)\sk.h: $(SRC_D)\crypto\des\sk.h | ||
| 365 | $(CP) $(SRC_D)\crypto\des\sk.h $(INCL_D)\sk.h | ||
| 366 | |||
| 367 | $(INCL_D)\spr.h: $(SRC_D)\crypto\des\spr.h | ||
| 368 | $(CP) $(SRC_D)\crypto\des\spr.h $(INCL_D)\spr.h | ||
| 369 | |||
| 370 | $(INCL_D)\des_ver.h: $(SRC_D)\crypto\des\des_ver.h | ||
| 371 | $(CP) $(SRC_D)\crypto\des\des_ver.h $(INCL_D)\des_ver.h | ||
| 372 | |||
| 373 | $(INCL_D)\rc2_locl.h: $(SRC_D)\crypto\rc2\rc2_locl.h | ||
| 374 | $(CP) $(SRC_D)\crypto\rc2\rc2_locl.h $(INCL_D)\rc2_locl.h | ||
| 375 | |||
| 376 | $(INCL_D)\rc4_locl.h: $(SRC_D)\crypto\rc4\rc4_locl.h | ||
| 377 | $(CP) $(SRC_D)\crypto\rc4\rc4_locl.h $(INCL_D)\rc4_locl.h | ||
| 378 | |||
| 379 | $(INCL_D)\rc5_locl.h: $(SRC_D)\crypto\rc5\rc5_locl.h | ||
| 380 | $(CP) $(SRC_D)\crypto\rc5\rc5_locl.h $(INCL_D)\rc5_locl.h | ||
| 381 | |||
| 382 | $(INCL_D)\idea_lcl.h: $(SRC_D)\crypto\idea\idea_lcl.h | ||
| 383 | $(CP) $(SRC_D)\crypto\idea\idea_lcl.h $(INCL_D)\idea_lcl.h | ||
| 384 | |||
| 385 | $(INCL_D)\bf_pi.h: $(SRC_D)\crypto\bf\bf_pi.h | ||
| 386 | $(CP) $(SRC_D)\crypto\bf\bf_pi.h $(INCL_D)\bf_pi.h | ||
| 387 | |||
| 388 | $(INCL_D)\bf_locl.h: $(SRC_D)\crypto\bf\bf_locl.h | ||
| 389 | $(CP) $(SRC_D)\crypto\bf\bf_locl.h $(INCL_D)\bf_locl.h | ||
| 390 | |||
| 391 | $(INCL_D)\cast_s.h: $(SRC_D)\crypto\cast\cast_s.h | ||
| 392 | $(CP) $(SRC_D)\crypto\cast\cast_s.h $(INCL_D)\cast_s.h | ||
| 393 | |||
| 394 | $(INCL_D)\cast_lcl.h: $(SRC_D)\crypto\cast\cast_lcl.h | ||
| 395 | $(CP) $(SRC_D)\crypto\cast\cast_lcl.h $(INCL_D)\cast_lcl.h | ||
| 396 | |||
| 397 | $(INCL_D)\bn_lcl.h: $(SRC_D)\crypto\bn\bn_lcl.h | ||
| 398 | $(CP) $(SRC_D)\crypto\bn\bn_lcl.h $(INCL_D)\bn_lcl.h | ||
| 399 | |||
| 400 | $(INCL_D)\bn_prime.h: $(SRC_D)\crypto\bn\bn_prime.h | ||
| 401 | $(CP) $(SRC_D)\crypto\bn\bn_prime.h $(INCL_D)\bn_prime.h | ||
| 402 | |||
| 403 | $(INCL_D)\obj_dat.h: $(SRC_D)\crypto\objects\obj_dat.h | ||
| 404 | $(CP) $(SRC_D)\crypto\objects\obj_dat.h $(INCL_D)\obj_dat.h | ||
| 405 | |||
| 406 | $(INCL_D)\conf_lcl.h: $(SRC_D)\crypto\conf\conf_lcl.h | ||
| 407 | $(CP) $(SRC_D)\crypto\conf\conf_lcl.h $(INCL_D)\conf_lcl.h | ||
| 408 | |||
| 409 | $(INCL_D)\ssl_locl.h: $(SRC_D)\ssl\ssl_locl.h | ||
| 410 | $(CP) $(SRC_D)\ssl\ssl_locl.h $(INCL_D)\ssl_locl.h | ||
| 411 | |||
| 412 | $(INCL_D)\rsaref.h: $(SRC_D)\rsaref\rsaref.h | ||
| 413 | $(CP) $(SRC_D)\rsaref\rsaref.h $(INCL_D)\rsaref.h | ||
| 414 | |||
| 415 | $(INCL_D)\apps.h: $(SRC_D)\apps\apps.h | ||
| 416 | $(CP) $(SRC_D)\apps\apps.h $(INCL_D)\apps.h | ||
| 417 | |||
| 418 | $(INCL_D)\progs.h: $(SRC_D)\apps\progs.h | ||
| 419 | $(CP) $(SRC_D)\apps\progs.h $(INCL_D)\progs.h | ||
| 420 | |||
| 421 | $(INCL_D)\s_apps.h: $(SRC_D)\apps\s_apps.h | ||
| 422 | $(CP) $(SRC_D)\apps\s_apps.h $(INCL_D)\s_apps.h | ||
| 423 | |||
| 424 | $(INCL_D)\testdsa.h: $(SRC_D)\apps\testdsa.h | ||
| 425 | $(CP) $(SRC_D)\apps\testdsa.h $(INCL_D)\testdsa.h | ||
| 426 | |||
| 427 | $(INCL_D)\testrsa.h: $(SRC_D)\apps\testrsa.h | ||
| 428 | $(CP) $(SRC_D)\apps\testrsa.h $(INCL_D)\testrsa.h | ||
| 429 | |||
| 430 | $(INC_D)\e_os.h: $(SRC_D)\.\e_os.h | ||
| 431 | $(CP) $(SRC_D)\.\e_os.h $(INC_D)\e_os.h | ||
| 432 | |||
| 433 | $(INC_D)\crypto.h: $(SRC_D)\crypto\crypto.h | ||
| 434 | $(CP) $(SRC_D)\crypto\crypto.h $(INC_D)\crypto.h | ||
| 435 | |||
| 436 | $(INC_D)\cryptall.h: $(SRC_D)\crypto\cryptall.h | ||
| 437 | $(CP) $(SRC_D)\crypto\cryptall.h $(INC_D)\cryptall.h | ||
| 438 | |||
| 439 | $(INC_D)\md2.h: $(SRC_D)\crypto\md2\md2.h | ||
| 440 | $(CP) $(SRC_D)\crypto\md2\md2.h $(INC_D)\md2.h | ||
| 441 | |||
| 442 | $(INC_D)\md5.h: $(SRC_D)\crypto\md5\md5.h | ||
| 443 | $(CP) $(SRC_D)\crypto\md5\md5.h $(INC_D)\md5.h | ||
| 444 | |||
| 445 | $(INC_D)\sha.h: $(SRC_D)\crypto\sha\sha.h | ||
| 446 | $(CP) $(SRC_D)\crypto\sha\sha.h $(INC_D)\sha.h | ||
| 447 | |||
| 448 | $(INC_D)\mdc2.h: $(SRC_D)\crypto\mdc2\mdc2.h | ||
| 449 | $(CP) $(SRC_D)\crypto\mdc2\mdc2.h $(INC_D)\mdc2.h | ||
| 450 | |||
| 451 | $(INC_D)\hmac.h: $(SRC_D)\crypto\hmac\hmac.h | ||
| 452 | $(CP) $(SRC_D)\crypto\hmac\hmac.h $(INC_D)\hmac.h | ||
| 453 | |||
| 454 | $(INC_D)\ripemd.h: $(SRC_D)\crypto\ripemd\ripemd.h | ||
| 455 | $(CP) $(SRC_D)\crypto\ripemd\ripemd.h $(INC_D)\ripemd.h | ||
| 456 | |||
| 457 | $(INC_D)\des.h: $(SRC_D)\crypto\des\des.h | ||
| 458 | $(CP) $(SRC_D)\crypto\des\des.h $(INC_D)\des.h | ||
| 459 | |||
| 460 | $(INC_D)\rc2.h: $(SRC_D)\crypto\rc2\rc2.h | ||
| 461 | $(CP) $(SRC_D)\crypto\rc2\rc2.h $(INC_D)\rc2.h | ||
| 462 | |||
| 463 | $(INC_D)\rc4.h: $(SRC_D)\crypto\rc4\rc4.h | ||
| 464 | $(CP) $(SRC_D)\crypto\rc4\rc4.h $(INC_D)\rc4.h | ||
| 465 | |||
| 466 | $(INC_D)\rc5.h: $(SRC_D)\crypto\rc5\rc5.h | ||
| 467 | $(CP) $(SRC_D)\crypto\rc5\rc5.h $(INC_D)\rc5.h | ||
| 468 | |||
| 469 | $(INC_D)\idea.h: $(SRC_D)\crypto\idea\idea.h | ||
| 470 | $(CP) $(SRC_D)\crypto\idea\idea.h $(INC_D)\idea.h | ||
| 471 | |||
| 472 | $(INC_D)\blowfish.h: $(SRC_D)\crypto\bf\blowfish.h | ||
| 473 | $(CP) $(SRC_D)\crypto\bf\blowfish.h $(INC_D)\blowfish.h | ||
| 474 | |||
| 475 | $(INC_D)\cast.h: $(SRC_D)\crypto\cast\cast.h | ||
| 476 | $(CP) $(SRC_D)\crypto\cast\cast.h $(INC_D)\cast.h | ||
| 477 | |||
| 478 | $(INC_D)\bn.h: $(SRC_D)\crypto\bn\bn.h | ||
| 479 | $(CP) $(SRC_D)\crypto\bn\bn.h $(INC_D)\bn.h | ||
| 480 | |||
| 481 | $(INC_D)\rsa.h: $(SRC_D)\crypto\rsa\rsa.h | ||
| 482 | $(CP) $(SRC_D)\crypto\rsa\rsa.h $(INC_D)\rsa.h | ||
| 483 | |||
| 484 | $(INC_D)\dsa.h: $(SRC_D)\crypto\dsa\dsa.h | ||
| 485 | $(CP) $(SRC_D)\crypto\dsa\dsa.h $(INC_D)\dsa.h | ||
| 486 | |||
| 487 | $(INC_D)\dh.h: $(SRC_D)\crypto\dh\dh.h | ||
| 488 | $(CP) $(SRC_D)\crypto\dh\dh.h $(INC_D)\dh.h | ||
| 489 | |||
| 490 | $(INC_D)\buffer.h: $(SRC_D)\crypto\buffer\buffer.h | ||
| 491 | $(CP) $(SRC_D)\crypto\buffer\buffer.h $(INC_D)\buffer.h | ||
| 492 | |||
| 493 | $(INC_D)\bio.h: $(SRC_D)\crypto\bio\bio.h | ||
| 494 | $(CP) $(SRC_D)\crypto\bio\bio.h $(INC_D)\bio.h | ||
| 495 | |||
| 496 | $(INC_D)\bss_file.c: $(SRC_D)\crypto\bio\bss_file.c | ||
| 497 | $(CP) $(SRC_D)\crypto\bio\bss_file.c $(INC_D)\bss_file.c | ||
| 498 | |||
| 499 | $(INC_D)\stack.h: $(SRC_D)\crypto\stack\stack.h | ||
| 500 | $(CP) $(SRC_D)\crypto\stack\stack.h $(INC_D)\stack.h | ||
| 501 | |||
| 502 | $(INC_D)\lhash.h: $(SRC_D)\crypto\lhash\lhash.h | ||
| 503 | $(CP) $(SRC_D)\crypto\lhash\lhash.h $(INC_D)\lhash.h | ||
| 504 | |||
| 505 | $(INC_D)\rand.h: $(SRC_D)\crypto\rand\rand.h | ||
| 506 | $(CP) $(SRC_D)\crypto\rand\rand.h $(INC_D)\rand.h | ||
| 507 | |||
| 508 | $(INC_D)\err.h: $(SRC_D)\crypto\err\err.h | ||
| 509 | $(CP) $(SRC_D)\crypto\err\err.h $(INC_D)\err.h | ||
| 510 | |||
| 511 | $(INC_D)\objects.h: $(SRC_D)\crypto\objects\objects.h | ||
| 512 | $(CP) $(SRC_D)\crypto\objects\objects.h $(INC_D)\objects.h | ||
| 513 | |||
| 514 | $(INC_D)\evp.h: $(SRC_D)\crypto\evp\evp.h | ||
| 515 | $(CP) $(SRC_D)\crypto\evp\evp.h $(INC_D)\evp.h | ||
| 516 | |||
| 517 | $(INC_D)\pem.h: $(SRC_D)\crypto\pem\pem.h | ||
| 518 | $(CP) $(SRC_D)\crypto\pem\pem.h $(INC_D)\pem.h | ||
| 519 | |||
| 520 | $(INC_D)\asn1.h: $(SRC_D)\crypto\asn1\asn1.h | ||
| 521 | $(CP) $(SRC_D)\crypto\asn1\asn1.h $(INC_D)\asn1.h | ||
| 522 | |||
| 523 | $(INC_D)\asn1_mac.h: $(SRC_D)\crypto\asn1\asn1_mac.h | ||
| 524 | $(CP) $(SRC_D)\crypto\asn1\asn1_mac.h $(INC_D)\asn1_mac.h | ||
| 525 | |||
| 526 | $(INC_D)\x509.h: $(SRC_D)\crypto\x509\x509.h | ||
| 527 | $(CP) $(SRC_D)\crypto\x509\x509.h $(INC_D)\x509.h | ||
| 528 | |||
| 529 | $(INC_D)\x509_vfy.h: $(SRC_D)\crypto\x509\x509_vfy.h | ||
| 530 | $(CP) $(SRC_D)\crypto\x509\x509_vfy.h $(INC_D)\x509_vfy.h | ||
| 531 | |||
| 532 | $(INC_D)\conf.h: $(SRC_D)\crypto\conf\conf.h | ||
| 533 | $(CP) $(SRC_D)\crypto\conf\conf.h $(INC_D)\conf.h | ||
| 534 | |||
| 535 | $(INC_D)\txt_db.h: $(SRC_D)\crypto\txt_db\txt_db.h | ||
| 536 | $(CP) $(SRC_D)\crypto\txt_db\txt_db.h $(INC_D)\txt_db.h | ||
| 537 | |||
| 538 | $(INC_D)\pkcs7.h: $(SRC_D)\crypto\pkcs7\pkcs7.h | ||
| 539 | $(CP) $(SRC_D)\crypto\pkcs7\pkcs7.h $(INC_D)\pkcs7.h | ||
| 540 | |||
| 541 | $(INC_D)\ssl.h: $(SRC_D)\ssl\ssl.h | ||
| 542 | $(CP) $(SRC_D)\ssl\ssl.h $(INC_D)\ssl.h | ||
| 543 | |||
| 544 | $(INC_D)\ssl2.h: $(SRC_D)\ssl\ssl2.h | ||
| 545 | $(CP) $(SRC_D)\ssl\ssl2.h $(INC_D)\ssl2.h | ||
| 546 | |||
| 547 | $(INC_D)\ssl3.h: $(SRC_D)\ssl\ssl3.h | ||
| 548 | $(CP) $(SRC_D)\ssl\ssl3.h $(INC_D)\ssl3.h | ||
| 549 | |||
| 550 | $(INC_D)\ssl23.h: $(SRC_D)\ssl\ssl23.h | ||
| 551 | $(CP) $(SRC_D)\ssl\ssl23.h $(INC_D)\ssl23.h | ||
| 552 | |||
| 553 | $(INC_D)\tls1.h: $(SRC_D)\ssl\tls1.h | ||
| 554 | $(CP) $(SRC_D)\ssl\tls1.h $(INC_D)\tls1.h | ||
| 555 | |||
| 556 | $(OBJ_D)\md2test.obj: $(SRC_D)\crypto\md2\md2test.c | ||
| 557 | $(CC) /Fo$(OBJ_D)\md2test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\md2\md2test.c | ||
| 558 | |||
| 559 | $(OBJ_D)\md5test.obj: $(SRC_D)\crypto\md5\md5test.c | ||
| 560 | $(CC) /Fo$(OBJ_D)\md5test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\md5\md5test.c | ||
| 561 | |||
| 562 | $(OBJ_D)\shatest.obj: $(SRC_D)\crypto\sha\shatest.c | ||
| 563 | $(CC) /Fo$(OBJ_D)\shatest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\sha\shatest.c | ||
| 564 | |||
| 565 | $(OBJ_D)\sha1test.obj: $(SRC_D)\crypto\sha\sha1test.c | ||
| 566 | $(CC) /Fo$(OBJ_D)\sha1test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\sha\sha1test.c | ||
| 567 | |||
| 568 | $(OBJ_D)\mdc2test.obj: $(SRC_D)\crypto\mdc2\mdc2test.c | ||
| 569 | $(CC) /Fo$(OBJ_D)\mdc2test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\mdc2\mdc2test.c | ||
| 570 | |||
| 571 | $(OBJ_D)\hmactest.obj: $(SRC_D)\crypto\hmac\hmactest.c | ||
| 572 | $(CC) /Fo$(OBJ_D)\hmactest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\hmac\hmactest.c | ||
| 573 | |||
| 574 | $(OBJ_D)\rmdtest.obj: $(SRC_D)\crypto\ripemd\rmdtest.c | ||
| 575 | $(CC) /Fo$(OBJ_D)\rmdtest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\ripemd\rmdtest.c | ||
| 576 | |||
| 577 | $(OBJ_D)\destest.obj: $(SRC_D)\crypto\des\destest.c | ||
| 578 | $(CC) /Fo$(OBJ_D)\destest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\des\destest.c | ||
| 579 | |||
| 580 | $(OBJ_D)\rc2test.obj: $(SRC_D)\crypto\rc2\rc2test.c | ||
| 581 | $(CC) /Fo$(OBJ_D)\rc2test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2test.c | ||
| 582 | |||
| 583 | $(OBJ_D)\rc4test.obj: $(SRC_D)\crypto\rc4\rc4test.c | ||
| 584 | $(CC) /Fo$(OBJ_D)\rc4test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\rc4\rc4test.c | ||
| 585 | |||
| 586 | $(OBJ_D)\rc5test.obj: $(SRC_D)\crypto\rc5\rc5test.c | ||
| 587 | $(CC) /Fo$(OBJ_D)\rc5test.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5test.c | ||
| 588 | |||
| 589 | $(OBJ_D)\ideatest.obj: $(SRC_D)\crypto\idea\ideatest.c | ||
| 590 | $(CC) /Fo$(OBJ_D)\ideatest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\idea\ideatest.c | ||
| 591 | |||
| 592 | $(OBJ_D)\bftest.obj: $(SRC_D)\crypto\bf\bftest.c | ||
| 593 | $(CC) /Fo$(OBJ_D)\bftest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\bf\bftest.c | ||
| 594 | |||
| 595 | $(OBJ_D)\casttest.obj: $(SRC_D)\crypto\cast\casttest.c | ||
| 596 | $(CC) /Fo$(OBJ_D)\casttest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\cast\casttest.c | ||
| 597 | |||
| 598 | $(OBJ_D)\bntest.obj: $(SRC_D)\crypto\bn\bntest.c | ||
| 599 | $(CC) /Fo$(OBJ_D)\bntest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\bn\bntest.c | ||
| 600 | |||
| 601 | $(OBJ_D)\exptest.obj: $(SRC_D)\crypto\bn\exptest.c | ||
| 602 | $(CC) /Fo$(OBJ_D)\exptest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\bn\exptest.c | ||
| 603 | |||
| 604 | $(OBJ_D)\dsatest.obj: $(SRC_D)\crypto\dsa\dsatest.c | ||
| 605 | $(CC) /Fo$(OBJ_D)\dsatest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\dsa\dsatest.c | ||
| 606 | |||
| 607 | $(OBJ_D)\dhtest.obj: $(SRC_D)\crypto\dh\dhtest.c | ||
| 608 | $(CC) /Fo$(OBJ_D)\dhtest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\dh\dhtest.c | ||
| 609 | |||
| 610 | $(OBJ_D)\randtest.obj: $(SRC_D)\crypto\rand\randtest.c | ||
| 611 | $(CC) /Fo$(OBJ_D)\randtest.obj $(APP_CFLAGS) -c $(SRC_D)\crypto\rand\randtest.c | ||
| 612 | |||
| 613 | $(OBJ_D)\ssltest.obj: $(SRC_D)\ssl\ssltest.c | ||
| 614 | $(CC) /Fo$(OBJ_D)\ssltest.obj $(APP_CFLAGS) -c $(SRC_D)\ssl\ssltest.c | ||
| 615 | |||
| 616 | $(OBJ_D)\verify.obj: $(SRC_D)\apps\verify.c | ||
| 617 | $(CC) /Fo$(OBJ_D)\verify.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\verify.c | ||
| 618 | |||
| 619 | $(OBJ_D)\asn1pars.obj: $(SRC_D)\apps\asn1pars.c | ||
| 620 | $(CC) /Fo$(OBJ_D)\asn1pars.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\asn1pars.c | ||
| 621 | |||
| 622 | $(OBJ_D)\req.obj: $(SRC_D)\apps\req.c | ||
| 623 | $(CC) /Fo$(OBJ_D)\req.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\req.c | ||
| 624 | |||
| 625 | $(OBJ_D)\dgst.obj: $(SRC_D)\apps\dgst.c | ||
| 626 | $(CC) /Fo$(OBJ_D)\dgst.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\dgst.c | ||
| 627 | |||
| 628 | $(OBJ_D)\dh.obj: $(SRC_D)\apps\dh.c | ||
| 629 | $(CC) /Fo$(OBJ_D)\dh.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\dh.c | ||
| 630 | |||
| 631 | $(OBJ_D)\enc.obj: $(SRC_D)\apps\enc.c | ||
| 632 | $(CC) /Fo$(OBJ_D)\enc.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\enc.c | ||
| 633 | |||
| 634 | $(OBJ_D)\gendh.obj: $(SRC_D)\apps\gendh.c | ||
| 635 | $(CC) /Fo$(OBJ_D)\gendh.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\gendh.c | ||
| 636 | |||
| 637 | $(OBJ_D)\errstr.obj: $(SRC_D)\apps\errstr.c | ||
| 638 | $(CC) /Fo$(OBJ_D)\errstr.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\errstr.c | ||
| 639 | |||
| 640 | $(OBJ_D)\ca.obj: $(SRC_D)\apps\ca.c | ||
| 641 | $(CC) /Fo$(OBJ_D)\ca.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\ca.c | ||
| 642 | |||
| 643 | $(OBJ_D)\pkcs7.obj: $(SRC_D)\apps\pkcs7.c | ||
| 644 | $(CC) /Fo$(OBJ_D)\pkcs7.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\pkcs7.c | ||
| 645 | |||
| 646 | $(OBJ_D)\crl2p7.obj: $(SRC_D)\apps\crl2p7.c | ||
| 647 | $(CC) /Fo$(OBJ_D)\crl2p7.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\crl2p7.c | ||
| 648 | |||
| 649 | $(OBJ_D)\crl.obj: $(SRC_D)\apps\crl.c | ||
| 650 | $(CC) /Fo$(OBJ_D)\crl.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\crl.c | ||
| 651 | |||
| 652 | $(OBJ_D)\rsa.obj: $(SRC_D)\apps\rsa.c | ||
| 653 | $(CC) /Fo$(OBJ_D)\rsa.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\rsa.c | ||
| 654 | |||
| 655 | $(OBJ_D)\dsa.obj: $(SRC_D)\apps\dsa.c | ||
| 656 | $(CC) /Fo$(OBJ_D)\dsa.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\dsa.c | ||
| 657 | |||
| 658 | $(OBJ_D)\dsaparam.obj: $(SRC_D)\apps\dsaparam.c | ||
| 659 | $(CC) /Fo$(OBJ_D)\dsaparam.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\dsaparam.c | ||
| 660 | |||
| 661 | $(OBJ_D)\x509.obj: $(SRC_D)\apps\x509.c | ||
| 662 | $(CC) /Fo$(OBJ_D)\x509.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\x509.c | ||
| 663 | |||
| 664 | $(OBJ_D)\genrsa.obj: $(SRC_D)\apps\genrsa.c | ||
| 665 | $(CC) /Fo$(OBJ_D)\genrsa.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\genrsa.c | ||
| 666 | |||
| 667 | $(OBJ_D)\s_server.obj: $(SRC_D)\apps\s_server.c | ||
| 668 | $(CC) /Fo$(OBJ_D)\s_server.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_server.c | ||
| 669 | |||
| 670 | $(OBJ_D)\s_client.obj: $(SRC_D)\apps\s_client.c | ||
| 671 | $(CC) /Fo$(OBJ_D)\s_client.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_client.c | ||
| 672 | |||
| 673 | $(OBJ_D)\speed.obj: $(SRC_D)\apps\speed.c | ||
| 674 | $(CC) /Fo$(OBJ_D)\speed.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\speed.c | ||
| 675 | |||
| 676 | $(OBJ_D)\s_time.obj: $(SRC_D)\apps\s_time.c | ||
| 677 | $(CC) /Fo$(OBJ_D)\s_time.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_time.c | ||
| 678 | |||
| 679 | $(OBJ_D)\apps.obj: $(SRC_D)\apps\apps.c | ||
| 680 | $(CC) /Fo$(OBJ_D)\apps.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\apps.c | ||
| 681 | |||
| 682 | $(OBJ_D)\s_cb.obj: $(SRC_D)\apps\s_cb.c | ||
| 683 | $(CC) /Fo$(OBJ_D)\s_cb.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_cb.c | ||
| 684 | |||
| 685 | $(OBJ_D)\s_socket.obj: $(SRC_D)\apps\s_socket.c | ||
| 686 | $(CC) /Fo$(OBJ_D)\s_socket.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\s_socket.c | ||
| 687 | |||
| 688 | $(OBJ_D)\version.obj: $(SRC_D)\apps\version.c | ||
| 689 | $(CC) /Fo$(OBJ_D)\version.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\version.c | ||
| 690 | |||
| 691 | $(OBJ_D)\sess_id.obj: $(SRC_D)\apps\sess_id.c | ||
| 692 | $(CC) /Fo$(OBJ_D)\sess_id.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\sess_id.c | ||
| 693 | |||
| 694 | $(OBJ_D)\ciphers.obj: $(SRC_D)\apps\ciphers.c | ||
| 695 | $(CC) /Fo$(OBJ_D)\ciphers.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\ciphers.c | ||
| 696 | |||
| 697 | $(OBJ_D)\ssleay.obj: $(SRC_D)\apps\ssleay.c | ||
| 698 | $(CC) /Fo$(OBJ_D)\ssleay.obj -DMONOLITH $(APP_CFLAGS) -c $(SRC_D)\apps\ssleay.c | ||
| 699 | |||
| 700 | crypto\bn\asm\x86w32.obj: crypto\bn\asm\x86w32.asm | ||
| 701 | $(ASM) /Focrypto\bn\asm\x86w32.obj $(SRC_D)\crypto\bn\asm\x86w32.asm | ||
| 702 | |||
| 703 | $(OBJ_D)\cryptlib.obj: $(SRC_D)\crypto\cryptlib.c | ||
| 704 | $(CC) /Fo$(OBJ_D)\cryptlib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cryptlib.c | ||
| 705 | |||
| 706 | $(OBJ_D)\mem.obj: $(SRC_D)\crypto\mem.c | ||
| 707 | $(CC) /Fo$(OBJ_D)\mem.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\mem.c | ||
| 708 | |||
| 709 | $(OBJ_D)\cversion.obj: $(SRC_D)\crypto\cversion.c | ||
| 710 | $(CC) /Fo$(OBJ_D)\cversion.obj $(SHLIB_CFLAGS) -DCFLAGS="\"$(CC) $(CFLAG)\"" -c $(SRC_D)\crypto\cversion.c | ||
| 711 | |||
| 712 | $(OBJ_D)\ex_data.obj: $(SRC_D)\crypto\ex_data.c | ||
| 713 | $(CC) /Fo$(OBJ_D)\ex_data.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\ex_data.c | ||
| 714 | |||
| 715 | $(OBJ_D)\cpt_err.obj: $(SRC_D)\crypto\cpt_err.c | ||
| 716 | $(CC) /Fo$(OBJ_D)\cpt_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cpt_err.c | ||
| 717 | |||
| 718 | $(OBJ_D)\md2_dgst.obj: $(SRC_D)\crypto\md2\md2_dgst.c | ||
| 719 | $(CC) /Fo$(OBJ_D)\md2_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\md2\md2_dgst.c | ||
| 720 | |||
| 721 | $(OBJ_D)\md2_one.obj: $(SRC_D)\crypto\md2\md2_one.c | ||
| 722 | $(CC) /Fo$(OBJ_D)\md2_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\md2\md2_one.c | ||
| 723 | |||
| 724 | $(OBJ_D)\md5_dgst.obj: $(SRC_D)\crypto\md5\md5_dgst.c | ||
| 725 | $(CC) /Fo$(OBJ_D)\md5_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\md5\md5_dgst.c | ||
| 726 | |||
| 727 | $(OBJ_D)\md5_one.obj: $(SRC_D)\crypto\md5\md5_one.c | ||
| 728 | $(CC) /Fo$(OBJ_D)\md5_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\md5\md5_one.c | ||
| 729 | |||
| 730 | $(OBJ_D)\sha_dgst.obj: $(SRC_D)\crypto\sha\sha_dgst.c | ||
| 731 | $(CC) /Fo$(OBJ_D)\sha_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\sha\sha_dgst.c | ||
| 732 | |||
| 733 | $(OBJ_D)\sha1dgst.obj: $(SRC_D)\crypto\sha\sha1dgst.c | ||
| 734 | $(CC) /Fo$(OBJ_D)\sha1dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\sha\sha1dgst.c | ||
| 735 | |||
| 736 | $(OBJ_D)\sha_one.obj: $(SRC_D)\crypto\sha\sha_one.c | ||
| 737 | $(CC) /Fo$(OBJ_D)\sha_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\sha\sha_one.c | ||
| 738 | |||
| 739 | $(OBJ_D)\sha1_one.obj: $(SRC_D)\crypto\sha\sha1_one.c | ||
| 740 | $(CC) /Fo$(OBJ_D)\sha1_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\sha\sha1_one.c | ||
| 741 | |||
| 742 | $(OBJ_D)\mdc2dgst.obj: $(SRC_D)\crypto\mdc2\mdc2dgst.c | ||
| 743 | $(CC) /Fo$(OBJ_D)\mdc2dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\mdc2\mdc2dgst.c | ||
| 744 | |||
| 745 | $(OBJ_D)\mdc2_one.obj: $(SRC_D)\crypto\mdc2\mdc2_one.c | ||
| 746 | $(CC) /Fo$(OBJ_D)\mdc2_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\mdc2\mdc2_one.c | ||
| 747 | |||
| 748 | $(OBJ_D)\hmac.obj: $(SRC_D)\crypto\hmac\hmac.c | ||
| 749 | $(CC) /Fo$(OBJ_D)\hmac.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\hmac\hmac.c | ||
| 750 | |||
| 751 | $(OBJ_D)\rmd_dgst.obj: $(SRC_D)\crypto\ripemd\rmd_dgst.c | ||
| 752 | $(CC) /Fo$(OBJ_D)\rmd_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\ripemd\rmd_dgst.c | ||
| 753 | |||
| 754 | $(OBJ_D)\rmd_one.obj: $(SRC_D)\crypto\ripemd\rmd_one.c | ||
| 755 | $(CC) /Fo$(OBJ_D)\rmd_one.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\ripemd\rmd_one.c | ||
| 756 | |||
| 757 | $(OBJ_D)\set_key.obj: $(SRC_D)\crypto\des\set_key.c | ||
| 758 | $(CC) /Fo$(OBJ_D)\set_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\set_key.c | ||
| 759 | |||
| 760 | $(OBJ_D)\ecb_enc.obj: $(SRC_D)\crypto\des\ecb_enc.c | ||
| 761 | $(CC) /Fo$(OBJ_D)\ecb_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ecb_enc.c | ||
| 762 | |||
| 763 | $(OBJ_D)\cbc_enc.obj: $(SRC_D)\crypto\des\cbc_enc.c | ||
| 764 | $(CC) /Fo$(OBJ_D)\cbc_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cbc_enc.c | ||
| 765 | |||
| 766 | $(OBJ_D)\ecb3_enc.obj: $(SRC_D)\crypto\des\ecb3_enc.c | ||
| 767 | $(CC) /Fo$(OBJ_D)\ecb3_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ecb3_enc.c | ||
| 768 | |||
| 769 | $(OBJ_D)\cfb64enc.obj: $(SRC_D)\crypto\des\cfb64enc.c | ||
| 770 | $(CC) /Fo$(OBJ_D)\cfb64enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cfb64enc.c | ||
| 771 | |||
| 772 | $(OBJ_D)\cfb64ede.obj: $(SRC_D)\crypto\des\cfb64ede.c | ||
| 773 | $(CC) /Fo$(OBJ_D)\cfb64ede.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cfb64ede.c | ||
| 774 | |||
| 775 | $(OBJ_D)\cfb_enc.obj: $(SRC_D)\crypto\des\cfb_enc.c | ||
| 776 | $(CC) /Fo$(OBJ_D)\cfb_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cfb_enc.c | ||
| 777 | |||
| 778 | $(OBJ_D)\ofb64ede.obj: $(SRC_D)\crypto\des\ofb64ede.c | ||
| 779 | $(CC) /Fo$(OBJ_D)\ofb64ede.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ofb64ede.c | ||
| 780 | |||
| 781 | $(OBJ_D)\enc_read.obj: $(SRC_D)\crypto\des\enc_read.c | ||
| 782 | $(CC) /Fo$(OBJ_D)\enc_read.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\enc_read.c | ||
| 783 | |||
| 784 | $(OBJ_D)\enc_writ.obj: $(SRC_D)\crypto\des\enc_writ.c | ||
| 785 | $(CC) /Fo$(OBJ_D)\enc_writ.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\enc_writ.c | ||
| 786 | |||
| 787 | $(OBJ_D)\ofb64enc.obj: $(SRC_D)\crypto\des\ofb64enc.c | ||
| 788 | $(CC) /Fo$(OBJ_D)\ofb64enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ofb64enc.c | ||
| 789 | |||
| 790 | $(OBJ_D)\ofb_enc.obj: $(SRC_D)\crypto\des\ofb_enc.c | ||
| 791 | $(CC) /Fo$(OBJ_D)\ofb_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\ofb_enc.c | ||
| 792 | |||
| 793 | $(OBJ_D)\str2key.obj: $(SRC_D)\crypto\des\str2key.c | ||
| 794 | $(CC) /Fo$(OBJ_D)\str2key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\str2key.c | ||
| 795 | |||
| 796 | $(OBJ_D)\pcbc_enc.obj: $(SRC_D)\crypto\des\pcbc_enc.c | ||
| 797 | $(CC) /Fo$(OBJ_D)\pcbc_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\pcbc_enc.c | ||
| 798 | |||
| 799 | $(OBJ_D)\qud_cksm.obj: $(SRC_D)\crypto\des\qud_cksm.c | ||
| 800 | $(CC) /Fo$(OBJ_D)\qud_cksm.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\qud_cksm.c | ||
| 801 | |||
| 802 | $(OBJ_D)\rand_key.obj: $(SRC_D)\crypto\des\rand_key.c | ||
| 803 | $(CC) /Fo$(OBJ_D)\rand_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\rand_key.c | ||
| 804 | |||
| 805 | $(OBJ_D)\des_enc.obj: $(SRC_D)\crypto\des\des_enc.c | ||
| 806 | $(CC) /Fo$(OBJ_D)\des_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\des_enc.c | ||
| 807 | |||
| 808 | $(OBJ_D)\fcrypt_b.obj: $(SRC_D)\crypto\des\fcrypt_b.c | ||
| 809 | $(CC) /Fo$(OBJ_D)\fcrypt_b.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\fcrypt_b.c | ||
| 810 | |||
| 811 | $(OBJ_D)\read2pwd.obj: $(SRC_D)\crypto\des\read2pwd.c | ||
| 812 | $(CC) /Fo$(OBJ_D)\read2pwd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\read2pwd.c | ||
| 813 | |||
| 814 | $(OBJ_D)\fcrypt.obj: $(SRC_D)\crypto\des\fcrypt.c | ||
| 815 | $(CC) /Fo$(OBJ_D)\fcrypt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\fcrypt.c | ||
| 816 | |||
| 817 | $(OBJ_D)\xcbc_enc.obj: $(SRC_D)\crypto\des\xcbc_enc.c | ||
| 818 | $(CC) /Fo$(OBJ_D)\xcbc_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\xcbc_enc.c | ||
| 819 | |||
| 820 | $(OBJ_D)\read_pwd.obj: $(SRC_D)\crypto\des\read_pwd.c | ||
| 821 | $(CC) /Fo$(OBJ_D)\read_pwd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\read_pwd.c | ||
| 822 | |||
| 823 | $(OBJ_D)\rpc_enc.obj: $(SRC_D)\crypto\des\rpc_enc.c | ||
| 824 | $(CC) /Fo$(OBJ_D)\rpc_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\rpc_enc.c | ||
| 825 | |||
| 826 | $(OBJ_D)\cbc_cksm.obj: $(SRC_D)\crypto\des\cbc_cksm.c | ||
| 827 | $(CC) /Fo$(OBJ_D)\cbc_cksm.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\cbc_cksm.c | ||
| 828 | |||
| 829 | $(OBJ_D)\supp.obj: $(SRC_D)\crypto\des\supp.c | ||
| 830 | $(CC) /Fo$(OBJ_D)\supp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\des\supp.c | ||
| 831 | |||
| 832 | $(OBJ_D)\rc2_ecb.obj: $(SRC_D)\crypto\rc2\rc2_ecb.c | ||
| 833 | $(CC) /Fo$(OBJ_D)\rc2_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2_ecb.c | ||
| 834 | |||
| 835 | $(OBJ_D)\rc2_skey.obj: $(SRC_D)\crypto\rc2\rc2_skey.c | ||
| 836 | $(CC) /Fo$(OBJ_D)\rc2_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2_skey.c | ||
| 837 | |||
| 838 | $(OBJ_D)\rc2_cbc.obj: $(SRC_D)\crypto\rc2\rc2_cbc.c | ||
| 839 | $(CC) /Fo$(OBJ_D)\rc2_cbc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2_cbc.c | ||
| 840 | |||
| 841 | $(OBJ_D)\rc2cfb64.obj: $(SRC_D)\crypto\rc2\rc2cfb64.c | ||
| 842 | $(CC) /Fo$(OBJ_D)\rc2cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2cfb64.c | ||
| 843 | |||
| 844 | $(OBJ_D)\rc2ofb64.obj: $(SRC_D)\crypto\rc2\rc2ofb64.c | ||
| 845 | $(CC) /Fo$(OBJ_D)\rc2ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc2\rc2ofb64.c | ||
| 846 | |||
| 847 | $(OBJ_D)\rc4_skey.obj: $(SRC_D)\crypto\rc4\rc4_skey.c | ||
| 848 | $(CC) /Fo$(OBJ_D)\rc4_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc4\rc4_skey.c | ||
| 849 | |||
| 850 | $(OBJ_D)\rc4_enc.obj: $(SRC_D)\crypto\rc4\rc4_enc.c | ||
| 851 | $(CC) /Fo$(OBJ_D)\rc4_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc4\rc4_enc.c | ||
| 852 | |||
| 853 | $(OBJ_D)\rc5_skey.obj: $(SRC_D)\crypto\rc5\rc5_skey.c | ||
| 854 | $(CC) /Fo$(OBJ_D)\rc5_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5_skey.c | ||
| 855 | |||
| 856 | $(OBJ_D)\rc5_ecb.obj: $(SRC_D)\crypto\rc5\rc5_ecb.c | ||
| 857 | $(CC) /Fo$(OBJ_D)\rc5_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5_ecb.c | ||
| 858 | |||
| 859 | $(OBJ_D)\rc5_enc.obj: $(SRC_D)\crypto\rc5\rc5_enc.c | ||
| 860 | $(CC) /Fo$(OBJ_D)\rc5_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5_enc.c | ||
| 861 | |||
| 862 | $(OBJ_D)\rc5cfb64.obj: $(SRC_D)\crypto\rc5\rc5cfb64.c | ||
| 863 | $(CC) /Fo$(OBJ_D)\rc5cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5cfb64.c | ||
| 864 | |||
| 865 | $(OBJ_D)\rc5ofb64.obj: $(SRC_D)\crypto\rc5\rc5ofb64.c | ||
| 866 | $(CC) /Fo$(OBJ_D)\rc5ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rc5\rc5ofb64.c | ||
| 867 | |||
| 868 | $(OBJ_D)\i_cbc.obj: $(SRC_D)\crypto\idea\i_cbc.c | ||
| 869 | $(CC) /Fo$(OBJ_D)\i_cbc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_cbc.c | ||
| 870 | |||
| 871 | $(OBJ_D)\i_cfb64.obj: $(SRC_D)\crypto\idea\i_cfb64.c | ||
| 872 | $(CC) /Fo$(OBJ_D)\i_cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_cfb64.c | ||
| 873 | |||
| 874 | $(OBJ_D)\i_ofb64.obj: $(SRC_D)\crypto\idea\i_ofb64.c | ||
| 875 | $(CC) /Fo$(OBJ_D)\i_ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_ofb64.c | ||
| 876 | |||
| 877 | $(OBJ_D)\i_ecb.obj: $(SRC_D)\crypto\idea\i_ecb.c | ||
| 878 | $(CC) /Fo$(OBJ_D)\i_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_ecb.c | ||
| 879 | |||
| 880 | $(OBJ_D)\i_skey.obj: $(SRC_D)\crypto\idea\i_skey.c | ||
| 881 | $(CC) /Fo$(OBJ_D)\i_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\idea\i_skey.c | ||
| 882 | |||
| 883 | $(OBJ_D)\bf_skey.obj: $(SRC_D)\crypto\bf\bf_skey.c | ||
| 884 | $(CC) /Fo$(OBJ_D)\bf_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_skey.c | ||
| 885 | |||
| 886 | $(OBJ_D)\bf_ecb.obj: $(SRC_D)\crypto\bf\bf_ecb.c | ||
| 887 | $(CC) /Fo$(OBJ_D)\bf_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_ecb.c | ||
| 888 | |||
| 889 | $(OBJ_D)\bf_enc.obj: $(SRC_D)\crypto\bf\bf_enc.c | ||
| 890 | $(CC) /Fo$(OBJ_D)\bf_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_enc.c | ||
| 891 | |||
| 892 | $(OBJ_D)\bf_cfb64.obj: $(SRC_D)\crypto\bf\bf_cfb64.c | ||
| 893 | $(CC) /Fo$(OBJ_D)\bf_cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_cfb64.c | ||
| 894 | |||
| 895 | $(OBJ_D)\bf_ofb64.obj: $(SRC_D)\crypto\bf\bf_ofb64.c | ||
| 896 | $(CC) /Fo$(OBJ_D)\bf_ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bf\bf_ofb64.c | ||
| 897 | |||
| 898 | $(OBJ_D)\c_skey.obj: $(SRC_D)\crypto\cast\c_skey.c | ||
| 899 | $(CC) /Fo$(OBJ_D)\c_skey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_skey.c | ||
| 900 | |||
| 901 | $(OBJ_D)\c_ecb.obj: $(SRC_D)\crypto\cast\c_ecb.c | ||
| 902 | $(CC) /Fo$(OBJ_D)\c_ecb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_ecb.c | ||
| 903 | |||
| 904 | $(OBJ_D)\c_enc.obj: $(SRC_D)\crypto\cast\c_enc.c | ||
| 905 | $(CC) /Fo$(OBJ_D)\c_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_enc.c | ||
| 906 | |||
| 907 | $(OBJ_D)\c_cfb64.obj: $(SRC_D)\crypto\cast\c_cfb64.c | ||
| 908 | $(CC) /Fo$(OBJ_D)\c_cfb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_cfb64.c | ||
| 909 | |||
| 910 | $(OBJ_D)\c_ofb64.obj: $(SRC_D)\crypto\cast\c_ofb64.c | ||
| 911 | $(CC) /Fo$(OBJ_D)\c_ofb64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\cast\c_ofb64.c | ||
| 912 | |||
| 913 | $(OBJ_D)\bn_add.obj: $(SRC_D)\crypto\bn\bn_add.c | ||
| 914 | $(CC) /Fo$(OBJ_D)\bn_add.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_add.c | ||
| 915 | |||
| 916 | $(OBJ_D)\bn_div.obj: $(SRC_D)\crypto\bn\bn_div.c | ||
| 917 | $(CC) /Fo$(OBJ_D)\bn_div.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_div.c | ||
| 918 | |||
| 919 | $(OBJ_D)\bn_exp.obj: $(SRC_D)\crypto\bn\bn_exp.c | ||
| 920 | $(CC) /Fo$(OBJ_D)\bn_exp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_exp.c | ||
| 921 | |||
| 922 | $(OBJ_D)\bn_lib.obj: $(SRC_D)\crypto\bn\bn_lib.c | ||
| 923 | $(CC) /Fo$(OBJ_D)\bn_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_lib.c | ||
| 924 | |||
| 925 | $(OBJ_D)\bn_mod.obj: $(SRC_D)\crypto\bn\bn_mod.c | ||
| 926 | $(CC) /Fo$(OBJ_D)\bn_mod.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mod.c | ||
| 927 | |||
| 928 | $(OBJ_D)\bn_mul.obj: $(SRC_D)\crypto\bn\bn_mul.c | ||
| 929 | $(CC) /Fo$(OBJ_D)\bn_mul.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mul.c | ||
| 930 | |||
| 931 | $(OBJ_D)\bn_print.obj: $(SRC_D)\crypto\bn\bn_print.c | ||
| 932 | $(CC) /Fo$(OBJ_D)\bn_print.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_print.c | ||
| 933 | |||
| 934 | $(OBJ_D)\bn_rand.obj: $(SRC_D)\crypto\bn\bn_rand.c | ||
| 935 | $(CC) /Fo$(OBJ_D)\bn_rand.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_rand.c | ||
| 936 | |||
| 937 | $(OBJ_D)\bn_shift.obj: $(SRC_D)\crypto\bn\bn_shift.c | ||
| 938 | $(CC) /Fo$(OBJ_D)\bn_shift.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_shift.c | ||
| 939 | |||
| 940 | $(OBJ_D)\bn_sub.obj: $(SRC_D)\crypto\bn\bn_sub.c | ||
| 941 | $(CC) /Fo$(OBJ_D)\bn_sub.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_sub.c | ||
| 942 | |||
| 943 | $(OBJ_D)\bn_word.obj: $(SRC_D)\crypto\bn\bn_word.c | ||
| 944 | $(CC) /Fo$(OBJ_D)\bn_word.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_word.c | ||
| 945 | |||
| 946 | $(OBJ_D)\bn_blind.obj: $(SRC_D)\crypto\bn\bn_blind.c | ||
| 947 | $(CC) /Fo$(OBJ_D)\bn_blind.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_blind.c | ||
| 948 | |||
| 949 | $(OBJ_D)\bn_gcd.obj: $(SRC_D)\crypto\bn\bn_gcd.c | ||
| 950 | $(CC) /Fo$(OBJ_D)\bn_gcd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_gcd.c | ||
| 951 | |||
| 952 | $(OBJ_D)\bn_prime.obj: $(SRC_D)\crypto\bn\bn_prime.c | ||
| 953 | $(CC) /Fo$(OBJ_D)\bn_prime.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_prime.c | ||
| 954 | |||
| 955 | $(OBJ_D)\bn_err.obj: $(SRC_D)\crypto\bn\bn_err.c | ||
| 956 | $(CC) /Fo$(OBJ_D)\bn_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_err.c | ||
| 957 | |||
| 958 | $(OBJ_D)\bn_sqr.obj: $(SRC_D)\crypto\bn\bn_sqr.c | ||
| 959 | $(CC) /Fo$(OBJ_D)\bn_sqr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_sqr.c | ||
| 960 | |||
| 961 | $(OBJ_D)\bn_mulw.obj: $(SRC_D)\crypto\bn\bn_mulw.c | ||
| 962 | $(CC) /Fo$(OBJ_D)\bn_mulw.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mulw.c | ||
| 963 | |||
| 964 | $(OBJ_D)\bn_recp.obj: $(SRC_D)\crypto\bn\bn_recp.c | ||
| 965 | $(CC) /Fo$(OBJ_D)\bn_recp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_recp.c | ||
| 966 | |||
| 967 | $(OBJ_D)\bn_mont.obj: $(SRC_D)\crypto\bn\bn_mont.c | ||
| 968 | $(CC) /Fo$(OBJ_D)\bn_mont.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mont.c | ||
| 969 | |||
| 970 | $(OBJ_D)\bn_mpi.obj: $(SRC_D)\crypto\bn\bn_mpi.c | ||
| 971 | $(CC) /Fo$(OBJ_D)\bn_mpi.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bn\bn_mpi.c | ||
| 972 | |||
| 973 | $(OBJ_D)\rsa_eay.obj: $(SRC_D)\crypto\rsa\rsa_eay.c | ||
| 974 | $(CC) /Fo$(OBJ_D)\rsa_eay.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_eay.c | ||
| 975 | |||
| 976 | $(OBJ_D)\rsa_gen.obj: $(SRC_D)\crypto\rsa\rsa_gen.c | ||
| 977 | $(CC) /Fo$(OBJ_D)\rsa_gen.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_gen.c | ||
| 978 | |||
| 979 | $(OBJ_D)\rsa_lib.obj: $(SRC_D)\crypto\rsa\rsa_lib.c | ||
| 980 | $(CC) /Fo$(OBJ_D)\rsa_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_lib.c | ||
| 981 | |||
| 982 | $(OBJ_D)\rsa_sign.obj: $(SRC_D)\crypto\rsa\rsa_sign.c | ||
| 983 | $(CC) /Fo$(OBJ_D)\rsa_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_sign.c | ||
| 984 | |||
| 985 | $(OBJ_D)\rsa_saos.obj: $(SRC_D)\crypto\rsa\rsa_saos.c | ||
| 986 | $(CC) /Fo$(OBJ_D)\rsa_saos.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_saos.c | ||
| 987 | |||
| 988 | $(OBJ_D)\rsa_err.obj: $(SRC_D)\crypto\rsa\rsa_err.c | ||
| 989 | $(CC) /Fo$(OBJ_D)\rsa_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_err.c | ||
| 990 | |||
| 991 | $(OBJ_D)\rsa_pk1.obj: $(SRC_D)\crypto\rsa\rsa_pk1.c | ||
| 992 | $(CC) /Fo$(OBJ_D)\rsa_pk1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_pk1.c | ||
| 993 | |||
| 994 | $(OBJ_D)\rsa_ssl.obj: $(SRC_D)\crypto\rsa\rsa_ssl.c | ||
| 995 | $(CC) /Fo$(OBJ_D)\rsa_ssl.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_ssl.c | ||
| 996 | |||
| 997 | $(OBJ_D)\rsa_none.obj: $(SRC_D)\crypto\rsa\rsa_none.c | ||
| 998 | $(CC) /Fo$(OBJ_D)\rsa_none.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rsa\rsa_none.c | ||
| 999 | |||
| 1000 | $(OBJ_D)\dsa_gen.obj: $(SRC_D)\crypto\dsa\dsa_gen.c | ||
| 1001 | $(CC) /Fo$(OBJ_D)\dsa_gen.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_gen.c | ||
| 1002 | |||
| 1003 | $(OBJ_D)\dsa_key.obj: $(SRC_D)\crypto\dsa\dsa_key.c | ||
| 1004 | $(CC) /Fo$(OBJ_D)\dsa_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_key.c | ||
| 1005 | |||
| 1006 | $(OBJ_D)\dsa_lib.obj: $(SRC_D)\crypto\dsa\dsa_lib.c | ||
| 1007 | $(CC) /Fo$(OBJ_D)\dsa_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_lib.c | ||
| 1008 | |||
| 1009 | $(OBJ_D)\dsa_vrf.obj: $(SRC_D)\crypto\dsa\dsa_vrf.c | ||
| 1010 | $(CC) /Fo$(OBJ_D)\dsa_vrf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_vrf.c | ||
| 1011 | |||
| 1012 | $(OBJ_D)\dsa_sign.obj: $(SRC_D)\crypto\dsa\dsa_sign.c | ||
| 1013 | $(CC) /Fo$(OBJ_D)\dsa_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_sign.c | ||
| 1014 | |||
| 1015 | $(OBJ_D)\dsa_err.obj: $(SRC_D)\crypto\dsa\dsa_err.c | ||
| 1016 | $(CC) /Fo$(OBJ_D)\dsa_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dsa\dsa_err.c | ||
| 1017 | |||
| 1018 | $(OBJ_D)\dh_gen.obj: $(SRC_D)\crypto\dh\dh_gen.c | ||
| 1019 | $(CC) /Fo$(OBJ_D)\dh_gen.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_gen.c | ||
| 1020 | |||
| 1021 | $(OBJ_D)\dh_key.obj: $(SRC_D)\crypto\dh\dh_key.c | ||
| 1022 | $(CC) /Fo$(OBJ_D)\dh_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_key.c | ||
| 1023 | |||
| 1024 | $(OBJ_D)\dh_lib.obj: $(SRC_D)\crypto\dh\dh_lib.c | ||
| 1025 | $(CC) /Fo$(OBJ_D)\dh_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_lib.c | ||
| 1026 | |||
| 1027 | $(OBJ_D)\dh_check.obj: $(SRC_D)\crypto\dh\dh_check.c | ||
| 1028 | $(CC) /Fo$(OBJ_D)\dh_check.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_check.c | ||
| 1029 | |||
| 1030 | $(OBJ_D)\dh_err.obj: $(SRC_D)\crypto\dh\dh_err.c | ||
| 1031 | $(CC) /Fo$(OBJ_D)\dh_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\dh\dh_err.c | ||
| 1032 | |||
| 1033 | $(OBJ_D)\buffer.obj: $(SRC_D)\crypto\buffer\buffer.c | ||
| 1034 | $(CC) /Fo$(OBJ_D)\buffer.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\buffer\buffer.c | ||
| 1035 | |||
| 1036 | $(OBJ_D)\buf_err.obj: $(SRC_D)\crypto\buffer\buf_err.c | ||
| 1037 | $(CC) /Fo$(OBJ_D)\buf_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\buffer\buf_err.c | ||
| 1038 | |||
| 1039 | $(OBJ_D)\bio_lib.obj: $(SRC_D)\crypto\bio\bio_lib.c | ||
| 1040 | $(CC) /Fo$(OBJ_D)\bio_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bio_lib.c | ||
| 1041 | |||
| 1042 | $(OBJ_D)\bio_cb.obj: $(SRC_D)\crypto\bio\bio_cb.c | ||
| 1043 | $(CC) /Fo$(OBJ_D)\bio_cb.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bio_cb.c | ||
| 1044 | |||
| 1045 | $(OBJ_D)\bio_err.obj: $(SRC_D)\crypto\bio\bio_err.c | ||
| 1046 | $(CC) /Fo$(OBJ_D)\bio_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bio_err.c | ||
| 1047 | |||
| 1048 | $(OBJ_D)\bss_mem.obj: $(SRC_D)\crypto\bio\bss_mem.c | ||
| 1049 | $(CC) /Fo$(OBJ_D)\bss_mem.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_mem.c | ||
| 1050 | |||
| 1051 | $(OBJ_D)\bss_null.obj: $(SRC_D)\crypto\bio\bss_null.c | ||
| 1052 | $(CC) /Fo$(OBJ_D)\bss_null.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_null.c | ||
| 1053 | |||
| 1054 | $(OBJ_D)\bss_fd.obj: $(SRC_D)\crypto\bio\bss_fd.c | ||
| 1055 | $(CC) /Fo$(OBJ_D)\bss_fd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_fd.c | ||
| 1056 | |||
| 1057 | $(OBJ_D)\bss_file.obj: $(SRC_D)\crypto\bio\bss_file.c | ||
| 1058 | $(CC) /Fo$(OBJ_D)\bss_file.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_file.c | ||
| 1059 | |||
| 1060 | $(OBJ_D)\bss_sock.obj: $(SRC_D)\crypto\bio\bss_sock.c | ||
| 1061 | $(CC) /Fo$(OBJ_D)\bss_sock.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_sock.c | ||
| 1062 | |||
| 1063 | $(OBJ_D)\bss_conn.obj: $(SRC_D)\crypto\bio\bss_conn.c | ||
| 1064 | $(CC) /Fo$(OBJ_D)\bss_conn.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_conn.c | ||
| 1065 | |||
| 1066 | $(OBJ_D)\bf_null.obj: $(SRC_D)\crypto\bio\bf_null.c | ||
| 1067 | $(CC) /Fo$(OBJ_D)\bf_null.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bf_null.c | ||
| 1068 | |||
| 1069 | $(OBJ_D)\bf_buff.obj: $(SRC_D)\crypto\bio\bf_buff.c | ||
| 1070 | $(CC) /Fo$(OBJ_D)\bf_buff.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bf_buff.c | ||
| 1071 | |||
| 1072 | $(OBJ_D)\b_print.obj: $(SRC_D)\crypto\bio\b_print.c | ||
| 1073 | $(CC) /Fo$(OBJ_D)\b_print.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\b_print.c | ||
| 1074 | |||
| 1075 | $(OBJ_D)\b_dump.obj: $(SRC_D)\crypto\bio\b_dump.c | ||
| 1076 | $(CC) /Fo$(OBJ_D)\b_dump.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\b_dump.c | ||
| 1077 | |||
| 1078 | $(OBJ_D)\b_sock.obj: $(SRC_D)\crypto\bio\b_sock.c | ||
| 1079 | $(CC) /Fo$(OBJ_D)\b_sock.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\b_sock.c | ||
| 1080 | |||
| 1081 | $(OBJ_D)\bss_acpt.obj: $(SRC_D)\crypto\bio\bss_acpt.c | ||
| 1082 | $(CC) /Fo$(OBJ_D)\bss_acpt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bss_acpt.c | ||
| 1083 | |||
| 1084 | $(OBJ_D)\bf_nbio.obj: $(SRC_D)\crypto\bio\bf_nbio.c | ||
| 1085 | $(CC) /Fo$(OBJ_D)\bf_nbio.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\bio\bf_nbio.c | ||
| 1086 | |||
| 1087 | $(OBJ_D)\stack.obj: $(SRC_D)\crypto\stack\stack.c | ||
| 1088 | $(CC) /Fo$(OBJ_D)\stack.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\stack\stack.c | ||
| 1089 | |||
| 1090 | $(OBJ_D)\lhash.obj: $(SRC_D)\crypto\lhash\lhash.c | ||
| 1091 | $(CC) /Fo$(OBJ_D)\lhash.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\lhash\lhash.c | ||
| 1092 | |||
| 1093 | $(OBJ_D)\lh_stats.obj: $(SRC_D)\crypto\lhash\lh_stats.c | ||
| 1094 | $(CC) /Fo$(OBJ_D)\lh_stats.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\lhash\lh_stats.c | ||
| 1095 | |||
| 1096 | $(OBJ_D)\md_rand.obj: $(SRC_D)\crypto\rand\md_rand.c | ||
| 1097 | $(CC) /Fo$(OBJ_D)\md_rand.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rand\md_rand.c | ||
| 1098 | |||
| 1099 | $(OBJ_D)\randfile.obj: $(SRC_D)\crypto\rand\randfile.c | ||
| 1100 | $(CC) /Fo$(OBJ_D)\randfile.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\rand\randfile.c | ||
| 1101 | |||
| 1102 | $(OBJ_D)\err.obj: $(SRC_D)\crypto\err\err.c | ||
| 1103 | $(CC) /Fo$(OBJ_D)\err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\err\err.c | ||
| 1104 | |||
| 1105 | $(OBJ_D)\err_all.obj: $(SRC_D)\crypto\err\err_all.c | ||
| 1106 | $(CC) /Fo$(OBJ_D)\err_all.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\err\err_all.c | ||
| 1107 | |||
| 1108 | $(OBJ_D)\err_prn.obj: $(SRC_D)\crypto\err\err_prn.c | ||
| 1109 | $(CC) /Fo$(OBJ_D)\err_prn.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\err\err_prn.c | ||
| 1110 | |||
| 1111 | $(OBJ_D)\obj_dat.obj: $(SRC_D)\crypto\objects\obj_dat.c | ||
| 1112 | $(CC) /Fo$(OBJ_D)\obj_dat.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\objects\obj_dat.c | ||
| 1113 | |||
| 1114 | $(OBJ_D)\obj_lib.obj: $(SRC_D)\crypto\objects\obj_lib.c | ||
| 1115 | $(CC) /Fo$(OBJ_D)\obj_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\objects\obj_lib.c | ||
| 1116 | |||
| 1117 | $(OBJ_D)\obj_err.obj: $(SRC_D)\crypto\objects\obj_err.c | ||
| 1118 | $(CC) /Fo$(OBJ_D)\obj_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\objects\obj_err.c | ||
| 1119 | |||
| 1120 | $(OBJ_D)\encode.obj: $(SRC_D)\crypto\evp\encode.c | ||
| 1121 | $(CC) /Fo$(OBJ_D)\encode.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\encode.c | ||
| 1122 | |||
| 1123 | $(OBJ_D)\digest.obj: $(SRC_D)\crypto\evp\digest.c | ||
| 1124 | $(CC) /Fo$(OBJ_D)\digest.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\digest.c | ||
| 1125 | |||
| 1126 | $(OBJ_D)\evp_enc.obj: $(SRC_D)\crypto\evp\evp_enc.c | ||
| 1127 | $(CC) /Fo$(OBJ_D)\evp_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\evp_enc.c | ||
| 1128 | |||
| 1129 | $(OBJ_D)\evp_key.obj: $(SRC_D)\crypto\evp\evp_key.c | ||
| 1130 | $(CC) /Fo$(OBJ_D)\evp_key.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\evp_key.c | ||
| 1131 | |||
| 1132 | $(OBJ_D)\e_ecb_d.obj: $(SRC_D)\crypto\evp\e_ecb_d.c | ||
| 1133 | $(CC) /Fo$(OBJ_D)\e_ecb_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_d.c | ||
| 1134 | |||
| 1135 | $(OBJ_D)\e_cbc_d.obj: $(SRC_D)\crypto\evp\e_cbc_d.c | ||
| 1136 | $(CC) /Fo$(OBJ_D)\e_cbc_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_d.c | ||
| 1137 | |||
| 1138 | $(OBJ_D)\e_cfb_d.obj: $(SRC_D)\crypto\evp\e_cfb_d.c | ||
| 1139 | $(CC) /Fo$(OBJ_D)\e_cfb_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_d.c | ||
| 1140 | |||
| 1141 | $(OBJ_D)\e_ofb_d.obj: $(SRC_D)\crypto\evp\e_ofb_d.c | ||
| 1142 | $(CC) /Fo$(OBJ_D)\e_ofb_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_d.c | ||
| 1143 | |||
| 1144 | $(OBJ_D)\e_ecb_i.obj: $(SRC_D)\crypto\evp\e_ecb_i.c | ||
| 1145 | $(CC) /Fo$(OBJ_D)\e_ecb_i.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_i.c | ||
| 1146 | |||
| 1147 | $(OBJ_D)\e_cbc_i.obj: $(SRC_D)\crypto\evp\e_cbc_i.c | ||
| 1148 | $(CC) /Fo$(OBJ_D)\e_cbc_i.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_i.c | ||
| 1149 | |||
| 1150 | $(OBJ_D)\e_cfb_i.obj: $(SRC_D)\crypto\evp\e_cfb_i.c | ||
| 1151 | $(CC) /Fo$(OBJ_D)\e_cfb_i.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_i.c | ||
| 1152 | |||
| 1153 | $(OBJ_D)\e_ofb_i.obj: $(SRC_D)\crypto\evp\e_ofb_i.c | ||
| 1154 | $(CC) /Fo$(OBJ_D)\e_ofb_i.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_i.c | ||
| 1155 | |||
| 1156 | $(OBJ_D)\e_ecb_3d.obj: $(SRC_D)\crypto\evp\e_ecb_3d.c | ||
| 1157 | $(CC) /Fo$(OBJ_D)\e_ecb_3d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_3d.c | ||
| 1158 | |||
| 1159 | $(OBJ_D)\e_cbc_3d.obj: $(SRC_D)\crypto\evp\e_cbc_3d.c | ||
| 1160 | $(CC) /Fo$(OBJ_D)\e_cbc_3d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_3d.c | ||
| 1161 | |||
| 1162 | $(OBJ_D)\e_rc4.obj: $(SRC_D)\crypto\evp\e_rc4.c | ||
| 1163 | $(CC) /Fo$(OBJ_D)\e_rc4.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_rc4.c | ||
| 1164 | |||
| 1165 | $(OBJ_D)\names.obj: $(SRC_D)\crypto\evp\names.c | ||
| 1166 | $(CC) /Fo$(OBJ_D)\names.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\names.c | ||
| 1167 | |||
| 1168 | $(OBJ_D)\e_cfb_3d.obj: $(SRC_D)\crypto\evp\e_cfb_3d.c | ||
| 1169 | $(CC) /Fo$(OBJ_D)\e_cfb_3d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_3d.c | ||
| 1170 | |||
| 1171 | $(OBJ_D)\e_ofb_3d.obj: $(SRC_D)\crypto\evp\e_ofb_3d.c | ||
| 1172 | $(CC) /Fo$(OBJ_D)\e_ofb_3d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_3d.c | ||
| 1173 | |||
| 1174 | $(OBJ_D)\e_xcbc_d.obj: $(SRC_D)\crypto\evp\e_xcbc_d.c | ||
| 1175 | $(CC) /Fo$(OBJ_D)\e_xcbc_d.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_xcbc_d.c | ||
| 1176 | |||
| 1177 | $(OBJ_D)\e_ecb_r2.obj: $(SRC_D)\crypto\evp\e_ecb_r2.c | ||
| 1178 | $(CC) /Fo$(OBJ_D)\e_ecb_r2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_r2.c | ||
| 1179 | |||
| 1180 | $(OBJ_D)\e_cbc_r2.obj: $(SRC_D)\crypto\evp\e_cbc_r2.c | ||
| 1181 | $(CC) /Fo$(OBJ_D)\e_cbc_r2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_r2.c | ||
| 1182 | |||
| 1183 | $(OBJ_D)\e_cfb_r2.obj: $(SRC_D)\crypto\evp\e_cfb_r2.c | ||
| 1184 | $(CC) /Fo$(OBJ_D)\e_cfb_r2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_r2.c | ||
| 1185 | |||
| 1186 | $(OBJ_D)\e_ofb_r2.obj: $(SRC_D)\crypto\evp\e_ofb_r2.c | ||
| 1187 | $(CC) /Fo$(OBJ_D)\e_ofb_r2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_r2.c | ||
| 1188 | |||
| 1189 | $(OBJ_D)\e_ecb_bf.obj: $(SRC_D)\crypto\evp\e_ecb_bf.c | ||
| 1190 | $(CC) /Fo$(OBJ_D)\e_ecb_bf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_bf.c | ||
| 1191 | |||
| 1192 | $(OBJ_D)\e_cbc_bf.obj: $(SRC_D)\crypto\evp\e_cbc_bf.c | ||
| 1193 | $(CC) /Fo$(OBJ_D)\e_cbc_bf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_bf.c | ||
| 1194 | |||
| 1195 | $(OBJ_D)\e_cfb_bf.obj: $(SRC_D)\crypto\evp\e_cfb_bf.c | ||
| 1196 | $(CC) /Fo$(OBJ_D)\e_cfb_bf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_bf.c | ||
| 1197 | |||
| 1198 | $(OBJ_D)\e_ofb_bf.obj: $(SRC_D)\crypto\evp\e_ofb_bf.c | ||
| 1199 | $(CC) /Fo$(OBJ_D)\e_ofb_bf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_bf.c | ||
| 1200 | |||
| 1201 | $(OBJ_D)\e_ecb_c.obj: $(SRC_D)\crypto\evp\e_ecb_c.c | ||
| 1202 | $(CC) /Fo$(OBJ_D)\e_ecb_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_c.c | ||
| 1203 | |||
| 1204 | $(OBJ_D)\e_cbc_c.obj: $(SRC_D)\crypto\evp\e_cbc_c.c | ||
| 1205 | $(CC) /Fo$(OBJ_D)\e_cbc_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_c.c | ||
| 1206 | |||
| 1207 | $(OBJ_D)\e_cfb_c.obj: $(SRC_D)\crypto\evp\e_cfb_c.c | ||
| 1208 | $(CC) /Fo$(OBJ_D)\e_cfb_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_c.c | ||
| 1209 | |||
| 1210 | $(OBJ_D)\e_ofb_c.obj: $(SRC_D)\crypto\evp\e_ofb_c.c | ||
| 1211 | $(CC) /Fo$(OBJ_D)\e_ofb_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_c.c | ||
| 1212 | |||
| 1213 | $(OBJ_D)\e_ecb_r5.obj: $(SRC_D)\crypto\evp\e_ecb_r5.c | ||
| 1214 | $(CC) /Fo$(OBJ_D)\e_ecb_r5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ecb_r5.c | ||
| 1215 | |||
| 1216 | $(OBJ_D)\e_cbc_r5.obj: $(SRC_D)\crypto\evp\e_cbc_r5.c | ||
| 1217 | $(CC) /Fo$(OBJ_D)\e_cbc_r5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cbc_r5.c | ||
| 1218 | |||
| 1219 | $(OBJ_D)\e_cfb_r5.obj: $(SRC_D)\crypto\evp\e_cfb_r5.c | ||
| 1220 | $(CC) /Fo$(OBJ_D)\e_cfb_r5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_cfb_r5.c | ||
| 1221 | |||
| 1222 | $(OBJ_D)\e_ofb_r5.obj: $(SRC_D)\crypto\evp\e_ofb_r5.c | ||
| 1223 | $(CC) /Fo$(OBJ_D)\e_ofb_r5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_ofb_r5.c | ||
| 1224 | |||
| 1225 | $(OBJ_D)\m_null.obj: $(SRC_D)\crypto\evp\m_null.c | ||
| 1226 | $(CC) /Fo$(OBJ_D)\m_null.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_null.c | ||
| 1227 | |||
| 1228 | $(OBJ_D)\m_md2.obj: $(SRC_D)\crypto\evp\m_md2.c | ||
| 1229 | $(CC) /Fo$(OBJ_D)\m_md2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_md2.c | ||
| 1230 | |||
| 1231 | $(OBJ_D)\m_md5.obj: $(SRC_D)\crypto\evp\m_md5.c | ||
| 1232 | $(CC) /Fo$(OBJ_D)\m_md5.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_md5.c | ||
| 1233 | |||
| 1234 | $(OBJ_D)\m_sha.obj: $(SRC_D)\crypto\evp\m_sha.c | ||
| 1235 | $(CC) /Fo$(OBJ_D)\m_sha.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_sha.c | ||
| 1236 | |||
| 1237 | $(OBJ_D)\m_sha1.obj: $(SRC_D)\crypto\evp\m_sha1.c | ||
| 1238 | $(CC) /Fo$(OBJ_D)\m_sha1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_sha1.c | ||
| 1239 | |||
| 1240 | $(OBJ_D)\m_dss.obj: $(SRC_D)\crypto\evp\m_dss.c | ||
| 1241 | $(CC) /Fo$(OBJ_D)\m_dss.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_dss.c | ||
| 1242 | |||
| 1243 | $(OBJ_D)\m_dss1.obj: $(SRC_D)\crypto\evp\m_dss1.c | ||
| 1244 | $(CC) /Fo$(OBJ_D)\m_dss1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_dss1.c | ||
| 1245 | |||
| 1246 | $(OBJ_D)\m_mdc2.obj: $(SRC_D)\crypto\evp\m_mdc2.c | ||
| 1247 | $(CC) /Fo$(OBJ_D)\m_mdc2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_mdc2.c | ||
| 1248 | |||
| 1249 | $(OBJ_D)\m_ripemd.obj: $(SRC_D)\crypto\evp\m_ripemd.c | ||
| 1250 | $(CC) /Fo$(OBJ_D)\m_ripemd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\m_ripemd.c | ||
| 1251 | |||
| 1252 | $(OBJ_D)\p_open.obj: $(SRC_D)\crypto\evp\p_open.c | ||
| 1253 | $(CC) /Fo$(OBJ_D)\p_open.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_open.c | ||
| 1254 | |||
| 1255 | $(OBJ_D)\p_seal.obj: $(SRC_D)\crypto\evp\p_seal.c | ||
| 1256 | $(CC) /Fo$(OBJ_D)\p_seal.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_seal.c | ||
| 1257 | |||
| 1258 | $(OBJ_D)\p_sign.obj: $(SRC_D)\crypto\evp\p_sign.c | ||
| 1259 | $(CC) /Fo$(OBJ_D)\p_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_sign.c | ||
| 1260 | |||
| 1261 | $(OBJ_D)\p_verify.obj: $(SRC_D)\crypto\evp\p_verify.c | ||
| 1262 | $(CC) /Fo$(OBJ_D)\p_verify.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_verify.c | ||
| 1263 | |||
| 1264 | $(OBJ_D)\p_lib.obj: $(SRC_D)\crypto\evp\p_lib.c | ||
| 1265 | $(CC) /Fo$(OBJ_D)\p_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_lib.c | ||
| 1266 | |||
| 1267 | $(OBJ_D)\p_enc.obj: $(SRC_D)\crypto\evp\p_enc.c | ||
| 1268 | $(CC) /Fo$(OBJ_D)\p_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_enc.c | ||
| 1269 | |||
| 1270 | $(OBJ_D)\p_dec.obj: $(SRC_D)\crypto\evp\p_dec.c | ||
| 1271 | $(CC) /Fo$(OBJ_D)\p_dec.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\p_dec.c | ||
| 1272 | |||
| 1273 | $(OBJ_D)\bio_md.obj: $(SRC_D)\crypto\evp\bio_md.c | ||
| 1274 | $(CC) /Fo$(OBJ_D)\bio_md.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\bio_md.c | ||
| 1275 | |||
| 1276 | $(OBJ_D)\bio_b64.obj: $(SRC_D)\crypto\evp\bio_b64.c | ||
| 1277 | $(CC) /Fo$(OBJ_D)\bio_b64.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\bio_b64.c | ||
| 1278 | |||
| 1279 | $(OBJ_D)\bio_enc.obj: $(SRC_D)\crypto\evp\bio_enc.c | ||
| 1280 | $(CC) /Fo$(OBJ_D)\bio_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\bio_enc.c | ||
| 1281 | |||
| 1282 | $(OBJ_D)\evp_err.obj: $(SRC_D)\crypto\evp\evp_err.c | ||
| 1283 | $(CC) /Fo$(OBJ_D)\evp_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\evp_err.c | ||
| 1284 | |||
| 1285 | $(OBJ_D)\e_null.obj: $(SRC_D)\crypto\evp\e_null.c | ||
| 1286 | $(CC) /Fo$(OBJ_D)\e_null.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\e_null.c | ||
| 1287 | |||
| 1288 | $(OBJ_D)\c_all.obj: $(SRC_D)\crypto\evp\c_all.c | ||
| 1289 | $(CC) /Fo$(OBJ_D)\c_all.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\c_all.c | ||
| 1290 | |||
| 1291 | $(OBJ_D)\evp_lib.obj: $(SRC_D)\crypto\evp\evp_lib.c | ||
| 1292 | $(CC) /Fo$(OBJ_D)\evp_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\evp\evp_lib.c | ||
| 1293 | |||
| 1294 | $(OBJ_D)\pem_sign.obj: $(SRC_D)\crypto\pem\pem_sign.c | ||
| 1295 | $(CC) /Fo$(OBJ_D)\pem_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_sign.c | ||
| 1296 | |||
| 1297 | $(OBJ_D)\pem_seal.obj: $(SRC_D)\crypto\pem\pem_seal.c | ||
| 1298 | $(CC) /Fo$(OBJ_D)\pem_seal.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_seal.c | ||
| 1299 | |||
| 1300 | $(OBJ_D)\pem_info.obj: $(SRC_D)\crypto\pem\pem_info.c | ||
| 1301 | $(CC) /Fo$(OBJ_D)\pem_info.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_info.c | ||
| 1302 | |||
| 1303 | $(OBJ_D)\pem_lib.obj: $(SRC_D)\crypto\pem\pem_lib.c | ||
| 1304 | $(CC) /Fo$(OBJ_D)\pem_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_lib.c | ||
| 1305 | |||
| 1306 | $(OBJ_D)\pem_all.obj: $(SRC_D)\crypto\pem\pem_all.c | ||
| 1307 | $(CC) /Fo$(OBJ_D)\pem_all.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_all.c | ||
| 1308 | |||
| 1309 | $(OBJ_D)\pem_err.obj: $(SRC_D)\crypto\pem\pem_err.c | ||
| 1310 | $(CC) /Fo$(OBJ_D)\pem_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pem\pem_err.c | ||
| 1311 | |||
| 1312 | $(OBJ_D)\a_object.obj: $(SRC_D)\crypto\asn1\a_object.c | ||
| 1313 | $(CC) /Fo$(OBJ_D)\a_object.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_object.c | ||
| 1314 | |||
| 1315 | $(OBJ_D)\a_bitstr.obj: $(SRC_D)\crypto\asn1\a_bitstr.c | ||
| 1316 | $(CC) /Fo$(OBJ_D)\a_bitstr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_bitstr.c | ||
| 1317 | |||
| 1318 | $(OBJ_D)\a_utctm.obj: $(SRC_D)\crypto\asn1\a_utctm.c | ||
| 1319 | $(CC) /Fo$(OBJ_D)\a_utctm.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_utctm.c | ||
| 1320 | |||
| 1321 | $(OBJ_D)\a_int.obj: $(SRC_D)\crypto\asn1\a_int.c | ||
| 1322 | $(CC) /Fo$(OBJ_D)\a_int.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_int.c | ||
| 1323 | |||
| 1324 | $(OBJ_D)\a_octet.obj: $(SRC_D)\crypto\asn1\a_octet.c | ||
| 1325 | $(CC) /Fo$(OBJ_D)\a_octet.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_octet.c | ||
| 1326 | |||
| 1327 | $(OBJ_D)\a_print.obj: $(SRC_D)\crypto\asn1\a_print.c | ||
| 1328 | $(CC) /Fo$(OBJ_D)\a_print.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_print.c | ||
| 1329 | |||
| 1330 | $(OBJ_D)\a_type.obj: $(SRC_D)\crypto\asn1\a_type.c | ||
| 1331 | $(CC) /Fo$(OBJ_D)\a_type.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_type.c | ||
| 1332 | |||
| 1333 | $(OBJ_D)\a_set.obj: $(SRC_D)\crypto\asn1\a_set.c | ||
| 1334 | $(CC) /Fo$(OBJ_D)\a_set.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_set.c | ||
| 1335 | |||
| 1336 | $(OBJ_D)\a_dup.obj: $(SRC_D)\crypto\asn1\a_dup.c | ||
| 1337 | $(CC) /Fo$(OBJ_D)\a_dup.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_dup.c | ||
| 1338 | |||
| 1339 | $(OBJ_D)\a_d2i_fp.obj: $(SRC_D)\crypto\asn1\a_d2i_fp.c | ||
| 1340 | $(CC) /Fo$(OBJ_D)\a_d2i_fp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_d2i_fp.c | ||
| 1341 | |||
| 1342 | $(OBJ_D)\a_i2d_fp.obj: $(SRC_D)\crypto\asn1\a_i2d_fp.c | ||
| 1343 | $(CC) /Fo$(OBJ_D)\a_i2d_fp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_i2d_fp.c | ||
| 1344 | |||
| 1345 | $(OBJ_D)\a_sign.obj: $(SRC_D)\crypto\asn1\a_sign.c | ||
| 1346 | $(CC) /Fo$(OBJ_D)\a_sign.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_sign.c | ||
| 1347 | |||
| 1348 | $(OBJ_D)\a_digest.obj: $(SRC_D)\crypto\asn1\a_digest.c | ||
| 1349 | $(CC) /Fo$(OBJ_D)\a_digest.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_digest.c | ||
| 1350 | |||
| 1351 | $(OBJ_D)\a_verify.obj: $(SRC_D)\crypto\asn1\a_verify.c | ||
| 1352 | $(CC) /Fo$(OBJ_D)\a_verify.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_verify.c | ||
| 1353 | |||
| 1354 | $(OBJ_D)\x_algor.obj: $(SRC_D)\crypto\asn1\x_algor.c | ||
| 1355 | $(CC) /Fo$(OBJ_D)\x_algor.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_algor.c | ||
| 1356 | |||
| 1357 | $(OBJ_D)\x_val.obj: $(SRC_D)\crypto\asn1\x_val.c | ||
| 1358 | $(CC) /Fo$(OBJ_D)\x_val.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_val.c | ||
| 1359 | |||
| 1360 | $(OBJ_D)\x_pubkey.obj: $(SRC_D)\crypto\asn1\x_pubkey.c | ||
| 1361 | $(CC) /Fo$(OBJ_D)\x_pubkey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_pubkey.c | ||
| 1362 | |||
| 1363 | $(OBJ_D)\x_sig.obj: $(SRC_D)\crypto\asn1\x_sig.c | ||
| 1364 | $(CC) /Fo$(OBJ_D)\x_sig.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_sig.c | ||
| 1365 | |||
| 1366 | $(OBJ_D)\x_req.obj: $(SRC_D)\crypto\asn1\x_req.c | ||
| 1367 | $(CC) /Fo$(OBJ_D)\x_req.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_req.c | ||
| 1368 | |||
| 1369 | $(OBJ_D)\x_attrib.obj: $(SRC_D)\crypto\asn1\x_attrib.c | ||
| 1370 | $(CC) /Fo$(OBJ_D)\x_attrib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_attrib.c | ||
| 1371 | |||
| 1372 | $(OBJ_D)\x_name.obj: $(SRC_D)\crypto\asn1\x_name.c | ||
| 1373 | $(CC) /Fo$(OBJ_D)\x_name.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_name.c | ||
| 1374 | |||
| 1375 | $(OBJ_D)\x_cinf.obj: $(SRC_D)\crypto\asn1\x_cinf.c | ||
| 1376 | $(CC) /Fo$(OBJ_D)\x_cinf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_cinf.c | ||
| 1377 | |||
| 1378 | $(OBJ_D)\x_x509.obj: $(SRC_D)\crypto\asn1\x_x509.c | ||
| 1379 | $(CC) /Fo$(OBJ_D)\x_x509.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_x509.c | ||
| 1380 | |||
| 1381 | $(OBJ_D)\x_crl.obj: $(SRC_D)\crypto\asn1\x_crl.c | ||
| 1382 | $(CC) /Fo$(OBJ_D)\x_crl.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_crl.c | ||
| 1383 | |||
| 1384 | $(OBJ_D)\x_info.obj: $(SRC_D)\crypto\asn1\x_info.c | ||
| 1385 | $(CC) /Fo$(OBJ_D)\x_info.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_info.c | ||
| 1386 | |||
| 1387 | $(OBJ_D)\x_spki.obj: $(SRC_D)\crypto\asn1\x_spki.c | ||
| 1388 | $(CC) /Fo$(OBJ_D)\x_spki.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_spki.c | ||
| 1389 | |||
| 1390 | $(OBJ_D)\d2i_r_pr.obj: $(SRC_D)\crypto\asn1\d2i_r_pr.c | ||
| 1391 | $(CC) /Fo$(OBJ_D)\d2i_r_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_r_pr.c | ||
| 1392 | |||
| 1393 | $(OBJ_D)\i2d_r_pr.obj: $(SRC_D)\crypto\asn1\i2d_r_pr.c | ||
| 1394 | $(CC) /Fo$(OBJ_D)\i2d_r_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_r_pr.c | ||
| 1395 | |||
| 1396 | $(OBJ_D)\d2i_r_pu.obj: $(SRC_D)\crypto\asn1\d2i_r_pu.c | ||
| 1397 | $(CC) /Fo$(OBJ_D)\d2i_r_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_r_pu.c | ||
| 1398 | |||
| 1399 | $(OBJ_D)\i2d_r_pu.obj: $(SRC_D)\crypto\asn1\i2d_r_pu.c | ||
| 1400 | $(CC) /Fo$(OBJ_D)\i2d_r_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_r_pu.c | ||
| 1401 | |||
| 1402 | $(OBJ_D)\d2i_s_pr.obj: $(SRC_D)\crypto\asn1\d2i_s_pr.c | ||
| 1403 | $(CC) /Fo$(OBJ_D)\d2i_s_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_s_pr.c | ||
| 1404 | |||
| 1405 | $(OBJ_D)\i2d_s_pr.obj: $(SRC_D)\crypto\asn1\i2d_s_pr.c | ||
| 1406 | $(CC) /Fo$(OBJ_D)\i2d_s_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_s_pr.c | ||
| 1407 | |||
| 1408 | $(OBJ_D)\d2i_s_pu.obj: $(SRC_D)\crypto\asn1\d2i_s_pu.c | ||
| 1409 | $(CC) /Fo$(OBJ_D)\d2i_s_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_s_pu.c | ||
| 1410 | |||
| 1411 | $(OBJ_D)\i2d_s_pu.obj: $(SRC_D)\crypto\asn1\i2d_s_pu.c | ||
| 1412 | $(CC) /Fo$(OBJ_D)\i2d_s_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_s_pu.c | ||
| 1413 | |||
| 1414 | $(OBJ_D)\d2i_pu.obj: $(SRC_D)\crypto\asn1\d2i_pu.c | ||
| 1415 | $(CC) /Fo$(OBJ_D)\d2i_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_pu.c | ||
| 1416 | |||
| 1417 | $(OBJ_D)\d2i_pr.obj: $(SRC_D)\crypto\asn1\d2i_pr.c | ||
| 1418 | $(CC) /Fo$(OBJ_D)\d2i_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_pr.c | ||
| 1419 | |||
| 1420 | $(OBJ_D)\i2d_pu.obj: $(SRC_D)\crypto\asn1\i2d_pu.c | ||
| 1421 | $(CC) /Fo$(OBJ_D)\i2d_pu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_pu.c | ||
| 1422 | |||
| 1423 | $(OBJ_D)\i2d_pr.obj: $(SRC_D)\crypto\asn1\i2d_pr.c | ||
| 1424 | $(CC) /Fo$(OBJ_D)\i2d_pr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_pr.c | ||
| 1425 | |||
| 1426 | $(OBJ_D)\t_req.obj: $(SRC_D)\crypto\asn1\t_req.c | ||
| 1427 | $(CC) /Fo$(OBJ_D)\t_req.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\t_req.c | ||
| 1428 | |||
| 1429 | $(OBJ_D)\t_x509.obj: $(SRC_D)\crypto\asn1\t_x509.c | ||
| 1430 | $(CC) /Fo$(OBJ_D)\t_x509.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\t_x509.c | ||
| 1431 | |||
| 1432 | $(OBJ_D)\t_pkey.obj: $(SRC_D)\crypto\asn1\t_pkey.c | ||
| 1433 | $(CC) /Fo$(OBJ_D)\t_pkey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\t_pkey.c | ||
| 1434 | |||
| 1435 | $(OBJ_D)\p7_i_s.obj: $(SRC_D)\crypto\asn1\p7_i_s.c | ||
| 1436 | $(CC) /Fo$(OBJ_D)\p7_i_s.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_i_s.c | ||
| 1437 | |||
| 1438 | $(OBJ_D)\p7_signi.obj: $(SRC_D)\crypto\asn1\p7_signi.c | ||
| 1439 | $(CC) /Fo$(OBJ_D)\p7_signi.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_signi.c | ||
| 1440 | |||
| 1441 | $(OBJ_D)\p7_signd.obj: $(SRC_D)\crypto\asn1\p7_signd.c | ||
| 1442 | $(CC) /Fo$(OBJ_D)\p7_signd.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_signd.c | ||
| 1443 | |||
| 1444 | $(OBJ_D)\p7_recip.obj: $(SRC_D)\crypto\asn1\p7_recip.c | ||
| 1445 | $(CC) /Fo$(OBJ_D)\p7_recip.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_recip.c | ||
| 1446 | |||
| 1447 | $(OBJ_D)\p7_enc_c.obj: $(SRC_D)\crypto\asn1\p7_enc_c.c | ||
| 1448 | $(CC) /Fo$(OBJ_D)\p7_enc_c.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_enc_c.c | ||
| 1449 | |||
| 1450 | $(OBJ_D)\p7_evp.obj: $(SRC_D)\crypto\asn1\p7_evp.c | ||
| 1451 | $(CC) /Fo$(OBJ_D)\p7_evp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_evp.c | ||
| 1452 | |||
| 1453 | $(OBJ_D)\p7_dgst.obj: $(SRC_D)\crypto\asn1\p7_dgst.c | ||
| 1454 | $(CC) /Fo$(OBJ_D)\p7_dgst.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_dgst.c | ||
| 1455 | |||
| 1456 | $(OBJ_D)\p7_s_e.obj: $(SRC_D)\crypto\asn1\p7_s_e.c | ||
| 1457 | $(CC) /Fo$(OBJ_D)\p7_s_e.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_s_e.c | ||
| 1458 | |||
| 1459 | $(OBJ_D)\p7_enc.obj: $(SRC_D)\crypto\asn1\p7_enc.c | ||
| 1460 | $(CC) /Fo$(OBJ_D)\p7_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_enc.c | ||
| 1461 | |||
| 1462 | $(OBJ_D)\p7_lib.obj: $(SRC_D)\crypto\asn1\p7_lib.c | ||
| 1463 | $(CC) /Fo$(OBJ_D)\p7_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\p7_lib.c | ||
| 1464 | |||
| 1465 | $(OBJ_D)\f_int.obj: $(SRC_D)\crypto\asn1\f_int.c | ||
| 1466 | $(CC) /Fo$(OBJ_D)\f_int.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\f_int.c | ||
| 1467 | |||
| 1468 | $(OBJ_D)\f_string.obj: $(SRC_D)\crypto\asn1\f_string.c | ||
| 1469 | $(CC) /Fo$(OBJ_D)\f_string.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\f_string.c | ||
| 1470 | |||
| 1471 | $(OBJ_D)\i2d_dhp.obj: $(SRC_D)\crypto\asn1\i2d_dhp.c | ||
| 1472 | $(CC) /Fo$(OBJ_D)\i2d_dhp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_dhp.c | ||
| 1473 | |||
| 1474 | $(OBJ_D)\i2d_dsap.obj: $(SRC_D)\crypto\asn1\i2d_dsap.c | ||
| 1475 | $(CC) /Fo$(OBJ_D)\i2d_dsap.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\i2d_dsap.c | ||
| 1476 | |||
| 1477 | $(OBJ_D)\d2i_dhp.obj: $(SRC_D)\crypto\asn1\d2i_dhp.c | ||
| 1478 | $(CC) /Fo$(OBJ_D)\d2i_dhp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_dhp.c | ||
| 1479 | |||
| 1480 | $(OBJ_D)\d2i_dsap.obj: $(SRC_D)\crypto\asn1\d2i_dsap.c | ||
| 1481 | $(CC) /Fo$(OBJ_D)\d2i_dsap.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\d2i_dsap.c | ||
| 1482 | |||
| 1483 | $(OBJ_D)\n_pkey.obj: $(SRC_D)\crypto\asn1\n_pkey.c | ||
| 1484 | $(CC) /Fo$(OBJ_D)\n_pkey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\n_pkey.c | ||
| 1485 | |||
| 1486 | $(OBJ_D)\a_hdr.obj: $(SRC_D)\crypto\asn1\a_hdr.c | ||
| 1487 | $(CC) /Fo$(OBJ_D)\a_hdr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_hdr.c | ||
| 1488 | |||
| 1489 | $(OBJ_D)\x_pkey.obj: $(SRC_D)\crypto\asn1\x_pkey.c | ||
| 1490 | $(CC) /Fo$(OBJ_D)\x_pkey.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_pkey.c | ||
| 1491 | |||
| 1492 | $(OBJ_D)\a_bool.obj: $(SRC_D)\crypto\asn1\a_bool.c | ||
| 1493 | $(CC) /Fo$(OBJ_D)\a_bool.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_bool.c | ||
| 1494 | |||
| 1495 | $(OBJ_D)\x_exten.obj: $(SRC_D)\crypto\asn1\x_exten.c | ||
| 1496 | $(CC) /Fo$(OBJ_D)\x_exten.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\x_exten.c | ||
| 1497 | |||
| 1498 | $(OBJ_D)\asn1_par.obj: $(SRC_D)\crypto\asn1\asn1_par.c | ||
| 1499 | $(CC) /Fo$(OBJ_D)\asn1_par.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\asn1_par.c | ||
| 1500 | |||
| 1501 | $(OBJ_D)\asn1_lib.obj: $(SRC_D)\crypto\asn1\asn1_lib.c | ||
| 1502 | $(CC) /Fo$(OBJ_D)\asn1_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\asn1_lib.c | ||
| 1503 | |||
| 1504 | $(OBJ_D)\asn1_err.obj: $(SRC_D)\crypto\asn1\asn1_err.c | ||
| 1505 | $(CC) /Fo$(OBJ_D)\asn1_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\asn1_err.c | ||
| 1506 | |||
| 1507 | $(OBJ_D)\a_meth.obj: $(SRC_D)\crypto\asn1\a_meth.c | ||
| 1508 | $(CC) /Fo$(OBJ_D)\a_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_meth.c | ||
| 1509 | |||
| 1510 | $(OBJ_D)\a_bytes.obj: $(SRC_D)\crypto\asn1\a_bytes.c | ||
| 1511 | $(CC) /Fo$(OBJ_D)\a_bytes.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\a_bytes.c | ||
| 1512 | |||
| 1513 | $(OBJ_D)\evp_asn1.obj: $(SRC_D)\crypto\asn1\evp_asn1.c | ||
| 1514 | $(CC) /Fo$(OBJ_D)\evp_asn1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\asn1\evp_asn1.c | ||
| 1515 | |||
| 1516 | $(OBJ_D)\x509_def.obj: $(SRC_D)\crypto\x509\x509_def.c | ||
| 1517 | $(CC) /Fo$(OBJ_D)\x509_def.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_def.c | ||
| 1518 | |||
| 1519 | $(OBJ_D)\x509_d2.obj: $(SRC_D)\crypto\x509\x509_d2.c | ||
| 1520 | $(CC) /Fo$(OBJ_D)\x509_d2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_d2.c | ||
| 1521 | |||
| 1522 | $(OBJ_D)\x509_r2x.obj: $(SRC_D)\crypto\x509\x509_r2x.c | ||
| 1523 | $(CC) /Fo$(OBJ_D)\x509_r2x.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_r2x.c | ||
| 1524 | |||
| 1525 | $(OBJ_D)\x509_cmp.obj: $(SRC_D)\crypto\x509\x509_cmp.c | ||
| 1526 | $(CC) /Fo$(OBJ_D)\x509_cmp.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_cmp.c | ||
| 1527 | |||
| 1528 | $(OBJ_D)\x509_obj.obj: $(SRC_D)\crypto\x509\x509_obj.c | ||
| 1529 | $(CC) /Fo$(OBJ_D)\x509_obj.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_obj.c | ||
| 1530 | |||
| 1531 | $(OBJ_D)\x509_req.obj: $(SRC_D)\crypto\x509\x509_req.c | ||
| 1532 | $(CC) /Fo$(OBJ_D)\x509_req.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_req.c | ||
| 1533 | |||
| 1534 | $(OBJ_D)\x509_vfy.obj: $(SRC_D)\crypto\x509\x509_vfy.c | ||
| 1535 | $(CC) /Fo$(OBJ_D)\x509_vfy.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_vfy.c | ||
| 1536 | |||
| 1537 | $(OBJ_D)\x509_set.obj: $(SRC_D)\crypto\x509\x509_set.c | ||
| 1538 | $(CC) /Fo$(OBJ_D)\x509_set.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_set.c | ||
| 1539 | |||
| 1540 | $(OBJ_D)\x509rset.obj: $(SRC_D)\crypto\x509\x509rset.c | ||
| 1541 | $(CC) /Fo$(OBJ_D)\x509rset.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509rset.c | ||
| 1542 | |||
| 1543 | $(OBJ_D)\x509_err.obj: $(SRC_D)\crypto\x509\x509_err.c | ||
| 1544 | $(CC) /Fo$(OBJ_D)\x509_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_err.c | ||
| 1545 | |||
| 1546 | $(OBJ_D)\x509name.obj: $(SRC_D)\crypto\x509\x509name.c | ||
| 1547 | $(CC) /Fo$(OBJ_D)\x509name.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509name.c | ||
| 1548 | |||
| 1549 | $(OBJ_D)\x509_v3.obj: $(SRC_D)\crypto\x509\x509_v3.c | ||
| 1550 | $(CC) /Fo$(OBJ_D)\x509_v3.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_v3.c | ||
| 1551 | |||
| 1552 | $(OBJ_D)\x509_ext.obj: $(SRC_D)\crypto\x509\x509_ext.c | ||
| 1553 | $(CC) /Fo$(OBJ_D)\x509_ext.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_ext.c | ||
| 1554 | |||
| 1555 | $(OBJ_D)\x509pack.obj: $(SRC_D)\crypto\x509\x509pack.c | ||
| 1556 | $(CC) /Fo$(OBJ_D)\x509pack.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509pack.c | ||
| 1557 | |||
| 1558 | $(OBJ_D)\x509type.obj: $(SRC_D)\crypto\x509\x509type.c | ||
| 1559 | $(CC) /Fo$(OBJ_D)\x509type.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509type.c | ||
| 1560 | |||
| 1561 | $(OBJ_D)\x509_lu.obj: $(SRC_D)\crypto\x509\x509_lu.c | ||
| 1562 | $(CC) /Fo$(OBJ_D)\x509_lu.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_lu.c | ||
| 1563 | |||
| 1564 | $(OBJ_D)\x_all.obj: $(SRC_D)\crypto\x509\x_all.c | ||
| 1565 | $(CC) /Fo$(OBJ_D)\x_all.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x_all.c | ||
| 1566 | |||
| 1567 | $(OBJ_D)\x509_txt.obj: $(SRC_D)\crypto\x509\x509_txt.c | ||
| 1568 | $(CC) /Fo$(OBJ_D)\x509_txt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\x509_txt.c | ||
| 1569 | |||
| 1570 | $(OBJ_D)\by_file.obj: $(SRC_D)\crypto\x509\by_file.c | ||
| 1571 | $(CC) /Fo$(OBJ_D)\by_file.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\by_file.c | ||
| 1572 | |||
| 1573 | $(OBJ_D)\by_dir.obj: $(SRC_D)\crypto\x509\by_dir.c | ||
| 1574 | $(CC) /Fo$(OBJ_D)\by_dir.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\by_dir.c | ||
| 1575 | |||
| 1576 | $(OBJ_D)\v3_net.obj: $(SRC_D)\crypto\x509\v3_net.c | ||
| 1577 | $(CC) /Fo$(OBJ_D)\v3_net.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\v3_net.c | ||
| 1578 | |||
| 1579 | $(OBJ_D)\v3_x509.obj: $(SRC_D)\crypto\x509\v3_x509.c | ||
| 1580 | $(CC) /Fo$(OBJ_D)\v3_x509.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\x509\v3_x509.c | ||
| 1581 | |||
| 1582 | $(OBJ_D)\conf.obj: $(SRC_D)\crypto\conf\conf.c | ||
| 1583 | $(CC) /Fo$(OBJ_D)\conf.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\conf\conf.c | ||
| 1584 | |||
| 1585 | $(OBJ_D)\conf_err.obj: $(SRC_D)\crypto\conf\conf_err.c | ||
| 1586 | $(CC) /Fo$(OBJ_D)\conf_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\conf\conf_err.c | ||
| 1587 | |||
| 1588 | $(OBJ_D)\txt_db.obj: $(SRC_D)\crypto\txt_db\txt_db.c | ||
| 1589 | $(CC) /Fo$(OBJ_D)\txt_db.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\txt_db\txt_db.c | ||
| 1590 | |||
| 1591 | $(OBJ_D)\pk7_lib.obj: $(SRC_D)\crypto\pkcs7\pk7_lib.c | ||
| 1592 | $(CC) /Fo$(OBJ_D)\pk7_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pkcs7\pk7_lib.c | ||
| 1593 | |||
| 1594 | $(OBJ_D)\pkcs7err.obj: $(SRC_D)\crypto\pkcs7\pkcs7err.c | ||
| 1595 | $(CC) /Fo$(OBJ_D)\pkcs7err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pkcs7\pkcs7err.c | ||
| 1596 | |||
| 1597 | $(OBJ_D)\pk7_doit.obj: $(SRC_D)\crypto\pkcs7\pk7_doit.c | ||
| 1598 | $(CC) /Fo$(OBJ_D)\pk7_doit.obj $(SHLIB_CFLAGS) -c $(SRC_D)\crypto\pkcs7\pk7_doit.c | ||
| 1599 | |||
| 1600 | $(OBJ_D)\s2_meth.obj: $(SRC_D)\ssl\s2_meth.c | ||
| 1601 | $(CC) /Fo$(OBJ_D)\s2_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_meth.c | ||
| 1602 | |||
| 1603 | $(OBJ_D)\s2_srvr.obj: $(SRC_D)\ssl\s2_srvr.c | ||
| 1604 | $(CC) /Fo$(OBJ_D)\s2_srvr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_srvr.c | ||
| 1605 | |||
| 1606 | $(OBJ_D)\s2_clnt.obj: $(SRC_D)\ssl\s2_clnt.c | ||
| 1607 | $(CC) /Fo$(OBJ_D)\s2_clnt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_clnt.c | ||
| 1608 | |||
| 1609 | $(OBJ_D)\s2_lib.obj: $(SRC_D)\ssl\s2_lib.c | ||
| 1610 | $(CC) /Fo$(OBJ_D)\s2_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_lib.c | ||
| 1611 | |||
| 1612 | $(OBJ_D)\s2_enc.obj: $(SRC_D)\ssl\s2_enc.c | ||
| 1613 | $(CC) /Fo$(OBJ_D)\s2_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_enc.c | ||
| 1614 | |||
| 1615 | $(OBJ_D)\s2_pkt.obj: $(SRC_D)\ssl\s2_pkt.c | ||
| 1616 | $(CC) /Fo$(OBJ_D)\s2_pkt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s2_pkt.c | ||
| 1617 | |||
| 1618 | $(OBJ_D)\s3_meth.obj: $(SRC_D)\ssl\s3_meth.c | ||
| 1619 | $(CC) /Fo$(OBJ_D)\s3_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_meth.c | ||
| 1620 | |||
| 1621 | $(OBJ_D)\s3_srvr.obj: $(SRC_D)\ssl\s3_srvr.c | ||
| 1622 | $(CC) /Fo$(OBJ_D)\s3_srvr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_srvr.c | ||
| 1623 | |||
| 1624 | $(OBJ_D)\s3_clnt.obj: $(SRC_D)\ssl\s3_clnt.c | ||
| 1625 | $(CC) /Fo$(OBJ_D)\s3_clnt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_clnt.c | ||
| 1626 | |||
| 1627 | $(OBJ_D)\s3_lib.obj: $(SRC_D)\ssl\s3_lib.c | ||
| 1628 | $(CC) /Fo$(OBJ_D)\s3_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_lib.c | ||
| 1629 | |||
| 1630 | $(OBJ_D)\s3_enc.obj: $(SRC_D)\ssl\s3_enc.c | ||
| 1631 | $(CC) /Fo$(OBJ_D)\s3_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_enc.c | ||
| 1632 | |||
| 1633 | $(OBJ_D)\s3_pkt.obj: $(SRC_D)\ssl\s3_pkt.c | ||
| 1634 | $(CC) /Fo$(OBJ_D)\s3_pkt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_pkt.c | ||
| 1635 | |||
| 1636 | $(OBJ_D)\s3_both.obj: $(SRC_D)\ssl\s3_both.c | ||
| 1637 | $(CC) /Fo$(OBJ_D)\s3_both.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s3_both.c | ||
| 1638 | |||
| 1639 | $(OBJ_D)\s23_meth.obj: $(SRC_D)\ssl\s23_meth.c | ||
| 1640 | $(CC) /Fo$(OBJ_D)\s23_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_meth.c | ||
| 1641 | |||
| 1642 | $(OBJ_D)\s23_srvr.obj: $(SRC_D)\ssl\s23_srvr.c | ||
| 1643 | $(CC) /Fo$(OBJ_D)\s23_srvr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_srvr.c | ||
| 1644 | |||
| 1645 | $(OBJ_D)\s23_clnt.obj: $(SRC_D)\ssl\s23_clnt.c | ||
| 1646 | $(CC) /Fo$(OBJ_D)\s23_clnt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_clnt.c | ||
| 1647 | |||
| 1648 | $(OBJ_D)\s23_lib.obj: $(SRC_D)\ssl\s23_lib.c | ||
| 1649 | $(CC) /Fo$(OBJ_D)\s23_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_lib.c | ||
| 1650 | |||
| 1651 | $(OBJ_D)\s23_pkt.obj: $(SRC_D)\ssl\s23_pkt.c | ||
| 1652 | $(CC) /Fo$(OBJ_D)\s23_pkt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\s23_pkt.c | ||
| 1653 | |||
| 1654 | $(OBJ_D)\t1_meth.obj: $(SRC_D)\ssl\t1_meth.c | ||
| 1655 | $(CC) /Fo$(OBJ_D)\t1_meth.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_meth.c | ||
| 1656 | |||
| 1657 | $(OBJ_D)\t1_srvr.obj: $(SRC_D)\ssl\t1_srvr.c | ||
| 1658 | $(CC) /Fo$(OBJ_D)\t1_srvr.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_srvr.c | ||
| 1659 | |||
| 1660 | $(OBJ_D)\t1_clnt.obj: $(SRC_D)\ssl\t1_clnt.c | ||
| 1661 | $(CC) /Fo$(OBJ_D)\t1_clnt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_clnt.c | ||
| 1662 | |||
| 1663 | $(OBJ_D)\t1_lib.obj: $(SRC_D)\ssl\t1_lib.c | ||
| 1664 | $(CC) /Fo$(OBJ_D)\t1_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_lib.c | ||
| 1665 | |||
| 1666 | $(OBJ_D)\t1_enc.obj: $(SRC_D)\ssl\t1_enc.c | ||
| 1667 | $(CC) /Fo$(OBJ_D)\t1_enc.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\t1_enc.c | ||
| 1668 | |||
| 1669 | $(OBJ_D)\ssl_lib.obj: $(SRC_D)\ssl\ssl_lib.c | ||
| 1670 | $(CC) /Fo$(OBJ_D)\ssl_lib.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_lib.c | ||
| 1671 | |||
| 1672 | $(OBJ_D)\ssl_err2.obj: $(SRC_D)\ssl\ssl_err2.c | ||
| 1673 | $(CC) /Fo$(OBJ_D)\ssl_err2.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_err2.c | ||
| 1674 | |||
| 1675 | $(OBJ_D)\ssl_cert.obj: $(SRC_D)\ssl\ssl_cert.c | ||
| 1676 | $(CC) /Fo$(OBJ_D)\ssl_cert.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_cert.c | ||
| 1677 | |||
| 1678 | $(OBJ_D)\ssl_sess.obj: $(SRC_D)\ssl\ssl_sess.c | ||
| 1679 | $(CC) /Fo$(OBJ_D)\ssl_sess.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_sess.c | ||
| 1680 | |||
| 1681 | $(OBJ_D)\ssl_ciph.obj: $(SRC_D)\ssl\ssl_ciph.c | ||
| 1682 | $(CC) /Fo$(OBJ_D)\ssl_ciph.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_ciph.c | ||
| 1683 | |||
| 1684 | $(OBJ_D)\ssl_stat.obj: $(SRC_D)\ssl\ssl_stat.c | ||
| 1685 | $(CC) /Fo$(OBJ_D)\ssl_stat.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_stat.c | ||
| 1686 | |||
| 1687 | $(OBJ_D)\ssl_rsa.obj: $(SRC_D)\ssl\ssl_rsa.c | ||
| 1688 | $(CC) /Fo$(OBJ_D)\ssl_rsa.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_rsa.c | ||
| 1689 | |||
| 1690 | $(OBJ_D)\ssl_asn1.obj: $(SRC_D)\ssl\ssl_asn1.c | ||
| 1691 | $(CC) /Fo$(OBJ_D)\ssl_asn1.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_asn1.c | ||
| 1692 | |||
| 1693 | $(OBJ_D)\ssl_txt.obj: $(SRC_D)\ssl\ssl_txt.c | ||
| 1694 | $(CC) /Fo$(OBJ_D)\ssl_txt.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_txt.c | ||
| 1695 | |||
| 1696 | $(OBJ_D)\ssl_algs.obj: $(SRC_D)\ssl\ssl_algs.c | ||
| 1697 | $(CC) /Fo$(OBJ_D)\ssl_algs.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_algs.c | ||
| 1698 | |||
| 1699 | $(OBJ_D)\bio_ssl.obj: $(SRC_D)\ssl\bio_ssl.c | ||
| 1700 | $(CC) /Fo$(OBJ_D)\bio_ssl.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\bio_ssl.c | ||
| 1701 | |||
| 1702 | $(OBJ_D)\ssl_err.obj: $(SRC_D)\ssl\ssl_err.c | ||
| 1703 | $(CC) /Fo$(OBJ_D)\ssl_err.obj $(SHLIB_CFLAGS) -c $(SRC_D)\ssl\ssl_err.c | ||
| 1704 | |||
| 1705 | $(OBJ_D)\rsaref.obj: $(SRC_D)\rsaref\rsaref.c | ||
| 1706 | $(CC) /Fo$(OBJ_D)\rsaref.obj $(LIB_CFLAGS) -c $(SRC_D)\rsaref\rsaref.c | ||
| 1707 | |||
| 1708 | $(OBJ_D)\rsar_err.obj: $(SRC_D)\rsaref\rsar_err.c | ||
| 1709 | $(CC) /Fo$(OBJ_D)\rsar_err.obj $(LIB_CFLAGS) -c $(SRC_D)\rsaref\rsar_err.c | ||
| 1710 | |||
| 1711 | $(TEST_D)\md2test.exe: $(OBJ_D)\md2test.obj $(LIBS_DEP) | ||
| 1712 | $(LINK) $(LFLAGS) @<< | ||
| 1713 | $(APP_EX_OBJ) $(OBJ_D)\md2test.obj | ||
| 1714 | $(TEST_D)\md2test.exe | ||
| 1715 | |||
| 1716 | $(L_LIBS) $(EX_LIBS) | ||
| 1717 | |||
| 1718 | << | ||
| 1719 | |||
| 1720 | $(TEST_D)\md5test.exe: $(OBJ_D)\md5test.obj $(LIBS_DEP) | ||
| 1721 | $(LINK) $(LFLAGS) @<< | ||
| 1722 | $(APP_EX_OBJ) $(OBJ_D)\md5test.obj | ||
| 1723 | $(TEST_D)\md5test.exe | ||
| 1724 | |||
| 1725 | $(L_LIBS) $(EX_LIBS) | ||
| 1726 | |||
| 1727 | << | ||
| 1728 | |||
| 1729 | $(TEST_D)\shatest.exe: $(OBJ_D)\shatest.obj $(LIBS_DEP) | ||
| 1730 | $(LINK) $(LFLAGS) @<< | ||
| 1731 | $(APP_EX_OBJ) $(OBJ_D)\shatest.obj | ||
| 1732 | $(TEST_D)\shatest.exe | ||
| 1733 | |||
| 1734 | $(L_LIBS) $(EX_LIBS) | ||
| 1735 | |||
| 1736 | << | ||
| 1737 | |||
| 1738 | $(TEST_D)\sha1test.exe: $(OBJ_D)\sha1test.obj $(LIBS_DEP) | ||
| 1739 | $(LINK) $(LFLAGS) @<< | ||
| 1740 | $(APP_EX_OBJ) $(OBJ_D)\sha1test.obj | ||
| 1741 | $(TEST_D)\sha1test.exe | ||
| 1742 | |||
| 1743 | $(L_LIBS) $(EX_LIBS) | ||
| 1744 | |||
| 1745 | << | ||
| 1746 | |||
| 1747 | $(TEST_D)\mdc2test.exe: $(OBJ_D)\mdc2test.obj $(LIBS_DEP) | ||
| 1748 | $(LINK) $(LFLAGS) @<< | ||
| 1749 | $(APP_EX_OBJ) $(OBJ_D)\mdc2test.obj | ||
| 1750 | $(TEST_D)\mdc2test.exe | ||
| 1751 | |||
| 1752 | $(L_LIBS) $(EX_LIBS) | ||
| 1753 | |||
| 1754 | << | ||
| 1755 | |||
| 1756 | $(TEST_D)\hmactest.exe: $(OBJ_D)\hmactest.obj $(LIBS_DEP) | ||
| 1757 | $(LINK) $(LFLAGS) @<< | ||
| 1758 | $(APP_EX_OBJ) $(OBJ_D)\hmactest.obj | ||
| 1759 | $(TEST_D)\hmactest.exe | ||
| 1760 | |||
| 1761 | $(L_LIBS) $(EX_LIBS) | ||
| 1762 | |||
| 1763 | << | ||
| 1764 | |||
| 1765 | $(TEST_D)\rmdtest.exe: $(OBJ_D)\rmdtest.obj $(LIBS_DEP) | ||
| 1766 | $(LINK) $(LFLAGS) @<< | ||
| 1767 | $(APP_EX_OBJ) $(OBJ_D)\rmdtest.obj | ||
| 1768 | $(TEST_D)\rmdtest.exe | ||
| 1769 | |||
| 1770 | $(L_LIBS) $(EX_LIBS) | ||
| 1771 | |||
| 1772 | << | ||
| 1773 | |||
| 1774 | $(TEST_D)\destest.exe: $(OBJ_D)\destest.obj $(LIBS_DEP) | ||
| 1775 | $(LINK) $(LFLAGS) @<< | ||
| 1776 | $(APP_EX_OBJ) $(OBJ_D)\destest.obj | ||
| 1777 | $(TEST_D)\destest.exe | ||
| 1778 | |||
| 1779 | $(L_LIBS) $(EX_LIBS) | ||
| 1780 | |||
| 1781 | << | ||
| 1782 | |||
| 1783 | $(TEST_D)\rc2test.exe: $(OBJ_D)\rc2test.obj $(LIBS_DEP) | ||
| 1784 | $(LINK) $(LFLAGS) @<< | ||
| 1785 | $(APP_EX_OBJ) $(OBJ_D)\rc2test.obj | ||
| 1786 | $(TEST_D)\rc2test.exe | ||
| 1787 | |||
| 1788 | $(L_LIBS) $(EX_LIBS) | ||
| 1789 | |||
| 1790 | << | ||
| 1791 | |||
| 1792 | $(TEST_D)\rc4test.exe: $(OBJ_D)\rc4test.obj $(LIBS_DEP) | ||
| 1793 | $(LINK) $(LFLAGS) @<< | ||
| 1794 | $(APP_EX_OBJ) $(OBJ_D)\rc4test.obj | ||
| 1795 | $(TEST_D)\rc4test.exe | ||
| 1796 | |||
| 1797 | $(L_LIBS) $(EX_LIBS) | ||
| 1798 | |||
| 1799 | << | ||
| 1800 | |||
| 1801 | $(TEST_D)\rc5test.exe: $(OBJ_D)\rc5test.obj $(LIBS_DEP) | ||
| 1802 | $(LINK) $(LFLAGS) @<< | ||
| 1803 | $(APP_EX_OBJ) $(OBJ_D)\rc5test.obj | ||
| 1804 | $(TEST_D)\rc5test.exe | ||
| 1805 | |||
| 1806 | $(L_LIBS) $(EX_LIBS) | ||
| 1807 | |||
| 1808 | << | ||
| 1809 | |||
| 1810 | $(TEST_D)\ideatest.exe: $(OBJ_D)\ideatest.obj $(LIBS_DEP) | ||
| 1811 | $(LINK) $(LFLAGS) @<< | ||
| 1812 | $(APP_EX_OBJ) $(OBJ_D)\ideatest.obj | ||
| 1813 | $(TEST_D)\ideatest.exe | ||
| 1814 | |||
| 1815 | $(L_LIBS) $(EX_LIBS) | ||
| 1816 | |||
| 1817 | << | ||
| 1818 | |||
| 1819 | $(TEST_D)\bftest.exe: $(OBJ_D)\bftest.obj $(LIBS_DEP) | ||
| 1820 | $(LINK) $(LFLAGS) @<< | ||
| 1821 | $(APP_EX_OBJ) $(OBJ_D)\bftest.obj | ||
| 1822 | $(TEST_D)\bftest.exe | ||
| 1823 | |||
| 1824 | $(L_LIBS) $(EX_LIBS) | ||
| 1825 | |||
| 1826 | << | ||
| 1827 | |||
| 1828 | $(TEST_D)\casttest.exe: $(OBJ_D)\casttest.obj $(LIBS_DEP) | ||
| 1829 | $(LINK) $(LFLAGS) @<< | ||
| 1830 | $(APP_EX_OBJ) $(OBJ_D)\casttest.obj | ||
| 1831 | $(TEST_D)\casttest.exe | ||
| 1832 | |||
| 1833 | $(L_LIBS) $(EX_LIBS) | ||
| 1834 | |||
| 1835 | << | ||
| 1836 | |||
| 1837 | $(TEST_D)\bntest.exe: $(OBJ_D)\bntest.obj $(LIBS_DEP) | ||
| 1838 | $(LINK) $(LFLAGS) @<< | ||
| 1839 | $(APP_EX_OBJ) $(OBJ_D)\bntest.obj | ||
| 1840 | $(TEST_D)\bntest.exe | ||
| 1841 | |||
| 1842 | $(L_LIBS) $(EX_LIBS) | ||
| 1843 | |||
| 1844 | << | ||
| 1845 | |||
| 1846 | $(TEST_D)\exptest.exe: $(OBJ_D)\exptest.obj $(LIBS_DEP) | ||
| 1847 | $(LINK) $(LFLAGS) @<< | ||
| 1848 | $(APP_EX_OBJ) $(OBJ_D)\exptest.obj | ||
| 1849 | $(TEST_D)\exptest.exe | ||
| 1850 | |||
| 1851 | $(L_LIBS) $(EX_LIBS) | ||
| 1852 | |||
| 1853 | << | ||
| 1854 | |||
| 1855 | $(TEST_D)\dsatest.exe: $(OBJ_D)\dsatest.obj $(LIBS_DEP) | ||
| 1856 | $(LINK) $(LFLAGS) @<< | ||
| 1857 | $(APP_EX_OBJ) $(OBJ_D)\dsatest.obj | ||
| 1858 | $(TEST_D)\dsatest.exe | ||
| 1859 | |||
| 1860 | $(L_LIBS) $(EX_LIBS) | ||
| 1861 | |||
| 1862 | << | ||
| 1863 | |||
| 1864 | $(TEST_D)\dhtest.exe: $(OBJ_D)\dhtest.obj $(LIBS_DEP) | ||
| 1865 | $(LINK) $(LFLAGS) @<< | ||
| 1866 | $(APP_EX_OBJ) $(OBJ_D)\dhtest.obj | ||
| 1867 | $(TEST_D)\dhtest.exe | ||
| 1868 | |||
| 1869 | $(L_LIBS) $(EX_LIBS) | ||
| 1870 | |||
| 1871 | << | ||
| 1872 | |||
| 1873 | $(TEST_D)\randtest.exe: $(OBJ_D)\randtest.obj $(LIBS_DEP) | ||
| 1874 | $(LINK) $(LFLAGS) @<< | ||
| 1875 | $(APP_EX_OBJ) $(OBJ_D)\randtest.obj | ||
| 1876 | $(TEST_D)\randtest.exe | ||
| 1877 | |||
| 1878 | $(L_LIBS) $(EX_LIBS) | ||
| 1879 | |||
| 1880 | << | ||
| 1881 | |||
| 1882 | $(TEST_D)\ssltest.exe: $(OBJ_D)\ssltest.obj $(LIBS_DEP) | ||
| 1883 | $(LINK) $(LFLAGS) @<< | ||
| 1884 | $(APP_EX_OBJ) $(OBJ_D)\ssltest.obj | ||
| 1885 | $(TEST_D)\ssltest.exe | ||
| 1886 | |||
| 1887 | $(L_LIBS) $(EX_LIBS) | ||
| 1888 | |||
| 1889 | << | ||
| 1890 | |||
| 1891 | $(O_SSL): $(SSLOBJ) | ||
| 1892 | $(LINK) $(MLFLAGS) @<< | ||
| 1893 | $(SHLIB_EX_OBJ) + | ||
| 1894 | $(OBJ_D)\bio_ssl.obj + | ||
| 1895 | $(OBJ_D)\s23_clnt.obj + | ||
| 1896 | $(OBJ_D)\s23_lib.obj + | ||
| 1897 | $(OBJ_D)\s23_meth.obj + | ||
| 1898 | $(OBJ_D)\s23_pkt.obj + | ||
| 1899 | $(OBJ_D)\s23_srvr.obj + | ||
| 1900 | $(OBJ_D)\s2_clnt.obj + | ||
| 1901 | $(OBJ_D)\s2_enc.obj + | ||
| 1902 | $(OBJ_D)\s2_lib.obj + | ||
| 1903 | $(OBJ_D)\s2_meth.obj + | ||
| 1904 | $(OBJ_D)\s2_pkt.obj + | ||
| 1905 | $(OBJ_D)\s2_srvr.obj + | ||
| 1906 | $(OBJ_D)\s3_both.obj + | ||
| 1907 | $(OBJ_D)\s3_clnt.obj + | ||
| 1908 | $(OBJ_D)\s3_enc.obj + | ||
| 1909 | $(OBJ_D)\s3_lib.obj + | ||
| 1910 | $(OBJ_D)\s3_meth.obj + | ||
| 1911 | $(OBJ_D)\s3_pkt.obj + | ||
| 1912 | $(OBJ_D)\s3_srvr.obj + | ||
| 1913 | $(OBJ_D)\ssl_algs.obj + | ||
| 1914 | $(OBJ_D)\ssl_asn1.obj + | ||
| 1915 | $(OBJ_D)\ssl_cert.obj + | ||
| 1916 | $(OBJ_D)\ssl_ciph.obj + | ||
| 1917 | $(OBJ_D)\ssl_err.obj + | ||
| 1918 | $(OBJ_D)\ssl_err2.obj + | ||
| 1919 | $(OBJ_D)\ssl_lib.obj + | ||
| 1920 | $(OBJ_D)\ssl_rsa.obj + | ||
| 1921 | $(OBJ_D)\ssl_sess.obj + | ||
| 1922 | $(OBJ_D)\ssl_stat.obj + | ||
| 1923 | $(OBJ_D)\ssl_txt.obj + | ||
| 1924 | $(OBJ_D)\t1_clnt.obj + | ||
| 1925 | $(OBJ_D)\t1_enc.obj + | ||
| 1926 | $(OBJ_D)\t1_lib.obj + | ||
| 1927 | $(OBJ_D)\t1_meth.obj + | ||
| 1928 | $(OBJ_D)\t1_srvr.obj + | ||
| 1929 | |||
| 1930 | $(O_SSL) | ||
| 1931 | |||
| 1932 | $(L_CRYPTO) winsock oldnames ldllcew libw | ||
| 1933 | ms\ssleay16.def; | ||
| 1934 | << | ||
| 1935 | implib /noignorecase /nowep $(L_SSL) $(O_SSL) | ||
| 1936 | |||
| 1937 | $(O_RSAGLUE): $(RSAGLUEOBJ) | ||
| 1938 | del $(O_RSAGLUE) | ||
| 1939 | $(MKLIB) @<< | ||
| 1940 | $(O_RSAGLUE) | ||
| 1941 | y | ||
| 1942 | +$(OBJ_D)\rsar_err.obj & | ||
| 1943 | +$(OBJ_D)\rsaref.obj & | ||
| 1944 | |||
| 1945 | |||
| 1946 | << | ||
| 1947 | |||
| 1948 | $(O_CRYPTO): $(CRYPTOOBJ) | ||
| 1949 | $(LINK) $(MLFLAGS) @<< | ||
| 1950 | $(SHLIB_EX_OBJ) + | ||
| 1951 | $(BN_MULW_OBJ) + | ||
| 1952 | $(OBJ_D)\a_bitstr.obj + | ||
| 1953 | $(OBJ_D)\a_bool.obj + | ||
| 1954 | $(OBJ_D)\a_bytes.obj + | ||
| 1955 | $(OBJ_D)\a_d2i_fp.obj + | ||
| 1956 | $(OBJ_D)\a_digest.obj + | ||
| 1957 | $(OBJ_D)\a_dup.obj + | ||
| 1958 | $(OBJ_D)\a_hdr.obj + | ||
| 1959 | $(OBJ_D)\a_i2d_fp.obj + | ||
| 1960 | $(OBJ_D)\a_int.obj + | ||
| 1961 | $(OBJ_D)\a_meth.obj + | ||
| 1962 | $(OBJ_D)\a_object.obj + | ||
| 1963 | $(OBJ_D)\a_octet.obj + | ||
| 1964 | $(OBJ_D)\a_print.obj + | ||
| 1965 | $(OBJ_D)\a_set.obj + | ||
| 1966 | $(OBJ_D)\a_sign.obj + | ||
| 1967 | $(OBJ_D)\a_type.obj + | ||
| 1968 | $(OBJ_D)\a_utctm.obj + | ||
| 1969 | $(OBJ_D)\a_verify.obj + | ||
| 1970 | $(OBJ_D)\asn1_err.obj + | ||
| 1971 | $(OBJ_D)\asn1_lib.obj + | ||
| 1972 | $(OBJ_D)\asn1_par.obj + | ||
| 1973 | $(OBJ_D)\b_dump.obj + | ||
| 1974 | $(OBJ_D)\b_print.obj + | ||
| 1975 | $(OBJ_D)\b_sock.obj + | ||
| 1976 | $(OBJ_D)\bf_buff.obj + | ||
| 1977 | $(OBJ_D)\bf_cfb64.obj + | ||
| 1978 | $(OBJ_D)\bf_ecb.obj + | ||
| 1979 | $(OBJ_D)\bf_enc.obj + | ||
| 1980 | $(OBJ_D)\bf_nbio.obj + | ||
| 1981 | $(OBJ_D)\bf_null.obj + | ||
| 1982 | $(OBJ_D)\bf_ofb64.obj + | ||
| 1983 | $(OBJ_D)\bf_skey.obj + | ||
| 1984 | $(OBJ_D)\bio_b64.obj + | ||
| 1985 | $(OBJ_D)\bio_cb.obj + | ||
| 1986 | $(OBJ_D)\bio_enc.obj + | ||
| 1987 | $(OBJ_D)\bio_err.obj + | ||
| 1988 | $(OBJ_D)\bio_lib.obj + | ||
| 1989 | $(OBJ_D)\bio_md.obj + | ||
| 1990 | $(OBJ_D)\bn_add.obj + | ||
| 1991 | $(OBJ_D)\bn_blind.obj + | ||
| 1992 | $(OBJ_D)\bn_div.obj + | ||
| 1993 | $(OBJ_D)\bn_err.obj + | ||
| 1994 | $(OBJ_D)\bn_exp.obj + | ||
| 1995 | $(OBJ_D)\bn_gcd.obj + | ||
| 1996 | $(OBJ_D)\bn_lib.obj + | ||
| 1997 | $(OBJ_D)\bn_mod.obj + | ||
| 1998 | $(OBJ_D)\bn_mont.obj + | ||
| 1999 | $(OBJ_D)\bn_mpi.obj + | ||
| 2000 | $(OBJ_D)\bn_mul.obj + | ||
| 2001 | $(OBJ_D)\bn_prime.obj + | ||
| 2002 | $(OBJ_D)\bn_print.obj + | ||
| 2003 | $(OBJ_D)\bn_rand.obj + | ||
| 2004 | $(OBJ_D)\bn_recp.obj + | ||
| 2005 | $(OBJ_D)\bn_shift.obj + | ||
| 2006 | $(OBJ_D)\bn_sqr.obj + | ||
| 2007 | $(OBJ_D)\bn_sub.obj + | ||
| 2008 | $(OBJ_D)\bn_word.obj + | ||
| 2009 | $(OBJ_D)\bss_acpt.obj + | ||
| 2010 | $(OBJ_D)\bss_conn.obj + | ||
| 2011 | $(OBJ_D)\bss_fd.obj + | ||
| 2012 | $(OBJ_D)\bss_file.obj + | ||
| 2013 | $(OBJ_D)\bss_mem.obj + | ||
| 2014 | $(OBJ_D)\bss_null.obj + | ||
| 2015 | $(OBJ_D)\bss_sock.obj + | ||
| 2016 | $(OBJ_D)\buf_err.obj + | ||
| 2017 | $(OBJ_D)\buffer.obj + | ||
| 2018 | $(OBJ_D)\by_dir.obj + | ||
| 2019 | $(OBJ_D)\by_file.obj + | ||
| 2020 | $(OBJ_D)\c_all.obj + | ||
| 2021 | $(OBJ_D)\c_cfb64.obj + | ||
| 2022 | $(OBJ_D)\c_ecb.obj + | ||
| 2023 | $(OBJ_D)\c_enc.obj + | ||
| 2024 | $(OBJ_D)\c_ofb64.obj + | ||
| 2025 | $(OBJ_D)\c_skey.obj + | ||
| 2026 | $(OBJ_D)\cbc_cksm.obj + | ||
| 2027 | $(OBJ_D)\cbc_enc.obj + | ||
| 2028 | $(OBJ_D)\cfb64ede.obj + | ||
| 2029 | $(OBJ_D)\cfb64enc.obj + | ||
| 2030 | $(OBJ_D)\cfb_enc.obj + | ||
| 2031 | $(OBJ_D)\conf.obj + | ||
| 2032 | $(OBJ_D)\conf_err.obj + | ||
| 2033 | $(OBJ_D)\cpt_err.obj + | ||
| 2034 | $(OBJ_D)\cryptlib.obj + | ||
| 2035 | $(OBJ_D)\cversion.obj + | ||
| 2036 | $(OBJ_D)\d2i_dhp.obj + | ||
| 2037 | $(OBJ_D)\d2i_dsap.obj + | ||
| 2038 | $(OBJ_D)\d2i_pr.obj + | ||
| 2039 | $(OBJ_D)\d2i_pu.obj + | ||
| 2040 | $(OBJ_D)\d2i_r_pr.obj + | ||
| 2041 | $(OBJ_D)\d2i_r_pu.obj + | ||
| 2042 | $(OBJ_D)\d2i_s_pr.obj + | ||
| 2043 | $(OBJ_D)\d2i_s_pu.obj + | ||
| 2044 | $(OBJ_D)\des_enc.obj + | ||
| 2045 | $(OBJ_D)\dh_check.obj + | ||
| 2046 | $(OBJ_D)\dh_err.obj + | ||
| 2047 | $(OBJ_D)\dh_gen.obj + | ||
| 2048 | $(OBJ_D)\dh_key.obj + | ||
| 2049 | $(OBJ_D)\dh_lib.obj + | ||
| 2050 | $(OBJ_D)\digest.obj + | ||
| 2051 | $(OBJ_D)\dsa_err.obj + | ||
| 2052 | $(OBJ_D)\dsa_gen.obj + | ||
| 2053 | $(OBJ_D)\dsa_key.obj + | ||
| 2054 | $(OBJ_D)\dsa_lib.obj + | ||
| 2055 | $(OBJ_D)\dsa_sign.obj + | ||
| 2056 | $(OBJ_D)\dsa_vrf.obj + | ||
| 2057 | $(OBJ_D)\e_cbc_3d.obj + | ||
| 2058 | $(OBJ_D)\e_cbc_bf.obj + | ||
| 2059 | $(OBJ_D)\e_cbc_c.obj + | ||
| 2060 | $(OBJ_D)\e_cbc_d.obj + | ||
| 2061 | $(OBJ_D)\e_cbc_i.obj + | ||
| 2062 | $(OBJ_D)\e_cbc_r2.obj + | ||
| 2063 | $(OBJ_D)\e_cbc_r5.obj + | ||
| 2064 | $(OBJ_D)\e_cfb_3d.obj + | ||
| 2065 | $(OBJ_D)\e_cfb_bf.obj + | ||
| 2066 | $(OBJ_D)\e_cfb_c.obj + | ||
| 2067 | $(OBJ_D)\e_cfb_d.obj + | ||
| 2068 | $(OBJ_D)\e_cfb_i.obj + | ||
| 2069 | $(OBJ_D)\e_cfb_r2.obj + | ||
| 2070 | $(OBJ_D)\e_cfb_r5.obj + | ||
| 2071 | $(OBJ_D)\e_ecb_3d.obj + | ||
| 2072 | $(OBJ_D)\e_ecb_bf.obj + | ||
| 2073 | $(OBJ_D)\e_ecb_c.obj + | ||
| 2074 | $(OBJ_D)\e_ecb_d.obj + | ||
| 2075 | $(OBJ_D)\e_ecb_i.obj + | ||
| 2076 | $(OBJ_D)\e_ecb_r2.obj + | ||
| 2077 | $(OBJ_D)\e_ecb_r5.obj + | ||
| 2078 | $(OBJ_D)\e_null.obj + | ||
| 2079 | $(OBJ_D)\e_ofb_3d.obj + | ||
| 2080 | $(OBJ_D)\e_ofb_bf.obj + | ||
| 2081 | $(OBJ_D)\e_ofb_c.obj + | ||
| 2082 | $(OBJ_D)\e_ofb_d.obj + | ||
| 2083 | $(OBJ_D)\e_ofb_i.obj + | ||
| 2084 | $(OBJ_D)\e_ofb_r2.obj + | ||
| 2085 | $(OBJ_D)\e_ofb_r5.obj + | ||
| 2086 | $(OBJ_D)\e_rc4.obj + | ||
| 2087 | $(OBJ_D)\e_xcbc_d.obj + | ||
| 2088 | $(OBJ_D)\ecb3_enc.obj + | ||
| 2089 | $(OBJ_D)\ecb_enc.obj + | ||
| 2090 | $(OBJ_D)\enc_read.obj + | ||
| 2091 | $(OBJ_D)\enc_writ.obj + | ||
| 2092 | $(OBJ_D)\encode.obj + | ||
| 2093 | $(OBJ_D)\err.obj + | ||
| 2094 | $(OBJ_D)\err_all.obj + | ||
| 2095 | $(OBJ_D)\err_prn.obj + | ||
| 2096 | $(OBJ_D)\evp_asn1.obj + | ||
| 2097 | $(OBJ_D)\evp_enc.obj + | ||
| 2098 | $(OBJ_D)\evp_err.obj + | ||
| 2099 | $(OBJ_D)\evp_key.obj + | ||
| 2100 | $(OBJ_D)\evp_lib.obj + | ||
| 2101 | $(OBJ_D)\ex_data.obj + | ||
| 2102 | $(OBJ_D)\f_int.obj + | ||
| 2103 | $(OBJ_D)\f_string.obj + | ||
| 2104 | $(OBJ_D)\fcrypt.obj + | ||
| 2105 | $(OBJ_D)\fcrypt_b.obj + | ||
| 2106 | $(OBJ_D)\hmac.obj + | ||
| 2107 | $(OBJ_D)\i2d_dhp.obj + | ||
| 2108 | $(OBJ_D)\i2d_dsap.obj + | ||
| 2109 | $(OBJ_D)\i2d_pr.obj + | ||
| 2110 | $(OBJ_D)\i2d_pu.obj + | ||
| 2111 | $(OBJ_D)\i2d_r_pr.obj + | ||
| 2112 | $(OBJ_D)\i2d_r_pu.obj + | ||
| 2113 | $(OBJ_D)\i2d_s_pr.obj + | ||
| 2114 | $(OBJ_D)\i2d_s_pu.obj + | ||
| 2115 | $(OBJ_D)\i_cbc.obj + | ||
| 2116 | $(OBJ_D)\i_cfb64.obj + | ||
| 2117 | $(OBJ_D)\i_ecb.obj + | ||
| 2118 | $(OBJ_D)\i_ofb64.obj + | ||
| 2119 | $(OBJ_D)\i_skey.obj + | ||
| 2120 | $(OBJ_D)\lh_stats.obj + | ||
| 2121 | $(OBJ_D)\lhash.obj + | ||
| 2122 | $(OBJ_D)\m_dss.obj + | ||
| 2123 | $(OBJ_D)\m_dss1.obj + | ||
| 2124 | $(OBJ_D)\m_md2.obj + | ||
| 2125 | $(OBJ_D)\m_md5.obj + | ||
| 2126 | $(OBJ_D)\m_mdc2.obj + | ||
| 2127 | $(OBJ_D)\m_null.obj + | ||
| 2128 | $(OBJ_D)\m_ripemd.obj + | ||
| 2129 | $(OBJ_D)\m_sha.obj + | ||
| 2130 | $(OBJ_D)\m_sha1.obj + | ||
| 2131 | $(OBJ_D)\md2_dgst.obj + | ||
| 2132 | $(OBJ_D)\md2_one.obj + | ||
| 2133 | $(OBJ_D)\md5_dgst.obj + | ||
| 2134 | $(OBJ_D)\md5_one.obj + | ||
| 2135 | $(OBJ_D)\md_rand.obj + | ||
| 2136 | $(OBJ_D)\mdc2_one.obj + | ||
| 2137 | $(OBJ_D)\mdc2dgst.obj + | ||
| 2138 | $(OBJ_D)\mem.obj + | ||
| 2139 | $(OBJ_D)\n_pkey.obj + | ||
| 2140 | $(OBJ_D)\names.obj + | ||
| 2141 | $(OBJ_D)\obj_dat.obj + | ||
| 2142 | $(OBJ_D)\obj_err.obj + | ||
| 2143 | $(OBJ_D)\obj_lib.obj + | ||
| 2144 | $(OBJ_D)\ofb64ede.obj + | ||
| 2145 | $(OBJ_D)\ofb64enc.obj + | ||
| 2146 | $(OBJ_D)\ofb_enc.obj + | ||
| 2147 | $(OBJ_D)\p7_dgst.obj + | ||
| 2148 | $(OBJ_D)\p7_enc.obj + | ||
| 2149 | $(OBJ_D)\p7_enc_c.obj + | ||
| 2150 | $(OBJ_D)\p7_evp.obj + | ||
| 2151 | $(OBJ_D)\p7_i_s.obj + | ||
| 2152 | $(OBJ_D)\p7_lib.obj + | ||
| 2153 | $(OBJ_D)\p7_recip.obj + | ||
| 2154 | $(OBJ_D)\p7_s_e.obj + | ||
| 2155 | $(OBJ_D)\p7_signd.obj + | ||
| 2156 | $(OBJ_D)\p7_signi.obj + | ||
| 2157 | $(OBJ_D)\p_dec.obj + | ||
| 2158 | $(OBJ_D)\p_enc.obj + | ||
| 2159 | $(OBJ_D)\p_lib.obj + | ||
| 2160 | $(OBJ_D)\p_open.obj + | ||
| 2161 | $(OBJ_D)\p_seal.obj + | ||
| 2162 | $(OBJ_D)\p_sign.obj + | ||
| 2163 | $(OBJ_D)\p_verify.obj + | ||
| 2164 | $(OBJ_D)\pcbc_enc.obj + | ||
| 2165 | $(OBJ_D)\pem_all.obj + | ||
| 2166 | $(OBJ_D)\pem_err.obj + | ||
| 2167 | $(OBJ_D)\pem_info.obj + | ||
| 2168 | $(OBJ_D)\pem_lib.obj + | ||
| 2169 | $(OBJ_D)\pem_seal.obj + | ||
| 2170 | $(OBJ_D)\pem_sign.obj + | ||
| 2171 | $(OBJ_D)\pk7_doit.obj + | ||
| 2172 | $(OBJ_D)\pk7_lib.obj + | ||
| 2173 | $(OBJ_D)\pkcs7err.obj + | ||
| 2174 | $(OBJ_D)\qud_cksm.obj + | ||
| 2175 | $(OBJ_D)\rand_key.obj + | ||
| 2176 | $(OBJ_D)\randfile.obj + | ||
| 2177 | $(OBJ_D)\rc2_cbc.obj + | ||
| 2178 | $(OBJ_D)\rc2_ecb.obj + | ||
| 2179 | $(OBJ_D)\rc2_skey.obj + | ||
| 2180 | $(OBJ_D)\rc2cfb64.obj + | ||
| 2181 | $(OBJ_D)\rc2ofb64.obj + | ||
| 2182 | $(OBJ_D)\rc4_enc.obj + | ||
| 2183 | $(OBJ_D)\rc4_skey.obj + | ||
| 2184 | $(OBJ_D)\rc5_ecb.obj + | ||
| 2185 | $(OBJ_D)\rc5_enc.obj + | ||
| 2186 | $(OBJ_D)\rc5_skey.obj + | ||
| 2187 | $(OBJ_D)\rc5cfb64.obj + | ||
| 2188 | $(OBJ_D)\rc5ofb64.obj + | ||
| 2189 | $(OBJ_D)\read2pwd.obj + | ||
| 2190 | $(OBJ_D)\read_pwd.obj + | ||
| 2191 | $(OBJ_D)\rmd_dgst.obj + | ||
| 2192 | $(OBJ_D)\rmd_one.obj + | ||
| 2193 | $(OBJ_D)\rpc_enc.obj + | ||
| 2194 | $(OBJ_D)\rsa_eay.obj + | ||
| 2195 | $(OBJ_D)\rsa_err.obj + | ||
| 2196 | $(OBJ_D)\rsa_gen.obj + | ||
| 2197 | $(OBJ_D)\rsa_lib.obj + | ||
| 2198 | $(OBJ_D)\rsa_none.obj + | ||
| 2199 | $(OBJ_D)\rsa_pk1.obj + | ||
| 2200 | $(OBJ_D)\rsa_saos.obj + | ||
| 2201 | $(OBJ_D)\rsa_sign.obj + | ||
| 2202 | $(OBJ_D)\rsa_ssl.obj + | ||
| 2203 | $(OBJ_D)\set_key.obj + | ||
| 2204 | $(OBJ_D)\sha1_one.obj + | ||
| 2205 | $(OBJ_D)\sha1dgst.obj + | ||
| 2206 | $(OBJ_D)\sha_dgst.obj + | ||
| 2207 | $(OBJ_D)\sha_one.obj + | ||
| 2208 | $(OBJ_D)\stack.obj + | ||
| 2209 | $(OBJ_D)\str2key.obj + | ||
| 2210 | $(OBJ_D)\supp.obj + | ||
| 2211 | $(OBJ_D)\t_pkey.obj + | ||
| 2212 | $(OBJ_D)\t_req.obj + | ||
| 2213 | $(OBJ_D)\t_x509.obj + | ||
| 2214 | $(OBJ_D)\txt_db.obj + | ||
| 2215 | $(OBJ_D)\v3_net.obj + | ||
| 2216 | $(OBJ_D)\v3_x509.obj + | ||
| 2217 | $(OBJ_D)\x509_cmp.obj + | ||
| 2218 | $(OBJ_D)\x509_d2.obj + | ||
| 2219 | $(OBJ_D)\x509_def.obj + | ||
| 2220 | $(OBJ_D)\x509_err.obj + | ||
| 2221 | $(OBJ_D)\x509_ext.obj + | ||
| 2222 | $(OBJ_D)\x509_lu.obj + | ||
| 2223 | $(OBJ_D)\x509_obj.obj + | ||
| 2224 | $(OBJ_D)\x509_r2x.obj + | ||
| 2225 | $(OBJ_D)\x509_req.obj + | ||
| 2226 | $(OBJ_D)\x509_set.obj + | ||
| 2227 | $(OBJ_D)\x509_txt.obj + | ||
| 2228 | $(OBJ_D)\x509_v3.obj + | ||
| 2229 | $(OBJ_D)\x509_vfy.obj + | ||
| 2230 | $(OBJ_D)\x509name.obj + | ||
| 2231 | $(OBJ_D)\x509pack.obj + | ||
| 2232 | $(OBJ_D)\x509rset.obj + | ||
| 2233 | $(OBJ_D)\x509type.obj + | ||
| 2234 | $(OBJ_D)\x_algor.obj + | ||
| 2235 | $(OBJ_D)\x_all.obj + | ||
| 2236 | $(OBJ_D)\x_attrib.obj + | ||
| 2237 | $(OBJ_D)\x_cinf.obj + | ||
| 2238 | $(OBJ_D)\x_crl.obj + | ||
| 2239 | $(OBJ_D)\x_exten.obj + | ||
| 2240 | $(OBJ_D)\x_info.obj + | ||
| 2241 | $(OBJ_D)\x_name.obj + | ||
| 2242 | $(OBJ_D)\x_pkey.obj + | ||
| 2243 | $(OBJ_D)\x_pubkey.obj + | ||
| 2244 | $(OBJ_D)\x_req.obj + | ||
| 2245 | $(OBJ_D)\x_sig.obj + | ||
| 2246 | $(OBJ_D)\x_spki.obj + | ||
| 2247 | $(OBJ_D)\x_val.obj + | ||
| 2248 | $(OBJ_D)\x_x509.obj + | ||
| 2249 | $(OBJ_D)\xcbc_enc.obj + | ||
| 2250 | |||
| 2251 | $(O_CRYPTO) | ||
| 2252 | |||
| 2253 | winsock oldnames ldllcew libw | ||
| 2254 | ms\libeay16.def; | ||
| 2255 | << | ||
| 2256 | implib /noignorecase /nowep $(L_CRYPTO) $(O_CRYPTO) | ||
| 2257 | |||
| 2258 | $(BIN_D)\$(E_EXE).exe: $(E_OBJ) $(LIBS_DEP) | ||
| 2259 | $(LINK) $(LFLAGS) @<< | ||
| 2260 | $(APP_EX_OBJ) + | ||
| 2261 | $(OBJ_D)\apps.obj + | ||
| 2262 | $(OBJ_D)\asn1pars.obj + | ||
| 2263 | $(OBJ_D)\ca.obj + | ||
| 2264 | $(OBJ_D)\ciphers.obj + | ||
| 2265 | $(OBJ_D)\crl.obj + | ||
| 2266 | $(OBJ_D)\crl2p7.obj + | ||
| 2267 | $(OBJ_D)\dgst.obj + | ||
| 2268 | $(OBJ_D)\dh.obj + | ||
| 2269 | $(OBJ_D)\dsa.obj + | ||
| 2270 | $(OBJ_D)\dsaparam.obj + | ||
| 2271 | $(OBJ_D)\enc.obj + | ||
| 2272 | $(OBJ_D)\errstr.obj + | ||
| 2273 | $(OBJ_D)\gendh.obj + | ||
| 2274 | $(OBJ_D)\genrsa.obj + | ||
| 2275 | $(OBJ_D)\pkcs7.obj + | ||
| 2276 | $(OBJ_D)\req.obj + | ||
| 2277 | $(OBJ_D)\rsa.obj + | ||
| 2278 | $(OBJ_D)\s_cb.obj + | ||
| 2279 | $(OBJ_D)\s_client.obj + | ||
| 2280 | $(OBJ_D)\s_server.obj + | ||
| 2281 | $(OBJ_D)\s_socket.obj + | ||
| 2282 | $(OBJ_D)\s_time.obj + | ||
| 2283 | $(OBJ_D)\sess_id.obj + | ||
| 2284 | $(OBJ_D)\speed.obj + | ||
| 2285 | $(OBJ_D)\ssleay.obj + | ||
| 2286 | $(OBJ_D)\verify.obj + | ||
| 2287 | $(OBJ_D)\version.obj + | ||
| 2288 | $(OBJ_D)\x509.obj + | ||
| 2289 | |||
| 2290 | $(BIN_D)\$(E_EXE).exe | ||
| 2291 | |||
| 2292 | $(L_LIBS) $(EX_LIBS) | ||
| 2293 | |||
| 2294 | << | ||
| 2295 | |||
diff --git a/src/lib/libssl/src/mt/README b/src/lib/libssl/src/mt/README new file mode 100644 index 0000000000..df6b26e146 --- /dev/null +++ b/src/lib/libssl/src/mt/README | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | Mutithreading testing area. | ||
| 2 | |||
| 3 | Since this stuff is very very platorm specific, this is not part of the | ||
| 4 | normal build. Have a read of doc/threads.doc. | ||
| 5 | |||
| 6 | mttest will do some testing and will currently build under Windows NT/95, | ||
| 7 | Solaris and Linux. The IRIX stuff is not finished. | ||
| 8 | |||
| 9 | I have tested this program on a 12 CPU ultra sparc box (solaris 2.5.1) | ||
| 10 | and things seem to work ok. | ||
| 11 | |||
| 12 | The Linux pthreads package can be retrieved from | ||
| 13 | http://www.mit.edu:8001/people/proven/pthreads.html | ||
| 14 | |||
diff --git a/src/lib/libssl/src/mt/mttest.c b/src/lib/libssl/src/mt/mttest.c new file mode 100644 index 0000000000..8651a1131a --- /dev/null +++ b/src/lib/libssl/src/mt/mttest.c | |||
| @@ -0,0 +1,1115 @@ | |||
| 1 | /* mt/mttest.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 <stdlib.h> | ||
| 61 | #include <string.h> | ||
| 62 | #include <errno.h> | ||
| 63 | #ifdef LINUX | ||
| 64 | #include <typedefs.h> | ||
| 65 | #endif | ||
| 66 | #ifdef WIN32 | ||
| 67 | #include <windows.h> | ||
| 68 | #endif | ||
| 69 | #ifdef SOLARIS | ||
| 70 | #include <synch.h> | ||
| 71 | #include <thread.h> | ||
| 72 | #endif | ||
| 73 | #ifdef IRIX | ||
| 74 | #include <ulocks.h> | ||
| 75 | #include <sys/prctl.h> | ||
| 76 | #endif | ||
| 77 | #include "lhash.h" | ||
| 78 | #include "crypto.h" | ||
| 79 | #include "buffer.h" | ||
| 80 | #include "../e_os.h" | ||
| 81 | #include "x509.h" | ||
| 82 | #include "ssl.h" | ||
| 83 | #include "err.h" | ||
| 84 | |||
| 85 | #ifdef NO_FP_API | ||
| 86 | #define APPS_WIN16 | ||
| 87 | #include "../crypto/buffer/bss_file.c" | ||
| 88 | #endif | ||
| 89 | |||
| 90 | #define TEST_SERVER_CERT "../apps/server.pem" | ||
| 91 | #define TEST_CLIENT_CERT "../apps/client.pem" | ||
| 92 | |||
| 93 | #define MAX_THREAD_NUMBER 100 | ||
| 94 | |||
| 95 | #ifndef NOPROTO | ||
| 96 | int MS_CALLBACK verify_callback(int ok, X509 *xs, X509 *xi, int depth, | ||
| 97 | int error,char *arg); | ||
| 98 | void thread_setup(void); | ||
| 99 | void thread_cleanup(void); | ||
| 100 | void do_threads(SSL_CTX *s_ctx,SSL_CTX *c_ctx); | ||
| 101 | |||
| 102 | void irix_locking_callback(int mode,int type,char *file,int line); | ||
| 103 | void solaris_locking_callback(int mode,int type,char *file,int line); | ||
| 104 | void win32_locking_callback(int mode,int type,char *file,int line); | ||
| 105 | void pthreads_locking_callback(int mode,int type,char *file,int line); | ||
| 106 | |||
| 107 | unsigned long irix_thread_id(void ); | ||
| 108 | unsigned long solaris_thread_id(void ); | ||
| 109 | unsigned long pthreads_thread_id(void ); | ||
| 110 | |||
| 111 | #else | ||
| 112 | int MS_CALLBACK verify_callback(); | ||
| 113 | void thread_setup(); | ||
| 114 | void thread_cleanup(); | ||
| 115 | void do_threads(); | ||
| 116 | |||
| 117 | void irix_locking_callback(); | ||
| 118 | void solaris_locking_callback(); | ||
| 119 | void win32_locking_callback(); | ||
| 120 | void pthreads_locking_callback(); | ||
| 121 | |||
| 122 | unsigned long irix_thread_id(); | ||
| 123 | unsigned long solaris_thread_id(); | ||
| 124 | unsigned long pthreads_thread_id(); | ||
| 125 | |||
| 126 | #endif | ||
| 127 | |||
| 128 | BIO *bio_err=NULL; | ||
| 129 | BIO *bio_stdout=NULL; | ||
| 130 | |||
| 131 | static char *cipher=NULL; | ||
| 132 | int verbose=0; | ||
| 133 | #ifdef FIONBIO | ||
| 134 | static int s_nbio=0; | ||
| 135 | #endif | ||
| 136 | |||
| 137 | int thread_number=10; | ||
| 138 | int number_of_loops=10; | ||
| 139 | int reconnect=0; | ||
| 140 | int cache_stats=0; | ||
| 141 | |||
| 142 | #ifndef NOPROTO | ||
| 143 | int doit(char *ctx[4]); | ||
| 144 | #else | ||
| 145 | int doit(); | ||
| 146 | #endif | ||
| 147 | |||
| 148 | static void print_stats(fp,ctx) | ||
| 149 | FILE *fp; | ||
| 150 | SSL_CTX *ctx; | ||
| 151 | { | ||
| 152 | fprintf(fp,"%4ld items in the session cache\n", | ||
| 153 | SSL_CTX_sess_number(ctx)); | ||
| 154 | fprintf(fp,"%4d client connects (SSL_connect())\n", | ||
| 155 | SSL_CTX_sess_connect(ctx)); | ||
| 156 | fprintf(fp,"%4d client connects that finished\n", | ||
| 157 | SSL_CTX_sess_connect_good(ctx)); | ||
| 158 | fprintf(fp,"%4d server connects (SSL_accept())\n", | ||
| 159 | SSL_CTX_sess_accept(ctx)); | ||
| 160 | fprintf(fp,"%4d server connects that finished\n", | ||
| 161 | SSL_CTX_sess_accept_good(ctx)); | ||
| 162 | fprintf(fp,"%4d session cache hits\n",SSL_CTX_sess_hits(ctx)); | ||
| 163 | fprintf(fp,"%4d session cache misses\n",SSL_CTX_sess_misses(ctx)); | ||
| 164 | fprintf(fp,"%4d session cache timeouts\n",SSL_CTX_sess_timeouts(ctx)); | ||
| 165 | } | ||
| 166 | |||
| 167 | static void sv_usage() | ||
| 168 | { | ||
| 169 | fprintf(stderr,"usage: ssltest [args ...]\n"); | ||
| 170 | fprintf(stderr,"\n"); | ||
| 171 | fprintf(stderr," -server_auth - check server certificate\n"); | ||
| 172 | fprintf(stderr," -client_auth - do client authentication\n"); | ||
| 173 | fprintf(stderr," -v - more output\n"); | ||
| 174 | fprintf(stderr," -CApath arg - PEM format directory of CA's\n"); | ||
| 175 | fprintf(stderr," -CAfile arg - PEM format file of CA's\n"); | ||
| 176 | fprintf(stderr," -threads arg - number of threads\n"); | ||
| 177 | fprintf(stderr," -loops arg - number of 'connections', per thread\n"); | ||
| 178 | fprintf(stderr," -reconnect - reuse session-id's\n"); | ||
| 179 | fprintf(stderr," -stats - server session-id cache stats\n"); | ||
| 180 | fprintf(stderr," -cert arg - server certificate/key\n"); | ||
| 181 | fprintf(stderr," -ccert arg - client certificate/key\n"); | ||
| 182 | fprintf(stderr," -ssl3 - just SSLv3n\n"); | ||
| 183 | } | ||
| 184 | |||
| 185 | int main(argc, argv) | ||
| 186 | int argc; | ||
| 187 | char *argv[]; | ||
| 188 | { | ||
| 189 | char *CApath=NULL,*CAfile=NULL; | ||
| 190 | int badop=0; | ||
| 191 | int ret=1; | ||
| 192 | int client_auth=0; | ||
| 193 | int server_auth=0; | ||
| 194 | SSL_CTX *s_ctx=NULL; | ||
| 195 | SSL_CTX *c_ctx=NULL; | ||
| 196 | char *scert=TEST_SERVER_CERT; | ||
| 197 | char *ccert=TEST_CLIENT_CERT; | ||
| 198 | SSL_METHOD *ssl_method=SSLv23_method(); | ||
| 199 | |||
| 200 | if (bio_err == NULL) | ||
| 201 | bio_err=BIO_new_fp(stderr,BIO_NOCLOSE); | ||
| 202 | if (bio_stdout == NULL) | ||
| 203 | bio_stdout=BIO_new_fp(stdout,BIO_NOCLOSE); | ||
| 204 | argc--; | ||
| 205 | argv++; | ||
| 206 | |||
| 207 | while (argc >= 1) | ||
| 208 | { | ||
| 209 | if (strcmp(*argv,"-server_auth") == 0) | ||
| 210 | server_auth=1; | ||
| 211 | else if (strcmp(*argv,"-client_auth") == 0) | ||
| 212 | client_auth=1; | ||
| 213 | else if (strcmp(*argv,"-reconnect") == 0) | ||
| 214 | reconnect=1; | ||
| 215 | else if (strcmp(*argv,"-stats") == 0) | ||
| 216 | cache_stats=1; | ||
| 217 | else if (strcmp(*argv,"-ssl3") == 0) | ||
| 218 | ssl_method=SSLv3_method(); | ||
| 219 | else if (strcmp(*argv,"-ssl2") == 0) | ||
| 220 | ssl_method=SSLv2_method(); | ||
| 221 | else if (strcmp(*argv,"-CApath") == 0) | ||
| 222 | { | ||
| 223 | if (--argc < 1) goto bad; | ||
| 224 | CApath= *(++argv); | ||
| 225 | } | ||
| 226 | else if (strcmp(*argv,"-CAfile") == 0) | ||
| 227 | { | ||
| 228 | if (--argc < 1) goto bad; | ||
| 229 | CAfile= *(++argv); | ||
| 230 | } | ||
| 231 | else if (strcmp(*argv,"-cert") == 0) | ||
| 232 | { | ||
| 233 | if (--argc < 1) goto bad; | ||
| 234 | scert= *(++argv); | ||
| 235 | } | ||
| 236 | else if (strcmp(*argv,"-ccert") == 0) | ||
| 237 | { | ||
| 238 | if (--argc < 1) goto bad; | ||
| 239 | ccert= *(++argv); | ||
| 240 | } | ||
| 241 | else if (strcmp(*argv,"-threads") == 0) | ||
| 242 | { | ||
| 243 | if (--argc < 1) goto bad; | ||
| 244 | thread_number= atoi(*(++argv)); | ||
| 245 | if (thread_number == 0) thread_number=1; | ||
| 246 | if (thread_number > MAX_THREAD_NUMBER) | ||
| 247 | thread_number=MAX_THREAD_NUMBER; | ||
| 248 | } | ||
| 249 | else if (strcmp(*argv,"-loops") == 0) | ||
| 250 | { | ||
| 251 | if (--argc < 1) goto bad; | ||
| 252 | number_of_loops= atoi(*(++argv)); | ||
| 253 | if (number_of_loops == 0) number_of_loops=1; | ||
| 254 | } | ||
| 255 | else | ||
| 256 | { | ||
| 257 | fprintf(stderr,"unknown option %s\n",*argv); | ||
| 258 | badop=1; | ||
| 259 | break; | ||
| 260 | } | ||
| 261 | argc--; | ||
| 262 | argv++; | ||
| 263 | } | ||
| 264 | if (badop) | ||
| 265 | { | ||
| 266 | bad: | ||
| 267 | sv_usage(); | ||
| 268 | goto end; | ||
| 269 | } | ||
| 270 | |||
| 271 | if (cipher == NULL) cipher=getenv("SSL_CIPHER"); | ||
| 272 | |||
| 273 | SSL_load_error_strings(); | ||
| 274 | SSLeay_add_ssl_algorithms(); | ||
| 275 | |||
| 276 | c_ctx=SSL_CTX_new(ssl_method); | ||
| 277 | s_ctx=SSL_CTX_new(ssl_method); | ||
| 278 | if ((c_ctx == NULL) || (s_ctx == NULL)) | ||
| 279 | { | ||
| 280 | ERR_print_errors(bio_err); | ||
| 281 | goto end; | ||
| 282 | } | ||
| 283 | |||
| 284 | SSL_CTX_set_session_cache_mode(s_ctx, | ||
| 285 | SSL_SESS_CACHE_NO_AUTO_CLEAR|SSL_SESS_CACHE_SERVER); | ||
| 286 | SSL_CTX_set_session_cache_mode(c_ctx, | ||
| 287 | SSL_SESS_CACHE_NO_AUTO_CLEAR|SSL_SESS_CACHE_SERVER); | ||
| 288 | |||
| 289 | SSL_CTX_use_certificate_file(s_ctx,scert,SSL_FILETYPE_PEM); | ||
| 290 | SSL_CTX_use_RSAPrivateKey_file(s_ctx,scert,SSL_FILETYPE_PEM); | ||
| 291 | |||
| 292 | if (client_auth) | ||
| 293 | { | ||
| 294 | SSL_CTX_use_certificate_file(c_ctx,ccert, | ||
| 295 | SSL_FILETYPE_PEM); | ||
| 296 | SSL_CTX_use_RSAPrivateKey_file(c_ctx,ccert, | ||
| 297 | SSL_FILETYPE_PEM); | ||
| 298 | } | ||
| 299 | |||
| 300 | if ( (!SSL_CTX_load_verify_locations(s_ctx,CAfile,CApath)) || | ||
| 301 | (!SSL_CTX_set_default_verify_paths(s_ctx)) || | ||
| 302 | (!SSL_CTX_load_verify_locations(c_ctx,CAfile,CApath)) || | ||
| 303 | (!SSL_CTX_set_default_verify_paths(c_ctx))) | ||
| 304 | { | ||
| 305 | fprintf(stderr,"SSL_load_verify_locations\n"); | ||
| 306 | ERR_print_errors(bio_err); | ||
| 307 | goto end; | ||
| 308 | } | ||
| 309 | |||
| 310 | if (client_auth) | ||
| 311 | { | ||
| 312 | fprintf(stderr,"client authentication\n"); | ||
| 313 | SSL_CTX_set_verify(s_ctx, | ||
| 314 | SSL_VERIFY_PEER|SSL_VERIFY_FAIL_IF_NO_PEER_CERT, | ||
| 315 | verify_callback); | ||
| 316 | } | ||
| 317 | if (server_auth) | ||
| 318 | { | ||
| 319 | fprintf(stderr,"server authentication\n"); | ||
| 320 | SSL_CTX_set_verify(c_ctx,SSL_VERIFY_PEER, | ||
| 321 | verify_callback); | ||
| 322 | } | ||
| 323 | |||
| 324 | thread_setup(); | ||
| 325 | do_threads(s_ctx,c_ctx); | ||
| 326 | thread_cleanup(); | ||
| 327 | end: | ||
| 328 | |||
| 329 | if (c_ctx != NULL) | ||
| 330 | { | ||
| 331 | fprintf(stderr,"Client SSL_CTX stats then free it\n"); | ||
| 332 | print_stats(stderr,c_ctx); | ||
| 333 | SSL_CTX_free(c_ctx); | ||
| 334 | } | ||
| 335 | if (s_ctx != NULL) | ||
| 336 | { | ||
| 337 | fprintf(stderr,"Server SSL_CTX stats then free it\n"); | ||
| 338 | print_stats(stderr,s_ctx); | ||
| 339 | if (cache_stats) | ||
| 340 | { | ||
| 341 | fprintf(stderr,"-----\n"); | ||
| 342 | lh_stats(SSL_CTX_sessions(s_ctx),stderr); | ||
| 343 | fprintf(stderr,"-----\n"); | ||
| 344 | /* lh_node_stats(SSL_CTX_sessions(s_ctx),stderr); | ||
| 345 | fprintf(stderr,"-----\n"); */ | ||
| 346 | lh_node_usage_stats(SSL_CTX_sessions(s_ctx),stderr); | ||
| 347 | fprintf(stderr,"-----\n"); | ||
| 348 | } | ||
| 349 | SSL_CTX_free(s_ctx); | ||
| 350 | fprintf(stderr,"done free\n"); | ||
| 351 | } | ||
| 352 | exit(ret); | ||
| 353 | return(0); | ||
| 354 | } | ||
| 355 | |||
| 356 | #define W_READ 1 | ||
| 357 | #define W_WRITE 2 | ||
| 358 | #define C_DONE 1 | ||
| 359 | #define S_DONE 2 | ||
| 360 | |||
| 361 | int ndoit(ssl_ctx) | ||
| 362 | SSL_CTX *ssl_ctx[2]; | ||
| 363 | { | ||
| 364 | int i; | ||
| 365 | int ret; | ||
| 366 | char *ctx[4]; | ||
| 367 | |||
| 368 | ctx[0]=(char *)ssl_ctx[0]; | ||
| 369 | ctx[1]=(char *)ssl_ctx[1]; | ||
| 370 | |||
| 371 | if (reconnect) | ||
| 372 | { | ||
| 373 | ctx[2]=(char *)SSL_new(ssl_ctx[0]); | ||
| 374 | ctx[3]=(char *)SSL_new(ssl_ctx[1]); | ||
| 375 | } | ||
| 376 | else | ||
| 377 | { | ||
| 378 | ctx[2]=NULL; | ||
| 379 | ctx[3]=NULL; | ||
| 380 | } | ||
| 381 | |||
| 382 | fprintf(stdout,"started thread %lu\n",CRYPTO_thread_id()); | ||
| 383 | for (i=0; i<number_of_loops; i++) | ||
| 384 | { | ||
| 385 | /* fprintf(stderr,"%4d %2d ctx->ref (%3d,%3d)\n", | ||
| 386 | CRYPTO_thread_id(),i, | ||
| 387 | ssl_ctx[0]->references, | ||
| 388 | ssl_ctx[1]->references); */ | ||
| 389 | /* pthread_delay_np(&tm);*/ | ||
| 390 | |||
| 391 | ret=doit(ctx); | ||
| 392 | if (ret != 0) | ||
| 393 | { | ||
| 394 | fprintf(stdout,"error[%d] %lu - %d\n", | ||
| 395 | i,CRYPTO_thread_id(),ret); | ||
| 396 | return(ret); | ||
| 397 | } | ||
| 398 | } | ||
| 399 | fprintf(stdout,"DONE %lu\n",CRYPTO_thread_id()); | ||
| 400 | if (reconnect) | ||
| 401 | { | ||
| 402 | SSL_free((SSL *)ctx[2]); | ||
| 403 | SSL_free((SSL *)ctx[3]); | ||
| 404 | } | ||
| 405 | return(0); | ||
| 406 | } | ||
| 407 | |||
| 408 | int doit(ctx) | ||
| 409 | char *ctx[4]; | ||
| 410 | { | ||
| 411 | SSL_CTX *s_ctx,*c_ctx; | ||
| 412 | static char cbuf[200],sbuf[200]; | ||
| 413 | SSL *c_ssl=NULL; | ||
| 414 | SSL *s_ssl=NULL; | ||
| 415 | BIO *c_to_s=NULL; | ||
| 416 | BIO *s_to_c=NULL; | ||
| 417 | BIO *c_bio=NULL; | ||
| 418 | BIO *s_bio=NULL; | ||
| 419 | int c_r,c_w,s_r,s_w; | ||
| 420 | int c_want,s_want; | ||
| 421 | int i; | ||
| 422 | int done=0; | ||
| 423 | int c_write,s_write; | ||
| 424 | int do_server=0,do_client=0; | ||
| 425 | |||
| 426 | s_ctx=(SSL_CTX *)ctx[0]; | ||
| 427 | c_ctx=(SSL_CTX *)ctx[1]; | ||
| 428 | |||
| 429 | if (ctx[2] != NULL) | ||
| 430 | s_ssl=(SSL *)ctx[2]; | ||
| 431 | else | ||
| 432 | s_ssl=SSL_new(s_ctx); | ||
| 433 | |||
| 434 | if (ctx[3] != NULL) | ||
| 435 | c_ssl=(SSL *)ctx[3]; | ||
| 436 | else | ||
| 437 | c_ssl=SSL_new(c_ctx); | ||
| 438 | |||
| 439 | if ((s_ssl == NULL) || (c_ssl == NULL)) goto err; | ||
| 440 | |||
| 441 | c_to_s=BIO_new(BIO_s_mem()); | ||
| 442 | s_to_c=BIO_new(BIO_s_mem()); | ||
| 443 | if ((s_to_c == NULL) || (c_to_s == NULL)) goto err; | ||
| 444 | |||
| 445 | c_bio=BIO_new(BIO_f_ssl()); | ||
| 446 | s_bio=BIO_new(BIO_f_ssl()); | ||
| 447 | if ((c_bio == NULL) || (s_bio == NULL)) goto err; | ||
| 448 | |||
| 449 | SSL_set_connect_state(c_ssl); | ||
| 450 | SSL_set_bio(c_ssl,s_to_c,c_to_s); | ||
| 451 | BIO_set_ssl(c_bio,c_ssl,(ctx[2] == NULL)?BIO_CLOSE:BIO_NOCLOSE); | ||
| 452 | |||
| 453 | SSL_set_accept_state(s_ssl); | ||
| 454 | SSL_set_bio(s_ssl,c_to_s,s_to_c); | ||
| 455 | BIO_set_ssl(s_bio,s_ssl,(ctx[3] == NULL)?BIO_CLOSE:BIO_NOCLOSE); | ||
| 456 | |||
| 457 | c_r=0; s_r=1; | ||
| 458 | c_w=1; s_w=0; | ||
| 459 | c_want=W_WRITE; | ||
| 460 | s_want=0; | ||
| 461 | c_write=1,s_write=0; | ||
| 462 | |||
| 463 | /* We can always do writes */ | ||
| 464 | for (;;) | ||
| 465 | { | ||
| 466 | do_server=0; | ||
| 467 | do_client=0; | ||
| 468 | |||
| 469 | i=(int)BIO_pending(s_bio); | ||
| 470 | if ((i && s_r) || s_w) do_server=1; | ||
| 471 | |||
| 472 | i=(int)BIO_pending(c_bio); | ||
| 473 | if ((i && c_r) || c_w) do_client=1; | ||
| 474 | |||
| 475 | if (do_server && verbose) | ||
| 476 | { | ||
| 477 | if (SSL_in_init(s_ssl)) | ||
| 478 | printf("server waiting in SSL_accept - %s\n", | ||
| 479 | SSL_state_string_long(s_ssl)); | ||
| 480 | else if (s_write) | ||
| 481 | printf("server:SSL_write()\n"); | ||
| 482 | else | ||
| 483 | printf("server:SSL_read()\n"); | ||
| 484 | } | ||
| 485 | |||
| 486 | if (do_client && verbose) | ||
| 487 | { | ||
| 488 | if (SSL_in_init(c_ssl)) | ||
| 489 | printf("client waiting in SSL_connect - %s\n", | ||
| 490 | SSL_state_string_long(c_ssl)); | ||
| 491 | else if (c_write) | ||
| 492 | printf("client:SSL_write()\n"); | ||
| 493 | else | ||
| 494 | printf("client:SSL_read()\n"); | ||
| 495 | } | ||
| 496 | |||
| 497 | if (!do_client && !do_server) | ||
| 498 | { | ||
| 499 | fprintf(stdout,"ERROR IN STARTUP\n"); | ||
| 500 | break; | ||
| 501 | } | ||
| 502 | if (do_client && !(done & C_DONE)) | ||
| 503 | { | ||
| 504 | if (c_write) | ||
| 505 | { | ||
| 506 | i=BIO_write(c_bio,"hello from client\n",18); | ||
| 507 | if (i < 0) | ||
| 508 | { | ||
| 509 | c_r=0; | ||
| 510 | c_w=0; | ||
| 511 | if (BIO_should_retry(c_bio)) | ||
| 512 | { | ||
| 513 | if (BIO_should_read(c_bio)) | ||
| 514 | c_r=1; | ||
| 515 | if (BIO_should_write(c_bio)) | ||
| 516 | c_w=1; | ||
| 517 | } | ||
| 518 | else | ||
| 519 | { | ||
| 520 | fprintf(stderr,"ERROR in CLIENT\n"); | ||
| 521 | return(1); | ||
| 522 | } | ||
| 523 | } | ||
| 524 | else if (i == 0) | ||
| 525 | { | ||
| 526 | fprintf(stderr,"SSL CLIENT STARTUP FAILED\n"); | ||
| 527 | return(1); | ||
| 528 | } | ||
| 529 | else | ||
| 530 | { | ||
| 531 | /* ok */ | ||
| 532 | c_write=0; | ||
| 533 | } | ||
| 534 | } | ||
| 535 | else | ||
| 536 | { | ||
| 537 | i=BIO_read(c_bio,cbuf,100); | ||
| 538 | if (i < 0) | ||
| 539 | { | ||
| 540 | c_r=0; | ||
| 541 | c_w=0; | ||
| 542 | if (BIO_should_retry(c_bio)) | ||
| 543 | { | ||
| 544 | if (BIO_should_read(c_bio)) | ||
| 545 | c_r=1; | ||
| 546 | if (BIO_should_write(c_bio)) | ||
| 547 | c_w=1; | ||
| 548 | } | ||
| 549 | else | ||
| 550 | { | ||
| 551 | fprintf(stderr,"ERROR in CLIENT\n"); | ||
| 552 | return(1); | ||
| 553 | } | ||
| 554 | } | ||
| 555 | else if (i == 0) | ||
| 556 | { | ||
| 557 | fprintf(stderr,"SSL CLIENT STARTUP FAILED\n"); | ||
| 558 | return(1); | ||
| 559 | } | ||
| 560 | else | ||
| 561 | { | ||
| 562 | done|=C_DONE; | ||
| 563 | #ifdef undef | ||
| 564 | fprintf(stdout,"CLIENT:from server:"); | ||
| 565 | fwrite(cbuf,1,i,stdout); | ||
| 566 | fflush(stdout); | ||
| 567 | #endif | ||
| 568 | } | ||
| 569 | } | ||
| 570 | } | ||
| 571 | |||
| 572 | if (do_server && !(done & S_DONE)) | ||
| 573 | { | ||
| 574 | if (!s_write) | ||
| 575 | { | ||
| 576 | i=BIO_read(s_bio,sbuf,100); | ||
| 577 | if (i < 0) | ||
| 578 | { | ||
| 579 | s_r=0; | ||
| 580 | s_w=0; | ||
| 581 | if (BIO_should_retry(s_bio)) | ||
| 582 | { | ||
| 583 | if (BIO_should_read(s_bio)) | ||
| 584 | s_r=1; | ||
| 585 | if (BIO_should_write(s_bio)) | ||
| 586 | s_w=1; | ||
| 587 | } | ||
| 588 | else | ||
| 589 | { | ||
| 590 | fprintf(stderr,"ERROR in SERVER\n"); | ||
| 591 | ERR_print_errors_fp(stderr); | ||
| 592 | return(1); | ||
| 593 | } | ||
| 594 | } | ||
| 595 | else if (i == 0) | ||
| 596 | { | ||
| 597 | fprintf(stderr,"SSL SERVER STARTUP FAILED\n"); | ||
| 598 | return(1); | ||
| 599 | } | ||
| 600 | else | ||
| 601 | { | ||
| 602 | s_write=1; | ||
| 603 | s_w=1; | ||
| 604 | #ifdef undef | ||
| 605 | fprintf(stdout,"SERVER:from client:"); | ||
| 606 | fwrite(sbuf,1,i,stdout); | ||
| 607 | fflush(stdout); | ||
| 608 | #endif | ||
| 609 | } | ||
| 610 | } | ||
| 611 | else | ||
| 612 | { | ||
| 613 | i=BIO_write(s_bio,"hello from server\n",18); | ||
| 614 | if (i < 0) | ||
| 615 | { | ||
| 616 | s_r=0; | ||
| 617 | s_w=0; | ||
| 618 | if (BIO_should_retry(s_bio)) | ||
| 619 | { | ||
| 620 | if (BIO_should_read(s_bio)) | ||
| 621 | s_r=1; | ||
| 622 | if (BIO_should_write(s_bio)) | ||
| 623 | s_w=1; | ||
| 624 | } | ||
| 625 | else | ||
| 626 | { | ||
| 627 | fprintf(stderr,"ERROR in SERVER\n"); | ||
| 628 | ERR_print_errors_fp(stderr); | ||
| 629 | return(1); | ||
| 630 | } | ||
| 631 | } | ||
| 632 | else if (i == 0) | ||
| 633 | { | ||
| 634 | fprintf(stderr,"SSL SERVER STARTUP FAILED\n"); | ||
| 635 | return(1); | ||
| 636 | } | ||
| 637 | else | ||
| 638 | { | ||
| 639 | s_write=0; | ||
| 640 | s_r=1; | ||
| 641 | done|=S_DONE; | ||
| 642 | } | ||
| 643 | } | ||
| 644 | } | ||
| 645 | |||
| 646 | if ((done & S_DONE) && (done & C_DONE)) break; | ||
| 647 | } | ||
| 648 | |||
| 649 | SSL_set_shutdown(c_ssl,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); | ||
| 650 | SSL_set_shutdown(s_ssl,SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); | ||
| 651 | |||
| 652 | #ifdef undef | ||
| 653 | fprintf(stdout,"DONE\n"); | ||
| 654 | #endif | ||
| 655 | err: | ||
| 656 | /* We have to set the BIO's to NULL otherwise they will be | ||
| 657 | * free()ed twice. Once when th s_ssl is SSL_free()ed and | ||
| 658 | * again when c_ssl is SSL_free()ed. | ||
| 659 | * This is a hack required because s_ssl and c_ssl are sharing the same | ||
| 660 | * BIO structure and SSL_set_bio() and SSL_free() automatically | ||
| 661 | * BIO_free non NULL entries. | ||
| 662 | * You should not normally do this or be required to do this */ | ||
| 663 | |||
| 664 | if (s_ssl != NULL) | ||
| 665 | { | ||
| 666 | s_ssl->rbio=NULL; | ||
| 667 | s_ssl->wbio=NULL; | ||
| 668 | } | ||
| 669 | if (c_ssl != NULL) | ||
| 670 | { | ||
| 671 | c_ssl->rbio=NULL; | ||
| 672 | c_ssl->wbio=NULL; | ||
| 673 | } | ||
| 674 | |||
| 675 | /* The SSL's are optionally freed in the following calls */ | ||
| 676 | if (c_to_s != NULL) BIO_free(c_to_s); | ||
| 677 | if (s_to_c != NULL) BIO_free(s_to_c); | ||
| 678 | |||
| 679 | if (c_bio != NULL) BIO_free(c_bio); | ||
| 680 | if (s_bio != NULL) BIO_free(s_bio); | ||
| 681 | return(0); | ||
| 682 | } | ||
| 683 | |||
| 684 | int MS_CALLBACK verify_callback(ok, xs, xi, depth, error, arg) | ||
| 685 | int ok; | ||
| 686 | X509 *xs; | ||
| 687 | X509 *xi; | ||
| 688 | int depth; | ||
| 689 | int error; | ||
| 690 | char *arg; | ||
| 691 | { | ||
| 692 | char buf[256]; | ||
| 693 | |||
| 694 | if (verbose) | ||
| 695 | { | ||
| 696 | X509_NAME_oneline(X509_get_subject_name(xs),buf,256); | ||
| 697 | if (ok) | ||
| 698 | fprintf(stderr,"depth=%d %s\n",depth,buf); | ||
| 699 | else | ||
| 700 | fprintf(stderr,"depth=%d error=%d %s\n",depth,error,buf); | ||
| 701 | } | ||
| 702 | return(ok); | ||
| 703 | } | ||
| 704 | |||
| 705 | #define THREAD_STACK_SIZE (16*1024) | ||
| 706 | |||
| 707 | #ifdef WIN32 | ||
| 708 | |||
| 709 | static PRLOCK lock_cs[CRYPTO_NUM_LOCKS]; | ||
| 710 | |||
| 711 | void thread_setup() | ||
| 712 | { | ||
| 713 | int i; | ||
| 714 | |||
| 715 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 716 | { | ||
| 717 | lock_cs[i]=CreateMutex(NULL,FALSE,NULL); | ||
| 718 | } | ||
| 719 | |||
| 720 | CRYPTO_set_locking_callback((void (*)(int,int,char *,int))win32_locking_callback); | ||
| 721 | /* id callback defined */ | ||
| 722 | } | ||
| 723 | |||
| 724 | void thread_cleanup() | ||
| 725 | { | ||
| 726 | int i; | ||
| 727 | |||
| 728 | CRYPTO_set_locking_callback(NULL); | ||
| 729 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 730 | CloseHandle(lock_cs[i]); | ||
| 731 | } | ||
| 732 | |||
| 733 | void win32_locking_callback(mode,type,file,line) | ||
| 734 | int mode; | ||
| 735 | int type; | ||
| 736 | char *file; | ||
| 737 | int line; | ||
| 738 | { | ||
| 739 | if (mode & CRYPTO_LOCK) | ||
| 740 | { | ||
| 741 | WaitForSingleObject(lock_cs[type],INFINITE); | ||
| 742 | } | ||
| 743 | else | ||
| 744 | { | ||
| 745 | ReleaseMutex(lock_cs[type]); | ||
| 746 | } | ||
| 747 | } | ||
| 748 | |||
| 749 | void do_threads(s_ctx,c_ctx) | ||
| 750 | SSL_CTX *s_ctx,*c_ctx; | ||
| 751 | { | ||
| 752 | double ret; | ||
| 753 | SSL_CTX *ssl_ctx[2]; | ||
| 754 | DWORD thread_id[MAX_THREAD_NUMBER]; | ||
| 755 | HANDLE thread_handle[MAX_THREAD_NUMBER]; | ||
| 756 | int i; | ||
| 757 | SYSTEMTIME start,end; | ||
| 758 | |||
| 759 | ssl_ctx[0]=s_ctx; | ||
| 760 | ssl_ctx[1]=c_ctx; | ||
| 761 | |||
| 762 | GetSystemTime(&start); | ||
| 763 | for (i=0; i<thread_number; i++) | ||
| 764 | { | ||
| 765 | thread_handle[i]=CreateThread(NULL, | ||
| 766 | THREAD_STACK_SIZE, | ||
| 767 | (LPTHREAD_START_ROUTINE)ndoit, | ||
| 768 | (void *)ssl_ctx, | ||
| 769 | 0L, | ||
| 770 | &(thread_id[i])); | ||
| 771 | } | ||
| 772 | |||
| 773 | printf("reaping\n"); | ||
| 774 | for (i=0; i<thread_number; i+=50) | ||
| 775 | { | ||
| 776 | int j; | ||
| 777 | |||
| 778 | j=(thread_number < (i+50))?(thread_number-i):50; | ||
| 779 | |||
| 780 | if (WaitForMultipleObjects(j, | ||
| 781 | (CONST HANDLE *)&(thread_handle[i]),TRUE,INFINITE) | ||
| 782 | == WAIT_FAILED) | ||
| 783 | { | ||
| 784 | fprintf(stderr,"WaitForMultipleObjects failed:%d\n",GetLastError()); | ||
| 785 | exit(1); | ||
| 786 | } | ||
| 787 | } | ||
| 788 | GetSystemTime(&end); | ||
| 789 | |||
| 790 | if (start.wDayOfWeek > end.wDayOfWeek) end.wDayOfWeek+=7; | ||
| 791 | ret=(end.wDayOfWeek-start.wDayOfWeek)*24; | ||
| 792 | |||
| 793 | ret=(ret+end.wHour-start.wHour)*60; | ||
| 794 | ret=(ret+end.wMinute-start.wMinute)*60; | ||
| 795 | ret=(ret+end.wSecond-start.wSecond); | ||
| 796 | ret+=(end.wMilliseconds-start.wMilliseconds)/1000.0; | ||
| 797 | |||
| 798 | printf("win32 threads done - %.3f seconds\n",ret); | ||
| 799 | } | ||
| 800 | |||
| 801 | #endif /* WIN32 */ | ||
| 802 | |||
| 803 | #ifdef SOLARIS | ||
| 804 | |||
| 805 | static mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | ||
| 806 | /*static rwlock_t lock_cs[CRYPTO_NUM_LOCKS]; */ | ||
| 807 | static long lock_count[CRYPTO_NUM_LOCKS]; | ||
| 808 | |||
| 809 | void thread_setup() | ||
| 810 | { | ||
| 811 | int i; | ||
| 812 | |||
| 813 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 814 | { | ||
| 815 | lock_count[i]=0; | ||
| 816 | /* rwlock_init(&(lock_cs[i]),USYNC_THREAD,NULL); */ | ||
| 817 | mutex_init(&(lock_cs[i]),USYNC_THREAD,NULL); | ||
| 818 | } | ||
| 819 | |||
| 820 | CRYPTO_set_id_callback((unsigned long (*)())solaris_thread_id); | ||
| 821 | CRYPTO_set_locking_callback((void (*)())solaris_locking_callback); | ||
| 822 | } | ||
| 823 | |||
| 824 | void thread_cleanup() | ||
| 825 | { | ||
| 826 | int i; | ||
| 827 | |||
| 828 | CRYPTO_set_locking_callback(NULL); | ||
| 829 | fprintf(stderr,"cleanup\n"); | ||
| 830 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 831 | { | ||
| 832 | /* rwlock_destroy(&(lock_cs[i])); */ | ||
| 833 | mutex_destroy(&(lock_cs[i])); | ||
| 834 | fprintf(stderr,"%8ld:%s\n",lock_count[i],CRYPTO_get_lock_name(i)); | ||
| 835 | } | ||
| 836 | fprintf(stderr,"done cleanup\n"); | ||
| 837 | } | ||
| 838 | |||
| 839 | void solaris_locking_callback(mode,type,file,line) | ||
| 840 | int mode; | ||
| 841 | int type; | ||
| 842 | char *file; | ||
| 843 | int line; | ||
| 844 | { | ||
| 845 | #ifdef undef | ||
| 846 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | ||
| 847 | CRYPTO_thread_id(), | ||
| 848 | (mode&CRYPTO_LOCK)?"l":"u", | ||
| 849 | (type&CRYPTO_READ)?"r":"w",file,line); | ||
| 850 | #endif | ||
| 851 | |||
| 852 | /* | ||
| 853 | if (CRYPTO_LOCK_SSL_CERT == type) | ||
| 854 | fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", | ||
| 855 | CRYPTO_thread_id(), | ||
| 856 | mode,file,line); | ||
| 857 | */ | ||
| 858 | if (mode & CRYPTO_LOCK) | ||
| 859 | { | ||
| 860 | /* if (mode & CRYPTO_READ) | ||
| 861 | rw_rdlock(&(lock_cs[type])); | ||
| 862 | else | ||
| 863 | rw_wrlock(&(lock_cs[type])); */ | ||
| 864 | |||
| 865 | mutex_lock(&(lock_cs[type])); | ||
| 866 | lock_count[type]++; | ||
| 867 | } | ||
| 868 | else | ||
| 869 | { | ||
| 870 | /* rw_unlock(&(lock_cs[type])); */ | ||
| 871 | mutex_unlock(&(lock_cs[type])); | ||
| 872 | } | ||
| 873 | } | ||
| 874 | |||
| 875 | void do_threads(s_ctx,c_ctx) | ||
| 876 | SSL_CTX *s_ctx,*c_ctx; | ||
| 877 | { | ||
| 878 | SSL_CTX *ssl_ctx[2]; | ||
| 879 | thread_t thread_ctx[MAX_THREAD_NUMBER]; | ||
| 880 | int i; | ||
| 881 | |||
| 882 | ssl_ctx[0]=s_ctx; | ||
| 883 | ssl_ctx[1]=c_ctx; | ||
| 884 | |||
| 885 | thr_setconcurrency(thread_number); | ||
| 886 | for (i=0; i<thread_number; i++) | ||
| 887 | { | ||
| 888 | thr_create(NULL, THREAD_STACK_SIZE, | ||
| 889 | (void *(*)())ndoit, | ||
| 890 | (void *)ssl_ctx, | ||
| 891 | 0L, | ||
| 892 | &(thread_ctx[i])); | ||
| 893 | } | ||
| 894 | |||
| 895 | printf("reaping\n"); | ||
| 896 | for (i=0; i<thread_number; i++) | ||
| 897 | { | ||
| 898 | thr_join(thread_ctx[i],NULL,NULL); | ||
| 899 | } | ||
| 900 | |||
| 901 | printf("solaris threads done (%d,%d)\n", | ||
| 902 | s_ctx->references,c_ctx->references); | ||
| 903 | } | ||
| 904 | |||
| 905 | unsigned long solaris_thread_id() | ||
| 906 | { | ||
| 907 | unsigned long ret; | ||
| 908 | |||
| 909 | ret=(unsigned long)thr_self(); | ||
| 910 | return(ret); | ||
| 911 | } | ||
| 912 | #endif /* SOLARIS */ | ||
| 913 | |||
| 914 | #ifdef IRIX | ||
| 915 | |||
| 916 | |||
| 917 | static usptr_t *arena; | ||
| 918 | static usema_t *lock_cs[CRYPTO_NUM_LOCKS]; | ||
| 919 | |||
| 920 | void thread_setup() | ||
| 921 | { | ||
| 922 | int i; | ||
| 923 | char filename[20]; | ||
| 924 | |||
| 925 | strcpy(filename,"/tmp/mttest.XXXXXX"); | ||
| 926 | mktemp(filename); | ||
| 927 | |||
| 928 | usconfig(CONF_STHREADIOOFF); | ||
| 929 | usconfig(CONF_STHREADMALLOCOFF); | ||
| 930 | usconfig(CONF_INITUSERS,100); | ||
| 931 | usconfig(CONF_LOCKTYPE,US_DEBUGPLUS); | ||
| 932 | arena=usinit(filename); | ||
| 933 | unlink(filename); | ||
| 934 | |||
| 935 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 936 | { | ||
| 937 | lock_cs[i]=usnewsema(arena,1); | ||
| 938 | } | ||
| 939 | |||
| 940 | CRYPTO_set_id_callback((unsigned long (*)())irix_thread_id); | ||
| 941 | CRYPTO_set_locking_callback((void (*)())irix_locking_callback); | ||
| 942 | } | ||
| 943 | |||
| 944 | void thread_cleanup() | ||
| 945 | { | ||
| 946 | int i; | ||
| 947 | |||
| 948 | CRYPTO_set_locking_callback(NULL); | ||
| 949 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 950 | { | ||
| 951 | char buf[10]; | ||
| 952 | |||
| 953 | sprintf(buf,"%2d:",i); | ||
| 954 | usdumpsema(lock_cs[i],stdout,buf); | ||
| 955 | usfreesema(lock_cs[i],arena); | ||
| 956 | } | ||
| 957 | } | ||
| 958 | |||
| 959 | void irix_locking_callback(mode,type,file,line) | ||
| 960 | int mode; | ||
| 961 | int type; | ||
| 962 | char *file; | ||
| 963 | int line; | ||
| 964 | { | ||
| 965 | if (mode & CRYPTO_LOCK) | ||
| 966 | { | ||
| 967 | printf("lock %d\n",type); | ||
| 968 | uspsema(lock_cs[type]); | ||
| 969 | } | ||
| 970 | else | ||
| 971 | { | ||
| 972 | printf("unlock %d\n",type); | ||
| 973 | usvsema(lock_cs[type]); | ||
| 974 | } | ||
| 975 | } | ||
| 976 | |||
| 977 | void do_threads(s_ctx,c_ctx) | ||
| 978 | SSL_CTX *s_ctx,*c_ctx; | ||
| 979 | { | ||
| 980 | SSL_CTX *ssl_ctx[2]; | ||
| 981 | int thread_ctx[MAX_THREAD_NUMBER]; | ||
| 982 | int i; | ||
| 983 | |||
| 984 | ssl_ctx[0]=s_ctx; | ||
| 985 | ssl_ctx[1]=c_ctx; | ||
| 986 | |||
| 987 | for (i=0; i<thread_number; i++) | ||
| 988 | { | ||
| 989 | thread_ctx[i]=sproc((void (*)())ndoit, | ||
| 990 | PR_SADDR|PR_SFDS,(void *)ssl_ctx); | ||
| 991 | } | ||
| 992 | |||
| 993 | printf("reaping\n"); | ||
| 994 | for (i=0; i<thread_number; i++) | ||
| 995 | { | ||
| 996 | wait(NULL); | ||
| 997 | } | ||
| 998 | |||
| 999 | printf("irix threads done (%d,%d)\n", | ||
| 1000 | s_ctx->references,c_ctx->references); | ||
| 1001 | } | ||
| 1002 | |||
| 1003 | unsigned long irix_thread_id() | ||
| 1004 | { | ||
| 1005 | unsigned long ret; | ||
| 1006 | |||
| 1007 | ret=(unsigned long)getpid(); | ||
| 1008 | return(ret); | ||
| 1009 | } | ||
| 1010 | #endif /* IRIX */ | ||
| 1011 | |||
| 1012 | #ifdef PTHREADS | ||
| 1013 | |||
| 1014 | static pthread_mutex_t lock_cs[CRYPTO_NUM_LOCKS]; | ||
| 1015 | static long lock_count[CRYPTO_NUM_LOCKS]; | ||
| 1016 | |||
| 1017 | void thread_setup() | ||
| 1018 | { | ||
| 1019 | int i; | ||
| 1020 | |||
| 1021 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 1022 | { | ||
| 1023 | lock_count[i]=0; | ||
| 1024 | pthread_mutex_init(&(lock_cs[i]),NULL); | ||
| 1025 | } | ||
| 1026 | |||
| 1027 | CRYPTO_set_id_callback((unsigned long (*)())pthreads_thread_id); | ||
| 1028 | CRYPTO_set_locking_callback((void (*)())pthreads_locking_callback); | ||
| 1029 | } | ||
| 1030 | |||
| 1031 | void thread_cleanup() | ||
| 1032 | { | ||
| 1033 | int i; | ||
| 1034 | |||
| 1035 | CRYPTO_set_locking_callback(NULL); | ||
| 1036 | fprintf(stderr,"cleanup\n"); | ||
| 1037 | for (i=0; i<CRYPTO_NUM_LOCKS; i++) | ||
| 1038 | { | ||
| 1039 | pthread_mutex_destroy(&(lock_cs[i])); | ||
| 1040 | fprintf(stderr,"%8ld:%s\n",lock_count[i], | ||
| 1041 | CRYPTO_get_lock_name(i)); | ||
| 1042 | } | ||
| 1043 | fprintf(stderr,"done cleanup\n"); | ||
| 1044 | } | ||
| 1045 | |||
| 1046 | void pthreads_locking_callback(mode,type,file,line) | ||
| 1047 | int mode; | ||
| 1048 | int type; | ||
| 1049 | char *file; | ||
| 1050 | int line; | ||
| 1051 | { | ||
| 1052 | #ifdef undef | ||
| 1053 | fprintf(stderr,"thread=%4d mode=%s lock=%s %s:%d\n", | ||
| 1054 | CRYPTO_thread_id(), | ||
| 1055 | (mode&CRYPTO_LOCK)?"l":"u", | ||
| 1056 | (type&CRYPTO_READ)?"r":"w",file,line); | ||
| 1057 | #endif | ||
| 1058 | /* | ||
| 1059 | if (CRYPTO_LOCK_SSL_CERT == type) | ||
| 1060 | fprintf(stderr,"(t,m,f,l) %ld %d %s %d\n", | ||
| 1061 | CRYPTO_thread_id(), | ||
| 1062 | mode,file,line); | ||
| 1063 | */ | ||
| 1064 | if (mode & CRYPTO_LOCK) | ||
| 1065 | { | ||
| 1066 | pthread_mutex_lock(&(lock_cs[type])); | ||
| 1067 | lock_count[type]++; | ||
| 1068 | } | ||
| 1069 | else | ||
| 1070 | { | ||
| 1071 | pthread_mutex_unlock(&(lock_cs[type])); | ||
| 1072 | } | ||
| 1073 | } | ||
| 1074 | |||
| 1075 | void do_threads(s_ctx,c_ctx) | ||
| 1076 | SSL_CTX *s_ctx,*c_ctx; | ||
| 1077 | { | ||
| 1078 | SSL_CTX *ssl_ctx[2]; | ||
| 1079 | pthread_t thread_ctx[MAX_THREAD_NUMBER]; | ||
| 1080 | int i; | ||
| 1081 | |||
| 1082 | ssl_ctx[0]=s_ctx; | ||
| 1083 | ssl_ctx[1]=c_ctx; | ||
| 1084 | |||
| 1085 | /* | ||
| 1086 | thr_setconcurrency(thread_number); | ||
| 1087 | */ | ||
| 1088 | for (i=0; i<thread_number; i++) | ||
| 1089 | { | ||
| 1090 | pthread_create(&(thread_ctx[i]), NULL, | ||
| 1091 | (void *(*)())ndoit, (void *)ssl_ctx); | ||
| 1092 | } | ||
| 1093 | |||
| 1094 | printf("reaping\n"); | ||
| 1095 | for (i=0; i<thread_number; i++) | ||
| 1096 | { | ||
| 1097 | pthread_join(thread_ctx[i],NULL); | ||
| 1098 | } | ||
| 1099 | |||
| 1100 | printf("pthreads threads done (%d,%d)\n", | ||
| 1101 | s_ctx->references,c_ctx->references); | ||
| 1102 | } | ||
| 1103 | |||
| 1104 | unsigned long pthreads_thread_id() | ||
| 1105 | { | ||
| 1106 | unsigned long ret; | ||
| 1107 | |||
| 1108 | ret=(unsigned long)pthread_self(); | ||
| 1109 | return(ret); | ||
| 1110 | } | ||
| 1111 | |||
| 1112 | #endif /* PTHREADS */ | ||
| 1113 | |||
| 1114 | |||
| 1115 | |||
diff --git a/src/lib/libssl/src/mt/profile.sh b/src/lib/libssl/src/mt/profile.sh new file mode 100644 index 0000000000..de5eb06708 --- /dev/null +++ b/src/lib/libssl/src/mt/profile.sh | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | /bin/rm -f mttest | ||
| 3 | cc -p -DSOLARIS -I../include -g mttest.c -o mttest -L/usr/lib/libc -ldl -L.. -lthread -lssl -lcrypto -lnsl -lsocket | ||
| 4 | |||
diff --git a/src/lib/libssl/src/mt/ptest.bat b/src/lib/libssl/src/mt/ptest.bat new file mode 100644 index 0000000000..ccaccae09d --- /dev/null +++ b/src/lib/libssl/src/mt/ptest.bat | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | del mttest.exe | ||
| 2 | |||
| 3 | purify cl /O2 -DWIN32 /MD -I..\out mttest.c /Femttest ..\out\ssl32.lib ..\out\crypt32.lib | ||
| 4 | |||
diff --git a/src/lib/libssl/src/mt/pthread.sh b/src/lib/libssl/src/mt/pthread.sh new file mode 100644 index 0000000000..7d0b6e55f5 --- /dev/null +++ b/src/lib/libssl/src/mt/pthread.sh | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # build using pthreads | ||
| 4 | # | ||
| 5 | # http://www.mit.edu:8001/people/proven/pthreads.html | ||
| 6 | # | ||
| 7 | /bin/rm -f mttest | ||
| 8 | pgcc -DPTHREADS -I../include -g mttest.c -o mttest -L.. -lssl -lcrypto | ||
| 9 | |||
diff --git a/src/lib/libssl/src/mt/purify.sh b/src/lib/libssl/src/mt/purify.sh new file mode 100644 index 0000000000..57c4017073 --- /dev/null +++ b/src/lib/libssl/src/mt/purify.sh | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | /bin/rm -f mttest | ||
| 3 | purify cc -DSOLARIS -I../include -g mttest.c -o mttest -L.. -lthread -lssl -lcrypto -lnsl -lsocket | ||
| 4 | |||
diff --git a/src/lib/libssl/src/mt/solaris.sh b/src/lib/libssl/src/mt/solaris.sh new file mode 100644 index 0000000000..f6a90b17ee --- /dev/null +++ b/src/lib/libssl/src/mt/solaris.sh | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | /bin/rm -f mttest | ||
| 3 | cc -DSOLARIS -I../include -g mttest.c -o mttest -L.. -lthread -lssl -lcrypto -lnsl -lsocket | ||
| 4 | |||
diff --git a/src/lib/libssl/src/mt/win32.bat b/src/lib/libssl/src/mt/win32.bat new file mode 100644 index 0000000000..56089f69be --- /dev/null +++ b/src/lib/libssl/src/mt/win32.bat | |||
| @@ -0,0 +1,4 @@ | |||
| 1 | del mttest.exe | ||
| 2 | |||
| 3 | cl /O2 -DWIN32 /MD -I..\out mttest.c /Femttest ..\out\ssleay32.lib ..\out\libeay32.lib | ||
| 4 | |||
diff --git a/src/lib/libssl/src/perl/MANIFEST b/src/lib/libssl/src/perl/MANIFEST new file mode 100644 index 0000000000..992db5ed4c --- /dev/null +++ b/src/lib/libssl/src/perl/MANIFEST | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | MANIFEST | ||
| 2 | Makefile.PL | ||
| 3 | SSLeay.pm | ||
| 4 | bio.xs | ||
| 5 | bn.xs | ||
| 6 | cipher.xs | ||
| 7 | digest.xs | ||
| 8 | err.xs | ||
| 9 | ssl.xs | ||
| 10 | x509.xs | ||
| 11 | test.pl | ||
| 12 | test2.pl | ||
| 13 | test3.pl | ||
| 14 | test9.pl | ||
| 15 | testbn.pl | ||
| 16 | testmd.pl | ||
| 17 | typemap | ||
diff --git a/src/lib/libssl/src/perl/Makefile.PL b/src/lib/libssl/src/perl/Makefile.PL new file mode 100644 index 0000000000..f9998e0a61 --- /dev/null +++ b/src/lib/libssl/src/perl/Makefile.PL | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | use ExtUtils::MakeMaker; | ||
| 2 | # See lib/ExtUtils/MakeMaker.pm for details of how to influence | ||
| 3 | # the contents of the Makefile that is written. | ||
| 4 | WriteMakefile( | ||
| 5 | 'OPTIMIZE' => '-g', | ||
| 6 | 'DISTNAME' => 'SSLeay-perl5-0.8.5', | ||
| 7 | 'NAME' => 'SSLeay', | ||
| 8 | 'VERSION_FROM' => 'SSLeay.pm', | ||
| 9 | 'LIBS' => ['-L.. -lssl -lcrypto'], | ||
| 10 | 'DEFINE' => '', | ||
| 11 | 'INC' => '-I../include', | ||
| 12 | 'C' => ['callback.c'], | ||
| 13 | 'H' => ['p5SSLeay.h'], | ||
| 14 | 'OBJECT' => " SSLeay.o bio.o bn.o cipher.o digest.o err.o | ||
| 15 | ssl.o x509.o", | ||
| 16 | 'XS' => { 'SSLeay.xs' => 'SSLeay.c', | ||
| 17 | 'bio.xs' => 'bio.c', | ||
| 18 | 'bn.xs' => 'bn.c', | ||
| 19 | 'cipher.xs' => 'cipher.c', | ||
| 20 | 'digest.xs' => 'digest.c', | ||
| 21 | 'err.xs' => 'err.c', | ||
| 22 | 'ssl.xs' => 'ssl.c', | ||
| 23 | 'x509.xs' => 'x509.c', | ||
| 24 | } | ||
| 25 | ); | ||
diff --git a/src/lib/libssl/src/perl/SSLeay.pm b/src/lib/libssl/src/perl/SSLeay.pm new file mode 100644 index 0000000000..f7710039d2 --- /dev/null +++ b/src/lib/libssl/src/perl/SSLeay.pm | |||
| @@ -0,0 +1,78 @@ | |||
| 1 | package SSLeay; | ||
| 2 | |||
| 3 | use Exporter; | ||
| 4 | use DynaLoader; | ||
| 5 | |||
| 6 | @ISA = qw(Exporter DynaLoader); | ||
| 7 | @EXPORT = qw(); | ||
| 8 | |||
| 9 | $VERSION='0.82'; | ||
| 10 | $VERSION='0.82'; | ||
| 11 | bootstrap SSLeay; | ||
| 12 | |||
| 13 | @SSLeay::BN::ISA= qw(SSLeay::ERR); | ||
| 14 | @SSLeay::MD::ISA= qw(SSLeay::ERR); | ||
| 15 | @SSLeay::Cipher::ISA= qw(SSLeay::ERR); | ||
| 16 | @SSLeay::SSL::CTX::ISA= qw(SSLeay::ERR); | ||
| 17 | @SSLeay::BIO::ISA= qw(SSLeay::ERR); | ||
| 18 | @SSLeay::SSL::ISA= qw(SSLeay::ERR); | ||
| 19 | |||
| 20 | @BN::ISA= qw(SSLeay::BN); | ||
| 21 | @MD::ISA= qw(SSLeay::MD); | ||
| 22 | @Cipher::ISA= qw(SSLeay::Cipher); | ||
| 23 | @SSL::ISA= qw(SSLeay::SSL); | ||
| 24 | @SSL::CTX::ISA= qw(SSLeay::SSL::CTX); | ||
| 25 | @BIO::ISA= qw(SSLeay::BIO); | ||
| 26 | |||
| 27 | |||
| 28 | @SSLeay::MD::names=qw(md2 md5 sha sha1 ripemd160 mdc2); | ||
| 29 | |||
| 30 | @SSLeay::Cipher::names=qw( | ||
| 31 | des-ecb des-cfb des-ofb des-cbc | ||
| 32 | des-ede des-ede-cfb des-ede-ofb des-ede-cbc | ||
| 33 | des-ede3 des-ede3-cfb des-ede3-ofb des-ede3-cbc | ||
| 34 | desx-cbc rc4 rc4-40 | ||
| 35 | idea-ecb idea-cfb idea-ofb idea-cbc | ||
| 36 | rc2-ecb rc2-cbc rc2-40-cbc rc2-cfb rc2-ofb | ||
| 37 | bf-ecb bf-cfb bf-ofb bf-cbc | ||
| 38 | cast5-ecb cast5-cfb cast5-ofb cast5-cbc | ||
| 39 | rc5-ecb rc5-cfb rc5-ofb rc5-cbc | ||
| 40 | ); | ||
| 41 | |||
| 42 | sub SSLeay::SSL::CTX::new_ssl { SSLeay::SSL::new($_[0]); } | ||
| 43 | |||
| 44 | sub SSLeay::ERR::error | ||
| 45 | { | ||
| 46 | my($o)=@_; | ||
| 47 | my($s,$ret); | ||
| 48 | |||
| 49 | while (($s=$o->get_error()) != 0) | ||
| 50 | { | ||
| 51 | $ret.=$s."\n"; | ||
| 52 | } | ||
| 53 | return($ret); | ||
| 54 | } | ||
| 55 | |||
| 56 | @SSLeay::Cipher::aliases=qw(des desx des3 idea rc2 bf cast); | ||
| 57 | |||
| 58 | package SSLeay::BN; | ||
| 59 | |||
| 60 | sub bnfix { (ref($_[0]) ne "SSLeay::BN")?SSLeay::BN::dec2bn($_[0]):$_[0]; } | ||
| 61 | use overload | ||
| 62 | "=" => sub { dup($_[0]); }, | ||
| 63 | "+" => sub { add($_[0],$_[1]); }, | ||
| 64 | "-" => sub { ($_[1],$_[0])=($_[0],$_[1]) if $_[2]; | ||
| 65 | SSLeay::BN::sub($_[0],$_[1]); }, | ||
| 66 | "*" => sub { mul($_[0],$_[1]); }, | ||
| 67 | "/" => sub { ($_[1],$_[0])=($_[0],$_[1]) if $_[2]; (div($_[0],$_[1]))[0]; }, | ||
| 68 | "%" => sub { ($_[1],$_[0])=($_[0],$_[1]) if $_[2]; mod($_[0],$_[1]); }, | ||
| 69 | "**" => sub { ($_[1],$_[0])=($_[0],$_[1]) if $_[2]; exp($_[0],$_[1]); }, | ||
| 70 | "<<" => sub { lshift($_[0],$_[1]); }, | ||
| 71 | ">>" => sub { rshift($_[0],$_[1]); }, | ||
| 72 | "<=>" => sub { SSLeay::BN::cmp($_[0],$_[1]); }, | ||
| 73 | '""' => sub { bn2dec($_[0]); }, | ||
| 74 | '0+' => sub { dec2bn($_[0]); }, | ||
| 75 | "bool" => sub { ref($_[0]) eq "SSLeay::BN"; }; | ||
| 76 | |||
| 77 | sub SSLeay::BIO::do_accept { SSLeay::BIO::do_handshake(@_); } | ||
| 78 | 1; | ||
diff --git a/src/lib/libssl/src/perl/SSLeay.xs b/src/lib/libssl/src/perl/SSLeay.xs new file mode 100644 index 0000000000..582b5705aa --- /dev/null +++ b/src/lib/libssl/src/perl/SSLeay.xs | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | #include "p5SSLeay.h" | ||
| 2 | |||
| 3 | SV *new_ref(type,obj,mort) | ||
| 4 | char *type; | ||
| 5 | char *obj; | ||
| 6 | { | ||
| 7 | SV *ret; | ||
| 8 | |||
| 9 | if (mort) | ||
| 10 | ret=sv_newmortal(); | ||
| 11 | else | ||
| 12 | ret=newSViv(0); | ||
| 13 | sv_setref_pv(ret,type,(void *)obj); | ||
| 14 | return(ret); | ||
| 15 | } | ||
| 16 | |||
| 17 | int ex_new(obj,data,ad,idx,argl,argp) | ||
| 18 | char *obj; | ||
| 19 | SV *data; | ||
| 20 | CRYPTO_EX_DATA *ad; | ||
| 21 | int idx; | ||
| 22 | long argl; | ||
| 23 | char *argp; | ||
| 24 | { | ||
| 25 | SV *sv; | ||
| 26 | |||
| 27 | fprintf(stderr,"ex_new %08X %s\n",obj,argp); | ||
| 28 | sv=sv_newmortal(); | ||
| 29 | sv_setref_pv(sv,argp,(void *)obj); | ||
| 30 | CRYPTO_set_ex_data(ad,idx,(char *)sv); | ||
| 31 | return(1); | ||
| 32 | } | ||
| 33 | |||
| 34 | void ex_cleanup(obj,data,ad,idx,argl,argp) | ||
| 35 | char *obj; | ||
| 36 | SV *data; | ||
| 37 | CRYPTO_EX_DATA *ad; | ||
| 38 | int idx; | ||
| 39 | long argl; | ||
| 40 | char *argp; | ||
| 41 | { | ||
| 42 | pr_name("ex_cleanup"); | ||
| 43 | fprintf(stderr,"ex_cleanup %08X %s\n",obj,argp); | ||
| 44 | if (data != NULL) | ||
| 45 | SvREFCNT_dec((SV *)data); | ||
| 46 | } | ||
| 47 | |||
| 48 | MODULE = SSLeay PACKAGE = SSLeay | ||
| 49 | |||
| 50 | BOOT: | ||
| 51 | boot_bio(); | ||
| 52 | boot_cipher(); | ||
| 53 | boot_digest(); | ||
| 54 | boot_err(); | ||
| 55 | boot_ssl(); | ||
| 56 | boot_SSLeay__BN(); | ||
| 57 | boot_SSLeay__BIO(); | ||
| 58 | boot_SSLeay__Cipher(); | ||
| 59 | boot_SSLeay__MD(); | ||
| 60 | boot_SSLeay__ERR(); | ||
| 61 | boot_SSLeay__SSL(); | ||
| 62 | boot_SSLeay__X509(); | ||
| 63 | |||
diff --git a/src/lib/libssl/src/perl/b.pl b/src/lib/libssl/src/perl/b.pl new file mode 100644 index 0000000000..e8b3fd0dd9 --- /dev/null +++ b/src/lib/libssl/src/perl/b.pl | |||
| @@ -0,0 +1,21 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $cmd=<<"EOF"; | ||
| 8 | |||
| 9 | EOF | ||
| 10 | |||
| 11 | $conn="localhost:4433"; | ||
| 12 | $conn=$ARGV[0] if $#ARGV >= 0; | ||
| 13 | print "X\n"; | ||
| 14 | $bio=BIO->new("connect"); | ||
| 15 | print "XX\n"; | ||
| 16 | $bio->set_callback(sub {print STDERR $_[0]->number_read."\n"; $_[$#_] }); | ||
| 17 | print "XXX\n"; | ||
| 18 | $bio->hostname($conn) || die $ssl->error(); | ||
| 19 | print "XXXX\n"; | ||
| 20 | |||
| 21 | #$ssl=BIO->new("ssl"); | ||
diff --git a/src/lib/libssl/src/perl/bio.pl b/src/lib/libssl/src/perl/bio.pl new file mode 100644 index 0000000000..653322c2cc --- /dev/null +++ b/src/lib/libssl/src/perl/bio.pl | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $cmd=<<"EOF"; | ||
| 8 | |||
| 9 | EOF | ||
| 10 | |||
| 11 | $conn="localhost:4433"; | ||
| 12 | $conn=$ARGV[0] if $#ARGV >= 0; | ||
| 13 | $bio=SSLeay::BIO::new("connect"); | ||
| 14 | $bio->set_callback(sub {print STDERR $_[0]->number_read."\n"; $_[$#_] }); | ||
| 15 | $bio->hostname($conn) || die $ssl->error(); | ||
| 16 | |||
| 17 | |||
| 18 | (($ret=$bio->do_handshake()) > 0) || die $bio->error(); | ||
| 19 | |||
| 20 | (($ret=$bio->syswrite($cmd)) > 0) || die $bio->error(); | ||
| 21 | |||
| 22 | while (1) | ||
| 23 | { | ||
| 24 | $ret=$bio->sysread($buf,10240); | ||
| 25 | last if ($ret <= 0); | ||
| 26 | print $buf; | ||
| 27 | } | ||
| 28 | |||
diff --git a/src/lib/libssl/src/perl/bio.txt b/src/lib/libssl/src/perl/bio.txt new file mode 100644 index 0000000000..5b46c9f5ee --- /dev/null +++ b/src/lib/libssl/src/perl/bio.txt | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | BIO::new(type) | ||
| 2 | "connect" | ||
| 3 | "accept" | ||
| 4 | "ssl" | ||
| 5 | "buffer" | ||
| 6 | |||
| 7 | "connect" | ||
| 8 | BIO::hostname(name) host:port to connect to | ||
| 9 | |||
| 10 | "accept" | ||
| 11 | BIO::set_accept_port(port) port to connect too. | ||
| 12 | |||
| 13 | "connect", "accept", "ssl" | ||
| 14 | BIO::do_andshake do protocol | ||
| 15 | |||
| 16 | "ssl" | ||
| 17 | BIO::set_ssl(ssl) | ||
| 18 | BIO::get_ssl() | ||
| 19 | |||
| 20 | BIO::push(bio) | ||
| 21 | BIO::pop; return BIO | ||
| 22 | BIO::number_read() | ||
| 23 | BIO::number_written() | ||
| 24 | BIO::references() | ||
| 25 | |||
| 26 | BIO::sysread(buf,len[,offset]) | ||
| 27 | BIO::syswrite(in[,len][,offset]) | ||
| 28 | BIO::getline() | ||
| 29 | BIO::puts(in) | ||
| 30 | BIO::flush() | ||
| 31 | BIO::type() | ||
| 32 | BIO::next_bio(); | ||
| 33 | BIO::set_callback(callback[, args]) | ||
| 34 | |||
| 35 | BIO::new_buffer_ssl_connect(SSL_CTX) | ||
| 36 | BIO::new_ssl_connect(SSL_CTX) | ||
diff --git a/src/lib/libssl/src/perl/bio.xs b/src/lib/libssl/src/perl/bio.xs new file mode 100644 index 0000000000..3782d42062 --- /dev/null +++ b/src/lib/libssl/src/perl/bio.xs | |||
| @@ -0,0 +1,448 @@ | |||
| 1 | #include "p5SSLeay.h" | ||
| 2 | |||
| 3 | static int p5_bio_ex_bio_ptr=0; | ||
| 4 | static int p5_bio_ex_bio_callback=0; | ||
| 5 | static int p5_bio_ex_bio_callback_data=0; | ||
| 6 | |||
| 7 | static long p5_bio_callback(bio,state,parg,cmd,larg,ret) | ||
| 8 | BIO *bio; | ||
| 9 | int state; | ||
| 10 | char *parg; | ||
| 11 | int cmd; | ||
| 12 | long larg; | ||
| 13 | int ret; | ||
| 14 | { | ||
| 15 | int i; | ||
| 16 | SV *me,*cb; | ||
| 17 | |||
| 18 | me=(SV *)BIO_get_ex_data(bio,p5_bio_ex_bio_ptr); | ||
| 19 | cb=(SV *)BIO_get_ex_data(bio,p5_bio_ex_bio_callback); | ||
| 20 | if (cb != NULL) | ||
| 21 | { | ||
| 22 | dSP; | ||
| 23 | |||
| 24 | ENTER ; | ||
| 25 | SAVETMPS; | ||
| 26 | |||
| 27 | PUSHMARK(sp); | ||
| 28 | XPUSHs(me); | ||
| 29 | XPUSHs(sv_2mortal(newSViv(state))); | ||
| 30 | XPUSHs(sv_2mortal(newSViv(cmd))); | ||
| 31 | if ((state == BIO_CB_READ) || (state == BIO_CB_WRITE)) | ||
| 32 | { | ||
| 33 | XPUSHs(sv_2mortal(newSVpv(parg,larg))); | ||
| 34 | } | ||
| 35 | else | ||
| 36 | XPUSHs(&sv_undef); | ||
| 37 | /* ptr one */ | ||
| 38 | XPUSHs(sv_2mortal(newSViv(larg))); | ||
| 39 | XPUSHs(sv_2mortal(newSViv(ret))); | ||
| 40 | PUTBACK; | ||
| 41 | |||
| 42 | i=perl_call_sv(cb,G_SCALAR); | ||
| 43 | |||
| 44 | SPAGAIN; | ||
| 45 | if (i == 1) | ||
| 46 | ret=POPi; | ||
| 47 | else | ||
| 48 | ret=1; | ||
| 49 | PUTBACK; | ||
| 50 | FREETMPS; | ||
| 51 | LEAVE; | ||
| 52 | } | ||
| 53 | else | ||
| 54 | { | ||
| 55 | croak("Internal error in SSL p5_ssl_info_callback"); | ||
| 56 | } | ||
| 57 | return(ret); | ||
| 58 | } | ||
| 59 | |||
| 60 | int boot_bio() | ||
| 61 | { | ||
| 62 | p5_bio_ex_bio_ptr= | ||
| 63 | BIO_get_ex_new_index(0,"SSLeay::BIO",ex_new,NULL,ex_cleanup); | ||
| 64 | p5_bio_ex_bio_callback= | ||
| 65 | BIO_get_ex_new_index(0,"bio_callback",NULL,NULL, | ||
| 66 | ex_cleanup); | ||
| 67 | p5_bio_ex_bio_callback_data= | ||
| 68 | BIO_get_ex_new_index(0,"bio_callback_data",NULL,NULL, | ||
| 69 | ex_cleanup); | ||
| 70 | return(1); | ||
| 71 | } | ||
| 72 | |||
| 73 | MODULE = SSLeay::BIO PACKAGE = SSLeay::BIO PREFIX = p5_BIO_ | ||
| 74 | |||
| 75 | VERSIONCHECK: DISABLE | ||
| 76 | |||
| 77 | void | ||
| 78 | p5_BIO_new_buffer_ssl_connect(...) | ||
| 79 | PREINIT: | ||
| 80 | SSL_CTX *ctx; | ||
| 81 | BIO *bio; | ||
| 82 | SV *arg; | ||
| 83 | PPCODE: | ||
| 84 | if (items == 1) | ||
| 85 | arg=ST(0); | ||
| 86 | else if (items == 2) | ||
| 87 | arg=ST(1); | ||
| 88 | else | ||
| 89 | arg=NULL; | ||
| 90 | |||
| 91 | if ((arg == NULL) || !(sv_derived_from(arg,"SSLeay::SSL::CTX"))) | ||
| 92 | croak("Usage: SSLeay::BIO::new_buffer_ssl_connect(SSL_CTX)"); | ||
| 93 | else | ||
| 94 | { | ||
| 95 | IV tmp=SvIV((SV *)SvRV(arg)); | ||
| 96 | ctx=(SSL_CTX *)tmp; | ||
| 97 | } | ||
| 98 | EXTEND(sp,1); | ||
| 99 | bio=BIO_new_buffer_ssl_connect(ctx); | ||
| 100 | arg=new_ref("SSLeay::BIO",(char *)bio,0); | ||
| 101 | PUSHs(arg); | ||
| 102 | BIO_set_ex_data(bio,p5_bio_ex_bio_ptr,(char *)arg); | ||
| 103 | |||
| 104 | void | ||
| 105 | p5_BIO_new_ssl_connect(...) | ||
| 106 | PREINIT: | ||
| 107 | SSL_CTX *ctx; | ||
| 108 | BIO *bio; | ||
| 109 | SV *arg; | ||
| 110 | PPCODE: | ||
| 111 | if (items == 1) | ||
| 112 | arg=ST(0); | ||
| 113 | else if (items == 2) | ||
| 114 | arg=ST(1); | ||
| 115 | else | ||
| 116 | arg=NULL; | ||
| 117 | |||
| 118 | if ((arg == NULL) || !(sv_derived_from(arg,"SSLeay::SSL::CTX"))) | ||
| 119 | croak("Usage: SSLeay::BIO::new_ssl_connect(SSL_CTX)"); | ||
| 120 | else | ||
| 121 | { | ||
| 122 | IV tmp=SvIV((SV *)SvRV(arg)); | ||
| 123 | ctx=(SSL_CTX *)tmp; | ||
| 124 | } | ||
| 125 | EXTEND(sp,1); | ||
| 126 | bio=BIO_new_ssl_connect(ctx); | ||
| 127 | arg=new_ref("SSLeay::BIO",(char *)bio,0); | ||
| 128 | PUSHs(arg); | ||
| 129 | BIO_set_ex_data(bio,p5_bio_ex_bio_ptr,(char *)arg); | ||
| 130 | |||
| 131 | void | ||
| 132 | p5_BIO_new(...) | ||
| 133 | PREINIT: | ||
| 134 | BIO *bio; | ||
| 135 | char *type; | ||
| 136 | SV *arg; | ||
| 137 | PPCODE: | ||
| 138 | pr_name("p5_BIO_new"); | ||
| 139 | if ((items == 1) && SvPOK(ST(0))) | ||
| 140 | type=SvPV(ST(0),na); | ||
| 141 | else if ((items == 2) && SvPOK(ST(1))) | ||
| 142 | type=SvPV(ST(1),na); | ||
| 143 | else | ||
| 144 | croak("Usage: SSLeay::BIO::new(type)"); | ||
| 145 | |||
| 146 | EXTEND(sp,1); | ||
| 147 | if (strcmp(type,"connect") == 0) | ||
| 148 | bio=BIO_new(BIO_s_connect()); | ||
| 149 | else if (strcmp(type,"accept") == 0) | ||
| 150 | bio=BIO_new(BIO_s_accept()); | ||
| 151 | else if (strcmp(type,"ssl") == 0) | ||
| 152 | bio=BIO_new(BIO_f_ssl()); | ||
| 153 | else if (strcmp(type,"buffer") == 0) | ||
| 154 | bio=BIO_new(BIO_f_buffer()); | ||
| 155 | else | ||
| 156 | croak("unknown BIO type"); | ||
| 157 | arg=new_ref("SSLeay::BIO",(char *)bio,0); | ||
| 158 | PUSHs(arg); | ||
| 159 | BIO_set_ex_data(bio,p5_bio_ex_bio_ptr,(char *)arg); | ||
| 160 | |||
| 161 | int | ||
| 162 | p5_BIO_hostname(bio,name) | ||
| 163 | BIO *bio; | ||
| 164 | char *name; | ||
| 165 | CODE: | ||
| 166 | RETVAL=BIO_set_hostname(bio,name); | ||
| 167 | OUTPUT: | ||
| 168 | RETVAL | ||
| 169 | |||
| 170 | int | ||
| 171 | p5_BIO_set_accept_port(bio,str) | ||
| 172 | BIO *bio; | ||
| 173 | char *str; | ||
| 174 | CODE: | ||
| 175 | RETVAL=BIO_set_accept_port(bio,str); | ||
| 176 | OUTPUT: | ||
| 177 | RETVAL | ||
| 178 | |||
| 179 | int | ||
| 180 | p5_BIO_do_handshake(bio) | ||
| 181 | BIO *bio; | ||
| 182 | CODE: | ||
| 183 | RETVAL=BIO_do_handshake(bio); | ||
| 184 | OUTPUT: | ||
| 185 | RETVAL | ||
| 186 | |||
| 187 | BIO * | ||
| 188 | p5_BIO_push(b,bio) | ||
| 189 | BIO *b; | ||
| 190 | BIO *bio; | ||
| 191 | CODE: | ||
| 192 | /* This reference will be reduced when the reference is | ||
| 193 | * let go, and then when the BIO_free_all() is called | ||
| 194 | * inside the SSLeay library by the BIO with this | ||
| 195 | * pushed into */ | ||
| 196 | bio->references++; | ||
| 197 | RETVAL=BIO_push(b,bio); | ||
| 198 | OUTPUT: | ||
| 199 | RETVAL | ||
| 200 | |||
| 201 | void | ||
| 202 | p5_BIO_pop(b) | ||
| 203 | BIO *b | ||
| 204 | PREINIT: | ||
| 205 | BIO *bio; | ||
| 206 | char *type; | ||
| 207 | SV *arg; | ||
| 208 | PPCODE: | ||
| 209 | bio=BIO_pop(b); | ||
| 210 | if (bio != NULL) | ||
| 211 | { | ||
| 212 | /* This BIO will either be one created in the | ||
| 213 | * perl library, in which case it will have a perl | ||
| 214 | * SV, otherwise it will have been created internally, | ||
| 215 | * inside SSLeay. For the 'pushed in', it needs | ||
| 216 | * the reference count decememted. */ | ||
| 217 | arg=(SV *)BIO_get_ex_data(bio,p5_bio_ex_bio_ptr); | ||
| 218 | if (arg == NULL) | ||
| 219 | { | ||
| 220 | arg=new_ref("SSLeay::BIO",(char *)bio,0); | ||
| 221 | PUSHs(arg); | ||
| 222 | BIO_set_ex_data(bio,p5_bio_ex_bio_ptr,(char *)arg); | ||
| 223 | } | ||
| 224 | else | ||
| 225 | { | ||
| 226 | /* it was pushed in */ | ||
| 227 | SvREFCNT_inc(arg); | ||
| 228 | PUSHs(arg); | ||
| 229 | if (bio->references < 1) | ||
| 230 | abort(); | ||
| 231 | /* decrement the reference count */ | ||
| 232 | BIO_free(bio); | ||
| 233 | } | ||
| 234 | } | ||
| 235 | |||
| 236 | int | ||
| 237 | p5_BIO_sysread(bio,in,num, ...) | ||
| 238 | BIO *bio; | ||
| 239 | SV *in; | ||
| 240 | int num; | ||
| 241 | PREINIT: | ||
| 242 | int i,n,olen; | ||
| 243 | int offset; | ||
| 244 | char *p; | ||
| 245 | CODE: | ||
| 246 | offset=0; | ||
| 247 | if (!SvPOK(in)) | ||
| 248 | sv_setpvn(in,"",0); | ||
| 249 | SvPV(in,olen); | ||
| 250 | if (items > 3) | ||
| 251 | { | ||
| 252 | offset=SvIV(ST(3)); | ||
| 253 | if (offset < 0) | ||
| 254 | { | ||
| 255 | if (-offset > olen) | ||
| 256 | croad("Offset outside string"); | ||
| 257 | offset+=olen; | ||
| 258 | } | ||
| 259 | } | ||
| 260 | if ((num+offset) > olen) | ||
| 261 | { | ||
| 262 | SvGROW(in,num+offset+1); | ||
| 263 | p=SvPV(in,i); | ||
| 264 | memset(&(p[olen]),0,(num+offset)-olen+1); | ||
| 265 | } | ||
| 266 | p=SvPV(in,n); | ||
| 267 | |||
| 268 | i=BIO_read(bio,p+offset,num); | ||
| 269 | RETVAL=i; | ||
| 270 | if (i <= 0) i=0; | ||
| 271 | SvCUR_set(in,offset+i); | ||
| 272 | OUTPUT: | ||
| 273 | RETVAL | ||
| 274 | |||
| 275 | int | ||
| 276 | p5_BIO_syswrite(bio,in, ...) | ||
| 277 | BIO *bio; | ||
| 278 | SV *in; | ||
| 279 | PREINIT: | ||
| 280 | char *ptr; | ||
| 281 | int len,in_len; | ||
| 282 | int offset=0; | ||
| 283 | int n; | ||
| 284 | CODE: | ||
| 285 | ptr=SvPV(in,in_len); | ||
| 286 | if (items > 2) | ||
| 287 | { | ||
| 288 | len=SvOK(ST(2))?SvIV(ST(2)):in_len; | ||
| 289 | if (items > 3) | ||
| 290 | { | ||
| 291 | offset=SvIV(ST(3)); | ||
| 292 | if (offset < 0) | ||
| 293 | { | ||
| 294 | if (-offset > in_len) | ||
| 295 | croak("Offset outside string"); | ||
| 296 | offset+=in_len; | ||
| 297 | } | ||
| 298 | else if ((offset >= in_len) && (in_len > 0)) | ||
| 299 | croak("Offset outside string"); | ||
| 300 | } | ||
| 301 | if (len >= (in_len-offset)) | ||
| 302 | len=in_len-offset; | ||
| 303 | } | ||
| 304 | else | ||
| 305 | len=in_len; | ||
| 306 | |||
| 307 | RETVAL=BIO_write(bio,ptr+offset,len); | ||
| 308 | OUTPUT: | ||
| 309 | RETVAL | ||
| 310 | |||
| 311 | void | ||
| 312 | p5_BIO_getline(bio) | ||
| 313 | BIO *bio; | ||
| 314 | PREINIT: | ||
| 315 | int i; | ||
| 316 | char *p; | ||
| 317 | PPCODE: | ||
| 318 | pr_name("p5_BIO_gets"); | ||
| 319 | EXTEND(sp,1); | ||
| 320 | PUSHs(sv_newmortal()); | ||
| 321 | sv_setpvn(ST(0),"",0); | ||
| 322 | SvGROW(ST(0),1024); | ||
| 323 | p=SvPV(ST(0),na); | ||
| 324 | i=BIO_gets(bio,p,1024); | ||
| 325 | if (i < 0) i=0; | ||
| 326 | SvCUR_set(ST(0),i); | ||
| 327 | |||
| 328 | int | ||
| 329 | p5_BIO_flush(bio) | ||
| 330 | BIO *bio; | ||
| 331 | CODE: | ||
| 332 | RETVAL=BIO_flush(bio); | ||
| 333 | OUTPUT: | ||
| 334 | RETVAL | ||
| 335 | |||
| 336 | char * | ||
| 337 | p5_BIO_type(bio) | ||
| 338 | BIO *bio; | ||
| 339 | CODE: | ||
| 340 | RETVAL=bio->method->name; | ||
| 341 | OUTPUT: | ||
| 342 | RETVAL | ||
| 343 | |||
| 344 | void | ||
| 345 | p5_BIO_next_bio(b) | ||
| 346 | BIO *b | ||
| 347 | PREINIT: | ||
| 348 | BIO *bio; | ||
| 349 | char *type; | ||
| 350 | SV *arg; | ||
| 351 | PPCODE: | ||
| 352 | bio=b->next_bio; | ||
| 353 | if (bio != NULL) | ||
| 354 | { | ||
| 355 | arg=(SV *)BIO_get_ex_data(bio,p5_bio_ex_bio_ptr); | ||
| 356 | if (arg == NULL) | ||
| 357 | { | ||
| 358 | arg=new_ref("SSLeay::BIO",(char *)bio,0); | ||
| 359 | PUSHs(arg); | ||
| 360 | BIO_set_ex_data(bio,p5_bio_ex_bio_ptr,(char *)arg); | ||
| 361 | } | ||
| 362 | else | ||
| 363 | { | ||
| 364 | SvREFCNT_inc(arg); | ||
| 365 | PUSHs(arg); | ||
| 366 | } | ||
| 367 | } | ||
| 368 | |||
| 369 | int | ||
| 370 | p5_BIO_puts(bio,in) | ||
| 371 | BIO *bio; | ||
| 372 | SV *in; | ||
| 373 | PREINIT: | ||
| 374 | char *ptr; | ||
| 375 | CODE: | ||
| 376 | ptr=SvPV(in,na); | ||
| 377 | RETVAL=BIO_puts(bio,ptr); | ||
| 378 | OUTPUT: | ||
| 379 | RETVAL | ||
| 380 | |||
| 381 | void | ||
| 382 | p5_BIO_set_callback(bio,cb,...) | ||
| 383 | BIO *bio; | ||
| 384 | SV *cb; | ||
| 385 | PREINIT: | ||
| 386 | SV *arg=NULL; | ||
| 387 | SV *arg2=NULL; | ||
| 388 | CODE: | ||
| 389 | if (items > 3) | ||
| 390 | croak("Usage: SSLeay::BIO::set_callback(bio,callback[,arg]"); | ||
| 391 | if (items == 3) | ||
| 392 | { | ||
| 393 | arg2=sv_mortalcopy(ST(2)); | ||
| 394 | SvREFCNT_inc(arg2); | ||
| 395 | BIO_set_ex_data(bio,p5_bio_ex_bio_callback_data, | ||
| 396 | (char *)arg2); | ||
| 397 | } | ||
| 398 | arg=sv_mortalcopy(ST(1)); | ||
| 399 | SvREFCNT_inc(arg); | ||
| 400 | BIO_set_ex_data(bio,p5_bio_ex_bio_callback,(char *)arg); | ||
| 401 | BIO_set_callback(bio,p5_bio_callback); | ||
| 402 | |||
| 403 | void | ||
| 404 | p5_BIO_DESTROY(bio) | ||
| 405 | BIO *bio | ||
| 406 | PREINIT: | ||
| 407 | SV *sv; | ||
| 408 | PPCODE: | ||
| 409 | pr_name_d("p5_BIO_DESTROY",bio->references); | ||
| 410 | printf("p5_BIO_DESTROY <%s> %d\n",bio->method->name,bio->references); | ||
| 411 | BIO_set_ex_data(bio,p5_bio_ex_bio_ptr,NULL); | ||
| 412 | BIO_free_all(bio); | ||
| 413 | |||
| 414 | int | ||
| 415 | p5_BIO_set_ssl(bio,ssl) | ||
| 416 | BIO *bio; | ||
| 417 | SSL *ssl; | ||
| 418 | CODE: | ||
| 419 | pr_name("p5_BIO_set_ssl"); | ||
| 420 | ssl->references++; | ||
| 421 | RETVAL=BIO_set_ssl(bio,ssl,BIO_CLOSE); | ||
| 422 | OUTPUT: | ||
| 423 | RETVAL | ||
| 424 | |||
| 425 | int | ||
| 426 | p5_BIO_number_read(bio) | ||
| 427 | BIO *bio; | ||
| 428 | CODE: | ||
| 429 | RETVAL=BIO_number_read(bio); | ||
| 430 | OUTPUT: | ||
| 431 | RETVAL | ||
| 432 | |||
| 433 | int | ||
| 434 | p5_BIO_number_written(bio) | ||
| 435 | BIO *bio; | ||
| 436 | CODE: | ||
| 437 | RETVAL=BIO_number_written(bio); | ||
| 438 | OUTPUT: | ||
| 439 | RETVAL | ||
| 440 | |||
| 441 | int | ||
| 442 | p5_BIO_references(bio) | ||
| 443 | BIO *bio; | ||
| 444 | CODE: | ||
| 445 | RETVAL=bio->references; | ||
| 446 | OUTPUT: | ||
| 447 | RETVAL | ||
| 448 | |||
diff --git a/src/lib/libssl/src/perl/bn.pl b/src/lib/libssl/src/perl/bn.pl new file mode 100644 index 0000000000..5314ca46e1 --- /dev/null +++ b/src/lib/libssl/src/perl/bn.pl | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | use ExtUtils::testlib; | ||
| 3 | use SSLeay; | ||
| 4 | |||
| 5 | $message=SSLeay::BN::new(); | ||
| 6 | $e=SSLeay::BN::new(); | ||
| 7 | $mod=SSLeay::BN::new(); | ||
| 8 | |||
| 9 | $mod=SSLeay::BN::dec2bn("114381625757888867669235779976146612010218296721242362562561842935706935245733897830597123563958705058989075147599290026879543541"); | ||
| 10 | $e=5; | ||
| 11 | $d=SSLeay::BN::dec2bn("45752650303155547067694311990458644804087318688496945025024737159778909096647814932594914301288138204957467016445183857236173773"); | ||
| 12 | |||
| 13 | $message=SSLeay::BN::bin2bn("The magic words are squeamish ossifrage"); | ||
| 14 | |||
| 15 | |||
| 16 | $cipher_text= $message->mod_exp($e,$mod); | ||
| 17 | print $mod."\n"; | ||
| 18 | print $mod->num_bits()."\n"; | ||
| 19 | for (1 .. 1000) | ||
| 20 | { | ||
| 21 | $clear= $cipher_text->mod_exp($d,$mod); | ||
| 22 | } | ||
| 23 | print $clear->bn2bin()."\n"; | ||
diff --git a/src/lib/libssl/src/perl/bn.txt b/src/lib/libssl/src/perl/bn.txt new file mode 100644 index 0000000000..784e761558 --- /dev/null +++ b/src/lib/libssl/src/perl/bn.txt | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | BN->new() | ||
| 2 | BN->dup(a) | ||
| 3 | BN->rand(bits[,top][,bottom]) | ||
| 4 | |||
| 5 | BN->hex2bn(a) | ||
| 6 | BN->bn2hex(a) | ||
| 7 | BN->dec2bn(a) | ||
| 8 | BN->bn2dec(a) | ||
| 9 | BN->bin2bn(a) | ||
| 10 | BN->bn2bin(a) | ||
| 11 | BN->mpi2bn(a) | ||
| 12 | BN->bn2mpi(a) | ||
| 13 | |||
| 14 | BN->add(a,b) | ||
| 15 | BN->sub(a,b) | ||
| 16 | BN->mul(a,b) | ||
| 17 | (div,mod)=BN->div(a,b) | ||
| 18 | BN->mod(a,b) | ||
| 19 | BN->exp(a,p) | ||
| 20 | BN->mod_mul(a,b,c) | ||
| 21 | BN->mod_exp(a,b,c) | ||
| 22 | |||
| 23 | BN->is_prime(p,num) | ||
| 24 | BN->generate_prime(bits,strong,callback) | ||
| 25 | |||
| 26 | BN->num_bits(a) | ||
| 27 | BN->cmp(a,b) | ||
| 28 | BN->ucmp(a,b) | ||
| 29 | BN->is_bit_set(a,pos) | ||
| 30 | BN->set_bit(a,pos) | ||
| 31 | BN->clear_bit(a,pos) | ||
| 32 | BN->lshift(a,num) | ||
| 33 | BN->rshift(a,num) | ||
| 34 | BN->mask_bits(a,pos) | ||
| 35 | BN->clear(a) | ||
| 36 | BN->gcd(a,b) | ||
| 37 | BN->mod_inverse(a,mod) | ||
| 38 | |||
diff --git a/src/lib/libssl/src/perl/bn.xs b/src/lib/libssl/src/perl/bn.xs new file mode 100644 index 0000000000..c15be3729a --- /dev/null +++ b/src/lib/libssl/src/perl/bn.xs | |||
| @@ -0,0 +1,589 @@ | |||
| 1 | #include "p5SSLeay.h" | ||
| 2 | |||
| 3 | int sv_to_BIGNUM(var,arg,name) | ||
| 4 | BIGNUM **var; | ||
| 5 | SV *arg; | ||
| 6 | char *name; | ||
| 7 | { | ||
| 8 | int ret=1; | ||
| 9 | |||
| 10 | if (sv_derived_from(arg,"SSLeay::BN")) | ||
| 11 | { | ||
| 12 | IV tmp = SvIV((SV*)SvRV(arg)); | ||
| 13 | *var = (BIGNUM *) tmp; | ||
| 14 | } | ||
| 15 | else if (SvIOK(arg)) { | ||
| 16 | SV *tmp=sv_newmortal(); | ||
| 17 | *var=BN_new(); | ||
| 18 | BN_set_word(*var,SvIV(arg)); | ||
| 19 | sv_setref_pv(tmp,"SSLeay::BN",(void*)*var); | ||
| 20 | } | ||
| 21 | else if (SvPOK(arg)) { | ||
| 22 | char *ptr; | ||
| 23 | STRLEN len; | ||
| 24 | SV *tmp=sv_newmortal(); | ||
| 25 | *var=BN_new(); | ||
| 26 | sv_setref_pv(tmp,"SSLeay::BN", (void*)*var); | ||
| 27 | ptr=SvPV(arg,len); | ||
| 28 | SvGROW(arg,len+1); | ||
| 29 | ptr[len]='\0'; | ||
| 30 | BN_dec2bn(var,ptr); | ||
| 31 | } | ||
| 32 | else | ||
| 33 | { | ||
| 34 | croak(name); | ||
| 35 | ret=0; | ||
| 36 | } | ||
| 37 | return(ret); | ||
| 38 | } | ||
| 39 | |||
| 40 | typedef struct gpc_args_st { | ||
| 41 | SV *cb; | ||
| 42 | SV *arg; | ||
| 43 | } GPC_ARGS; | ||
| 44 | |||
| 45 | static void generate_prime_callback(pos,num,arg) | ||
| 46 | int pos; | ||
| 47 | int num; | ||
| 48 | char *arg; | ||
| 49 | { | ||
| 50 | dSP ; | ||
| 51 | int i; | ||
| 52 | GPC_ARGS *a=(GPC_ARGS *)arg; | ||
| 53 | |||
| 54 | ENTER ; | ||
| 55 | SAVETMPS ; | ||
| 56 | |||
| 57 | PUSHMARK(sp); | ||
| 58 | XPUSHs(sv_2mortal(newSViv(pos))); | ||
| 59 | XPUSHs(sv_2mortal(newSViv(num))); | ||
| 60 | XPUSHs(sv_2mortal(newSVsv(a->arg))); | ||
| 61 | PUTBACK; | ||
| 62 | |||
| 63 | i=perl_call_sv(a->cb,G_DISCARD); | ||
| 64 | |||
| 65 | SPAGAIN; | ||
| 66 | |||
| 67 | PUTBACK; | ||
| 68 | FREETMPS; | ||
| 69 | LEAVE; | ||
| 70 | } | ||
| 71 | |||
| 72 | MODULE = SSLeay::BN PACKAGE = SSLeay::BN PREFIX = p5_BN_ | ||
| 73 | |||
| 74 | VERSIONCHECK: DISABLE | ||
| 75 | |||
| 76 | void | ||
| 77 | p5_BN_new(...) | ||
| 78 | PREINIT: | ||
| 79 | BIGNUM *bn; | ||
| 80 | SV *arg; | ||
| 81 | PPCODE: | ||
| 82 | pr_name("p5_BN_new"); | ||
| 83 | EXTEND(sp,1); | ||
| 84 | PUSHs(sv_newmortal()); | ||
| 85 | bn=BN_new(); | ||
| 86 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)bn); | ||
| 87 | |||
| 88 | void | ||
| 89 | p5_BN_dup(a) | ||
| 90 | BIGNUM *a; | ||
| 91 | PREINIT: | ||
| 92 | BIGNUM *bn; | ||
| 93 | PPCODE: | ||
| 94 | pr_name("p5_BN_dup"); | ||
| 95 | EXTEND(sp,1); | ||
| 96 | PUSHs(sv_newmortal()); | ||
| 97 | bn=BN_dup(a); | ||
| 98 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)bn); | ||
| 99 | |||
| 100 | void | ||
| 101 | p5_BN_rand(bits,...) | ||
| 102 | int bits; | ||
| 103 | PREINIT: | ||
| 104 | int top=1; | ||
| 105 | int bottom=0; | ||
| 106 | BIGNUM *ret; | ||
| 107 | PPCODE: | ||
| 108 | pr_name("p5_BN_rand"); | ||
| 109 | if ((items < 1) || (items > 3)) | ||
| 110 | croak("Usage: SSLeay::BN::rand(bits[,top_bit][,bottombit]"); | ||
| 111 | if (items >= 2) top=(int)SvIV(ST(0)); | ||
| 112 | if (items >= 3) bottom=(int)SvIV(ST(1)); | ||
| 113 | EXTEND(sp,1); | ||
| 114 | PUSHs(sv_newmortal()); | ||
| 115 | ret=BN_new(); | ||
| 116 | BN_rand(ret,bits,top,bottom); | ||
| 117 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 118 | |||
| 119 | void | ||
| 120 | p5_BN_bin2bn(a) | ||
| 121 | datum a; | ||
| 122 | PREINIT: | ||
| 123 | BIGNUM *ret; | ||
| 124 | PPCODE: | ||
| 125 | pr_name("p5_BN_bin2bn"); | ||
| 126 | EXTEND(sp,1); | ||
| 127 | PUSHs(sv_newmortal()); | ||
| 128 | ret=BN_bin2bn(a.dptr,a.dsize,NULL); | ||
| 129 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 130 | |||
| 131 | void | ||
| 132 | p5_BN_bn2bin(a) | ||
| 133 | BIGNUM *a; | ||
| 134 | PREINIT: | ||
| 135 | int i; | ||
| 136 | PPCODE: | ||
| 137 | pr_name("p5_BN_bn2bin"); | ||
| 138 | EXTEND(sp,1); | ||
| 139 | PUSHs(sv_newmortal()); | ||
| 140 | i=BN_num_bytes(a)+2; | ||
| 141 | sv_setpvn(ST(0),"",1); | ||
| 142 | SvGROW(ST(0),i+1); | ||
| 143 | SvCUR_set(ST(0),BN_bn2bin(a,SvPV(ST(0),na))); | ||
| 144 | |||
| 145 | void | ||
| 146 | p5_BN_mpi2bn(a) | ||
| 147 | datum a; | ||
| 148 | PREINIT: | ||
| 149 | BIGNUM *ret; | ||
| 150 | PPCODE: | ||
| 151 | pr_name("p5_BN_mpi2bn"); | ||
| 152 | EXTEND(sp,1); | ||
| 153 | PUSHs(sv_newmortal()); | ||
| 154 | ret=BN_mpi2bn(a.dptr,a.dsize,NULL); | ||
| 155 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 156 | |||
| 157 | void | ||
| 158 | p5_BN_bn2mpi(a) | ||
| 159 | BIGNUM *a; | ||
| 160 | PREINIT: | ||
| 161 | int i; | ||
| 162 | PPCODE: | ||
| 163 | pr_name("p5_BN_bn2mpi"); | ||
| 164 | EXTEND(sp,1); | ||
| 165 | PUSHs(sv_newmortal()); | ||
| 166 | i=BN_bn2mpi(a,NULL); | ||
| 167 | sv_setpvn(ST(0),"",1); | ||
| 168 | SvGROW(ST(0),i+1); | ||
| 169 | SvCUR_set(ST(0),BN_bn2mpi(a,SvPV(ST(0),na))); | ||
| 170 | |||
| 171 | void | ||
| 172 | p5_BN_hex2bn(a) | ||
| 173 | datum a; | ||
| 174 | PREINIT: | ||
| 175 | BIGNUM *ret; | ||
| 176 | PPCODE: | ||
| 177 | pr_name("p5_BN_hex2bn"); | ||
| 178 | EXTEND(sp,1); | ||
| 179 | PUSHs(sv_newmortal()); | ||
| 180 | ret=BN_new(); | ||
| 181 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 182 | BN_hex2bn(&ret,a.dptr); | ||
| 183 | |||
| 184 | void | ||
| 185 | p5_BN_dec2bn(a) | ||
| 186 | datum a; | ||
| 187 | PREINIT: | ||
| 188 | BIGNUM *ret; | ||
| 189 | PPCODE: | ||
| 190 | pr_name("p5_BN_dec2bn"); | ||
| 191 | EXTEND(sp,1); | ||
| 192 | PUSHs(sv_newmortal()); | ||
| 193 | ret=BN_new(); | ||
| 194 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 195 | BN_dec2bn(&ret,a.dptr); | ||
| 196 | |||
| 197 | SV * | ||
| 198 | p5_BN_bn2hex(a) | ||
| 199 | BIGNUM *a; | ||
| 200 | PREINIT: | ||
| 201 | char *ptr; | ||
| 202 | int i; | ||
| 203 | CODE: | ||
| 204 | pr_name("p5_BN_bn2hex"); | ||
| 205 | ptr=BN_bn2hex(a); | ||
| 206 | RETVAL=newSVpv("",0); | ||
| 207 | i=strlen(ptr); | ||
| 208 | SvGROW(RETVAL,i+1); | ||
| 209 | memcpy(SvPV(RETVAL,na),ptr,i+1); | ||
| 210 | SvCUR_set(RETVAL,i); | ||
| 211 | Free(ptr); | ||
| 212 | OUTPUT: | ||
| 213 | RETVAL | ||
| 214 | |||
| 215 | SV * | ||
| 216 | p5_BN_bn2dec(a) | ||
| 217 | BIGNUM *a; | ||
| 218 | PREINIT: | ||
| 219 | char *ptr; | ||
| 220 | int i; | ||
| 221 | CODE: | ||
| 222 | pr_name("p5_BN_bn2dec"); | ||
| 223 | ptr=BN_bn2dec(a); | ||
| 224 | RETVAL=newSVpv("",0); | ||
| 225 | i=strlen(ptr); | ||
| 226 | SvGROW(RETVAL,i+1); | ||
| 227 | memcpy(SvPV(RETVAL,na),ptr,i+1); | ||
| 228 | SvCUR_set(RETVAL,i); | ||
| 229 | Free(ptr); | ||
| 230 | OUTPUT: | ||
| 231 | RETVAL | ||
| 232 | |||
| 233 | void | ||
| 234 | p5_BN_add(a,b) | ||
| 235 | BIGNUM *a; | ||
| 236 | BIGNUM *b; | ||
| 237 | PREINIT: | ||
| 238 | BIGNUM *ret; | ||
| 239 | PPCODE: | ||
| 240 | pr_name("p5_BN_add"); | ||
| 241 | EXTEND(sp,1); | ||
| 242 | PUSHs(sv_newmortal()); | ||
| 243 | ret=BN_new(); | ||
| 244 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 245 | BN_add(ret,a,b); | ||
| 246 | |||
| 247 | void | ||
| 248 | p5_BN_sub(a,b) | ||
| 249 | BIGNUM *a; | ||
| 250 | BIGNUM *b; | ||
| 251 | PREINIT: | ||
| 252 | BIGNUM *ret; | ||
| 253 | PPCODE: | ||
| 254 | pr_name("p5_BN_sub"); | ||
| 255 | EXTEND(sp,1); | ||
| 256 | PUSHs(sv_newmortal()); | ||
| 257 | ret=BN_new(); | ||
| 258 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 259 | BN_sub(ret,a,b); | ||
| 260 | |||
| 261 | void | ||
| 262 | p5_BN_mul(a,b) | ||
| 263 | BIGNUM *a; | ||
| 264 | BIGNUM *b; | ||
| 265 | PREINIT: | ||
| 266 | BIGNUM *ret; | ||
| 267 | PPCODE: | ||
| 268 | pr_name("p5_BN_mul"); | ||
| 269 | EXTEND(sp,1); | ||
| 270 | PUSHs(sv_newmortal()); | ||
| 271 | ret=BN_new(); | ||
| 272 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 273 | BN_mul(ret,a,b); | ||
| 274 | |||
| 275 | void | ||
| 276 | p5_BN_div(a,b) | ||
| 277 | BIGNUM *a; | ||
| 278 | BIGNUM *b; | ||
| 279 | PREINIT: | ||
| 280 | static BN_CTX *ctx=NULL; | ||
| 281 | BIGNUM *div,*mod; | ||
| 282 | PPCODE: | ||
| 283 | pr_name("p5_BN_div"); | ||
| 284 | if (ctx == NULL) ctx=BN_CTX_new(); | ||
| 285 | EXTEND(sp,2); | ||
| 286 | PUSHs(sv_newmortal()); | ||
| 287 | PUSHs(sv_newmortal()); | ||
| 288 | div=BN_new(); | ||
| 289 | mod=BN_new(); | ||
| 290 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)div); | ||
| 291 | sv_setref_pv(ST(1), "SSLeay::BN", (void*)mod); | ||
| 292 | BN_div(div,mod,a,b,ctx); | ||
| 293 | |||
| 294 | void | ||
| 295 | p5_BN_mod(a,b) | ||
| 296 | BIGNUM *a; | ||
| 297 | BIGNUM *b; | ||
| 298 | PREINIT: | ||
| 299 | static BN_CTX *ctx=NULL; | ||
| 300 | BIGNUM *rem; | ||
| 301 | PPCODE: | ||
| 302 | pr_name("p5_BN_mod"); | ||
| 303 | if (ctx == NULL) ctx=BN_CTX_new(); | ||
| 304 | EXTEND(sp,1); | ||
| 305 | PUSHs(sv_newmortal()); | ||
| 306 | rem=BN_new(); | ||
| 307 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)rem); | ||
| 308 | BN_mod(rem,a,b,ctx); | ||
| 309 | |||
| 310 | void | ||
| 311 | p5_BN_exp(a,p) | ||
| 312 | BIGNUM *a; | ||
| 313 | BIGNUM *p; | ||
| 314 | PREINIT: | ||
| 315 | BIGNUM *ret; | ||
| 316 | static BN_CTX *ctx=NULL; | ||
| 317 | PPCODE: | ||
| 318 | pr_name("p5_BN_exp"); | ||
| 319 | if (ctx == NULL) ctx=BN_CTX_new(); | ||
| 320 | EXTEND(sp,1); | ||
| 321 | PUSHs(sv_newmortal()); | ||
| 322 | ret=BN_new(); | ||
| 323 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 324 | BN_exp(ret,a,p,ctx); | ||
| 325 | |||
| 326 | void | ||
| 327 | p5_BN_mod_mul(a,b,c) | ||
| 328 | BIGNUM *a; | ||
| 329 | BIGNUM *b; | ||
| 330 | BIGNUM *c; | ||
| 331 | PREINIT: | ||
| 332 | static BN_CTX *ctx=NULL; | ||
| 333 | BIGNUM *ret; | ||
| 334 | PPCODE: | ||
| 335 | pr_name("p5_BN_mod_mul"); | ||
| 336 | if (ctx == NULL) ctx=BN_CTX_new(); | ||
| 337 | EXTEND(sp,1); | ||
| 338 | PUSHs(sv_newmortal()); | ||
| 339 | ret=BN_new(); | ||
| 340 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 341 | BN_mod_mul(ret,a,b,c,ctx); | ||
| 342 | |||
| 343 | void | ||
| 344 | p5_BN_mod_exp(a,b,c) | ||
| 345 | BIGNUM *a; | ||
| 346 | BIGNUM *b; | ||
| 347 | BIGNUM *c; | ||
| 348 | PREINIT: | ||
| 349 | static BN_CTX *ctx=NULL; | ||
| 350 | BIGNUM *ret; | ||
| 351 | PPCODE: | ||
| 352 | pr_name("p5_BN_mod_exp"); | ||
| 353 | if (ctx == NULL) ctx=BN_CTX_new(); | ||
| 354 | EXTEND(sp,1); | ||
| 355 | PUSHs(sv_newmortal()); | ||
| 356 | ret=BN_new(); | ||
| 357 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 358 | BN_mod_exp(ret,a,b,c,ctx); | ||
| 359 | |||
| 360 | void | ||
| 361 | p5_BN_generate_prime(...) | ||
| 362 | PREINIT: | ||
| 363 | int bits=512; | ||
| 364 | int strong=0; | ||
| 365 | BIGNUM *ret=NULL; | ||
| 366 | SV *callback=NULL; | ||
| 367 | SV *cb_arg=NULL; | ||
| 368 | GPC_ARGS arg; | ||
| 369 | dSP; | ||
| 370 | |||
| 371 | PPCODE: | ||
| 372 | pr_name("p5_BN_generate_prime"); | ||
| 373 | if ((items < 0) || (items > 4)) | ||
| 374 | croak("Usage: SSLeay::BN::generate_prime(a[,strong][,callback][,cb_arg]"); | ||
| 375 | if (items >= 1) bits=(int)SvIV(ST(0)); | ||
| 376 | if (items >= 2) strong=(int)SvIV(ST(1)); | ||
| 377 | if (items >= 3) callback=ST(2); | ||
| 378 | if (items == 4) cb_arg=ST(3); | ||
| 379 | |||
| 380 | if (callback == NULL) | ||
| 381 | ret=BN_generate_prime(bits,strong,NULL,NULL,NULL,NULL); | ||
| 382 | else | ||
| 383 | { | ||
| 384 | arg.cb=callback; | ||
| 385 | arg.arg=cb_arg; | ||
| 386 | |||
| 387 | ret=BN_generate_prime(bits,strong,NULL,NULL, | ||
| 388 | generate_prime_callback,(char *)&arg); | ||
| 389 | } | ||
| 390 | |||
| 391 | SPAGAIN; | ||
| 392 | sp-=items; /* a bit evil that I do this */ | ||
| 393 | |||
| 394 | EXTEND(sp,1); | ||
| 395 | PUSHs(sv_newmortal()); | ||
| 396 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 397 | |||
| 398 | void | ||
| 399 | p5_BN_is_prime(p,...) | ||
| 400 | BIGNUM *p; | ||
| 401 | PREINIT: | ||
| 402 | int nchecks=5,ret; | ||
| 403 | SV *callback=NULL; | ||
| 404 | SV *cb_arg=NULL; | ||
| 405 | GPC_ARGS arg; | ||
| 406 | dSP; | ||
| 407 | static BN_CTX *ctx=NULL; | ||
| 408 | PPCODE: | ||
| 409 | pr_name("p5_BN_is_prime"); | ||
| 410 | if ((items < 1) || (items > 4)) | ||
| 411 | croak("Usage: SSLeay::BN::is_prime(a[,ncheck][,callback][,callback_arg]"); | ||
| 412 | if (ctx == NULL) ctx=BN_CTX_new(); | ||
| 413 | if (items >= 2) nchecks=(int)SvIV(ST(1)); | ||
| 414 | if (items >= 3) callback=ST(2); | ||
| 415 | if (items >= 4) cb_arg=ST(3); | ||
| 416 | arg.arg=cb_arg; | ||
| 417 | if (callback == NULL) | ||
| 418 | ret=BN_is_prime(p,nchecks,NULL,ctx,NULL); | ||
| 419 | else | ||
| 420 | { | ||
| 421 | arg.cb=callback; | ||
| 422 | arg.arg=cb_arg; | ||
| 423 | ret=BN_is_prime(p,nchecks,generate_prime_callback, | ||
| 424 | ctx,(char *)&arg); | ||
| 425 | } | ||
| 426 | SPAGAIN; | ||
| 427 | sp-=items; /* a bit evil */ | ||
| 428 | PUSHs(sv_2mortal(newSViv(ret))); | ||
| 429 | |||
| 430 | int | ||
| 431 | p5_BN_num_bits(a) | ||
| 432 | BIGNUM *a; | ||
| 433 | CODE: | ||
| 434 | pr_name("p5_BN_num_bits"); | ||
| 435 | RETVAL=BN_num_bits(a); | ||
| 436 | OUTPUT: | ||
| 437 | RETVAL | ||
| 438 | |||
| 439 | int | ||
| 440 | p5_BN_cmp(a,b) | ||
| 441 | BIGNUM *a; | ||
| 442 | BIGNUM *b; | ||
| 443 | CODE: | ||
| 444 | pr_name("p5_BN_cmp"); | ||
| 445 | RETVAL=BN_cmp(a,b); | ||
| 446 | OUTPUT: | ||
| 447 | RETVAL | ||
| 448 | |||
| 449 | int | ||
| 450 | p5_BN_ucmp(a,b) | ||
| 451 | BIGNUM *a; | ||
| 452 | BIGNUM *b; | ||
| 453 | CODE: | ||
| 454 | pr_name("p5_BN_ucmp"); | ||
| 455 | RETVAL=BN_ucmp(a,b); | ||
| 456 | OUTPUT: | ||
| 457 | RETVAL | ||
| 458 | |||
| 459 | int | ||
| 460 | p5_BN_is_bit_set(a,b) | ||
| 461 | BIGNUM *a; | ||
| 462 | int b; | ||
| 463 | CODE: | ||
| 464 | pr_name("p5_BN_is_bit_set"); | ||
| 465 | RETVAL=BN_is_bit_set(a,b); | ||
| 466 | OUTPUT: | ||
| 467 | RETVAL | ||
| 468 | |||
| 469 | void | ||
| 470 | p5_BN_set_bit(a,b) | ||
| 471 | BIGNUM *a; | ||
| 472 | int b; | ||
| 473 | PREINIT: | ||
| 474 | BIGNUM *ret; | ||
| 475 | PPCODE: | ||
| 476 | pr_name("p5_BN_set_bit"); | ||
| 477 | EXTEND(sp,1); | ||
| 478 | PUSHs(sv_newmortal()); | ||
| 479 | ret=BN_dup(a); | ||
| 480 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 481 | BN_set_bit(ret,b); | ||
| 482 | |||
| 483 | void | ||
| 484 | p5_BN_clear_bit(a,b) | ||
| 485 | BIGNUM *a; | ||
| 486 | int b; | ||
| 487 | PREINIT: | ||
| 488 | BIGNUM *ret; | ||
| 489 | PPCODE: | ||
| 490 | pr_name("p5_BN_clear_bit"); | ||
| 491 | EXTEND(sp,1); | ||
| 492 | PUSHs(sv_newmortal()); | ||
| 493 | ret=BN_dup(a); | ||
| 494 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 495 | BN_clear_bit(ret,b); | ||
| 496 | |||
| 497 | void | ||
| 498 | p5_BN_lshift(a,b) | ||
| 499 | BIGNUM *a; | ||
| 500 | int b; | ||
| 501 | PREINIT: | ||
| 502 | BIGNUM *ret; | ||
| 503 | PPCODE: | ||
| 504 | pr_name("p5_BN_lshift"); | ||
| 505 | EXTEND(sp,1); | ||
| 506 | PUSHs(sv_newmortal()); | ||
| 507 | ret=BN_new(); | ||
| 508 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 509 | if (b == 1) | ||
| 510 | BN_lshift1(ret,a); | ||
| 511 | else | ||
| 512 | BN_lshift(ret,a,b); | ||
| 513 | |||
| 514 | void | ||
| 515 | p5_BN_rshift(a,b) | ||
| 516 | BIGNUM *a; | ||
| 517 | int b; | ||
| 518 | PREINIT: | ||
| 519 | BIGNUM *ret; | ||
| 520 | PPCODE: | ||
| 521 | pr_name("p5_BN_rshift"); | ||
| 522 | EXTEND(sp,1); | ||
| 523 | PUSHs(sv_newmortal()); | ||
| 524 | ret=BN_new(); | ||
| 525 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 526 | if (b == 1) | ||
| 527 | BN_rshift1(ret,a); | ||
| 528 | else | ||
| 529 | BN_rshift(ret,a,b); | ||
| 530 | |||
| 531 | void | ||
| 532 | p5_BN_mask_bits(a,b) | ||
| 533 | BIGNUM *a; | ||
| 534 | int b; | ||
| 535 | PREINIT: | ||
| 536 | BIGNUM *ret; | ||
| 537 | PPCODE: | ||
| 538 | pr_name("p5_BN_mask_bits"); | ||
| 539 | EXTEND(sp,1); | ||
| 540 | PUSHs(sv_newmortal()); | ||
| 541 | ret=BN_dup(a); | ||
| 542 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 543 | BN_mask_bits(ret,b); | ||
| 544 | |||
| 545 | void | ||
| 546 | p5_BN_clear(a) | ||
| 547 | BIGNUM *a; | ||
| 548 | PPCODE: | ||
| 549 | pr_name("p5_BN_clear"); | ||
| 550 | BN_clear(a); | ||
| 551 | |||
| 552 | void | ||
| 553 | p5_BN_gcd(a,b) | ||
| 554 | BIGNUM *a; | ||
| 555 | BIGNUM *b; | ||
| 556 | PREINIT: | ||
| 557 | static BN_CTX *ctx=NULL; | ||
| 558 | BIGNUM *ret; | ||
| 559 | PPCODE: | ||
| 560 | pr_name("p5_BN_gcd"); | ||
| 561 | if (ctx == NULL) ctx=BN_CTX_new(); | ||
| 562 | EXTEND(sp,1); | ||
| 563 | PUSHs(sv_newmortal()); | ||
| 564 | ret=BN_new(); | ||
| 565 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 566 | BN_gcd(ret,a,b,ctx); | ||
| 567 | |||
| 568 | void | ||
| 569 | p5_BN_mod_inverse(a,mod) | ||
| 570 | BIGNUM *a; | ||
| 571 | BIGNUM *mod; | ||
| 572 | PREINIT: | ||
| 573 | static BN_CTX *ctx=NULL; | ||
| 574 | BIGNUM *ret; | ||
| 575 | PPCODE: | ||
| 576 | pr_name("p5_BN_mod_inverse"); | ||
| 577 | if (ctx == NULL) ctx=BN_CTX_new(); | ||
| 578 | ret=BN_mod_inverse(a,mod,ctx); | ||
| 579 | EXTEND(sp,1); | ||
| 580 | PUSHs(sv_newmortal()); | ||
| 581 | sv_setref_pv(ST(0), "SSLeay::BN", (void*)ret); | ||
| 582 | |||
| 583 | void | ||
| 584 | p5_BN_DESTROY(bn) | ||
| 585 | BIGNUM *bn | ||
| 586 | CODE: | ||
| 587 | pr_name("p5_BN_DESTROY"); | ||
| 588 | BN_free(bn); | ||
| 589 | |||
diff --git a/src/lib/libssl/src/perl/callback.c b/src/lib/libssl/src/perl/callback.c new file mode 100644 index 0000000000..01840abc85 --- /dev/null +++ b/src/lib/libssl/src/perl/callback.c | |||
| @@ -0,0 +1,103 @@ | |||
| 1 | /* perl/callback.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 | SV *new_ref(type,obj,mort) | ||
| 60 | char *type; | ||
| 61 | char *obj; | ||
| 62 | { | ||
| 63 | SV *ret; | ||
| 64 | |||
| 65 | if (mort) | ||
| 66 | ret=sv_newmortal(); | ||
| 67 | else | ||
| 68 | ret=newSViv(0); | ||
| 69 | sv_setref_pv(ret,type,(void *)obj); | ||
| 70 | return(ret); | ||
| 71 | } | ||
| 72 | |||
| 73 | int ex_new(obj,data,ad,idx,argl,argp) | ||
| 74 | char *obj; | ||
| 75 | SV *data; | ||
| 76 | CRYPTO_EX_DATA *ad; | ||
| 77 | int idx; | ||
| 78 | long argl; | ||
| 79 | char *argp; | ||
| 80 | { | ||
| 81 | SV *sv; | ||
| 82 | |||
| 83 | fprintf(stderr,"ex_new %08X %s\n",obj,argp); | ||
| 84 | sv=sv_newmortal(); | ||
| 85 | sv_setref_pv(sv,argp,(void *)obj); | ||
| 86 | CRYPTO_set_ex_data(ad,idx,(char *)sv); | ||
| 87 | return(1); | ||
| 88 | } | ||
| 89 | |||
| 90 | void ex_cleanup(obj,data,ad,idx,argl,argp) | ||
| 91 | char *obj; | ||
| 92 | SV *data; | ||
| 93 | CRYPTO_EX_DATA *ad; | ||
| 94 | int idx; | ||
| 95 | long argl; | ||
| 96 | char *argp; | ||
| 97 | { | ||
| 98 | pr_name("ex_cleanup"); | ||
| 99 | fprintf(stderr,"ex_cleanup %08X %s\n",obj,argp); | ||
| 100 | if (data != NULL) | ||
| 101 | SvREFCNT_dec((SV *)data); | ||
| 102 | } | ||
| 103 | |||
diff --git a/src/lib/libssl/src/perl/cipher.pl b/src/lib/libssl/src/perl/cipher.pl new file mode 100644 index 0000000000..e774bceed2 --- /dev/null +++ b/src/lib/libssl/src/perl/cipher.pl | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $md=SSLeay::MD::new("md5"); | ||
| 8 | |||
| 9 | foreach (@SSLeay::Cipher::names) | ||
| 10 | { | ||
| 11 | ($c=SSLeay::Cipher::new($_)) || | ||
| 12 | die "'$_' is an unknown cipher algorithm\n"; | ||
| 13 | |||
| 14 | |||
| 15 | $data="012345678abcdefghijklmnopqrstuvwxyz"; | ||
| 16 | $c->init("01234567abcdefghABCDEFGH","zyxwvut",1); | ||
| 17 | |||
| 18 | $in =$c->update(substr($data, 0, 5)); | ||
| 19 | $in.=$c->update(substr($data, 5,10)); | ||
| 20 | $in.=$c->update(substr($data,15,1)); | ||
| 21 | $in.=$c->update(substr($data,16)); | ||
| 22 | |||
| 23 | $in.=$c->final(); | ||
| 24 | |||
| 25 | $c->init("01234567abcdefghABCDEFGH","zyxwvut",0); | ||
| 26 | $out=$c->update($in); | ||
| 27 | $out.=$c->final(); | ||
| 28 | |||
| 29 | ($out eq $data) || die "decrypt for $_ failed:$!\n"; | ||
| 30 | |||
| 31 | $md->init(); | ||
| 32 | $md->update($in); | ||
| 33 | $digest=$md->final(); | ||
| 34 | |||
| 35 | print unpack("H*",$digest); | ||
| 36 | printf " %2d %2d %2d %s\n", $c->key_length(), $c->iv_length(), | ||
| 37 | $c->block_size(), $c->name(); | ||
| 38 | } | ||
| 39 | |||
diff --git a/src/lib/libssl/src/perl/cipher.txt b/src/lib/libssl/src/perl/cipher.txt new file mode 100644 index 0000000000..c47952b5c9 --- /dev/null +++ b/src/lib/libssl/src/perl/cipher.txt | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | Cipher::new(name) "des-cbc" etc | ||
| 2 | Cipher::name() | ||
| 3 | Cipher::key_length() | ||
| 4 | Cipher::iv_length() | ||
| 5 | Cipher::block_size() | ||
| 6 | |||
| 7 | Cipher::init(key,iv,enc) | ||
| 8 | Cipher::update(in) | ||
| 9 | Cipher::final() | ||
| 10 | Cipher::cipher(in) | ||
diff --git a/src/lib/libssl/src/perl/cipher.xs b/src/lib/libssl/src/perl/cipher.xs new file mode 100644 index 0000000000..1044d7a4ef --- /dev/null +++ b/src/lib/libssl/src/perl/cipher.xs | |||
| @@ -0,0 +1,152 @@ | |||
| 1 | #include "p5SSLeay.h" | ||
| 2 | |||
| 3 | int boot_cipher() | ||
| 4 | { | ||
| 5 | SSLeay_add_all_ciphers(); | ||
| 6 | return(1); | ||
| 7 | } | ||
| 8 | |||
| 9 | MODULE = SSLeay::Cipher PACKAGE = SSLeay::Cipher PREFIX = p5_EVP_C_ | ||
| 10 | |||
| 11 | VERSIONCHECK: DISABLE | ||
| 12 | |||
| 13 | void | ||
| 14 | p5_EVP_C_new(...) | ||
| 15 | PREINIT: | ||
| 16 | EVP_CIPHER_CTX *ctx; | ||
| 17 | EVP_CIPHER *c; | ||
| 18 | char *name; | ||
| 19 | PPCODE: | ||
| 20 | if ((items == 1) && SvPOK(ST(0))) | ||
| 21 | name=SvPV(ST(0),na); | ||
| 22 | else if ((items == 2) && SvPOK(ST(1))) | ||
| 23 | name=SvPV(ST(1),na); | ||
| 24 | else | ||
| 25 | croak("Usage: SSLeay::Cipher::new(type)"); | ||
| 26 | PUSHs(sv_newmortal()); | ||
| 27 | c=EVP_get_cipherbyname(name); | ||
| 28 | if (c != NULL) | ||
| 29 | { | ||
| 30 | ctx=malloc(sizeof(EVP_CIPHER_CTX)); | ||
| 31 | EVP_EncryptInit(ctx,c,NULL,NULL); | ||
| 32 | sv_setref_pv(ST(0), "SSLeay::Cipher", (void*)ctx); | ||
| 33 | } | ||
| 34 | |||
| 35 | datum | ||
| 36 | p5_EVP_C_name(ctx) | ||
| 37 | EVP_CIPHER_CTX *ctx | ||
| 38 | CODE: | ||
| 39 | RETVAL.dptr=OBJ_nid2ln(EVP_CIPHER_CTX_nid(ctx)); | ||
| 40 | RETVAL.dsize=strlen(RETVAL.dptr); | ||
| 41 | OUTPUT: | ||
| 42 | RETVAL | ||
| 43 | |||
| 44 | int | ||
| 45 | p5_EVP_C_key_length(ctx) | ||
| 46 | EVP_CIPHER_CTX *ctx | ||
| 47 | CODE: | ||
| 48 | RETVAL=EVP_CIPHER_CTX_key_length(ctx); | ||
| 49 | OUTPUT: | ||
| 50 | RETVAL | ||
| 51 | |||
| 52 | int | ||
| 53 | p5_EVP_C_iv_length(ctx) | ||
| 54 | EVP_CIPHER_CTX *ctx | ||
| 55 | CODE: | ||
| 56 | RETVAL=EVP_CIPHER_CTX_iv_length(ctx); | ||
| 57 | OUTPUT: | ||
| 58 | RETVAL | ||
| 59 | |||
| 60 | int | ||
| 61 | p5_EVP_C_block_size(ctx) | ||
| 62 | EVP_CIPHER_CTX *ctx | ||
| 63 | CODE: | ||
| 64 | RETVAL=EVP_CIPHER_CTX_block_size(ctx); | ||
| 65 | OUTPUT: | ||
| 66 | RETVAL | ||
| 67 | |||
| 68 | void | ||
| 69 | p5_EVP_C_init(ctx,key,iv,enc) | ||
| 70 | EVP_CIPHER_CTX *ctx | ||
| 71 | datum key | ||
| 72 | datum iv | ||
| 73 | int enc | ||
| 74 | PREINIT: | ||
| 75 | char loc_iv[EVP_MAX_IV_LENGTH]; | ||
| 76 | char loc_key[EVP_MAX_KEY_LENGTH]; | ||
| 77 | char *ip=loc_iv,*kp=loc_key; | ||
| 78 | int i; | ||
| 79 | memset(loc_iv,0,EVP_MAX_IV_LENGTH); | ||
| 80 | memset(loc_key,0,EVP_MAX_KEY_LENGTH); | ||
| 81 | CODE: | ||
| 82 | i=key.dsize; | ||
| 83 | if (key.dsize > EVP_CIPHER_CTX_key_length(ctx)) | ||
| 84 | i=EVP_CIPHER_CTX_key_length(ctx); | ||
| 85 | if (i > 0) | ||
| 86 | { | ||
| 87 | memset(kp,0,EVP_MAX_KEY_LENGTH); | ||
| 88 | memcpy(kp,key.dptr,i); | ||
| 89 | } | ||
| 90 | else | ||
| 91 | kp=NULL; | ||
| 92 | i=iv.dsize; | ||
| 93 | if (iv.dsize > EVP_CIPHER_CTX_iv_length(ctx)) | ||
| 94 | i=EVP_CIPHER_CTX_iv_length(ctx); | ||
| 95 | if (i > 0) | ||
| 96 | { | ||
| 97 | memcpy(ip,iv.dptr,i); | ||
| 98 | memset(ip,0,EVP_MAX_IV_LENGTH); | ||
| 99 | } | ||
| 100 | else | ||
| 101 | ip=NULL; | ||
| 102 | EVP_CipherInit(ctx,EVP_CIPHER_CTX_cipher(ctx),kp,ip,enc); | ||
| 103 | memset(loc_key,0,sizeof(loc_key)); | ||
| 104 | memset(loc_iv,0,sizeof(loc_iv)); | ||
| 105 | |||
| 106 | SV * | ||
| 107 | p5_EVP_C_cipher(ctx,in) | ||
| 108 | EVP_CIPHER_CTX *ctx; | ||
| 109 | datum in; | ||
| 110 | CODE: | ||
| 111 | RETVAL=newSVpv("",0); | ||
| 112 | SvGROW(RETVAL,in.dsize+EVP_CIPHER_CTX_block_size(ctx)+1); | ||
| 113 | EVP_Cipher(ctx,SvPV(RETVAL,na),in.dptr,in.dsize); | ||
| 114 | SvCUR_set(RETVAL,in.dsize); | ||
| 115 | OUTPUT: | ||
| 116 | RETVAL | ||
| 117 | |||
| 118 | SV * | ||
| 119 | p5_EVP_C_update(ctx, in) | ||
| 120 | EVP_CIPHER_CTX *ctx | ||
| 121 | datum in | ||
| 122 | PREINIT: | ||
| 123 | int i; | ||
| 124 | CODE: | ||
| 125 | RETVAL=newSVpv("",0); | ||
| 126 | SvGROW(RETVAL,in.dsize+EVP_CIPHER_CTX_block_size(ctx)+1); | ||
| 127 | EVP_CipherUpdate(ctx,SvPV(RETVAL,na),&i,in.dptr,in.dsize); | ||
| 128 | SvCUR_set(RETVAL,i); | ||
| 129 | OUTPUT: | ||
| 130 | RETVAL | ||
| 131 | |||
| 132 | SV * | ||
| 133 | p5_EVP_C_final(ctx) | ||
| 134 | EVP_CIPHER_CTX *ctx | ||
| 135 | PREINIT: | ||
| 136 | int i; | ||
| 137 | CODE: | ||
| 138 | RETVAL=newSVpv("",0); | ||
| 139 | SvGROW(RETVAL,EVP_CIPHER_CTX_block_size(ctx)+1); | ||
| 140 | if (!EVP_CipherFinal(ctx,SvPV(RETVAL,na),&i)) | ||
| 141 | sv_setpv(RETVAL,"BAD DECODE"); | ||
| 142 | else | ||
| 143 | SvCUR_set(RETVAL,i); | ||
| 144 | OUTPUT: | ||
| 145 | RETVAL | ||
| 146 | |||
| 147 | void | ||
| 148 | p5_EVP_C_DESTROY(ctx) | ||
| 149 | EVP_CIPHER_CTX *ctx | ||
| 150 | CODE: | ||
| 151 | free((char *)ctx); | ||
| 152 | |||
diff --git a/src/lib/libssl/src/perl/dh.pl b/src/lib/libssl/src/perl/dh.pl new file mode 100644 index 0000000000..73decc241a --- /dev/null +++ b/src/lib/libssl/src/perl/dh.pl | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $g=SSLeay::BN::hex2bn("000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002"); | ||
| 8 | $p=SSLeay::BN::hex2bn("ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"); | ||
| 9 | $pub=SSLeay::BN::hex2bn("521b5b72d0a23f5f908eff62741b9c43ac65c47ad264a4f8d62d73dfab4938a6e019f81c28d64efd9b47c1b8188566c6184b6064cc42fac2778bd732678148c6cc7601bfe0ed18da76dd7bb976cd2ff0afc7b20f3f81171e2ea6534de061f929"); | ||
| 10 | $priv=SSLeay::BN::hex2bn("6e15c752af3f4cf6d7425164c451eeba760ec0651d12dc3b0ee5002a95af6191268ca47c0fbb3d836136eee795ae4af3a1adad5e04d0dbb04378cae0406ece23ca3b86839c0fd60064c1019c7d18be4dc0ec4be6c1e9ff6b0f5bd76373585503"); | ||
| 11 | $his=SSLeay::BN::hex2bn("d0fb51cd44a8578f55eb0822ede90f07504f4720d7367ff4bf76c27fedbce79d9204421ff7e86bd1dd02031bce4ceccd1d3e7c62679b6eb5fda8238fd4fe07bff573d552795f0d46f25753c688300fb9ed396792b59a49fdf89c8429124b668e"); | ||
| 12 | $sh=SSLeay::BN::hex2bn("66ec34b09bddf86147f6c6efd5ee4e6691e690eb0e90aceda16a742cad0abe531cb61d057aff362001ca19013215140ca2a1dd8966c78105bacbf2161f9cfbd58d351ff87923de77f9c56851037223d48272565416ee769e65a621cefb90b403"); | ||
| 13 | |||
| 14 | $g2=SSLeay::BN::hex2bn("000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002"); | ||
| 15 | $p2=SSLeay::BN::hex2bn("ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"); | ||
| 16 | $pub2=SSLeay::BN::hex2bn("d0fb51cd44a8578f55eb0822ede90f07504f4720d7367ff4bf76c27fedbce79d9204421ff7e86bd1dd02031bce4ceccd1d3e7c62679b6eb5fda8238fd4fe07bff573d552795f0d46f25753c688300fb9ed396792b59a49fdf89c8429124b668e"); | ||
| 17 | $priv2=SSLeay::BN::hex2bn("b81d54f52b687669fc8bd8087ac319accc2f94a2feafe09779f4a81e8e01f77290f5bbe84a08003afc4448145be427fad0b9d047889cf361c9dd378b15c1ebd5bda33e051fbd9eba8bf063e2bd836467cddb61f1db5c4b06bea5c9a77fb87b24"); | ||
| 18 | $his2=SSLeay::BN::hex2bn("521b5b72d0a23f5f908eff62741b9c43ac65c47ad264a4f8d62d73dfab4938a6e019f81c28d64efd9b47c1b8188566c6184b6064cc42fac2778bd732678148c6cc7601bfe0ed18da76dd7bb976cd2ff0afc7b20f3f81171e2ea6534de061f929"); | ||
| 19 | $sh2=SSLeay::BN::hex2bn("791faba7a6b592cb68a963945229483dc30f80f5cb295b2b5a59ef618a262d22de0845948a34db83d8bde260b940967ff85593a609e53ee6510aea09b776b4704d5e916917f384458d4790b6e0befcb1cb2f112b850e9ed410a091db80e1db2e"); | ||
| 20 | |||
| 21 | print "g=".$g->bn2hex."\n"; | ||
| 22 | print "p=".$p->bn2hex."\n"; | ||
| 23 | print "pub=".$pub->bn2hex."\n"; | ||
| 24 | print "priv=".$priv->bn2hex."\n"; | ||
| 25 | print "sh=".$sh->bn2hex."\n"; | ||
| 26 | |||
| 27 | print "new p - p2 = ".($p-$p2)."\n"; | ||
| 28 | |||
| 29 | $tmp=$g->mod_exp($priv,$p); | ||
| 30 | print "XXXXXXXXXXXXXXXX\n"; | ||
| 31 | print "new pub - pub = ".($tmp-$pub)."\n"; | ||
| 32 | $tmp2=$g2->mod_exp($priv2,$p2); | ||
| 33 | print "XXXXXXXXXXXXXXXX\n"; | ||
| 34 | |||
| 35 | print $p." pub\n"; | ||
| 36 | print $tmp2." calc pub\n"; | ||
| 37 | print $pub2." txt pub\n"; | ||
| 38 | |||
| 39 | |||
| 40 | |||
diff --git a/src/lib/libssl/src/perl/digest.txt b/src/lib/libssl/src/perl/digest.txt new file mode 100644 index 0000000000..6cb3ffedb0 --- /dev/null +++ b/src/lib/libssl/src/perl/digest.txt | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | MD::new(name) "md2", "md5" etc | ||
| 2 | MD::name() | ||
| 3 | MD::init() | ||
| 4 | MD::update(in) | ||
| 5 | MD::final() | ||
| 6 | |||
| 7 | |||
diff --git a/src/lib/libssl/src/perl/digest.xs b/src/lib/libssl/src/perl/digest.xs new file mode 100644 index 0000000000..5738b09e48 --- /dev/null +++ b/src/lib/libssl/src/perl/digest.xs | |||
| @@ -0,0 +1,83 @@ | |||
| 1 | #include "p5SSLeay.h" | ||
| 2 | |||
| 3 | int boot_digest() | ||
| 4 | { | ||
| 5 | SSLeay_add_all_digests(); | ||
| 6 | return(1); | ||
| 7 | } | ||
| 8 | |||
| 9 | MODULE = SSLeay::MD PACKAGE = SSLeay::MD PREFIX = p5_EVP_MD_ | ||
| 10 | |||
| 11 | PROTOTYPES: ENABLE | ||
| 12 | VERSIONCHECK: DISABLE | ||
| 13 | |||
| 14 | # SSLeay::MD::new(name) name= md2, md5, sha, sha1, or mdc2 | ||
| 15 | # md->name() - returns the name | ||
| 16 | # md->init() - reinitalises the digest | ||
| 17 | # md->update(data) - adds more data to digest | ||
| 18 | # digest=md->final() - returns digest | ||
| 19 | # | ||
| 20 | |||
| 21 | void | ||
| 22 | p5_EVP_MD_new(...) | ||
| 23 | PREINIT: | ||
| 24 | EVP_MD_CTX *ctx; | ||
| 25 | EVP_MD *md; | ||
| 26 | char *name; | ||
| 27 | PPCODE: | ||
| 28 | if ((items == 1) && SvPOK(ST(0))) | ||
| 29 | name=SvPV(ST(0),na); | ||
| 30 | else if ((items == 2) && SvPOK(ST(1))) | ||
| 31 | name=SvPV(ST(1),na); | ||
| 32 | else | ||
| 33 | croak("Usage: SSLeay::MD::new(type)"); | ||
| 34 | PUSHs(sv_newmortal()); | ||
| 35 | md=EVP_get_digestbyname(name); | ||
| 36 | if (md != NULL) | ||
| 37 | { | ||
| 38 | ctx=malloc(sizeof(EVP_MD_CTX)); | ||
| 39 | EVP_DigestInit(ctx,md); | ||
| 40 | sv_setref_pv(ST(0), "SSLeay::MD", (void*)ctx); | ||
| 41 | } | ||
| 42 | |||
| 43 | datum | ||
| 44 | p5_EVP_MD_name(ctx) | ||
| 45 | EVP_MD_CTX *ctx | ||
| 46 | CODE: | ||
| 47 | RETVAL.dptr=OBJ_nid2ln(EVP_MD_type(EVP_MD_CTX_type(ctx))); | ||
| 48 | RETVAL.dsize=strlen(RETVAL.dptr); | ||
| 49 | OUTPUT: | ||
| 50 | RETVAL | ||
| 51 | |||
| 52 | void | ||
| 53 | p5_EVP_MD_init(ctx) | ||
| 54 | EVP_MD_CTX *ctx | ||
| 55 | CODE: | ||
| 56 | EVP_DigestInit(ctx,EVP_MD_CTX_type(ctx)); | ||
| 57 | |||
| 58 | void | ||
| 59 | p5_EVP_MD_update(ctx, in) | ||
| 60 | EVP_MD_CTX *ctx | ||
| 61 | datum in | ||
| 62 | CODE: | ||
| 63 | EVP_DigestUpdate(ctx,in.dptr,in.dsize); | ||
| 64 | |||
| 65 | datum | ||
| 66 | p5_EVP_MD_final(ctx) | ||
| 67 | EVP_MD_CTX *ctx | ||
| 68 | PREINIT: | ||
| 69 | char md[EVP_MAX_MD_SIZE]; | ||
| 70 | int len; | ||
| 71 | CODE: | ||
| 72 | EVP_DigestFinal(ctx,md,&len); | ||
| 73 | RETVAL.dptr=md; | ||
| 74 | RETVAL.dsize=len; | ||
| 75 | OUTPUT: | ||
| 76 | RETVAL | ||
| 77 | |||
| 78 | void | ||
| 79 | p5_EVP_MD_DESTROY(ctx) | ||
| 80 | EVP_MD_CTX *ctx | ||
| 81 | CODE: | ||
| 82 | free((char *)ctx); | ||
| 83 | |||
diff --git a/src/lib/libssl/src/perl/err.txt b/src/lib/libssl/src/perl/err.txt new file mode 100644 index 0000000000..5e6cdaecdc --- /dev/null +++ b/src/lib/libssl/src/perl/err.txt | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | ERR::get_error() | ||
| 2 | ERR::peek_error() | ||
diff --git a/src/lib/libssl/src/perl/err.xs b/src/lib/libssl/src/perl/err.xs new file mode 100644 index 0000000000..6d1aec3ea1 --- /dev/null +++ b/src/lib/libssl/src/perl/err.xs | |||
| @@ -0,0 +1,46 @@ | |||
| 1 | #include "p5SSLeay.h" | ||
| 2 | |||
| 3 | int boot_err() | ||
| 4 | { | ||
| 5 | SSL_load_error_strings(); | ||
| 6 | return(1); | ||
| 7 | } | ||
| 8 | |||
| 9 | MODULE = SSLeay::ERR PACKAGE = SSLeay::ERR PREFIX = p5_ERR_ | ||
| 10 | |||
| 11 | PROTOTYPES: ENABLE | ||
| 12 | VERSIONCHECK: DISABLE | ||
| 13 | |||
| 14 | # md->error() - returns the last error in text or numeric context | ||
| 15 | |||
| 16 | void | ||
| 17 | p5_ERR_get_error(...) | ||
| 18 | PPCODE: | ||
| 19 | char buf[512]; | ||
| 20 | unsigned long l; | ||
| 21 | |||
| 22 | pr_name("p5_ERR_get_code"); | ||
| 23 | EXTEND(sp,1); | ||
| 24 | PUSHs(sv_newmortal()); | ||
| 25 | l=ERR_get_error(); | ||
| 26 | ERR_error_string(l,buf); | ||
| 27 | sv_setiv(ST(0),l); | ||
| 28 | sv_setpv(ST(0),buf); | ||
| 29 | SvIOK_on(ST(0)); | ||
| 30 | |||
| 31 | void | ||
| 32 | p5_ERR_peek_error(...) | ||
| 33 | PPCODE: | ||
| 34 | char buf[512]; | ||
| 35 | unsigned long l; | ||
| 36 | |||
| 37 | pr_name("p5_ERR_get_code"); | ||
| 38 | EXTEND(sp,1); | ||
| 39 | PUSHs(sv_newmortal()); | ||
| 40 | l=ERR_peek_error(); | ||
| 41 | ERR_error_string(l,buf); | ||
| 42 | sv_setiv(ST(0),l); | ||
| 43 | sv_setpv(ST(0),buf); | ||
| 44 | SvIOK_on(ST(0)); | ||
| 45 | |||
| 46 | |||
diff --git a/src/lib/libssl/src/perl/f.pl b/src/lib/libssl/src/perl/f.pl new file mode 100644 index 0000000000..a255931864 --- /dev/null +++ b/src/lib/libssl/src/perl/f.pl | |||
| @@ -0,0 +1,25 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $data=<>; | ||
| 8 | |||
| 9 | #$b=SSLeay::BN::hex2bn($a); | ||
| 10 | #$data=$b->bn2bin; | ||
| 11 | |||
| 12 | #substr($data,0,8)=""; | ||
| 13 | #print $data; | ||
| 14 | |||
| 15 | $md=SSLeay::MD::new("md5"); | ||
| 16 | $md->init(); | ||
| 17 | $md->update("test"); | ||
| 18 | $key=$md->final(); | ||
| 19 | |||
| 20 | $rc4=SSLeay::Cipher::new("rc4"); | ||
| 21 | $rc4->init($key,"",1); | ||
| 22 | $out=$rc4->cipher($data); | ||
| 23 | |||
| 24 | print $out; | ||
| 25 | |||
diff --git a/src/lib/libssl/src/perl/g.pl b/src/lib/libssl/src/perl/g.pl new file mode 100644 index 0000000000..ffbe694b05 --- /dev/null +++ b/src/lib/libssl/src/perl/g.pl | |||
| @@ -0,0 +1,18 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | use ExtUtils::testlib; | ||
| 3 | use SSLeay; | ||
| 4 | |||
| 5 | $num=SSLeay::BN::new(); | ||
| 6 | $shift=SSLeay::BN::new(); | ||
| 7 | |||
| 8 | print "0\n"; | ||
| 9 | $num=SSLeay::BN::hex2bn("1234329378209857309429670349760347603497603496398"); | ||
| 10 | print "1\n"; | ||
| 11 | $s=SSLeay::BN::hex2bn("59"); | ||
| 12 | print "a\n"; | ||
| 13 | $r=$num->lshift(59); | ||
| 14 | print "b"; | ||
| 15 | |||
| 16 | print $num->bn2hex."\n"; | ||
| 17 | print $s->bn2hex."\n"; | ||
| 18 | print $r->bn2hex."\n"; | ||
diff --git a/src/lib/libssl/src/perl/gen_rsa.pl b/src/lib/libssl/src/perl/gen_rsa.pl new file mode 100644 index 0000000000..ed8c71aa9e --- /dev/null +++ b/src/lib/libssl/src/perl/gen_rsa.pl | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $bits=512; | ||
| 8 | $bits=$ARGV[0] if $#ARGV >= 0; | ||
| 9 | |||
| 10 | $p=SSLeay::BN::generate_prime($bits/2,0,sub {print STDERR $_[0]?"+":"."}); | ||
| 11 | print "\n"; | ||
| 12 | $q=SSLeay::BN::generate_prime($bits/2,0,sub {print STDERR $_[0]?"+":"."}); | ||
| 13 | print "\n"; | ||
| 14 | |||
| 15 | $e=SSLeay::BN::hex2bn("10001"); | ||
| 16 | |||
| 17 | $t1=$p-1; | ||
| 18 | $t2=$q-1; | ||
| 19 | |||
| 20 | ($t1->gcd($e) == 1) || die "p failed the gcd test\n"; | ||
| 21 | ($t2->gcd($e) == 1) || die "q failed the gcd test\n"; | ||
| 22 | |||
| 23 | ($q,$p)=($p,$q) if ($p < $q); | ||
| 24 | $n=$p*$q; | ||
| 25 | $t=($p-1)*($q-1); | ||
| 26 | ($t->gcd($e) == 1) || die "t failed the gcd test\n"; | ||
| 27 | |||
| 28 | $d=$e->mod_inverse($t); | ||
| 29 | |||
| 30 | $dmp1=$d%($p-1); | ||
| 31 | $dmq1=$d%($q-1); | ||
| 32 | $iqmp=$q->mod_inverse($p); | ||
| 33 | |||
| 34 | print "n =$n\n"; | ||
| 35 | print "e =$e\n"; | ||
| 36 | print "d =$d\n"; | ||
| 37 | print "dmp1=$dmp1\n"; | ||
| 38 | print "dmq1=$dmq1\n"; | ||
| 39 | print "iqmp=$iqmp\n"; | ||
| 40 | |||
| 41 | $a=SSLeay::BN::bin2bn("This is an RSA test"); | ||
| 42 | print "Test with\n'".$a->bn2bin."' or\n$a\n"; | ||
| 43 | |||
| 44 | $t1=$a->mod_exp($e,$n); | ||
| 45 | print "$t1\n"; | ||
| 46 | $t2=$t1->mod_exp($d,$n); | ||
| 47 | print "'".$t2->bn2bin."'\n"; | ||
| 48 | |||
| 49 | |||
diff --git a/src/lib/libssl/src/perl/mul.pl b/src/lib/libssl/src/perl/mul.pl new file mode 100644 index 0000000000..611a760625 --- /dev/null +++ b/src/lib/libssl/src/perl/mul.pl | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | |||
| 8 | sub mul | ||
| 9 | { | ||
| 10 | my($ab,$cd,$num)=@_; | ||
| 11 | |||
| 12 | if ($num <= 4096) | ||
| 13 | { | ||
| 14 | return($ab*$cd); | ||
| 15 | } | ||
| 16 | else | ||
| 17 | { | ||
| 18 | my($a,$b,$c,$d,$n,$ac,$bd,$m,$t1,$t2); | ||
| 19 | |||
| 20 | $n=$num/2; | ||
| 21 | |||
| 22 | $a=$ab->mask_bits($n); | ||
| 23 | $b=$ab->rshift($n); | ||
| 24 | $c=$cd->mask_bits($n); | ||
| 25 | $d=$cd->rshift($n); | ||
| 26 | |||
| 27 | $t1=($b-$a); | ||
| 28 | $t2=($c-$d); | ||
| 29 | $m= &mul($t1,$t2,$n); | ||
| 30 | $ac=&mul($a,$c,$n); | ||
| 31 | $bd=&mul($b,$d,$n); | ||
| 32 | $m=$m+$ac+$bd; | ||
| 33 | $m=$m->lshift($n); | ||
| 34 | $bd=$bd->lshift($num); | ||
| 35 | |||
| 36 | $r=$ac+$m+$bd; | ||
| 37 | return($r); | ||
| 38 | } | ||
| 39 | } | ||
| 40 | |||
| 41 | $num=4096*32; | ||
| 42 | $a=SSLeay::BN::rand($num); | ||
| 43 | $b=SSLeay::BN::rand($num); | ||
| 44 | |||
| 45 | #for (1 .. 10) | ||
| 46 | { | ||
| 47 | $r=&mul($a,$b,$num); | ||
| 48 | } | ||
| 49 | |||
| 50 | #for (1 .. 10) | ||
| 51 | { | ||
| 52 | $rr=$a*$b; | ||
| 53 | } | ||
| 54 | |||
| 55 | $res=$rr-$r; | ||
| 56 | print $res->bn2hex()."\n"; | ||
diff --git a/src/lib/libssl/src/perl/p5SSLeay.h b/src/lib/libssl/src/perl/p5SSLeay.h new file mode 100644 index 0000000000..bcccda7d5f --- /dev/null +++ b/src/lib/libssl/src/perl/p5SSLeay.h | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | /* perl/p5SSLeay.h */ | ||
| 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 | #ifdef __cplusplus | ||
| 59 | extern "C" { | ||
| 60 | #endif | ||
| 61 | #include "EXTERN.h" | ||
| 62 | #include "perl.h" | ||
| 63 | #include "XSUB.h" | ||
| 64 | #ifdef __cplusplus | ||
| 65 | } | ||
| 66 | #endif | ||
| 67 | |||
| 68 | typedef struct datum_st | ||
| 69 | { | ||
| 70 | char *dptr; | ||
| 71 | int dsize; | ||
| 72 | } datum; | ||
| 73 | |||
| 74 | #include "crypto.h" | ||
| 75 | #include "buffer.h" | ||
| 76 | #include "bio.h" | ||
| 77 | #include "evp.h" | ||
| 78 | #include "err.h" | ||
| 79 | #include "x509.h" | ||
| 80 | #include "ssl.h" | ||
| 81 | |||
| 82 | #if 0 | ||
| 83 | #define pr_name(name) printf("%s\n",name) | ||
| 84 | #define pr_name_d(name,p2) printf("%s %d\n",name,p2) | ||
| 85 | #define pr_name_dd(name,p2,p3) printf("%s %d %d\n",name,p2,p3) | ||
| 86 | #else | ||
| 87 | #define pr_name(name) | ||
| 88 | #define pr_name_d(name,p2) | ||
| 89 | #define pr_name_dd(name,p2,p3) | ||
| 90 | #endif | ||
| 91 | |||
| 92 | SV *new_ref(char *type, char *obj, int mort); | ||
| 93 | int ex_new(char *obj,SV *data,CRYPTO_EX_DATA *ad,int idx,long argl,char *argp); | ||
| 94 | void ex_cleanup(char *obj,SV *data,CRYPTO_EX_DATA *ad,int idx, | ||
| 95 | long argl,char *argp); | ||
| 96 | |||
diff --git a/src/lib/libssl/src/perl/r.pl b/src/lib/libssl/src/perl/r.pl new file mode 100644 index 0000000000..abcc331c78 --- /dev/null +++ b/src/lib/libssl/src/perl/r.pl | |||
| @@ -0,0 +1,56 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $bits=512; | ||
| 8 | $bits=$ARGV[0] if $#ARGV >= 0; | ||
| 9 | |||
| 10 | $q=SSLeay::BN::dec2bn("334533373942443239443435463034324139443635374634423531423146313742443038394230324138363038393539303745363034393946353346323345374537463935433635374238353245344341444241344138413244373443323338334431414134363244443532423243423133433537"); | ||
| 11 | |||
| 12 | $p=SSLeay::BN::dec2bn("3338413942343132463534373734353742343636444439363131313131353843334536434330363934313646414132453044434138413630434631334134443046313735313632344131433437443642434436423642453234383046393732383538444139393131314339303743393939363744443235443332393332394543384630304634323646333735"); | ||
| 13 | $pp=SSLeay::BN::generate_prime($bits/2,0,sub {print STDERR $_[0]?"+":"."}); | ||
| 14 | |||
| 15 | printf $pp->is_prime."\n"; | ||
| 16 | printf $p->is_prime."\n"; | ||
| 17 | printf $q->is_prime."\n"; | ||
| 18 | printf "p->length=%d\n",$p->num_bits; | ||
| 19 | printf "q->length=%d\n",$q->num_bits; | ||
| 20 | $bits=$p->num_bits+$q->num_bits; | ||
| 21 | $e=SSLeay::BN::hex2bn("10001"); | ||
| 22 | |||
| 23 | $t1=$p-1; | ||
| 24 | $t2=$q-1; | ||
| 25 | |||
| 26 | ($t1->gcd($e) == 1) || die "p failed the gcd test\n"; | ||
| 27 | ($t2->gcd($e) == 1) || die "q failed the gcd test\n"; | ||
| 28 | |||
| 29 | ($q,$p)=($p,$q) if ($p < $q); | ||
| 30 | $n=$p*$q; | ||
| 31 | $t=($p-1)*($q-1); | ||
| 32 | ($t->gcd($e) == 1) || die "t failed the gcd test\n"; | ||
| 33 | |||
| 34 | $d=$e->mod_inverse($t); | ||
| 35 | |||
| 36 | $dmp1=$d%($p-1); | ||
| 37 | $dmq1=$d%($q-1); | ||
| 38 | $iqmp=$q->mod_inverse($p); | ||
| 39 | |||
| 40 | print "n =$n\n"; | ||
| 41 | print "e =$e\n"; | ||
| 42 | print "d =$d\n"; | ||
| 43 | print "dmp1=$dmp1\n"; | ||
| 44 | print "dmq1=$dmq1\n"; | ||
| 45 | print "iqmp=$iqmp\n"; | ||
| 46 | |||
| 47 | $a=SSLeay::BN::bin2bn("This is an RSA test"); | ||
| 48 | print "Test with\n'".$a->bn2bin."' or\n$a\n"; | ||
| 49 | |||
| 50 | print "<$a>\n"; | ||
| 51 | $t1=$a->mod_exp($e,$n); | ||
| 52 | print ">$t1>\n"; | ||
| 53 | $t2=$t1->mod_exp($d,$n); | ||
| 54 | print "<$t2>\n"; | ||
| 55 | |||
| 56 | |||
diff --git a/src/lib/libssl/src/perl/s.pl b/src/lib/libssl/src/perl/s.pl new file mode 100644 index 0000000000..1d438a6765 --- /dev/null +++ b/src/lib/libssl/src/perl/s.pl | |||
| @@ -0,0 +1,72 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $ssl_ctx=SSL::CTX->new("SSLv3_client"); | ||
| 8 | |||
| 9 | $ssl_ctx->set_options("-info_callback" => | ||
| 10 | sub { | ||
| 11 | print STDERR $_[0]->state()."\n"; | ||
| 12 | } | ||
| 13 | ); | ||
| 14 | |||
| 15 | $conn="localhost:4433"; | ||
| 16 | $conn=$ARGV[0] if $#ARGV >= 0; | ||
| 17 | $cbio=BIO->new("connect"); | ||
| 18 | $cbio->hostname($conn) || die $ssl->error(); | ||
| 19 | |||
| 20 | $bbio=BIO->new("buffer"); | ||
| 21 | |||
| 22 | $sbio=BIO->new("ssl"); | ||
| 23 | $ssl=$ssl_ctx->new_ssl; | ||
| 24 | $ssl->set_options(-connect_state); | ||
| 25 | $sbio->set_ssl($ssl); | ||
| 26 | |||
| 27 | $sbio->push($cbio); | ||
| 28 | $bbio->push($sbio); | ||
| 29 | $bio=$bbio; | ||
| 30 | |||
| 31 | #$bio->set_callback( | ||
| 32 | # sub { | ||
| 33 | # my($bio,$state,$cmd,$buf,$lart,$ret)=@_; | ||
| 34 | # print STDERR "$state:$cmd\n"; | ||
| 35 | # return($ret); | ||
| 36 | # } | ||
| 37 | # ); | ||
| 38 | |||
| 39 | $b=$bio; | ||
| 40 | do { | ||
| 41 | print STDERR $b->type."\n"; | ||
| 42 | } while ($b=$b->next_bio); | ||
| 43 | |||
| 44 | (($ret=$bio->syswrite("GET / HTTP/1.0\r\n\r\n")) > 0) || die $bio->error(); | ||
| 45 | $bio->flush; | ||
| 46 | |||
| 47 | $data=""; | ||
| 48 | while (1) | ||
| 49 | { | ||
| 50 | $ret=$bio->getline; | ||
| 51 | $ret =~ s/[\r\n]//g; | ||
| 52 | print STDERR "$ret\n"; | ||
| 53 | last if $ret eq ""; | ||
| 54 | $server=$1 if $ret=~ /^Server: (.*)/; | ||
| 55 | } | ||
| 56 | |||
| 57 | |||
| 58 | print "server is $server\n"; | ||
| 59 | $x509=$ssl->get_peer_certificate(); | ||
| 60 | print "version :".$x509->get_version()."\n"; | ||
| 61 | print "serialNumber:".$x509->get_serialNumber()->bn2hex."\n"; | ||
| 62 | print "subject :".$x509->get_subject_name()."\n"; | ||
| 63 | print "issuer :". $x509->get_issuer_name()."\n"; | ||
| 64 | |||
| 65 | $c=$ssl->get_current_cipher; | ||
| 66 | ($i,$a)=$c->get_bits; | ||
| 67 | $v=$c->get_version; | ||
| 68 | $n=$c->get_name; | ||
| 69 | |||
| 70 | print "protocol=".$ssl->get_version."\n"; | ||
| 71 | print "bits=$i($a) cipher type=$v cipher=$n\n"; | ||
| 72 | |||
diff --git a/src/lib/libssl/src/perl/s2.pl b/src/lib/libssl/src/perl/s2.pl new file mode 100644 index 0000000000..d39b4b8e25 --- /dev/null +++ b/src/lib/libssl/src/perl/s2.pl | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $ssl_ctx=SSL::CTX->new("SSLv3"); | ||
| 8 | |||
| 9 | $ssl_ctx->set_options("-info_callback" => | ||
| 10 | sub { | ||
| 11 | print STDERR $_[0]->state()."\n"; | ||
| 12 | } | ||
| 13 | ); | ||
| 14 | |||
| 15 | $conn="localhost:4433"; | ||
| 16 | $conn=$ARGV[0] if $#ARGV >= 0; | ||
| 17 | $cbio=BIO->new("connect"); | ||
| 18 | $cbio->hostname($conn) || die $ssl->error(); | ||
| 19 | |||
| 20 | $ssl=$ssl_ctx->new_ssl; | ||
| 21 | $sbio=BIO->new("ssl"); | ||
| 22 | $sbio->set_ssl($ssl); | ||
| 23 | $ssl->set_options("-connect_state"); | ||
| 24 | |||
| 25 | $bio=BIO->new("buffer"); | ||
| 26 | |||
| 27 | $sbio->push($cbio); | ||
| 28 | $bio->push($sbio); | ||
| 29 | |||
| 30 | ($bio->do_handshake() > 0) || die $bio->error(); | ||
| 31 | |||
| 32 | (($ret=$bio->syswrite("GET / HTTP/1.0\r\n\r\n")) > 0) || die $ssl->error(); | ||
| 33 | $bio->flush() || die $bio->error(); | ||
| 34 | |||
| 35 | $data=""; | ||
| 36 | while ($_=$bio->getline()) | ||
| 37 | { | ||
| 38 | if (/^Server:/) | ||
| 39 | { | ||
| 40 | print; | ||
| 41 | last; | ||
| 42 | } | ||
| 43 | } | ||
| 44 | |||
| 45 | if ($bio->peek_error()) | ||
| 46 | { | ||
| 47 | print "There was an error:".$ssl->error(); | ||
| 48 | } | ||
| 49 | print "exit\n"; | ||
diff --git a/src/lib/libssl/src/perl/server.pem b/src/lib/libssl/src/perl/server.pem new file mode 100644 index 0000000000..eabb927036 --- /dev/null +++ b/src/lib/libssl/src/perl/server.pem | |||
| @@ -0,0 +1,369 @@ | |||
| 1 | issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit) | ||
| 2 | subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Server test cert (512 bit) | ||
| 3 | -----BEGIN CERTIFICATE----- | ||
| 4 | MIIB6TCCAVICAQAwDQYJKoZIhvcNAQEEBQAwWzELMAkGA1UEBhMCQVUxEzARBgNV | ||
| 5 | BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYD | ||
| 6 | VQQDExJUZXN0IENBICgxMDI0IGJpdCkwHhcNOTcwNjA5MTM1NzQ2WhcNOTgwNjA5 | ||
| 7 | MTM1NzQ2WjBjMQswCQYDVQQGEwJBVTETMBEGA1UECBMKUXVlZW5zbGFuZDEaMBgG | ||
| 8 | A1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxIzAhBgNVBAMTGlNlcnZlciB0ZXN0IGNl | ||
| 9 | cnQgKDUxMiBiaXQpMFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAJ+zw4Qnlf8SMVIP | ||
| 10 | Fe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVDTGiXav6ooKXfX3j/7tdkuD8Ey2// | ||
| 11 | Kv7+ue0CAwEAATANBgkqhkiG9w0BAQQFAAOBgQB4TMR2CvacKE9wAsu9jyCX8YiW | ||
| 12 | mgCM+YoP6kt4Zkj2z5IRfm7WrycKsnpnOR+tGeqAjkCeZ6/36o9l91RvPnN1VJ/i | ||
| 13 | xQv2df0KFeMr00IkDdTNAdIWqFkSsZTAY2QAdgenb7MB1joejquYzO2DQIO7+wpH | ||
| 14 | irObpESxAZLySCmPPg== | ||
| 15 | -----END CERTIFICATE----- | ||
| 16 | -----BEGIN RSA PRIVATE KEY----- | ||
| 17 | MIIBPAIBAAJBAJ+zw4Qnlf8SMVIPFe9GEcStgOY2Ww/dgNdhjeD8ckUJNP5VZkVD | ||
| 18 | TGiXav6ooKXfX3j/7tdkuD8Ey2//Kv7+ue0CAwEAAQJAN6W31vDEP2DjdqhzCDDu | ||
| 19 | OA4NACqoiFqyblo7yc2tM4h4xMbC3Yx5UKMN9ZkCtX0gzrz6DyF47bdKcWBzNWCj | ||
| 20 | gQIhANEoojVt7hq+SQ6MCN6FTAysGgQf56Q3TYoJMoWvdiXVAiEAw3e3rc+VJpOz | ||
| 21 | rHuDo6bgpjUAAXM+v3fcpsfZSNO6V7kCIQCtbVjanpUwvZkMI9by02oUk9taki3b | ||
| 22 | PzPfAfNPYAbCJQIhAJXNQDWyqwn/lGmR11cqY2y9nZ1+5w3yHGatLrcDnQHxAiEA | ||
| 23 | vnlEGo8K85u+KwIOimM48ZG8oTk7iFdkqLJR1utT3aU= | ||
| 24 | -----END RSA PRIVATE KEY----- | ||
| 25 | subject=/C=US/O=AT&T Bell Laboratories/OU=Prototype Research CA | ||
| 26 | issuer= /C=US/O=AT&T Bell Laboratories/OU=Prototype Research CA | ||
| 27 | notBefore=950413210656Z | ||
| 28 | notAfter =970412210656Z | ||
| 29 | -----BEGIN X509 CERTIFICATE----- | ||
| 30 | |||
| 31 | MIICCDCCAXECAQAwDQYJKoZIhvcNAQEEBQAwTjELMAkGA1UEBhMCVVMxHzAdBgNV | ||
| 32 | BAoUFkFUJlQgQmVsbCBMYWJvcmF0b3JpZXMxHjAcBgNVBAsUFVByb3RvdHlwZSBS | ||
| 33 | ZXNlYXJjaCBDQTAeFw05NTA0MTMyMTA2NTZaFw05NzA0MTIyMTA2NTZaME4xCzAJ | ||
| 34 | BgNVBAYTAlVTMR8wHQYDVQQKFBZBVCZUIEJlbGwgTGFib3JhdG9yaWVzMR4wHAYD | ||
| 35 | VQQLFBVQcm90b3R5cGUgUmVzZWFyY2ggQ0EwgZwwDQYJKoZIhvcNAQEBBQADgYoA | ||
| 36 | MIGGAoGAebOmgtSCl+wCYZc86UGYeTLY8cjmW2P0FN8ToT/u2pECCoFdrlycX0OR | ||
| 37 | 3wt0ZhpFXLVNeDnHwEE9veNUih7pCL2ZBFqoIoQkB1lZmXRiVtjGonz8BLm/qrFM | ||
| 38 | YHb0lme/Ol+s118mwKVxnn6bSAeI/OXKhLaVdYZWk+aEaxEDkVkCAQ8wDQYJKoZI | ||
| 39 | hvcNAQEEBQADgYEAAZMG14lZmZ8bahkaHaTV9dQf4p2FZiQTFwHP9ZyGsXPC+LT5 | ||
| 40 | dG5iTaRmyjNIJdPWohZDl97kAci79aBndvuEvRKOjLHs3WRGBIwERnAcnY9Mz8u/ | ||
| 41 | zIHK23PjYVxGGaZd669OJwD0CYyqH22HH9nFUGaoJdsv39ChW0NRdLE9+y8= | ||
| 42 | -----END X509 CERTIFICATE----- | ||
| 43 | issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit) | ||
| 44 | subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test CA (1024 bit) | ||
| 45 | -----BEGIN CERTIFICATE----- | ||
| 46 | MIICJjCCAY8CAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV | ||
| 47 | BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD | ||
| 48 | VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTc0M1oXDTAxMDYw | ||
| 49 | OTEzNTc0M1owWzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY | ||
| 50 | BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRswGQYDVQQDExJUZXN0IENBICgxMDI0 | ||
| 51 | IGJpdCkwgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKO7o8t116VP6cgybTsZ | ||
| 52 | DCZhr95nYlZuya3aCi1IKoztqwWnjbmDFIriOqGFPrZQ+moMETC9D59iRW/dFXSv | ||
| 53 | 1F65ka/XY2hLh9exCCo7XuUcDs53Qp3bI3AmMqHjgzE8oO3ajyJAzJkTTOUecQU2 | ||
| 54 | mw/gI4tMM0LqWMQS7luTy4+xAgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAM7achv3v | ||
| 55 | hLQJcv/65eGEpBXM40ZDVoFQFFJWaY5p883HTqLB1x4FdzsXHH0QKBTcKpWwqyu4 | ||
| 56 | YDm3fb8oDugw72bCzfyZK/zVZPR/hVlqI/fvU109Qoc+7oPvIXWky71HfcK6ZBCA | ||
| 57 | q30KIqGM/uoM60INq97qjDmCJapagcNBGQs= | ||
| 58 | -----END CERTIFICATE----- | ||
| 59 | -----BEGIN RSA PRIVATE KEY----- | ||
| 60 | MIICXQIBAAKBgQCju6PLddelT+nIMm07GQwmYa/eZ2JWbsmt2gotSCqM7asFp425 | ||
| 61 | gxSK4jqhhT62UPpqDBEwvQ+fYkVv3RV0r9ReuZGv12NoS4fXsQgqO17lHA7Od0Kd | ||
| 62 | 2yNwJjKh44MxPKDt2o8iQMyZE0zlHnEFNpsP4COLTDNC6ljEEu5bk8uPsQIDAQAB | ||
| 63 | AoGAVZmpFZsDZfr0l2S9tLLwpjRWNOlKATQkno6q2WesT0eGLQufTciY+c8ypfU6 | ||
| 64 | hyio8r5iUl/VhhdjhAtKx1mRpiotftHo/eYf8rtsrnprOnWG0bWjLjtIoMbcxGn2 | ||
| 65 | J3bN6LJmbJMjDs0eJ3KnTu646F3nDUw2oGAwmpzKXA1KAP0CQQDRvQhxk2D3Pehs | ||
| 66 | HvG665u2pB5ipYQngEFlZO7RHJZzJOZEWSLuuMqaF/7pTfA5jiBvWqCgJeCRRInL | ||
| 67 | 21ru4dlPAkEAx9jj7BgKn5TYnMoBSSe0afjsV9oApVpN1Nacb1YDtCwy+scp3++s | ||
| 68 | nFxlv98wxIlSdpwMUn+AUWfjiWR7Tu/G/wJBAJ/KjwZIrFVxewP0x2ILYsTRYLzz | ||
| 69 | MS4PDsO7FB+I0i7DbBOifXS2oNSpd3I0CNMwrxFnUHzynpbOStVfN3ZL5w0CQQCa | ||
| 70 | pwFahxBRhkJKsxhjoFJBX9yl75JoY4Wvm5Tbo9ih6UJaRx3kqfkN14L2BKYcsZgb | ||
| 71 | KY9vmDOYy6iNfjDeWTfJAkBkfPUb8oTJ/nSP5zN6sqGxSY4krc4xLxpRmxoJ8HL2 | ||
| 72 | XfhqXkTzbU13RX9JJ/NZ8vQN9Vm2NhxRGJocQkmcdVtJ | ||
| 73 | -----END RSA PRIVATE KEY----- | ||
| 74 | -----BEGIN X509 CERTIFICATE----- | ||
| 75 | MIICYDCCAiACAgEoMAkGBSsOAwINBQAwfDELMAkGA1UEBhMCVVMxNjA0BgNVBAoT | ||
| 76 | LU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFuZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEZ | ||
| 77 | MBcGA1UECxMQVGVzdCBFbnZpcm9ubWVudDEaMBgGA1UECxMRRFNTLU5BU0EtUGls | ||
| 78 | b3QtQ0EwHhcNOTYwMjI2MTYzMjQ1WhcNOTcwMjI1MTYzMjQ1WjB8MQswCQYDVQQG | ||
| 79 | EwJVUzE2MDQGA1UEChMtTmF0aW9uYWwgQWVyb25hdXRpY3MgYW5kIFNwYWNlIEFk | ||
| 80 | bWluaXN0cmF0aW9uMRkwFwYDVQQLExBUZXN0IEVudmlyb25tZW50MRowGAYDVQQL | ||
| 81 | ExFEU1MtTkFTQS1QaWxvdC1DQTCB8jAJBgUrDgMCDAUAA4HkADCB4AJBAMA/ssKb | ||
| 82 | hPNUG7ZlASfVwEJU21O5OyF/iyBzgHI1O8eOhJGUYO8cc8wDMjR508Mr9cp6Uhl/ | ||
| 83 | ZB7FV5GkLNEnRHYCQQDUEaSg45P2qrDwixTRhFhmWz5Nvc4lRFQ/42XPcchiJBLb | ||
| 84 | bn3QK74T2IxY1yY+kCNq8XrIqf5fJJzIH0J/xUP3AhUAsg2wsQHfDGYk/BOSulX3 | ||
| 85 | fVd0geUCQQCzCFUQAh+ZkEmp5804cs6ZWBhrUAfnra8lJItYo9xPcXgdIfLfibcX | ||
| 86 | R71UsyO77MRD7B0+Ag2tq794IleCVcEEMAkGBSsOAwINBQADLwAwLAIUUayDfreR | ||
| 87 | Yh2WeU86/pHNdkUC1IgCFEfxe1f0oMpxJyrJ5XIxTi7vGdoK | ||
| 88 | -----END X509 CERTIFICATE----- | ||
| 89 | -----BEGIN X509 CERTIFICATE----- | ||
| 90 | |||
| 91 | MIICGTCCAdgCAwCqTDAJBgUrDgMCDQUAMHwxCzAJBgNVBAYTAlVTMTYwNAYDVQQK | ||
| 92 | Ey1OYXRpb25hbCBBZXJvbmF1dGljcyBhbmQgU3BhY2UgQWRtaW5pc3RyYXRpb24x | ||
| 93 | GTAXBgNVBAsTEFRlc3QgRW52aXJvbm1lbnQxGjAYBgNVBAsTEURTUy1OQVNBLVBp | ||
| 94 | bG90LUNBMB4XDTk2MDUxNDE3MDE0MVoXDTk3MDUxNDE3MDE0MVowMzELMAkGA1UE | ||
| 95 | BhMCQVUxDzANBgNVBAoTBk1pbmNvbTETMBEGA1UEAxMKRXJpYyBZb3VuZzCB8jAJ | ||
| 96 | BgUrDgMCDAUAA4HkADCB4AJBAKbfHz6vE6pXXMTpswtGUec2tvnfLJUsoxE9qs4+ | ||
| 97 | ObZX7LmLvragNPUeiTJx7UOWZ5DfBj6bXLc8eYne0lP1g3ACQQDUEaSg45P2qrDw | ||
| 98 | ixTRhFhmWz5Nvc4lRFQ/42XPcchiJBLbbn3QK74T2IxY1yY+kCNq8XrIqf5fJJzI | ||
| 99 | H0J/xUP3AhUAsg2wsQHfDGYk/BOSulX3fVd0geUCQQCzCFUQAh+ZkEmp5804cs6Z | ||
| 100 | WBhrUAfnra8lJItYo9xPcXgdIfLfibcXR71UsyO77MRD7B0+Ag2tq794IleCVcEE | ||
| 101 | MAkGBSsOAwINBQADMAAwLQIUWsuuJRE3VT4ueWkWMAJMJaZjj1ECFQCYY0zX4bzM | ||
| 102 | LC7obsrHD8XAHG+ZRG== | ||
| 103 | -----END X509 CERTIFICATE----- | ||
| 104 | -----BEGIN CERTIFICATE----- | ||
| 105 | MIICTTCCAbagAwIBAgIBADANBgkqhkiG9w0BAQQFADBMMQswCQYDVQQGEwJHQjEM | ||
| 106 | MAoGA1UEChMDVUNMMRgwFgYDVQQLEw9JQ0UtVEVMIFByb2plY3QxFTATBgNVBAMT | ||
| 107 | DFRydXN0RmFjdG9yeTAeFw05NzA0MjIxNDM5MTRaFw05ODA0MjIxNDM5MTRaMEwx | ||
| 108 | CzAJBgNVBAYTAkdCMQwwCgYDVQQKEwNVQ0wxGDAWBgNVBAsTD0lDRS1URUwgUHJv | ||
| 109 | amVjdDEVMBMGA1UEAxMMVHJ1c3RGYWN0b3J5MIGcMAoGBFUIAQECAgQAA4GNADCB | ||
| 110 | iQKBgQCEieR8NcXkUW1f0G6aC6u0i8q/98JqS6RxK5YmHIGKCkuTWAUjzLfUa4dt | ||
| 111 | U9igGCjTuxaDqlzEim+t/02pmiBZT9HaX++35MjQPUWmsChcYU5WyzGErXi+rQaw | ||
| 112 | zlwS73zM8qiPj/97lXYycWhgL0VaiDSPxRXEUdWoaGruom4mNQIDAQABo0IwQDAd | ||
| 113 | BgNVHQ4EFgQUHal1LZr7oVg5z6lYzrhTgZRCmcUwDgYDVR0PAQH/BAQDAgH2MA8G | ||
| 114 | A1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQEEBQADgYEAfaggfl6FZoioecjv0dq8 | ||
| 115 | /DXo/u11iMZvXn08gjX/zl2b4wtPbShOSY5FhkSm8GeySasz+/Nwb/uzfnIhokWi | ||
| 116 | lfPZHtlCWtXbIy/TN51eJyq04ceDCQDWvLC2enVg9KB+GJ34b5c5VaPRzq8MBxsA | ||
| 117 | S7ELuYGtmYgYm9NZOIr7yU0= | ||
| 118 | -----END CERTIFICATE----- | ||
| 119 | -----BEGIN CERTIFICATE----- | ||
| 120 | MIIB6jCCAZQCAgEtMA0GCSqGSIb3DQEBBAUAMIGAMQswCQYDVQQGEwJVUzE2MDQG | ||
| 121 | A1UEChMtTmF0aW9uYWwgQWVyb25hdXRpY3MgYW5kIFNwYWNlIEFkbWluaXN0cmF0 | ||
| 122 | aW9uMRkwFwYDVQQLExBUZXN0IEVudmlyb25tZW50MR4wHAYDVQQLExVNRDUtUlNB | ||
| 123 | LU5BU0EtUGlsb3QtQ0EwHhcNOTYwNDMwMjIwNTAwWhcNOTcwNDMwMjIwNTAwWjCB | ||
| 124 | gDELMAkGA1UEBhMCVVMxNjA0BgNVBAoTLU5hdGlvbmFsIEFlcm9uYXV0aWNzIGFu | ||
| 125 | ZCBTcGFjZSBBZG1pbmlzdHJhdGlvbjEZMBcGA1UECxMQVGVzdCBFbnZpcm9ubWVu | ||
| 126 | dDEeMBwGA1UECxMVTUQ1LVJTQS1OQVNBLVBpbG90LUNBMFkwCgYEVQgBAQICAgAD | ||
| 127 | SwAwSAJBALmmX5+GqAvcrWK13rfDrNX9UfeA7f+ijyBgeFQjYUoDpFqapw4nzQBL | ||
| 128 | bAXug8pKkRwa2Zh8YODhXsRWu2F/UckCAwEAATANBgkqhkiG9w0BAQQFAANBAH9a | ||
| 129 | OBA+QCsjxXgnSqHx04gcU8S49DVUb1f2XVoLnHlIb8RnX0k5O6mpHT5eti9bLkiW | ||
| 130 | GJNMJ4L0AJ/ac+SmHZc= | ||
| 131 | -----END CERTIFICATE----- | ||
| 132 | -----BEGIN CERTIFICATE----- | ||
| 133 | MIICajCCAdMCBDGA0QUwDQYJKoZIhvcNAQEEBQAwfTELMAkGA1UEBhMCQ2ExDzAN | ||
| 134 | BgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmlsaXR5IEFjY2VwdGVkMR8w | ||
| 135 | HQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRwwGgYDVQQDExNFbnRydXN0 | ||
| 136 | IERlbW8gV2ViIENBMB4XDTk2MDQyNjEzMzUwMVoXDTA2MDQyNjEzMzUwMVowfTEL | ||
| 137 | MAkGA1UEBhMCQ2ExDzANBgNVBAcTBk5lcGVhbjEeMBwGA1UECxMVTm8gTGlhYmls | ||
| 138 | aXR5IEFjY2VwdGVkMR8wHQYDVQQKExZGb3IgRGVtbyBQdXJwb3NlcyBPbmx5MRww | ||
| 139 | GgYDVQQDExNFbnRydXN0IERlbW8gV2ViIENBMIGdMA0GCSqGSIb3DQEBAQUAA4GL | ||
| 140 | ADCBhwKBgQCaroS7O1DA0hm4IefNYU1cx/nqOmzEnk291d1XqznDeF4wEgakbkCc | ||
| 141 | zTKxK791yNpXG5RmngqH7cygDRTHZJ6mfCRn0wGC+AI00F2vYTGqPGRQL1N3lZT0 | ||
| 142 | YDKFC0SQeMMjFIZ1aeQigroFQnHo0VB3zWIMpNkka8PY9lxHZAmWwQIBAzANBgkq | ||
| 143 | hkiG9w0BAQQFAAOBgQBAx0UMVA1s54lMQyXjMX5kj99FJN5itb8bK1Rk+cegPQPF | ||
| 144 | cWO9SEWyEjjBjIkjjzAwBkaEszFsNGxemxtXvwjIm1xEUMTVlPEWTs2qnDvAUA9W | ||
| 145 | YqhWbhH0toGT36236QAsqCZ76rbTRVSSX2BHyJwJMG2tCRv7kRJ//NIgxj3H4w== | ||
| 146 | -----END CERTIFICATE----- | ||
| 147 | |||
| 148 | issuer= /C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit) | ||
| 149 | subject=/C=AU/ST=Queensland/O=CryptSoft Pty Ltd/CN=Test PCA (1024 bit) | ||
| 150 | -----BEGIN CERTIFICATE----- | ||
| 151 | MIICJzCCAZACAQAwDQYJKoZIhvcNAQEEBQAwXDELMAkGA1UEBhMCQVUxEzARBgNV | ||
| 152 | BAgTClF1ZWVuc2xhbmQxGjAYBgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYD | ||
| 153 | VQQDExNUZXN0IFBDQSAoMTAyNCBiaXQpMB4XDTk3MDYwOTEzNTczN1oXDTAxMDYw | ||
| 154 | OTEzNTczN1owXDELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQxGjAY | ||
| 155 | BgNVBAoTEUNyeXB0U29mdCBQdHkgTHRkMRwwGgYDVQQDExNUZXN0IFBDQSAoMTAy | ||
| 156 | NCBiaXQpMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQCdoWk/3+WcMlfjIrkg | ||
| 157 | 40ketmnQaEogQe1LLcuOJV6rKfUSAsPgwgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp | ||
| 158 | 22Jp85PmemiDzyUIStwk72qhp1imbANZvlmlCFKiQrjUyuDfu4TABmn+kkt3vR1Y | ||
| 159 | BEOGt+IFye1UBVSATVdRJ2UVhwIDAQABMA0GCSqGSIb3DQEBBAUAA4GBABNA1u/S | ||
| 160 | Cg/LJZWb7GliiKJsvuhxlE4E5JxQF2zMub/CSNbF97//tYSyj96sxeFQxZXbcjm9 | ||
| 161 | xt6mr/xNLA4szNQMJ4P+L7b5e/jC5DSqlwS+CUYJgaFs/SP+qJoCSu1bR3IM9XWO | ||
| 162 | cRBpDmcBbYLkSyB92WURvsZ1LtjEcn+cdQVI | ||
| 163 | -----END CERTIFICATE----- | ||
| 164 | -----BEGIN RSA PRIVATE KEY----- | ||
| 165 | MIICXAIBAAKBgQCdoWk/3+WcMlfjIrkg40ketmnQaEogQe1LLcuOJV6rKfUSAsPg | ||
| 166 | wgsabJ/wn8TxA1yy3eKJbFl3OiUXMRsp22Jp85PmemiDzyUIStwk72qhp1imbANZ | ||
| 167 | vlmlCFKiQrjUyuDfu4TABmn+kkt3vR1YBEOGt+IFye1UBVSATVdRJ2UVhwIDAQAB | ||
| 168 | AoGAba4fTtuap5l7/8ZsbE7Z1O32KJY4ZcOZukLOLUUhXxXduT+FTgGWujc0/rgc | ||
| 169 | z9qYCLlNZHOouMYTgtSfYvuMuLZ11VIt0GYH+nRioLShE59Yy+zCRyC+gPigS1kz | ||
| 170 | xvo14AsOIPYV14Tk/SsHyq6E0eTk7VzaIE197giiINUERPECQQDSKmtPTh/lRKw7 | ||
| 171 | HSZSM0I1mFWn/1zqrAbontRQY5w98QWIOe5qmzYyFbPXYT3d9BzlsMyhgiRNoBbD | ||
| 172 | yvohSHXJAkEAwAHx6ezAZeWWzD5yXD36nyjpkVCw7Tk7TSmOceLJMWt1QcrCfqlS | ||
| 173 | xA5jjpQ6Z8suU5DdtWAryM2sAir1WisYzwJAd6Zcx56jvAQ3xcPXsE6scBTVFzrj | ||
| 174 | 7FqZ6E+cclPzfLQ+QQsyOBE7bpI6e/FJppY26XGZXo3YGzV8IGXrt40oOQJALETG | ||
| 175 | h86EFXo3qGOFbmsDy4pdP5nBERCu8X1xUCSfintiD4c2DInxgS5oGclnJeMcjTvL | ||
| 176 | QjQoJCX3UJCi/OUO1QJBAKgcDHWjMvt+l1pjJBsSEZ0HX9AAIIVx0RQmbFGS+F2Q | ||
| 177 | hhu5l77WnnZOQ9vvhV5u7NPCUF9nhU3jh60qWWO8mkc= | ||
| 178 | -----END RSA PRIVATE KEY----- | ||
| 179 | subject=/C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority | ||
| 180 | issuer= /C=US/O=RSA Data Security, Inc./OU=Commercial Certification Authority | ||
| 181 | notBefore=941104185834Z | ||
| 182 | notAfter =991103185834Z | ||
| 183 | -----BEGIN X509 CERTIFICATE----- | ||
| 184 | |||
| 185 | MIICIzCCAZACBQJBAAAWMA0GCSqGSIb3DQEBAgUAMFwxCzAJBgNVBAYTAlVTMSAw | ||
| 186 | HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVy | ||
| 187 | Y2lhbCBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDQxODU4MzRaFw05 | ||
| 188 | OTExMDMxODU4MzRaMFwxCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0YSBT | ||
| 189 | ZWN1cml0eSwgSW5jLjErMCkGA1UECxMiQ29tbWVyY2lhbCBDZXJ0aWZpY2F0aW9u | ||
| 190 | IEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCk+4Fie84QJ93o | ||
| 191 | 975sbsZwmdu41QUDaSiCnHJ/lj+O7Kwpkj+KFPhCdr69XQO5kNTQvAayUTNfxMK/ | ||
| 192 | touPmbZiImDd298ggrTKoi8tUO2UMt7gVY3UaOLgTNLNBRYulWZcYVI4HlGogqHE | ||
| 193 | 7yXpCuaLK44xZtn42f29O2nZ6wIDAQABMA0GCSqGSIb3DQEBAgUAA34AdrW2EP4j | ||
| 194 | 9/dZYkuwX5zBaLxJu7NJbyFHXSudVMQAKD+YufKKg5tgf+tQx6sFEC097TgCwaVI | ||
| 195 | 0v5loMC86qYjFmZsGySp8+x5NRhPJsjjr1BKx6cxa9B8GJ1Qv6km+iYrRpwUqbtb | ||
| 196 | MJhCKLVLU7tDCZJAuqiqWqTGtotXTcU= | ||
| 197 | -----END X509 CERTIFICATE----- | ||
| 198 | subject=/C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority | ||
| 199 | issuer= /C=US/O=RSA Data Security, Inc./OU=Secure Server Certification Authority | ||
| 200 | notBefore=941109235417Z | ||
| 201 | notAfter =991231235417Z | ||
| 202 | -----BEGIN X509 CERTIFICATE----- | ||
| 203 | |||
| 204 | MIICKTCCAZYCBQJBAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMSAw | ||
| 205 | HgYDVQQKExdSU0EgRGF0YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJl | ||
| 206 | IFNlcnZlciBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NDExMDkyMzU0MTda | ||
| 207 | Fw05OTEyMzEyMzU0MTdaMF8xCzAJBgNVBAYTAlVTMSAwHgYDVQQKExdSU0EgRGF0 | ||
| 208 | YSBTZWN1cml0eSwgSW5jLjEuMCwGA1UECxMlU2VjdXJlIFNlcnZlciBDZXJ0aWZp | ||
| 209 | Y2F0aW9uIEF1dGhvcml0eTCBmzANBgkqhkiG9w0BAQEFAAOBiQAwgYUCfgCSznrB | ||
| 210 | roM+WqqJg1esJQF2DK2ujiw3zus1eGRUA+WEQFHJv48I4oqCCNIWhjdV6bEhAq12 | ||
| 211 | aIGaBaJLyUslZiJWbIgHj/eBWW2EB2VwE3F2Ppt3TONQiVaYSLkdpykaEy5KEVmc | ||
| 212 | HhXVSVQsczppgrGXOZxtcGdI5d0t1sgeewIDAQABMA0GCSqGSIb3DQEBAgUAA34A | ||
| 213 | iNHReSHO4ovo+MF9NFM/YYPZtgs4F7boviGNjwC4i1N+RGceIr2XJ+CchcxK9oU7 | ||
| 214 | suK+ktPlDemvXA4MRpX/oRxePug2WHpzpgr4IhFrwwk4fia7c+8AvQKk8xQNMD9h | ||
| 215 | cHsg/jKjn7P0Z1LctO6EjJY2IN6BCINxIYoPnqk= | ||
| 216 | -----END X509 CERTIFICATE----- | ||
| 217 | subject=/C=ZA/SP=Western Cape/L=Cape Town/O=Thawte Consulting cc | ||
| 218 | /OU=Certification Services Division/CN=Thawte Server CA | ||
| 219 | /Email=server-certs@thawte.com | ||
| 220 | issuer= /C=ZA/SP=Western Cape/L=Cape Town/O=Thawte Consulting cc | ||
| 221 | /OU=Certification Services Division/CN=Thawte Server CA | ||
| 222 | /Email=server-certs@thawte.com | ||
| 223 | -----BEGIN CERTIFICATE----- | ||
| 224 | MIIC+TCCAmICAQAwDQYJKoZIhvcNAQEEBQAwgcQxCzAJBgNVBAYTAlpBMRUwEwYD | ||
| 225 | VQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU | ||
| 226 | VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy | ||
| 227 | dmljZXMgRGl2aXNpb24xGTAXBgNVBAMTEFRoYXd0ZSBTZXJ2ZXIgQ0ExJjAkBgkq | ||
| 228 | hkiG9w0BCQEWF3NlcnZlci1jZXJ0c0B0aGF3dGUuY29tMB4XDTk2MDcyNzE4MDc1 | ||
| 229 | N1oXDTk4MDcyNzE4MDc1N1owgcQxCzAJBgNVBAYTAlpBMRUwEwYDVQQIEwxXZXN0 | ||
| 230 | ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMUVGhhd3RlIENv | ||
| 231 | bnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2VydmljZXMgRGl2 | ||
| 232 | aXNpb24xGTAXBgNVBAMTEFRoYXd0ZSBTZXJ2ZXIgQ0ExJjAkBgkqhkiG9w0BCQEW | ||
| 233 | F3NlcnZlci1jZXJ0c0B0aGF3dGUuY29tMIGfMA0GCSqGSIb3DQEBAQUAA4GNADCB | ||
| 234 | iQKBgQDTpFBuyP9Wa+bPXbbqDGh1R6KqwtqEJfyo9EdR2oW1IHSUhh4PdcnpCGH1 | ||
| 235 | Bm0wbhUZAulSwGLbTZme4moMRDjN/r7jZAlwxf6xaym2L0nIO9QnBCUQly/nkG3A | ||
| 236 | KEKZ10xD3sP1IW1Un13DWOHA5NlbsLjctHvfNjrCtWYiEtaHDQIDAQABMA0GCSqG | ||
| 237 | SIb3DQEBBAUAA4GBAIsvn7ifX3RUIrvYXtpI4DOfARkTogwm6o7OwVdl93yFhDcX | ||
| 238 | 7h5t0XZ11MUAMziKdde3rmTvzUYIUCYoY5b032IwGMTvdiclK+STN6NP2m5nvFAM | ||
| 239 | qJT5gC5O+j/jBuZRQ4i0AMYQr5F4lT8oBJnhgafw6PL8aDY2vMHGSPl9+7uf | ||
| 240 | -----END CERTIFICATE----- | ||
| 241 | |||
| 242 | -----BEGIN CERTIFICATE----- | ||
| 243 | MIIDDTCCAnYCAQAwDQYJKoZIhvcNAQEEBQAwgc4xCzAJBgNVBAYTAlpBMRUwEwYD | ||
| 244 | VQQIEwxXZXN0ZXJuIENhcGUxEjAQBgNVBAcTCUNhcGUgVG93bjEdMBsGA1UEChMU | ||
| 245 | VGhhd3RlIENvbnN1bHRpbmcgY2MxKDAmBgNVBAsTH0NlcnRpZmljYXRpb24gU2Vy | ||
| 246 | dmljZXMgRGl2aXNpb24xITAfBgNVBAMTGFRoYXd0ZSBQcmVtaXVtIFNlcnZlciBD | ||
| 247 | QTEoMCYGCSqGSIb3DQEJARYZcHJlbWl1bS1zZXJ2ZXJAdGhhd3RlLmNvbTAeFw05 | ||
| 248 | NjA3MjcxODA3MTRaFw05ODA3MjcxODA3MTRaMIHOMQswCQYDVQQGEwJaQTEVMBMG | ||
| 249 | A1UECBMMV2VzdGVybiBDYXBlMRIwEAYDVQQHEwlDYXBlIFRvd24xHTAbBgNVBAoT | ||
| 250 | FFRoYXd0ZSBDb25zdWx0aW5nIGNjMSgwJgYDVQQLEx9DZXJ0aWZpY2F0aW9uIFNl | ||
| 251 | cnZpY2VzIERpdmlzaW9uMSEwHwYDVQQDExhUaGF3dGUgUHJlbWl1bSBTZXJ2ZXIg | ||
| 252 | Q0ExKDAmBgkqhkiG9w0BCQEWGXByZW1pdW0tc2VydmVyQHRoYXd0ZS5jb20wgZ8w | ||
| 253 | DQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBANI2NmqL18JbntqBQWKPOO5JBFXW0O8c | ||
| 254 | G5UWR+8YSDU6UvQragaPOy/qVuOvho2eF/eetGV1Ak3vywmiIVHYm9Bn0LoNkgYU | ||
| 255 | c9STy5cqAJxcTgy8+hVS/PJEbtoRSm4Iny8t4/mqOoZztkZTWMiJBb2DEbhzP6oH | ||
| 256 | jfRCTedAnRw3AgMBAAEwDQYJKoZIhvcNAQEEBQADgYEAutFIgTRZVYerIZfL9lvR | ||
| 257 | w9Eifvvo5KTZ3h+Bj+VzNnyw4Qc/IyXkPOu6SIiH9LQ3sCmWBdxpe+qr4l77rLj2 | ||
| 258 | GYuMtESFfn1XVALzkYgC7JcPuTOjMfIiMByt+uFf8AV8x0IW/Qkuv+hEQcyM9vxK | ||
| 259 | 3VZdLbCVIhNoEsysrxCpxcI= | ||
| 260 | -----END CERTIFICATE----- | ||
| 261 | Tims test GCI CA | ||
| 262 | |||
| 263 | -----BEGIN CERTIFICATE----- | ||
| 264 | MIIB8DCCAZoCAQAwDQYJKoZIhvcNAQEEBQAwgYIxCzAJBgNVBAYTAkFVMRMwEQYD | ||
| 265 | VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5 | ||
| 266 | cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2RldmVsb3BtZW50MRkwFwYDVQQDExBD | ||
| 267 | cnlwdFNvZnQgRGV2IENBMB4XDTk3MDMyMjEzMzQwNFoXDTk4MDMyMjEzMzQwNFow | ||
| 268 | gYIxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhC | ||
| 269 | cmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxFDASBgNVBAsTC2Rl | ||
| 270 | dmVsb3BtZW50MRkwFwYDVQQDExBDcnlwdFNvZnQgRGV2IENBMFwwDQYJKoZIhvcN | ||
| 271 | AQEBBQADSwAwSAJBAOAOAqogG5QwAmLhzyO4CoRnx/wVy4NZP4dxJy83O1EnL0rw | ||
| 272 | OdsamJKvPOLHgSXo3gDu9uVyvCf/QJmZAmC5ml8CAwEAATANBgkqhkiG9w0BAQQF | ||
| 273 | AANBADRRS/GVdd7rAqRW6SdmgLJduOU2yq3avBu99kRqbp9A/dLu6r6jU+eP4oOA | ||
| 274 | TfdbFZtAAD2Hx9jUtY3tfdrJOb8= | ||
| 275 | -----END CERTIFICATE----- | ||
| 276 | |||
| 277 | -----BEGIN CERTIFICATE----- | ||
| 278 | MIICVjCCAgACAQAwDQYJKoZIhvcNAQEEBQAwgbUxCzAJBgNVBAYTAkFVMRMwEQYD | ||
| 279 | VQQIEwpRdWVlbnNsYW5kMREwDwYDVQQHEwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5 | ||
| 280 | cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsTI1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9O | ||
| 281 | IEFVVEhPUklUSUVTMTQwMgYDVQQDEytaRVJPIFZBTFVFIENBIC0gREVNT05TVFJB | ||
| 282 | VElPTiBQVVJQT1NFUyBPTkxZMB4XDTk3MDQwMzEzMjI1NFoXDTk4MDQwMzEzMjI1 | ||
| 283 | NFowgbUxCzAJBgNVBAYTAkFVMRMwEQYDVQQIEwpRdWVlbnNsYW5kMREwDwYDVQQH | ||
| 284 | EwhCcmlzYmFuZTEaMBgGA1UEChMRQ3J5cHRTb2Z0IFB0eSBMdGQxLDAqBgNVBAsT | ||
| 285 | I1dPUlRITEVTUyBDRVJUSUZJQ0FUSU9OIEFVVEhPUklUSUVTMTQwMgYDVQQDEyta | ||
| 286 | RVJPIFZBTFVFIENBIC0gREVNT05TVFJBVElPTiBQVVJQT1NFUyBPTkxZMFwwDQYJ | ||
| 287 | KoZIhvcNAQEBBQADSwAwSAJBAOZ7T7yqP/tyspcko3yPY1y0Cm2EmwNvzW4QgVXR | ||
| 288 | Fjs3HmJ4xtSpXdo6mwcGezL3Abt/aQXaxv9PU8xt+Jr0OFUCAwEAATANBgkqhkiG | ||
| 289 | 9w0BAQQFAANBAOQpYmGgyCqCy1OljgJhCqQOu627oVlHzK1L+t9vBaMfn40AVUR4 | ||
| 290 | WzQVWO31KTgi5vTK1U+3h46fgUWqQ0h+6rU= | ||
| 291 | -----END CERTIFICATE----- | ||
| 292 | -----BEGIN CERTIFICATE----- | ||
| 293 | MIAwgKADAgECAgEAMA0GCSqGSIb3DQEBBAUAMGIxETAPBgNVBAcTCEludGVybmV0 | ||
| 294 | MRcwFQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24gQ2xh | ||
| 295 | c3MgMSBDQSAtIEluZGl2aWR1YWwgU3Vic2NyaWJlcjAeFw05NjA0MDgxMDIwMjda | ||
| 296 | Fw05NzA0MDgxMDIwMjdaMGIxETAPBgNVBAcTCEludGVybmV0MRcwFQYDVQQKEw5W | ||
| 297 | ZXJpU2lnbiwgSW5jLjE0MDIGA1UECxMrVmVyaVNpZ24gQ2xhc3MgMSBDQSAtIElu | ||
| 298 | ZGl2aWR1YWwgU3Vic2NyaWJlcjCAMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC2 | ||
| 299 | FKbPTdAFDdjKI9BvqrQpkmOOLPhvltcunXZLEbE2jVfJw/0cxrr+Hgi6M8qV6r7j | ||
| 300 | W80GqLd5HUQq7XPysVKDaBBwZJHXPmv5912dFEObbpdFmIFH0S3L3bty10w/cari | ||
| 301 | QPJUObwW7s987LrbP2wqsxaxhhKdrpM01bjV0Pc+qQIDAQABAAAAADANBgkqhkiG | ||
| 302 | 9w0BAQQFAAOBgQA+1nJryNt8VBRjRr07ArDAV/3jAH7GjDc9jsrxZS68ost9v06C | ||
| 303 | TvTNKGL+LISNmFLXl+JXhgGB0JZ9fvyYzNgHQ46HBUng1H6voalfJgS2KdEo50wW | ||
| 304 | 8EFZYMDkT1k4uynwJqkVN2QJK/2q4/A/VCov5h6SlM8Affg2W+1TLqvqkwAA | ||
| 305 | -----END CERTIFICATE----- | ||
| 306 | |||
| 307 | subject=/L=Internet/O=VeriSign, Inc./OU=VeriSign Class 2 CA - Individual Subscriber | ||
| 308 | issuer= /L=Internet/O=VeriSign, Inc./OU=VeriSign Class 2 CA - Individual Subscriber | ||
| 309 | |||
| 310 | -----BEGIN CERTIFICATE----- | ||
| 311 | MIIEkzCCA/ygAwIBAgIRANDTUpSRL3nTFeMrMayFSPAwDQYJKoZIhvcNAQECBQAw | ||
| 312 | YjERMA8GA1UEBxMISW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQw | ||
| 313 | MgYDVQQLEytWZXJpU2lnbiBDbGFzcyAyIENBIC0gSW5kaXZpZHVhbCBTdWJzY3Jp | ||
| 314 | YmVyMB4XDTk2MDYwNDAwMDAwMFoXDTk4MDYwNDIzNTk1OVowYjERMA8GA1UEBxMI | ||
| 315 | SW50ZXJuZXQxFzAVBgNVBAoTDlZlcmlTaWduLCBJbmMuMTQwMgYDVQQLEytWZXJp | ||
| 316 | U2lnbiBDbGFzcyAyIENBIC0gSW5kaXZpZHVhbCBTdWJzY3JpYmVyMIGfMA0GCSqG | ||
| 317 | SIb3DQEBAQUAA4GNADCBiQKBgQC6A+2czKGRcYMfm8gdnk+0de99TDDzsqo0v5nb | ||
| 318 | RsbUmMcdRQ7nsMbRWe0SAb/9QoLTZ/cJ0iOBqdrkz7UpqqKarVoTSdlSMVM92tWp | ||
| 319 | 3bJncZHQD1t4xd6lQVdI1/T6R+5J0T1ukOdsI9Jmf+F28S6g3R3L1SFwiHKeZKZv | ||
| 320 | z+793wIDAQABo4ICRzCCAkMwggIpBgNVHQMBAf8EggIdMIICGTCCAhUwggIRBgtg | ||
| 321 | hkgBhvhFAQcBATCCAgAWggGrVGhpcyBjZXJ0aWZpY2F0ZSBpbmNvcnBvcmF0ZXMg | ||
| 322 | YnkgcmVmZXJlbmNlLCBhbmQgaXRzIHVzZSBpcyBzdHJpY3RseSBzdWJqZWN0IHRv | ||
| 323 | LCB0aGUgVmVyaVNpZ24gQ2VydGlmaWNhdGlvbiBQcmFjdGljZSBTdGF0ZW1lbnQg | ||
| 324 | KENQUyksIGF2YWlsYWJsZSBhdDogaHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL0NQ | ||
| 325 | Uy0xLjA7IGJ5IEUtbWFpbCBhdCBDUFMtcmVxdWVzdHNAdmVyaXNpZ24uY29tOyBv | ||
| 326 | ciBieSBtYWlsIGF0IFZlcmlTaWduLCBJbmMuLCAyNTkzIENvYXN0IEF2ZS4sIE1v | ||
| 327 | dW50YWluIFZpZXcsIENBIDk0MDQzIFVTQSBUZWwuICsxICg0MTUpIDk2MS04ODMw | ||
| 328 | IENvcHlyaWdodCAoYykgMTk5NiBWZXJpU2lnbiwgSW5jLiAgQWxsIFJpZ2h0cyBS | ||
| 329 | ZXNlcnZlZC4gQ0VSVEFJTiBXQVJSQU5USUVTIERJU0NMQUlNRUQgYW5kIExJQUJJ | ||
| 330 | TElUWSBMSU1JVEVELqAOBgxghkgBhvhFAQcBAQGhDgYMYIZIAYb4RQEHAQECMC8w | ||
| 331 | LRYraHR0cHM6Ly93d3cudmVyaXNpZ24uY29tL3JlcG9zaXRvcnkvQ1BTLTEuMDAU | ||
| 332 | BglghkgBhvhCAQEBAf8EBAMCAgQwDQYJKoZIhvcNAQECBQADgYEApRJRkNBqLLgs | ||
| 333 | 53IR/d18ODdLOWMTZ+QOOxBrq460iBEdUwgF8vmPRX1ku7UiDeNzaLlurE6eFqHq | ||
| 334 | 2zPyK5j60zfTLVJMWKcQWwTJLjHtXrW8pxhNtFc6Fdvy5ZkHnC/9NIl7/t4U6WqB | ||
| 335 | p4y+p7SdMIkEwIZfds0VbnQyX5MRUJY= | ||
| 336 | -----END CERTIFICATE----- | ||
| 337 | |||
| 338 | subject=/C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority | ||
| 339 | issuer= /C=US/O=VeriSign, Inc./OU=Class 3 Public Primary Certification Authority | ||
| 340 | -----BEGIN CERTIFICATE----- | ||
| 341 | MIICMTCCAZoCBQKhAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw | ||
| 342 | FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMg | ||
| 343 | UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa | ||
| 344 | Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln | ||
| 345 | biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgMyBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp | ||
| 346 | Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAyVxZ | ||
| 347 | nvIbigEUtBDfBEDb41evakVAj4QMC9Ez2dkRz+4CWB8l9yqoRAWq7AMfeH+ek7ma | ||
| 348 | AKojfdashaJjRcdyJ8z0TMZ1cdI5709C8HXfCpDGjiBvmA/4rCNfcCk2pMmG57Ga | ||
| 349 | IMtTpYXnPb59mv4kRTPcdhXtD6JxZExlLoFoRacCAwEAATANBgkqhkiG9w0BAQIF | ||
| 350 | AAOBgQB1Zmw+0c2B27X4LzZRtvdCvM1Cr9wO+hVs+GeTVzrrtpLotgHKjLeOQ7RJ | ||
| 351 | Zfk+7r11Ri7J/CVdqMcvi5uPaM+0nJcYwE3vH9mvgrPmZLiEXIqaB1JDYft0nls6 | ||
| 352 | NvxMsvwaPxUupVs8G5DsiCnkWRb5zget7Ond2tIxik/W2O8XjQ== | ||
| 353 | -----END CERTIFICATE----- | ||
| 354 | subject=/C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority | ||
| 355 | issuer= /C=US/O=VeriSign, Inc./OU=Class 4 Public Primary Certification Authority | ||
| 356 | -----BEGIN CERTIFICATE----- | ||
| 357 | MIICMTCCAZoCBQKmAAABMA0GCSqGSIb3DQEBAgUAMF8xCzAJBgNVBAYTAlVTMRcw | ||
| 358 | FQYDVQQKEw5WZXJpU2lnbiwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMg | ||
| 359 | UHJpbWFyeSBDZXJ0aWZpY2F0aW9uIEF1dGhvcml0eTAeFw05NjAxMjkwMDAwMDBa | ||
| 360 | Fw05OTEyMzEyMzU5NTlaMF8xCzAJBgNVBAYTAlVTMRcwFQYDVQQKEw5WZXJpU2ln | ||
| 361 | biwgSW5jLjE3MDUGA1UECxMuQ2xhc3MgNCBQdWJsaWMgUHJpbWFyeSBDZXJ0aWZp | ||
| 362 | Y2F0aW9uIEF1dGhvcml0eTCBnzANBgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEA0LJ1 | ||
| 363 | 9njQrlpQ9OlQqZ+M1++RlHDo0iSQdomF1t+s5gEXMoDwnZNHvJplnR+Xrr/phnVj | ||
| 364 | IIm9gFidBAydqMEk6QvlMXi9/C0MN2qeeIDpRnX57aP7E3vIwUzSo+/1PLBij0pd | ||
| 365 | O92VZ48TucE81qcmm+zDO3rZTbxtm+gVAePwR6kCAwEAATANBgkqhkiG9w0BAQIF | ||
| 366 | AAOBgQBT3dPwnCR+QKri/AAa19oM/DJhuBUNlvP6Vxt/M3yv6ZiaYch6s7f/sdyZ | ||
| 367 | g9ysEvxwyR84Qu1E9oAuW2szaayc01znX1oYx7EteQSWQZGZQbE8DbqEOcY7l/Am | ||
| 368 | yY7uvcxClf8exwI/VAx49byqYHwCaejcrOICdmHEPgPq0ook0Q== | ||
| 369 | -----END CERTIFICATE----- | ||
diff --git a/src/lib/libssl/src/perl/ss.pl b/src/lib/libssl/src/perl/ss.pl new file mode 100644 index 0000000000..f243a3af50 --- /dev/null +++ b/src/lib/libssl/src/perl/ss.pl | |||
| @@ -0,0 +1,64 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $ssl_ctx=SSL::CTX->new("SSLv3_client"); | ||
| 8 | |||
| 9 | #$ssl_ctx->set_options("-info_callback" => | ||
| 10 | # sub { | ||
| 11 | # print STDERR $_[0]->state()."\n"; | ||
| 12 | # } | ||
| 13 | # ); | ||
| 14 | |||
| 15 | $conn="localhost:4433"; | ||
| 16 | $conn=$ARGV[0] if $#ARGV >= 0; | ||
| 17 | |||
| 18 | print $ssl_ctx."\n"; | ||
| 19 | $bio=BIO->new_buffer_ssl_connect($ssl_ctx); | ||
| 20 | $bio->hostname($conn) || die $bio->error(); | ||
| 21 | |||
| 22 | #$bio->set_callback( | ||
| 23 | # sub { | ||
| 24 | # my($bio,$state,$cmd,$buf,$lart,$ret)=@_; | ||
| 25 | # print STDERR "$state:$cmd\n"; | ||
| 26 | # return($ret); | ||
| 27 | # } | ||
| 28 | # ); | ||
| 29 | |||
| 30 | #$b=$bio; | ||
| 31 | #do { | ||
| 32 | # print STDERR $b->type."\n"; | ||
| 33 | # } while ($b=$b->next_bio); | ||
| 34 | |||
| 35 | (($ret=$bio->syswrite("GET / HTTP/1.0\r\n\r\n")) > 0) || die $bio->error(); | ||
| 36 | $bio->flush; | ||
| 37 | |||
| 38 | $data=""; | ||
| 39 | while (1) | ||
| 40 | { | ||
| 41 | $ret=$bio->getline; | ||
| 42 | $ret =~ s/[\r\n]//g; | ||
| 43 | print STDERR "$ret\n"; | ||
| 44 | last if $ret eq ""; | ||
| 45 | $server=$1 if $ret=~ /^Server: (.*)/; | ||
| 46 | } | ||
| 47 | |||
| 48 | |||
| 49 | print "server is $server\n"; | ||
| 50 | $x509=$ssl->get_peer_certificate(); | ||
| 51 | print "version :".$x509->get_version()."\n"; | ||
| 52 | print "serialNumber:".$x509->get_serialNumber()->bn2hex."\n"; | ||
| 53 | print "subject :".$x509->get_subject_name()."\n"; | ||
| 54 | print "issuer :". $x509->get_issuer_name()."\n"; | ||
| 55 | |||
| 56 | $c=$ssl->get_current_cipher; | ||
| 57 | ($i,$a)=$c->get_bits; | ||
| 58 | $v=$c->get_version; | ||
| 59 | $n=$c->get_name; | ||
| 60 | |||
| 61 | $ssl=$bio->get_ssl(); | ||
| 62 | print "protocol=".$ssl->get_version."\n"; | ||
| 63 | print "bits=$i($a) cipher type=$v cipher=$n\n"; | ||
| 64 | |||
diff --git a/src/lib/libssl/src/perl/ssl.pl b/src/lib/libssl/src/perl/ssl.pl new file mode 100644 index 0000000000..f9e983ed87 --- /dev/null +++ b/src/lib/libssl/src/perl/ssl.pl | |||
| @@ -0,0 +1,71 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $ssl_ctx=SSL::CTX->new("SSLv3"); | ||
| 8 | |||
| 9 | $ssl_ctx->set_options("-info_callback" => | ||
| 10 | sub { | ||
| 11 | print STDERR $_[0]->state()."\n"; | ||
| 12 | } | ||
| 13 | ); | ||
| 14 | |||
| 15 | $conn="localhost:4433"; | ||
| 16 | $conn=$ARGV[0] if $#ARGV >= 0; | ||
| 17 | $bio=BIO->new("connect"); | ||
| 18 | $bio->hostname($conn) || die $ssl->error(); | ||
| 19 | |||
| 20 | #$bbio=BIO->new("buffer"); | ||
| 21 | #$bbio->push($cbio); | ||
| 22 | #$bio=$bbio; | ||
| 23 | |||
| 24 | #$bio->set_callback( | ||
| 25 | # sub { | ||
| 26 | # my($bio,$state,$cmd,$buf,$lart,$ret)=@_; | ||
| 27 | # print STDERR "$state:$cmd\n"; | ||
| 28 | # return($ret); | ||
| 29 | # } | ||
| 30 | # ); | ||
| 31 | |||
| 32 | print STDERR "-1 ABCD\n"; | ||
| 33 | $ssl=$ssl_ctx->new_ssl; | ||
| 34 | print STDERR "000 ABCD\n"; | ||
| 35 | $ssl->set_bio($bio); | ||
| 36 | |||
| 37 | print STDERR "00 ABCD\n"; | ||
| 38 | (($ret=$ssl->connect()) > 0) || die $ssl->error(); | ||
| 39 | |||
| 40 | print STDERR "0 ABCD\n"; | ||
| 41 | |||
| 42 | (($ret=$ssl->syswrite("GET / HTTP/1.0\r\n\r\n")) > 0) || die $ssl->error(); | ||
| 43 | |||
| 44 | print STDERR "1 ABCD\n"; | ||
| 45 | $data=""; | ||
| 46 | while (1) | ||
| 47 | { | ||
| 48 | print STDERR "2 ABCD\n"; | ||
| 49 | $ret=$ssl->sysread($buf,1024); | ||
| 50 | print STDERR "3 ABCD\n"; | ||
| 51 | last if $ret <= 0; | ||
| 52 | $data.=$buf; | ||
| 53 | } | ||
| 54 | |||
| 55 | print STDERR "4 ABCD\n"; | ||
| 56 | @a=split(/[\r]\n/,$data); | ||
| 57 | ($server)=grep(/^Server:/,@a); | ||
| 58 | |||
| 59 | print "$server\n"; | ||
| 60 | $x509=$ssl->get_peer_certificate(); | ||
| 61 | print "subject:".$x509->get_subject_name()."\n"; | ||
| 62 | print "issuer:". $x509->get_issuer_name()."\n"; | ||
| 63 | |||
| 64 | $c=$ssl->get_current_cipher; | ||
| 65 | ($i,$a)=$c->get_bits; | ||
| 66 | $v=$c->get_version; | ||
| 67 | $n=$c->get_name; | ||
| 68 | |||
| 69 | print "protocol=".$ssl->get_version."\n"; | ||
| 70 | print "bits=$i($a) cipher type=$v cipher=$n\n"; | ||
| 71 | |||
diff --git a/src/lib/libssl/src/perl/ssl.txt b/src/lib/libssl/src/perl/ssl.txt new file mode 100644 index 0000000000..63c52a0e1d --- /dev/null +++ b/src/lib/libssl/src/perl/ssl.txt | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | SSL_CTX::new(method) | ||
| 2 | SSLv3 | ||
| 3 | SSLv3_client | ||
| 4 | SSLv3_server | ||
| 5 | SSLv23 | ||
| 6 | SSLv23_client | ||
| 7 | SSLv23_server | ||
| 8 | SSLv2 | ||
| 9 | SSLv2_client | ||
| 10 | SSLv2_server | ||
| 11 | |||
| 12 | SSL_CTX::use_PrivateKey_file(file[,type]) | ||
| 13 | type eq "der" or "pem". Default == 'pem'. | ||
| 14 | |||
| 15 | SSL_CTX::set_options(...) | ||
| 16 | -info_callback function | ||
| 17 | |||
| 18 | SSL::new(SSL_CTX) | ||
| 19 | |||
| 20 | SSL::connect(); returns 0, -1 or 1 | ||
| 21 | SSL::accept(); return 0, -1 or 1 | ||
| 22 | SSL::sysread(); as per sysread | ||
| 23 | SSL::syswrite(); as per syswrite | ||
| 24 | SSL::set_bio(bio); | ||
| 25 | |||
| 26 | SSL::set_options(...) | ||
| 27 | -info_callback function | ||
| 28 | -connect_state | ||
| 29 | -accept_state | ||
| 30 | |||
| 31 | SSL::state(); the state in numeric and text form. | ||
| 32 | SSL::references(); debug stuff | ||
| 33 | SSL::get_peer_certificate() | ||
| 34 | SSL::do_handshake() | ||
| 35 | SSL::renegotiate() | ||
| 36 | SSL::shutdown() | ||
| 37 | SSL::get_version() | ||
| 38 | |||
| 39 | SSL::get_current_cipher(); | ||
| 40 | |||
| 41 | (key,alg)=SSL_CIPHER::get_bits(); | ||
| 42 | SSL_CIPHER::get_version(); | ||
| 43 | SSL_CIPHER::get_name(); | ||
diff --git a/src/lib/libssl/src/perl/ssl.xs b/src/lib/libssl/src/perl/ssl.xs new file mode 100644 index 0000000000..6777cf7ada --- /dev/null +++ b/src/lib/libssl/src/perl/ssl.xs | |||
| @@ -0,0 +1,474 @@ | |||
| 1 | #include "p5SSLeay.h" | ||
| 2 | |||
| 3 | static int p5_ssl_ex_ssl_ptr=0; | ||
| 4 | static int p5_ssl_ex_ssl_info_callback=0; | ||
| 5 | static int p5_ssl_ex_ssl_ctx_ptr=0; | ||
| 6 | static int p5_ssl_ctx_ex_ssl_info_callback=0; | ||
| 7 | |||
| 8 | typedef struct ssl_ic_args_st { | ||
| 9 | SV *cb; | ||
| 10 | SV *arg; | ||
| 11 | } SSL_IC_ARGS; | ||
| 12 | |||
| 13 | static void p5_ssl_info_callback(ssl,mode,ret) | ||
| 14 | SSL *ssl; | ||
| 15 | int mode; | ||
| 16 | int ret; | ||
| 17 | { | ||
| 18 | int i; | ||
| 19 | SV *me,*cb; | ||
| 20 | |||
| 21 | me=(SV *)SSL_get_ex_data(ssl,p5_ssl_ex_ssl_ptr); | ||
| 22 | cb=(SV *)SSL_get_ex_data(ssl,p5_ssl_ex_ssl_info_callback); | ||
| 23 | if (cb == NULL) | ||
| 24 | cb=(SV *)SSL_CTX_get_ex_data( | ||
| 25 | SSL_get_SSL_CTX(ssl),p5_ssl_ctx_ex_ssl_info_callback); | ||
| 26 | if (cb != NULL) | ||
| 27 | { | ||
| 28 | dSP; | ||
| 29 | |||
| 30 | PUSHMARK(sp); | ||
| 31 | XPUSHs(me); | ||
| 32 | XPUSHs(sv_2mortal(newSViv(mode))); | ||
| 33 | XPUSHs(sv_2mortal(newSViv(ret))); | ||
| 34 | PUTBACK; | ||
| 35 | |||
| 36 | i=perl_call_sv(cb,G_DISCARD); | ||
| 37 | } | ||
| 38 | else | ||
| 39 | { | ||
| 40 | croak("Internal error in SSL p5_ssl_info_callback"); | ||
| 41 | } | ||
| 42 | } | ||
| 43 | |||
| 44 | int boot_ssl() | ||
| 45 | { | ||
| 46 | p5_ssl_ex_ssl_ptr= | ||
| 47 | SSL_get_ex_new_index(0,"SSLeay::SSL",ex_new,NULL,ex_cleanup); | ||
| 48 | p5_ssl_ex_ssl_info_callback= | ||
| 49 | SSL_get_ex_new_index(0,"ssl_info_callback",NULL,NULL, | ||
| 50 | ex_cleanup); | ||
| 51 | p5_ssl_ex_ssl_ctx_ptr= | ||
| 52 | SSL_get_ex_new_index(0,"ssl_ctx_ptr",NULL,NULL, | ||
| 53 | ex_cleanup); | ||
| 54 | p5_ssl_ctx_ex_ssl_info_callback= | ||
| 55 | SSL_CTX_get_ex_new_index(0,"ssl_ctx_info_callback",NULL,NULL, | ||
| 56 | ex_cleanup); | ||
| 57 | return(1); | ||
| 58 | } | ||
| 59 | |||
| 60 | MODULE = SSLeay::SSL PACKAGE = SSLeay::SSL::CTX PREFIX = p5_SSL_CTX_ | ||
| 61 | |||
| 62 | VERSIONCHECK: DISABLE | ||
| 63 | |||
| 64 | void | ||
| 65 | p5_SSL_CTX_new(...) | ||
| 66 | PREINIT: | ||
| 67 | SSL_METHOD *meth; | ||
| 68 | SSL_CTX *ctx; | ||
| 69 | char *method; | ||
| 70 | PPCODE: | ||
| 71 | pr_name("p5_SSL_CTX_new"); | ||
| 72 | if ((items == 1) && SvPOK(ST(0))) | ||
| 73 | method=SvPV(ST(0),na); | ||
| 74 | else if ((items == 2) && SvPOK(ST(1))) | ||
| 75 | method=SvPV(ST(1),na); | ||
| 76 | else | ||
| 77 | croak("Usage: SSLeay::SSL_CTX::new(type)"); | ||
| 78 | |||
| 79 | if (strcmp(method,"SSLv3") == 0) | ||
| 80 | meth=SSLv3_method(); | ||
| 81 | else if (strcmp(method,"SSLv3_client") == 0) | ||
| 82 | meth=SSLv3_client_method(); | ||
| 83 | else if (strcmp(method,"SSLv3_server") == 0) | ||
| 84 | meth=SSLv3_server_method(); | ||
| 85 | else if (strcmp(method,"SSLv23") == 0) | ||
| 86 | meth=SSLv23_method(); | ||
| 87 | else if (strcmp(method,"SSLv23_client") == 0) | ||
| 88 | meth=SSLv23_client_method(); | ||
| 89 | else if (strcmp(method,"SSLv23_server") == 0) | ||
| 90 | meth=SSLv23_server_method(); | ||
| 91 | else if (strcmp(method,"SSLv2") == 0) | ||
| 92 | meth=SSLv2_method(); | ||
| 93 | else if (strcmp(method,"SSLv2_client") == 0) | ||
| 94 | meth=SSLv2_client_method(); | ||
| 95 | else if (strcmp(method,"SSLv2_server") == 0) | ||
| 96 | meth=SSLv2_server_method(); | ||
| 97 | else | ||
| 98 | { | ||
| 99 | croak("Not passed a valid SSL method name, should be 'SSLv[23] [client|server]'"); | ||
| 100 | } | ||
| 101 | EXTEND(sp,1); | ||
| 102 | PUSHs(sv_newmortal()); | ||
| 103 | ctx=SSL_CTX_new(meth); | ||
| 104 | sv_setref_pv(ST(0), "SSLeay::SSL::CTX", (void*)ctx); | ||
| 105 | |||
| 106 | int | ||
| 107 | p5_SSL_CTX_use_PrivateKey_file(ctx,file,...) | ||
| 108 | SSL_CTX *ctx; | ||
| 109 | char *file; | ||
| 110 | PREINIT: | ||
| 111 | int i=SSL_FILETYPE_PEM; | ||
| 112 | char *ptr; | ||
| 113 | CODE: | ||
| 114 | pr_name("p5_SSL_CTX_use_PrivateKey_file"); | ||
| 115 | if (items > 3) | ||
| 116 | croak("SSLeay::SSL::CTX::use_PrivateKey_file(ssl_ctx,file[,type])"); | ||
| 117 | if (items == 3) | ||
| 118 | { | ||
| 119 | ptr=SvPV(ST(2),na); | ||
| 120 | if (strcmp(ptr,"der") == 0) | ||
| 121 | i=SSL_FILETYPE_ASN1; | ||
| 122 | else | ||
| 123 | i=SSL_FILETYPE_PEM; | ||
| 124 | } | ||
| 125 | RETVAL=SSL_CTX_use_RSAPrivateKey_file(ctx,file,i); | ||
| 126 | OUTPUT: | ||
| 127 | RETVAL | ||
| 128 | |||
| 129 | int | ||
| 130 | p5_SSL_CTX_set_options(ctx,...) | ||
| 131 | SSL_CTX *ctx; | ||
| 132 | PREINIT: | ||
| 133 | int i; | ||
| 134 | char *ptr; | ||
| 135 | SV *sv; | ||
| 136 | CODE: | ||
| 137 | pr_name("p5_SSL_CTX_set_options"); | ||
| 138 | |||
| 139 | for (i=1; i<items; i++) | ||
| 140 | { | ||
| 141 | if (!SvPOK(ST(i))) | ||
| 142 | croak("Usage: SSLeay::SSL_CTX::set_options(ssl_ctx[,option,value]+)"); | ||
| 143 | ptr=SvPV(ST(i),na); | ||
| 144 | if (strcmp(ptr,"-info_callback") == 0) | ||
| 145 | { | ||
| 146 | SSL_CTX_set_info_callback(ctx, | ||
| 147 | p5_ssl_info_callback); | ||
| 148 | sv=sv_mortalcopy(ST(i+1)); | ||
| 149 | SvREFCNT_inc(sv); | ||
| 150 | SSL_CTX_set_ex_data(ctx, | ||
| 151 | p5_ssl_ctx_ex_ssl_info_callback, | ||
| 152 | (char *)sv); | ||
| 153 | i++; | ||
| 154 | } | ||
| 155 | else | ||
| 156 | { | ||
| 157 | croak("SSLeay::SSL_CTX::set_options(): unknown option"); | ||
| 158 | } | ||
| 159 | } | ||
| 160 | |||
| 161 | void | ||
| 162 | p5_SSL_CTX_DESTROY(ctx) | ||
| 163 | SSL_CTX *ctx | ||
| 164 | PREINIT: | ||
| 165 | SV *sv; | ||
| 166 | PPCODE: | ||
| 167 | pr_name_d("p5_SSL_CTX_DESTROY",ctx->references); | ||
| 168 | SSL_CTX_free(ctx); | ||
| 169 | |||
| 170 | MODULE = SSLeay::SSL PACKAGE = SSLeay::SSL PREFIX = p5_SSL_ | ||
| 171 | |||
| 172 | void | ||
| 173 | p5_SSL_new(...) | ||
| 174 | PREINIT: | ||
| 175 | SV *sv_ctx; | ||
| 176 | SSL_CTX *ctx; | ||
| 177 | SSL *ssl; | ||
| 178 | int i; | ||
| 179 | SV *arg; | ||
| 180 | PPCODE: | ||
| 181 | pr_name("p5_SSL_new"); | ||
| 182 | if ((items != 1) && (items != 2)) | ||
| 183 | croak("Usage: SSLeay::SSL::new(ssl_ctx)"); | ||
| 184 | if (sv_derived_from(ST(items-1),"SSLeay::SSL::CTX")) | ||
| 185 | { | ||
| 186 | IV tmp = SvIV((SV*)SvRV(ST(items-1))); | ||
| 187 | ctx=(SSL_CTX *)tmp; | ||
| 188 | sv_ctx=ST(items-1); | ||
| 189 | } | ||
| 190 | else | ||
| 191 | croak("ssl_ctx is not of type SSLeay::SSL::CTX"); | ||
| 192 | |||
| 193 | EXTEND(sp,1); | ||
| 194 | PUSHs(sv_newmortal()); | ||
| 195 | ssl=SSL_new(ctx); | ||
| 196 | sv_setref_pv(ST(0), "SSLeay::SSL", (void*)ssl); | ||
| 197 | |||
| 198 | /* Now this is being a little hairy, we keep a pointer to | ||
| 199 | * our perl reference. We need to do a different one | ||
| 200 | * to the one we return because it will have it's reference | ||
| 201 | * count droped to 0 apon return and if we up its reference | ||
| 202 | * count, it will never be DESTROYED */ | ||
| 203 | arg=newSVsv(ST(0)); | ||
| 204 | SSL_set_ex_data(ssl,p5_ssl_ex_ssl_ptr,(char *)arg); | ||
| 205 | SvREFCNT_inc(sv_ctx); | ||
| 206 | SSL_set_ex_data(ssl,p5_ssl_ex_ssl_ctx_ptr,(char *)sv_ctx); | ||
| 207 | |||
| 208 | int | ||
| 209 | p5_SSL_connect(ssl) | ||
| 210 | SSL *ssl; | ||
| 211 | CODE: | ||
| 212 | RETVAL=SSL_connect(ssl); | ||
| 213 | OUTPUT: | ||
| 214 | RETVAL | ||
| 215 | |||
| 216 | int | ||
| 217 | p5_SSL_accept(ssl) | ||
| 218 | SSL *ssl; | ||
| 219 | CODE: | ||
| 220 | RETVAL=SSL_connect(ssl); | ||
| 221 | OUTPUT: | ||
| 222 | RETVAL | ||
| 223 | |||
| 224 | int | ||
| 225 | p5_SSL_sysread(ssl,in,num, ...) | ||
| 226 | SSL *ssl; | ||
| 227 | SV *in; | ||
| 228 | int num; | ||
| 229 | PREINIT: | ||
| 230 | int i,n,olen; | ||
| 231 | int offset; | ||
| 232 | char *p; | ||
| 233 | CODE: | ||
| 234 | offset=0; | ||
| 235 | if (!SvPOK(in)) | ||
| 236 | sv_setpvn(in,"",0); | ||
| 237 | SvPV(in,olen); | ||
| 238 | if (items > 3) | ||
| 239 | { | ||
| 240 | offset=SvIV(ST(3)); | ||
| 241 | if (offset < 0) | ||
| 242 | { | ||
| 243 | if (-offset > olen) | ||
| 244 | croad("Offset outside string"); | ||
| 245 | offset+=olen; | ||
| 246 | } | ||
| 247 | } | ||
| 248 | if ((num+offset) > olen) | ||
| 249 | { | ||
| 250 | SvGROW(in,num+offset+1); | ||
| 251 | p=SvPV(in,i); | ||
| 252 | memset(&(p[olen]),0,(num+offset)-olen+1); | ||
| 253 | } | ||
| 254 | p=SvPV(in,n); | ||
| 255 | |||
| 256 | i=SSL_read(ssl,p+offset,num); | ||
| 257 | RETVAL=i; | ||
| 258 | if (i <= 0) i=0; | ||
| 259 | SvCUR_set(in,offset+i); | ||
| 260 | OUTPUT: | ||
| 261 | RETVAL | ||
| 262 | |||
| 263 | int | ||
| 264 | p5_SSL_syswrite(ssl,in, ...) | ||
| 265 | SSL *ssl; | ||
| 266 | SV *in; | ||
| 267 | PREINIT: | ||
| 268 | char *ptr; | ||
| 269 | int len,in_len; | ||
| 270 | int offset=0; | ||
| 271 | int n; | ||
| 272 | CODE: | ||
| 273 | ptr=SvPV(in,in_len); | ||
| 274 | if (items > 2) | ||
| 275 | { | ||
| 276 | len=SvOK(ST(2))?SvIV(ST(2)):in_len; | ||
| 277 | if (items > 3) | ||
| 278 | { | ||
| 279 | offset=SvIV(ST(3)); | ||
| 280 | if (offset < 0) | ||
| 281 | { | ||
| 282 | if (-offset > in_len) | ||
| 283 | croak("Offset outside string"); | ||
| 284 | offset+=in_len; | ||
| 285 | } | ||
| 286 | else if ((offset >= in_len) && (in_len > 0)) | ||
| 287 | croak("Offset outside string"); | ||
| 288 | } | ||
| 289 | if (len >= (in_len-offset)) | ||
| 290 | len=in_len-offset; | ||
| 291 | } | ||
| 292 | else | ||
| 293 | len=in_len; | ||
| 294 | |||
| 295 | RETVAL=SSL_write(ssl,ptr+offset,len); | ||
| 296 | OUTPUT: | ||
| 297 | RETVAL | ||
| 298 | |||
| 299 | void | ||
| 300 | p5_SSL_set_bio(ssl,bio) | ||
| 301 | SSL *ssl; | ||
| 302 | BIO *bio; | ||
| 303 | CODE: | ||
| 304 | bio->references++; | ||
| 305 | SSL_set_bio(ssl,bio,bio); | ||
| 306 | |||
| 307 | int | ||
| 308 | p5_SSL_set_options(ssl,...) | ||
| 309 | SSL *ssl; | ||
| 310 | PREINIT: | ||
| 311 | int i; | ||
| 312 | char *ptr; | ||
| 313 | SV *sv; | ||
| 314 | CODE: | ||
| 315 | pr_name("p5_SSL_set_options"); | ||
| 316 | |||
| 317 | for (i=1; i<items; i++) | ||
| 318 | { | ||
| 319 | if (!SvPOK(ST(i))) | ||
| 320 | croak("Usage: SSLeay::SSL::set_options(ssl[,option,value]+)"); | ||
| 321 | ptr=SvPV(ST(i),na); | ||
| 322 | if (strcmp(ptr,"-info_callback") == 0) | ||
| 323 | { | ||
| 324 | SSL_set_info_callback(ssl, | ||
| 325 | p5_ssl_info_callback); | ||
| 326 | sv=sv_mortalcopy(ST(i+1)); | ||
| 327 | SvREFCNT_inc(sv); | ||
| 328 | SSL_set_ex_data(ssl, | ||
| 329 | p5_ssl_ex_ssl_info_callback,(char *)sv); | ||
| 330 | i++; | ||
| 331 | } | ||
| 332 | else if (strcmp(ptr,"-connect_state") == 0) | ||
| 333 | { | ||
| 334 | SSL_set_connect_state(ssl); | ||
| 335 | } | ||
| 336 | else if (strcmp(ptr,"-accept_state") == 0) | ||
| 337 | { | ||
| 338 | SSL_set_accept_state(ssl); | ||
| 339 | } | ||
| 340 | else | ||
| 341 | { | ||
| 342 | croak("SSLeay::SSL::set_options(): unknown option"); | ||
| 343 | } | ||
| 344 | } | ||
| 345 | |||
| 346 | void | ||
| 347 | p5_SSL_state(ssl) | ||
| 348 | SSL *ssl; | ||
| 349 | PREINIT: | ||
| 350 | int state; | ||
| 351 | PPCODE: | ||
| 352 | pr_name("p5_SSL_state"); | ||
| 353 | EXTEND(sp,1); | ||
| 354 | PUSHs(sv_newmortal()); | ||
| 355 | state=SSL_state(ssl); | ||
| 356 | sv_setpv(ST(0),SSL_state_string_long(ssl)); | ||
| 357 | sv_setiv(ST(0),state); | ||
| 358 | SvPOK_on(ST(0)); | ||
| 359 | |||
| 360 | void | ||
| 361 | p5_SSL_DESTROY(ssl) | ||
| 362 | SSL *ssl; | ||
| 363 | CODE: | ||
| 364 | pr_name_dd("p5_SSL_DESTROY",ssl->references,ssl->ctx->references); | ||
| 365 | fprintf(stderr,"SSL_DESTROY %d\n",ssl->references); | ||
| 366 | SSL_free(ssl); | ||
| 367 | |||
| 368 | int | ||
| 369 | p5_SSL_references(ssl) | ||
| 370 | SSL *ssl; | ||
| 371 | CODE: | ||
| 372 | RETVAL=ssl->references; | ||
| 373 | OUTPUT: | ||
| 374 | RETVAL | ||
| 375 | |||
| 376 | int | ||
| 377 | p5_SSL_do_handshake(ssl) | ||
| 378 | SSL *ssl; | ||
| 379 | CODE: | ||
| 380 | RETVAL=SSL_do_handshake(ssl); | ||
| 381 | OUTPUT: | ||
| 382 | RETVAL | ||
| 383 | |||
| 384 | int | ||
| 385 | p5_SSL_renegotiate(ssl) | ||
| 386 | SSL *ssl; | ||
| 387 | CODE: | ||
| 388 | RETVAL=SSL_renegotiate(ssl); | ||
| 389 | OUTPUT: | ||
| 390 | RETVAL | ||
| 391 | |||
| 392 | int | ||
| 393 | p5_SSL_shutdown(ssl) | ||
| 394 | SSL *ssl; | ||
| 395 | CODE: | ||
| 396 | RETVAL=SSL_shutdown(ssl); | ||
| 397 | OUTPUT: | ||
| 398 | RETVAL | ||
| 399 | |||
| 400 | char * | ||
| 401 | p5_SSL_get_version(ssl) | ||
| 402 | SSL *ssl; | ||
| 403 | CODE: | ||
| 404 | RETVAL=SSL_get_version(ssl); | ||
| 405 | OUTPUT: | ||
| 406 | RETVAL | ||
| 407 | |||
| 408 | SSL_CIPHER * | ||
| 409 | p5_SSL_get_current_cipher(ssl) | ||
| 410 | SSL *ssl; | ||
| 411 | CODE: | ||
| 412 | RETVAL=SSL_get_current_cipher(ssl); | ||
| 413 | OUTPUT: | ||
| 414 | RETVAL | ||
| 415 | |||
| 416 | X509 * | ||
| 417 | p5_SSL_get_peer_certificate(ssl) | ||
| 418 | SSL *ssl | ||
| 419 | CODE: | ||
| 420 | RETVAL=SSL_get_peer_certificate(ssl); | ||
| 421 | OUTPUT: | ||
| 422 | RETVAL | ||
| 423 | |||
| 424 | MODULE = SSLeay::SSL PACKAGE = SSLeay::SSL::CIPHER PREFIX = p5_SSL_CIPHER_ | ||
| 425 | |||
| 426 | int | ||
| 427 | p5_SSL_CIPHER_get_bits(sc) | ||
| 428 | SSL_CIPHER *sc | ||
| 429 | PREINIT: | ||
| 430 | int i,ret; | ||
| 431 | PPCODE: | ||
| 432 | EXTEND(sp,2); | ||
| 433 | PUSHs(sv_newmortal()); | ||
| 434 | PUSHs(sv_newmortal()); | ||
| 435 | ret=SSL_CIPHER_get_bits(sc,&i); | ||
| 436 | sv_setiv(ST(0),(IV)ret); | ||
| 437 | sv_setiv(ST(1),(IV)i); | ||
| 438 | |||
| 439 | char * | ||
| 440 | p5_SSL_CIPHER_get_version(sc) | ||
| 441 | SSL_CIPHER *sc | ||
| 442 | CODE: | ||
| 443 | RETVAL=SSL_CIPHER_get_version(sc); | ||
| 444 | OUTPUT: | ||
| 445 | RETVAL | ||
| 446 | |||
| 447 | char * | ||
| 448 | p5_SSL_CIPHER_get_name(sc) | ||
| 449 | SSL_CIPHER *sc | ||
| 450 | CODE: | ||
| 451 | RETVAL=SSL_CIPHER_get_name(sc); | ||
| 452 | OUTPUT: | ||
| 453 | RETVAL | ||
| 454 | |||
| 455 | MODULE = SSLeay::SSL PACKAGE = SSLeay::BIO PREFIX = p5_BIO_ | ||
| 456 | |||
| 457 | void | ||
| 458 | p5_BIO_get_ssl(bio) | ||
| 459 | BIO *bio; | ||
| 460 | PREINIT: | ||
| 461 | SSL *ssl; | ||
| 462 | SV *ret; | ||
| 463 | int i; | ||
| 464 | PPCODE: | ||
| 465 | if ((i=BIO_get_ssl(bio,&ssl)) > 0) | ||
| 466 | { | ||
| 467 | ret=(SV *)SSL_get_ex_data(ssl,p5_ssl_ex_ssl_ptr); | ||
| 468 | ret=sv_mortalcopy(ret); | ||
| 469 | } | ||
| 470 | else | ||
| 471 | ret= &sv_undef; | ||
| 472 | EXTEND(sp,1); | ||
| 473 | PUSHs(ret); | ||
| 474 | |||
diff --git a/src/lib/libssl/src/perl/ssl_srvr.pl b/src/lib/libssl/src/perl/ssl_srvr.pl new file mode 100644 index 0000000000..653a2e7f03 --- /dev/null +++ b/src/lib/libssl/src/perl/ssl_srvr.pl | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $ssl_ctx=SSL::CTX->new("SSLv3"); | ||
| 8 | |||
| 9 | $ssl_ctx->set_options("-info_callback" => | ||
| 10 | sub { | ||
| 11 | print STDERR $_[0]->state()."\n"; | ||
| 12 | } | ||
| 13 | ); | ||
| 14 | |||
| 15 | $ssl_ctx->use_PrivateKey_file("server.pem"); | ||
| 16 | |||
| 17 | $conn="localhost:4433"; | ||
| 18 | $conn=$ARGV[0] if $#ARGV >= 0; | ||
| 19 | $bio=BIO->new("connect"); | ||
| 20 | $bio->hostname($conn) || die $ssl->error(); | ||
| 21 | |||
| 22 | $ssl=$ssl_ctx->new_ssl; | ||
| 23 | $ssl->set_bio($bio); | ||
| 24 | |||
| 25 | (($ret=$ssl->connect()) > 0) || die $ssl->error(); | ||
| 26 | |||
| 27 | (($ret=$ssl->write("GET / HTTP/1.0\r\n\r\n")) > 0) || die $ssl->error(); | ||
| 28 | |||
| 29 | while (1) | ||
| 30 | { | ||
| 31 | $ret=$ssl->read($buf,10240); | ||
| 32 | last if ($ret <= 0); | ||
| 33 | print $buf; | ||
| 34 | } | ||
| 35 | |||
diff --git a/src/lib/libssl/src/perl/sslbio.pl b/src/lib/libssl/src/perl/sslbio.pl new file mode 100644 index 0000000000..ca9daa36a1 --- /dev/null +++ b/src/lib/libssl/src/perl/sslbio.pl | |||
| @@ -0,0 +1,40 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $ssl_ctx=SSL::CTX->new("SSLv3"); | ||
| 8 | |||
| 9 | #$ssl_ctx->set_options("-info_callback" => | ||
| 10 | # sub { | ||
| 11 | # print STDOUT $_[0]->state()."\n"; | ||
| 12 | # } | ||
| 13 | # ); | ||
| 14 | |||
| 15 | # create a ssl bio | ||
| 16 | $bssl=BIO->new("ssl"); | ||
| 17 | $bssl->set_ssl($ssl_ctx->new_ssl()) || die $bssl->error(); | ||
| 18 | $bssl->get_ssl->set_options("-connect_state") || die $ssl->error(); | ||
| 19 | |||
| 20 | $bssl->set_callback(sub { printf "XXXXXXXXXXXXXXXXXXXXXX %d %s\n",$_[1],$_[0]->type; }); | ||
| 21 | |||
| 22 | # create connect bio | ||
| 23 | $host="localhost:4433"; | ||
| 24 | $host=$ARGV[0] if $#ARGV >= 0; | ||
| 25 | $bio=BIO->new("connect"); | ||
| 26 | $bio->hostname($host) || die $bio->error(); | ||
| 27 | |||
| 28 | # push it in | ||
| 29 | $bssl->push($bio); | ||
| 30 | |||
| 31 | (($ret=$bssl->write("GET / HTTP/1.0\r\n\r\n")) > 0) || die $bssl->error(); | ||
| 32 | |||
| 33 | while (1) | ||
| 34 | { | ||
| 35 | $ret=$bssl->read($buf,10240); | ||
| 36 | last if ($ret <= 0); | ||
| 37 | print $buf; | ||
| 38 | } | ||
| 39 | |||
| 40 | |||
diff --git a/src/lib/libssl/src/perl/t.pl b/src/lib/libssl/src/perl/t.pl new file mode 100644 index 0000000000..fbd9fb8490 --- /dev/null +++ b/src/lib/libssl/src/perl/t.pl | |||
| @@ -0,0 +1,12 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $a=SSLeay::BN::dec2bn("1231353465324563455"); | ||
| 8 | print "a=$a\n".$a->bn2dec."\n"; | ||
| 9 | $b=SSLeay::BN::dec2bn("98790816238765235"); | ||
| 10 | print "a=$a\nb=$b\n"; | ||
| 11 | print $a->gcd($b)."\n"; | ||
| 12 | |||
diff --git a/src/lib/libssl/src/perl/test b/src/lib/libssl/src/perl/test new file mode 100644 index 0000000000..3977c48865 --- /dev/null +++ b/src/lib/libssl/src/perl/test | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | 30373b8dbfc38d360bda81fad2fb462e 8 0 8 des-ecb | ||
| 2 | a5f61a73a0894979d46c2481e9f27151 8 8 1 des-cfb | ||
| 3 | a64a08dc69e79becccde95bed6239fca 8 8 1 des-ofb | ||
| 4 | 553d168193e54100524541f2c473b705 8 8 8 des-cbc | ||
| 5 | bb75383e4aad6d83418dde16c6cea6f5 16 0 8 des-ede | ||
| 6 | 3ea71cd9a2e50d82d66b433e9471eeb2 16 8 1 des-ede-cfb | ||
| 7 | 3d56b76d43dc8d51647773bc9719a355 16 8 1 des-ede-ofb | ||
| 8 | eafa89aae63167b9798639c0e31223b4 16 8 8 des-ede-cbc | ||
| 9 | a952f8c409fb0df75a7df1aa54ba30b8 24 0 8 des-ede3 | ||
| 10 | 0badccc43a14d8503d33f32a2345bbd2 24 8 1 des-ede3-cfb | ||
| 11 | bae638c0e33850d02c792ed0e3d6b600 24 8 1 des-ede3-ofb | ||
| 12 | ec4522bbefabf0198126683e661325e2 24 8 8 des-ede3-cbc | ||
| 13 | 4431f05d198d8afc003aeec85bea01b9 24 8 8 desx-cbc | ||
| 14 | 606af8d6f30c1fd9c647df5eb716ae0f 16 0 1 rc4 | ||
| 15 | 4aaaf7e4bc3fd2caa6318a4852f636f4 5 0 1 rc4-40 | ||
| 16 | 77e0851e8c96c4a1e26140d1ec822036 16 0 8 idea-ecb | ||
| 17 | a28e51e283519fde0e128bcb697bc23e 16 8 1 idea-cfb | ||
| 18 | 17d0e70f07de6c08e9673d52987599ab 16 8 1 idea-ofb | ||
| 19 | 0687cf6ca11ee45f8bf9c29525405a4d 16 8 8 idea-cbc | ||
| 20 | e2268681a63198fe38282b0a1bb6ed36 16 0 8 rc2-ecb | ||
| 21 | f48748e6386790e639bbee4fccaa5067 16 8 8 rc2-cbc | ||
| 22 | f250cfe829ef797d6866e32526ec4fe4 5 8 8 rc2-40-cbc | ||
| 23 | a372f970b6c346341a2899bb872a7349 16 8 1 rc2-cfb | ||
| 24 | d2da66102dea6b833f0fbf71e2cb4988 16 8 1 rc2-ofb | ||
| 25 | 237b0ef0e4f7fb28a5708d59773caecf 16 0 8 bf-ecb | ||
| 26 | c58cf5da90472caf0f0b7fafb0590977 16 8 1 bf-cfb | ||
| 27 | 1f3e49e2e27f9ad177a6a64b09d361ed 16 8 1 bf-ofb | ||
| 28 | 66acaf2cb5f301580c59fa17d005b716 16 8 8 bf-cbc | ||
| 29 | 3548c9fe9fcd13f647ae177a15915af9 16 0 8 cast5-ecb | ||
| 30 | e8d074ad8cc0d3d828da80ab18452f91 16 8 1 cast5-cfb | ||
| 31 | 5331eb4351c2048c27c8a8901fd29e20 16 8 1 cast5-ofb | ||
| 32 | 8033607fdb68598cc62c379af218eeeb 16 8 8 cast5-cbc | ||
diff --git a/src/lib/libssl/src/perl/test.pl b/src/lib/libssl/src/perl/test.pl new file mode 100644 index 0000000000..52423ef620 --- /dev/null +++ b/src/lib/libssl/src/perl/test.pl | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | ($a=SSLeay::BN::new()) || die "unable to make bignum\n"; | ||
| 8 | ($b=SSLeay::BN::new()) || die "unable to make bignum\n"; | ||
| 9 | |||
| 10 | $a=SSLeay::BN::hex2bn("123456789ABCDEF"); | ||
| 11 | $b=SSLeay::BN::hex2bn("123456789ABCDEF"); | ||
| 12 | $mod=SSLeay::BN::hex2bn("fedcba9876543201"); | ||
| 13 | $c=SSLeay::BN::hex2bn("1234"); | ||
| 14 | |||
| 15 | print "a=".$a->bn2hex()."\n"; | ||
| 16 | print "b=".$b->bn2hex()."\n"; | ||
| 17 | print "c=".$c->bn2hex()."\n"; | ||
| 18 | |||
| 19 | print $a->mul($b)->bn2hex."\n"; | ||
| 20 | ($d,$r)=$b->div($c); | ||
| 21 | print "($d)($r)\n"; | ||
| 22 | printf "%s x %s + %s\n",$c->bn2hex,$d->bn2hex,$r->bn2hex; | ||
| 23 | |||
| 24 | $g=$d; | ||
| 25 | |||
| 26 | for (;;) | ||
| 27 | { | ||
| 28 | $a=$a->mod_mul($a,$mod); | ||
| 29 | print $a->bn2hex."\n"; | ||
| 30 | } | ||
diff --git a/src/lib/libssl/src/perl/test.txt b/src/lib/libssl/src/perl/test.txt new file mode 100644 index 0000000000..ff37ffd09b --- /dev/null +++ b/src/lib/libssl/src/perl/test.txt | |||
| @@ -0,0 +1,36 @@ | |||
| 1 | 30373b8dbfc38d360bda81fad2fb462e 8 0 8 des-ecb | ||
| 2 | a5f61a73a0894979d46c2481e9f27151 8 8 1 des-cfb | ||
| 3 | a64a08dc69e79becccde95bed6239fca 8 8 1 des-ofb | ||
| 4 | 553d168193e54100524541f2c473b705 8 8 8 des-cbc | ||
| 5 | bb75383e4aad6d83418dde16c6cea6f5 16 0 8 des-ede | ||
| 6 | 3ea71cd9a2e50d82d66b433e9471eeb2 16 8 1 des-ede-cfb | ||
| 7 | 3d56b76d43dc8d51647773bc9719a355 16 8 1 des-ede-ofb | ||
| 8 | eafa89aae63167b9798639c0e31223b4 16 8 8 des-ede-cbc | ||
| 9 | a952f8c409fb0df75a7df1aa54ba30b8 24 0 8 des-ede3 | ||
| 10 | 0badccc43a14d8503d33f32a2345bbd2 24 8 1 des-ede3-cfb | ||
| 11 | bae638c0e33850d02c792ed0e3d6b600 24 8 1 des-ede3-ofb | ||
| 12 | ec4522bbefabf0198126683e661325e2 24 8 8 des-ede3-cbc | ||
| 13 | 4431f05d198d8afc003aeec85bea01b9 24 8 8 desx-cbc | ||
| 14 | 606af8d6f30c1fd9c647df5eb716ae0f 16 0 1 rc4 | ||
| 15 | 4aaaf7e4bc3fd2caa6318a4852f636f4 5 0 1 rc4-40 | ||
| 16 | 77e0851e8c96c4a1e26140d1ec822036 16 0 8 idea-ecb | ||
| 17 | a28e51e283519fde0e128bcb697bc23e 16 8 1 idea-cfb | ||
| 18 | 17d0e70f07de6c08e9673d52987599ab 16 8 1 idea-ofb | ||
| 19 | 0687cf6ca11ee45f8bf9c29525405a4d 16 8 8 idea-cbc | ||
| 20 | e2268681a63198fe38282b0a1bb6ed36 16 0 8 rc2-ecb | ||
| 21 | f48748e6386790e639bbee4fccaa5067 16 8 8 rc2-cbc | ||
| 22 | f250cfe829ef797d6866e32526ec4fe4 5 8 8 rc2-40-cbc | ||
| 23 | a372f970b6c346341a2899bb872a7349 16 8 1 rc2-cfb | ||
| 24 | d2da66102dea6b833f0fbf71e2cb4988 16 8 1 rc2-ofb | ||
| 25 | 237b0ef0e4f7fb28a5708d59773caecf 16 0 8 bf-ecb | ||
| 26 | c58cf5da90472caf0f0b7fafb0590977 16 8 1 bf-cfb | ||
| 27 | 1f3e49e2e27f9ad177a6a64b09d361ed 16 8 1 bf-ofb | ||
| 28 | 66acaf2cb5f301580c59fa17d005b716 16 8 8 bf-cbc | ||
| 29 | 3548c9fe9fcd13f647ae177a15915af9 16 0 8 cast5-ecb | ||
| 30 | e8d074ad8cc0d3d828da80ab18452f91 16 8 1 cast5-cfb | ||
| 31 | 5331eb4351c2048c27c8a8901fd29e20 16 8 1 cast5-ofb | ||
| 32 | 8033607fdb68598cc62c379af218eeeb 16 8 8 cast5-cbc | ||
| 33 | e3a6760eb5e79bf4063cf0791e99842d 16 0 8 rc5-ecb | ||
| 34 | 2f5eab0d0992dcce8615a5a60966391a 16 8 1 rc5-cfb | ||
| 35 | c5893e49e73342db2957b83b70f23e27 16 8 1 rc5-ofb | ||
| 36 | 683ce60c8b7bf028ec0d3dc0f018a1a4 16 8 8 rc5-cbc | ||
diff --git a/src/lib/libssl/src/perl/test2.pl b/src/lib/libssl/src/perl/test2.pl new file mode 100644 index 0000000000..2e1196c072 --- /dev/null +++ b/src/lib/libssl/src/perl/test2.pl | |||
| @@ -0,0 +1,28 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | @md=(); | ||
| 8 | ($c=SSLeay::Cipher::new("idea")) || | ||
| 9 | die "'des' is an unknown cipher algorithm\n"; | ||
| 10 | |||
| 11 | printf "name =%s\n" ,$c->name(); | ||
| 12 | printf "key length=%2d\n",$c->key_length(); | ||
| 13 | printf "iv length =%2d\n",$c->iv_length(); | ||
| 14 | printf "block size=%2d\n",$c->block_size(); | ||
| 15 | |||
| 16 | $data="1234"; | ||
| 17 | $c->init("01234567","abcdefgh",1); | ||
| 18 | $in=$c->update($data); | ||
| 19 | $in.=$c->final(); | ||
| 20 | |||
| 21 | $c->init("01234567","abcdefgh",0); | ||
| 22 | $out=$c->update($in); | ||
| 23 | $out.=$c->final(); | ||
| 24 | print $data; | ||
| 25 | print " -> "; | ||
| 26 | print $out; | ||
| 27 | print "\n"; | ||
| 28 | |||
diff --git a/src/lib/libssl/src/perl/test3.pl b/src/lib/libssl/src/perl/test3.pl new file mode 100644 index 0000000000..4102ab9297 --- /dev/null +++ b/src/lib/libssl/src/perl/test3.pl | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | @md=(); | ||
| 8 | ($c=SSLeay::Cipher::new("idea")) || | ||
| 9 | die "'des' is an unknown cipher algorithm\n"; | ||
| 10 | |||
| 11 | $key=" "; | ||
| 12 | $iv=" "; | ||
| 13 | $c->init($key,$iv,0); | ||
| 14 | while (<>) | ||
| 15 | { | ||
| 16 | print $c->update($_); | ||
| 17 | } | ||
| 18 | print $c->final(); | ||
| 19 | |||
diff --git a/src/lib/libssl/src/perl/test8.pl b/src/lib/libssl/src/perl/test8.pl new file mode 100644 index 0000000000..c144f7f136 --- /dev/null +++ b/src/lib/libssl/src/perl/test8.pl | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | # 2687145 * 3003 * 10^5072 - 1. | ||
| 8 | |||
| 9 | $a=SSLeay::BN::set_word(99); | ||
| 10 | $b=SSLeay::BN::set_word(100); | ||
| 11 | |||
| 12 | $aa=$a->dup; | ||
| 13 | $bb=$b->dup; | ||
| 14 | |||
| 15 | $c=$a*$b; | ||
| 16 | $bb+=$a; | ||
| 17 | |||
| 18 | print "$a*$b=$c\n"; | ||
| 19 | print "$bb\n"; | ||
diff --git a/src/lib/libssl/src/perl/test9.pl b/src/lib/libssl/src/perl/test9.pl new file mode 100644 index 0000000000..cc710c310e --- /dev/null +++ b/src/lib/libssl/src/perl/test9.pl | |||
| @@ -0,0 +1,38 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | # 2687145 * 3003 * 10^5072 - 1. | ||
| 8 | |||
| 9 | $a=SSLeay::BN::set_word(2687145); | ||
| 10 | $b=SSLeay::BN::set_word(3003); | ||
| 11 | $c=SSLeay::BN::set_word(10); | ||
| 12 | $d=SSLeay::BN::set_word(5072); | ||
| 13 | $e=SSLeay::BN::set_word(1); | ||
| 14 | |||
| 15 | print $a->bn2hex()."\n"; | ||
| 16 | print $b->bn2hex()."\n"; | ||
| 17 | print $c->bn2hex()."\n"; | ||
| 18 | print $d->bn2hex()."\n"; | ||
| 19 | print $e->bn2hex()."\n"; | ||
| 20 | |||
| 21 | $f=(($a->mul($b)->mul($c->exp($d)))->sub($e)); | ||
| 22 | #print "$a $b\n"; | ||
| 23 | |||
| 24 | $c=$a->mul($b); | ||
| 25 | print "1->".$c->bn2hex()." \n"; | ||
| 26 | |||
| 27 | $c=$a*$b; | ||
| 28 | print "2->".$c->bn2hex()." \n"; | ||
| 29 | $a*=$b; | ||
| 30 | print "3->$a\n"; | ||
| 31 | |||
| 32 | print $f->bn2hex()." $a\n"; | ||
| 33 | print $a."\n"; | ||
| 34 | |||
| 35 | print "$a=(($b*$c)/$d);\n"; | ||
| 36 | $a=(($b*$c)/$d); | ||
| 37 | print "$a\n"; | ||
| 38 | |||
diff --git a/src/lib/libssl/src/perl/testbn.pl b/src/lib/libssl/src/perl/testbn.pl new file mode 100644 index 0000000000..3062439563 --- /dev/null +++ b/src/lib/libssl/src/perl/testbn.pl | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $num ="a43f6a8885a308d313198a2e03707344a4093822"; | ||
| 8 | $num.="299f31d0082efa98ec4e6c89452821e638d01377"; | ||
| 9 | $num.="be5466cf34e90c6cc0ac29b7c97c50dd3f84d5b5"; | ||
| 10 | $num.="b54709179216d5d98979fb1bd1310ba698dfb5ac"; | ||
| 11 | $num.="2ffd72dbd01adfb7b8e1afed6a267e96ba7c9045"; | ||
| 12 | $num.="f12c7f9924a19947b3916cf70801f2e2858efc16"; | ||
| 13 | $num.="636920d871574e69a458fea3f4933d7e0d95748f"; | ||
| 14 | $num.="728eb658718bcd5882154aee7b54a41dc25a59b5"; | ||
| 15 | $num.="9c30d5392af26013c5d1b023286085f0ca417918"; | ||
| 16 | $num.="b8db38ef8e79dcb0603a180e6c9e0e8bb01e8a3e"; | ||
| 17 | $num.="d71577c1bd314b2778af2fda55605c60e65525f3"; | ||
| 18 | $num.="aa55ab945748986263e8144055ca396a2aab10b6"; | ||
| 19 | $num.="b4cc5c341141e8cea15486af7c8f14a7"; | ||
| 20 | |||
| 21 | $a=SSLeay::BN::hex2bn($num); | ||
| 22 | print "num bits =".$a->num_bits."\n"; | ||
| 23 | print $a->is_prime(50,sub {print STDERR $_[0]?"+":"."})."\n"; | ||
diff --git a/src/lib/libssl/src/perl/testdec.pl b/src/lib/libssl/src/perl/testdec.pl new file mode 100644 index 0000000000..0dce3f8e79 --- /dev/null +++ b/src/lib/libssl/src/perl/testdec.pl | |||
| @@ -0,0 +1,14 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $a=SSLeay::BN::dec2bn("1234"); | ||
| 8 | |||
| 9 | foreach (1..4) | ||
| 10 | { | ||
| 11 | $a*=$a; | ||
| 12 | print $a."\n",$a->bn2dec()."\n"; | ||
| 13 | } | ||
| 14 | |||
diff --git a/src/lib/libssl/src/perl/testmd.pl b/src/lib/libssl/src/perl/testmd.pl new file mode 100644 index 0000000000..6549166c8a --- /dev/null +++ b/src/lib/libssl/src/perl/testmd.pl | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | @md=(); | ||
| 8 | foreach ("md2", "md5", "sha", "sha1", "mdc2", "ripemd160") | ||
| 9 | { | ||
| 10 | ($f=MD->new($_)) || | ||
| 11 | die "$_ is an unknown message digest algorithm\n"; | ||
| 12 | push(@md,$f); | ||
| 13 | } | ||
| 14 | |||
| 15 | while (<>) | ||
| 16 | { | ||
| 17 | foreach $md (@md) | ||
| 18 | { $md->update($_); } | ||
| 19 | } | ||
| 20 | |||
| 21 | foreach (@md) | ||
| 22 | { | ||
| 23 | $digest=$_->final(); | ||
| 24 | printf "%-4s=%s\n",$_->name(),unpack("H*",$digest); | ||
| 25 | } | ||
| 26 | |||
diff --git a/src/lib/libssl/src/perl/tt.pl b/src/lib/libssl/src/perl/tt.pl new file mode 100644 index 0000000000..80ec88b2a8 --- /dev/null +++ b/src/lib/libssl/src/perl/tt.pl | |||
| @@ -0,0 +1,15 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | for ($i=1; $i<1000; $i++) | ||
| 8 | { | ||
| 9 | $a.=$i%10; | ||
| 10 | $y=SSLeay::BN::dec2bn($a); | ||
| 11 | $z=SSLeay::BN::bn2dec($y); | ||
| 12 | |||
| 13 | print "$a\n$y\n$z\n"; | ||
| 14 | } | ||
| 15 | |||
diff --git a/src/lib/libssl/src/perl/typemap b/src/lib/libssl/src/perl/typemap new file mode 100644 index 0000000000..5226fbc369 --- /dev/null +++ b/src/lib/libssl/src/perl/typemap | |||
| @@ -0,0 +1,96 @@ | |||
| 1 | |||
| 2 | datum T_DATUM | ||
| 3 | EVP_MD_CTX * T_MD_CTX | ||
| 4 | EVP_CIPHER_CTX * T_CIPHER_CTX | ||
| 5 | BIGNUM * T_BIGNUM | ||
| 6 | SSL_METHOD * T_SSL_METHOD | ||
| 7 | SSL_CTX * T_SSL_CTX | ||
| 8 | SSL_CIPHER * T_SSL_CIPHER | ||
| 9 | SSL * T_SSL | ||
| 10 | BIO * T_BIO | ||
| 11 | X509 * T_X509 | ||
| 12 | |||
| 13 | INPUT | ||
| 14 | T_DATUM | ||
| 15 | $var.dptr=SvPV($arg,$var.dsize); | ||
| 16 | T_MD_CTX | ||
| 17 | if (sv_derived_from($arg, \"SSLeay::MD\")) { | ||
| 18 | IV tmp = SvIV((SV*)SvRV($arg)); | ||
| 19 | $var = (EVP_MD_CTX *) tmp; | ||
| 20 | } | ||
| 21 | else | ||
| 22 | croak(\"$var is not of type SSLeay::MD\") | ||
| 23 | T_CIPHER_CTX | ||
| 24 | if (sv_derived_from($arg, \"SSLeay::Cipher\")) { | ||
| 25 | IV tmp = SvIV((SV*)SvRV($arg)); | ||
| 26 | $var = (EVP_CIPHER_CTX *) tmp; | ||
| 27 | } | ||
| 28 | else | ||
| 29 | croak(\"$var is not of type SSLeay::Cipher\") | ||
| 30 | T_BIGNUM | ||
| 31 | sv_to_BIGNUM(&($var),$arg,\"$var is not of type SSLeay::MD, int or string\") | ||
| 32 | T_SSL_METHOD | ||
| 33 | if (sv_derived_from($arg, \"SSLeay::SSL::METHOD\")) { | ||
| 34 | IV tmp = SvIV((SV*)SvRV($arg)); | ||
| 35 | $var = (SSL_METHOD *) tmp; | ||
| 36 | } | ||
| 37 | else | ||
| 38 | croak(\"$var is not of type SSLeay::SSL::METHOD\") | ||
| 39 | T_SSL_CTX | ||
| 40 | if (sv_derived_from($arg, \"SSLeay::SSL::CTX\")) { | ||
| 41 | IV tmp = SvIV((SV*)SvRV($arg)); | ||
| 42 | $var = (SSL_CTX *) tmp; | ||
| 43 | } | ||
| 44 | else | ||
| 45 | croak(\"$var is not of type SSLeay::SSL::CTX\") | ||
| 46 | T_SSL_CIPHER | ||
| 47 | if (sv_derived_from($arg, \"SSLeay::SSL::CIPHER\")) { | ||
| 48 | IV tmp = SvIV((SV*)SvRV($arg)); | ||
| 49 | $var = (SSL_CIPHER *) tmp; | ||
| 50 | } | ||
| 51 | else | ||
| 52 | croak(\"$var is not of type SSLeay::SSL::CIPHER\") | ||
| 53 | T_SSL | ||
| 54 | if (sv_derived_from($arg, \"SSLeay::SSL\")) { | ||
| 55 | IV tmp = SvIV((SV*)SvRV($arg)); | ||
| 56 | $var = (SSL *) tmp; | ||
| 57 | } | ||
| 58 | else | ||
| 59 | croak(\"$var is not of type SSLeay::SSL\") | ||
| 60 | T_BIO | ||
| 61 | if (sv_derived_from($arg, \"SSLeay::BIO\")) { | ||
| 62 | IV tmp = SvIV((SV*)SvRV($arg)); | ||
| 63 | $var = (BIO *) tmp; | ||
| 64 | } | ||
| 65 | else | ||
| 66 | croak(\"$var is not of type SSLeay::BIO\") | ||
| 67 | T_X509 | ||
| 68 | if (sv_derived_from($arg, \"SSLeay::X509\")) { | ||
| 69 | IV tmp = SvIV((SV*)SvRV($arg)); | ||
| 70 | $var = (X509 *) tmp; | ||
| 71 | } | ||
| 72 | else | ||
| 73 | croak(\"$var is not of type SSLeay::X509\") | ||
| 74 | OUTPUT | ||
| 75 | T_DATUM | ||
| 76 | sv_setpvn($arg,$var.dptr,$var.dsize); | ||
| 77 | T_MD_CTX | ||
| 78 | sv_setref_pv($arg, \"SSLeay::MD\", (void*)$var); | ||
| 79 | T_CIPHER_CTX | ||
| 80 | sv_setref_pv($arg, \"SSLeay::Cipher\", (void*)$var); | ||
| 81 | T_BIGNUM | ||
| 82 | sv_setref_pv($arg, \"SSLeay::BN\", (void*)$var); | ||
| 83 | T_SSL_METHOD | ||
| 84 | sv_setref_pv($arg, \"SSLeay::SSL::METHOD\", (void*)$var); | ||
| 85 | T_SSL_CTX | ||
| 86 | sv_setref_pv($arg, \"SSLeay::SSL::CTX\", (void*)$var); | ||
| 87 | T_SSL_CIPHER | ||
| 88 | sv_setref_pv($arg, \"SSLeay::SSL::CIPHER\", (void*)$var); | ||
| 89 | T_SSL | ||
| 90 | sv_setref_pv($arg, \"SSLeay::SSL\", (void*)$var); | ||
| 91 | T_BIO | ||
| 92 | sv_setref_pv($arg, \"SSLeay::BIO\", (void*)$var); | ||
| 93 | T_X509 | ||
| 94 | sv_setref_pv($arg, \"SSLeay::X509\", (void*)$var); | ||
| 95 | |||
| 96 | |||
diff --git a/src/lib/libssl/src/perl/x509.txt b/src/lib/libssl/src/perl/x509.txt new file mode 100644 index 0000000000..8468eff512 --- /dev/null +++ b/src/lib/libssl/src/perl/x509.txt | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | X509::new() | ||
| 2 | |||
| 3 | X509::get_verson() | ||
| 4 | X509::get_serial_number() | ||
| 5 | X509::get_subject_name() | ||
| 6 | X509::get_issuer_name() | ||
diff --git a/src/lib/libssl/src/perl/x509.xs b/src/lib/libssl/src/perl/x509.xs new file mode 100644 index 0000000000..67633ad225 --- /dev/null +++ b/src/lib/libssl/src/perl/x509.xs | |||
| @@ -0,0 +1,74 @@ | |||
| 1 | #include "p5SSLeay.h" | ||
| 2 | |||
| 3 | MODULE = SSLeay::X509 PACKAGE = SSLeay::X509 PREFIX = p5_X509_ | ||
| 4 | |||
| 5 | PROTOTYPES: ENABLE | ||
| 6 | VERSIONCHECK: DISABLE | ||
| 7 | |||
| 8 | void | ||
| 9 | p5_X509_new(void ) | ||
| 10 | PREINIT: | ||
| 11 | X509 *x509; | ||
| 12 | SV *arg; | ||
| 13 | PPCODE: | ||
| 14 | pr_name("p5_X509_new"); | ||
| 15 | EXTEND(sp,1); | ||
| 16 | PUSHs(sv_newmortal()); | ||
| 17 | x509=X509_new(); | ||
| 18 | sv_setref_pv(ST(0),"SSLeay::X509",(void *)x509); | ||
| 19 | |||
| 20 | char * | ||
| 21 | p5_X509_get_subject_name(x509) | ||
| 22 | X509 *x509; | ||
| 23 | PREINIT: | ||
| 24 | char *p; | ||
| 25 | X509_NAME *name; | ||
| 26 | char buf[1024]; | ||
| 27 | int i; | ||
| 28 | CODE: | ||
| 29 | name=X509_get_subject_name(x509); | ||
| 30 | X509_NAME_oneline(name,buf,sizeof(buf)); | ||
| 31 | p= &(buf[0]); | ||
| 32 | RETVAL=p; | ||
| 33 | OUTPUT: | ||
| 34 | RETVAL | ||
| 35 | |||
| 36 | char * | ||
| 37 | p5_X509_get_issuer_name(x509) | ||
| 38 | X509 *x509; | ||
| 39 | PREINIT: | ||
| 40 | char *p; | ||
| 41 | X509_NAME *name; | ||
| 42 | char buf[1024]; | ||
| 43 | int i; | ||
| 44 | CODE: | ||
| 45 | name=X509_get_issuer_name(x509); | ||
| 46 | X509_NAME_oneline(name,buf,sizeof(buf)); | ||
| 47 | p= &(buf[0]); | ||
| 48 | RETVAL=p; | ||
| 49 | OUTPUT: | ||
| 50 | RETVAL | ||
| 51 | |||
| 52 | int | ||
| 53 | p5_X509_get_version(x509) | ||
| 54 | X509 *x509; | ||
| 55 | CODE: | ||
| 56 | RETVAL=X509_get_version(x509); | ||
| 57 | OUTPUT: | ||
| 58 | RETVAL | ||
| 59 | |||
| 60 | BIGNUM * | ||
| 61 | p5_X509_get_serialNumber(x509) | ||
| 62 | X509 *x509; | ||
| 63 | CODE: | ||
| 64 | RETVAL=ASN1_INTEGER_to_BN(X509_get_serialNumber(x509),NULL); | ||
| 65 | OUTPUT: | ||
| 66 | RETVAL | ||
| 67 | |||
| 68 | void | ||
| 69 | p5_X509_DESTROY(x509) | ||
| 70 | X509 *x509; | ||
| 71 | CODE: | ||
| 72 | pr_name("p5_X509_DESTROY"); | ||
| 73 | X509_free(x509); | ||
| 74 | |||
diff --git a/src/lib/libssl/src/perl/xstmp.c b/src/lib/libssl/src/perl/xstmp.c new file mode 100644 index 0000000000..aa18959017 --- /dev/null +++ b/src/lib/libssl/src/perl/xstmp.c | |||
| @@ -0,0 +1,102 @@ | |||
| 1 | /* perl/xstmp.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 | * This file was generated automatically by xsubpp version 1.9402 from the | ||
| 60 | * contents of SSLeay.xs. Do not edit this file, edit SSLeay.xs instead. | ||
| 61 | * | ||
| 62 | * ANY CHANGES MADE HERE WILL BE LOST! | ||
| 63 | * | ||
| 64 | */ | ||
| 65 | |||
| 66 | #line 1 "SSLeay.xs" | ||
| 67 | #ifdef __cplusplus | ||
| 68 | extern "C" { | ||
| 69 | #endif | ||
| 70 | #include "EXTERN.h" | ||
| 71 | #include "perl.h" | ||
| 72 | #include "XSUB.h" | ||
| 73 | #ifdef __cplusplus | ||
| 74 | } | ||
| 75 | #endif | ||
| 76 | |||
| 77 | typedef struct datum_st | ||
| 78 | { | ||
| 79 | char *dptr; | ||
| 80 | int dsize; | ||
| 81 | } datum; | ||
| 82 | |||
| 83 | #include "crypto.h" | ||
| 84 | #include "buffer.h" | ||
| 85 | #include "bio.h" | ||
| 86 | #include "evp.h" | ||
| 87 | #include "err.h" | ||
| 88 | #include "x509.h" | ||
| 89 | #include "ssl.h" | ||
| 90 | |||
| 91 | #if 0 | ||
| 92 | #define pr_name(name) printf("%s\n",name) | ||
| 93 | #define pr_name_d(name,p2) printf("%s %d\n",name,p2) | ||
| 94 | #define pr_name_dd(name,p2,p3) printf("%s %d %d\n",name,p2,p3) | ||
| 95 | #else | ||
| 96 | #define pr_name(name) | ||
| 97 | #define pr_name_d(name,p2) | ||
| 98 | #define pr_name_dd(name,p2,p3) | ||
| 99 | #endif | ||
| 100 | |||
| 101 | #include "callback.c" | ||
| 102 | |||
diff --git a/src/lib/libssl/src/perl/y.pl b/src/lib/libssl/src/perl/y.pl new file mode 100644 index 0000000000..fe608a6724 --- /dev/null +++ b/src/lib/libssl/src/perl/y.pl | |||
| @@ -0,0 +1,7 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | use ExtUtils::testlib; | ||
| 3 | use SSLeay; | ||
| 4 | |||
| 5 | $message=SSLeay::BN::dec2bn("936345681743241125150760694794510965960940252288797108931456691368672287489405603308617928680920874760917824938589009714909675985261365549781893129784821682998948722"); | ||
| 6 | |||
| 7 | print $message->bn2hex."\n"; | ||
diff --git a/src/lib/libssl/src/perl/yy.pl b/src/lib/libssl/src/perl/yy.pl new file mode 100644 index 0000000000..2e00edb3e9 --- /dev/null +++ b/src/lib/libssl/src/perl/yy.pl | |||
| @@ -0,0 +1,19 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | |||
| 7 | $a=SSLeay::BN::new(); | ||
| 8 | |||
| 9 | $a+="1234567"; | ||
| 10 | |||
| 11 | print $a->bn2hex()."\n"; | ||
| 12 | |||
| 13 | |||
| 14 | for (1 .. 20) | ||
| 15 | { | ||
| 16 | $a*=$a; | ||
| 17 | $b=$a->bn2hex(); | ||
| 18 | print " ".$b."\n".length($b)."\n"; | ||
| 19 | } | ||
diff --git a/src/lib/libssl/src/perl/z.pl b/src/lib/libssl/src/perl/z.pl new file mode 100644 index 0000000000..7e2d5285cc --- /dev/null +++ b/src/lib/libssl/src/perl/z.pl | |||
| @@ -0,0 +1,32 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | use ExtUtils::testlib; | ||
| 4 | |||
| 5 | use SSLeay; | ||
| 6 | use Benchmark; | ||
| 7 | |||
| 8 | $buf=('x' x (1024*1024)); | ||
| 9 | $buf=('x' x (1024*1024)); | ||
| 10 | |||
| 11 | @md=(); | ||
| 12 | foreach $name ("md2", "mdc2", "sha", "ripemd160", "sha1", "md5") | ||
| 13 | { | ||
| 14 | if (($name eq "md2") || ($name eq "mdc2")) | ||
| 15 | { $num=5; } | ||
| 16 | else { $num=100; } | ||
| 17 | |||
| 18 | $t=timeit($num,'&hash($name)'); | ||
| 19 | printf "%6d000 bytes/sec:$name\n",int(($num*1024*1024)/$t->[1]/1000); | ||
| 20 | } | ||
| 21 | |||
| 22 | sub hash | ||
| 23 | { | ||
| 24 | my($name)=@_; | ||
| 25 | my($f,$digest); | ||
| 26 | |||
| 27 | ($f=MD->new($name)) || | ||
| 28 | die "$_ is an unknown message digest algorithm\n"; | ||
| 29 | $f->update($buf); | ||
| 30 | $digest=$f->final(); | ||
| 31 | } | ||
| 32 | |||
diff --git a/src/lib/libssl/src/perl/zz.pl b/src/lib/libssl/src/perl/zz.pl new file mode 100644 index 0000000000..38866c9227 --- /dev/null +++ b/src/lib/libssl/src/perl/zz.pl | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | use ExtUtils::testlib; | ||
| 3 | use SSLeay; | ||
| 4 | |||
| 5 | $a=SSLeay::BN::dec2bn("12345678901234567890"); | ||
| 6 | $b=SSLeay::BN::dec2bn("98765432109876543210"); | ||
| 7 | print "a=$a\n"; | ||
| 8 | print "b=$b\n"; | ||
| 9 | |||
| 10 | $n=$a*$b; | ||
| 11 | $m=$n+"1223123235345634764534567889"; | ||
| 12 | $l=$m*88888888; | ||
| 13 | |||
| 14 | $r=$l/$b; | ||
| 15 | |||
| 16 | print "a=$a\n"; | ||
| 17 | print "b=$b\n"; | ||
| 18 | print "n=$n\n"; | ||
| 19 | print "m=$m\n"; | ||
| 20 | print "l=$l\n"; | ||
| 21 | print "r=$r\n"; | ||
| 22 | |||
diff --git a/src/lib/libssl/src/shlib/linux.sh b/src/lib/libssl/src/shlib/linux.sh new file mode 100644 index 0000000000..f80292d90c --- /dev/null +++ b/src/lib/libssl/src/shlib/linux.sh | |||
| @@ -0,0 +1,76 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | echo "#define DATE \"`date`\"" >crypto/date.h | ||
| 4 | |||
| 5 | major="0" | ||
| 6 | minor="8.2" | ||
| 7 | slib=libssl | ||
| 8 | clib=libcrypto | ||
| 9 | CC=gcc | ||
| 10 | CPP='gcc -E' | ||
| 11 | AS=as | ||
| 12 | FLAGS='-DX86_ASM -DTERMIO -O3 -DL_ENDIAN -fomit-frame-pointer -m486 -Wall' | ||
| 13 | #FLAGS='-DTERMIO -g2 -ggdb -DL_ENDIAN -m486 -Wall -DREF_CHECK -DCRYPTO_MDEBUG' | ||
| 14 | INCLUDE='-Iinclude -Icrypto -Issl' | ||
| 15 | SHFLAGS='-DPIC -fpic' | ||
| 16 | |||
| 17 | CFLAGS="$FLAGS $INCLUDE $SHFLAGS" | ||
| 18 | ASM_OBJ=""; | ||
| 19 | |||
| 20 | echo compiling bignum assember | ||
| 21 | $CPP -DELF crypto/bn/asm/bn86unix.cpp | $AS -o bn_asm.o | ||
| 22 | CFLAGS="$CFLAGS -DBN_ASM -DX86_ASM" | ||
| 23 | ASM_OBJ="$ASM_OBJ bn_asm.o" | ||
| 24 | |||
| 25 | echo compiling des assember | ||
| 26 | $CPP -DELF crypto/des/asm/dx86unix.cpp | $AS -o des_enc.o | ||
| 27 | $CPP -DELF crypto/des/asm/yx86unix.cpp | $AS -o fcrypt-b.o | ||
| 28 | CFLAGS="$CFLAGS -DDES_ASM" | ||
| 29 | ASM_OBJ="$ASM_OBJ des_enc.o fcrypt-b.o" | ||
| 30 | |||
| 31 | echo compiling blowfish assember | ||
| 32 | $CPP -DELF crypto/bf/asm/bx86unix.cpp | $AS -o bf_enc.o | ||
| 33 | CFLAGS="$CFLAGS -DBF_ASM" | ||
| 34 | ASM_OBJ="$ASM_OBJ bf_enc.o" | ||
| 35 | |||
| 36 | echo compiling cast assember | ||
| 37 | $CPP -DELF crypto/cast/asm/cx86unix.cpp | $AS -o cast_enc.o | ||
| 38 | CFLAGS="$CFLAGS -DCAST_ASM" | ||
| 39 | ASM_OBJ="$ASM_OBJ cast_enc.o" | ||
| 40 | |||
| 41 | echo compiling rc4 assember | ||
| 42 | $CPP -DELF crypto/rc4/asm/rx86unix.cpp | $AS -o rc4_enc.o | ||
| 43 | CFLAGS="$CFLAGS -DRC4_ASM" | ||
| 44 | ASM_OBJ="$ASM_OBJ rc4_enc.o" | ||
| 45 | |||
| 46 | echo compiling md5 assember | ||
| 47 | $CPP -DELF crypto/md5/asm/mx86unix.cpp | $AS -o md5_enc.o | ||
| 48 | CFLAGS="$CFLAGS -DMD5_ASM" | ||
| 49 | ASM_OBJ="$ASM_OBJ md5_enc.o" | ||
| 50 | |||
| 51 | echo compiling sha1 assember | ||
| 52 | $CPP -DELF crypto/sha/asm/sx86unix.cpp | $AS -o sha1_enc.o | ||
| 53 | CFLAGS="$CFLAGS -DSHA1_ASM" | ||
| 54 | ASM_OBJ="$ASM_OBJ sha1_enc.o" | ||
| 55 | |||
| 56 | echo compiling $clib | ||
| 57 | $CC -c $CFLAGS -DCFLAGS="\"$FLAGS\"" -o crypto.o crypto/crypto.c | ||
| 58 | |||
| 59 | echo linking $clib.so | ||
| 60 | gcc $CFLAGS -shared -Wl,-soname,$clib.so.$major -o $clib.so.$major.$minor crypto.o $ASM_OBJ | ||
| 61 | /bin/rm -f $clib.so $clib.so.$major | ||
| 62 | ln -s $clib.so.$major.$minor $clib.so | ||
| 63 | ln -s $clib.so.$major.$minor $clib.so.$major | ||
| 64 | |||
| 65 | echo compiling $slib.so | ||
| 66 | $CC -c $CFLAGS -o ssl.o ssl/ssl.c | ||
| 67 | |||
| 68 | echo building $slib.so | ||
| 69 | gcc $CFLAGS -shared -Wl,-soname,$slib.so.$major -o $slib.so.$major.$minor ssl.o | ||
| 70 | /bin/rm -f $slib.so $slib.so.$major | ||
| 71 | ln -s $slib.so.$major.$minor $slib.so | ||
| 72 | ln -s $slib.so.$major.$minor $slib.so.$major | ||
| 73 | |||
| 74 | echo building ssleay executable | ||
| 75 | gcc $CFLAGS -o ssleay apps/eay.c -L. -lssl -lcrypto | ||
| 76 | |||
diff --git a/src/lib/libssl/src/ssl/Makefile.ssl b/src/lib/libssl/src/ssl/Makefile.ssl new file mode 100644 index 0000000000..f4b13bf83b --- /dev/null +++ b/src/lib/libssl/src/ssl/Makefile.ssl | |||
| @@ -0,0 +1,100 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/ssl/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= ssl | ||
| 6 | TOP= .. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I../crypto -I../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | AR= ar r | ||
| 15 | |||
| 16 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 17 | |||
| 18 | ERR=ssl | ||
| 19 | ERRC=ssl_err | ||
| 20 | GENERAL=Makefile README | ||
| 21 | TEST=ssltest.c | ||
| 22 | APPS= | ||
| 23 | |||
| 24 | LIB=$(TOP)/libssl.a | ||
| 25 | LIBSRC= \ | ||
| 26 | s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c \ | ||
| 27 | s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c \ | ||
| 28 | s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c \ | ||
| 29 | t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c \ | ||
| 30 | ssl_lib.c ssl_err2.c ssl_cert.c ssl_sess.c \ | ||
| 31 | ssl_ciph.c ssl_stat.c ssl_rsa.c \ | ||
| 32 | ssl_asn1.c ssl_txt.c ssl_algs.c \ | ||
| 33 | bio_ssl.c $(ERRC).c | ||
| 34 | LIBOBJ= \ | ||
| 35 | s2_meth.o s2_srvr.o s2_clnt.o s2_lib.o s2_enc.o s2_pkt.o \ | ||
| 36 | s3_meth.o s3_srvr.o s3_clnt.o s3_lib.o s3_enc.o s3_pkt.o s3_both.o \ | ||
| 37 | s23_meth.o s23_srvr.o s23_clnt.o s23_lib.o s23_pkt.o \ | ||
| 38 | t1_meth.o t1_srvr.o t1_clnt.o t1_lib.o t1_enc.o \ | ||
| 39 | ssl_lib.o ssl_err2.o ssl_cert.o ssl_sess.o \ | ||
| 40 | ssl_ciph.o ssl_stat.o ssl_rsa.o \ | ||
| 41 | ssl_asn1.o ssl_txt.o ssl_algs.o \ | ||
| 42 | bio_ssl.o $(ERRC).o | ||
| 43 | |||
| 44 | SRC= $(LIBSRC) | ||
| 45 | |||
| 46 | EXHEADER= ssl.h ssl2.h ssl3.h ssl23.h tls1.h | ||
| 47 | HEADER= $(EXHEADER) ssl_locl.h | ||
| 48 | |||
| 49 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 50 | |||
| 51 | top: | ||
| 52 | (cd ..; $(MAKE) DIRS=$(DIR) all) | ||
| 53 | |||
| 54 | all: lib | ||
| 55 | |||
| 56 | lib: $(LIBOBJ) | ||
| 57 | $(AR) $(LIB) $(LIBOBJ) | ||
| 58 | sh $(TOP)/util/ranlib.sh $(LIB) | ||
| 59 | @touch lib | ||
| 60 | |||
| 61 | files: | ||
| 62 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 63 | |||
| 64 | links: | ||
| 65 | /bin/rm -f Makefile | ||
| 66 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 67 | $(TOP)/util/mklink.sh ../include $(EXHEADER) | ||
| 68 | $(TOP)/util/mklink.sh ../test $(TEST) | ||
| 69 | $(TOP)/util/mklink.sh ../apps $(APPS) | ||
| 70 | |||
| 71 | install: | ||
| 72 | @for i in $(EXHEADER) ; \ | ||
| 73 | do \ | ||
| 74 | (cp $$i $(INSTALLTOP)/include/$$i; \ | ||
| 75 | chmod 644 $(INSTALLTOP)/include/$$i ); \ | ||
| 76 | done; | ||
| 77 | |||
| 78 | tags: | ||
| 79 | ctags $(SRC) | ||
| 80 | |||
| 81 | tests: | ||
| 82 | |||
| 83 | lint: | ||
| 84 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 85 | |||
| 86 | depend: | ||
| 87 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(LIBSRC) | ||
| 88 | |||
| 89 | dclean: | ||
| 90 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 91 | mv -f Makefile.new $(MAKEFILE) | ||
| 92 | |||
| 93 | clean: | ||
| 94 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 95 | |||
| 96 | errors: | ||
| 97 | perl $(TOP)/util/err-ins.pl $(ERR).err $(ERR).h | ||
| 98 | perl ../crypto/err/err_genc.pl -s $(ERR).h $(ERRC).c | ||
| 99 | |||
| 100 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/ssl/readme b/src/lib/libssl/src/ssl/readme new file mode 100644 index 0000000000..ca174848a1 --- /dev/null +++ b/src/lib/libssl/src/ssl/readme | |||
| @@ -0,0 +1,277 @@ | |||
| 1 | 22 Jun 1996 | ||
| 2 | This file belongs in ../apps, but I'll leave it here because it deals | ||
| 3 | with SSL :-) It is rather dated but it gives you an idea of how | ||
| 4 | things work. | ||
| 5 | === | ||
| 6 | |||
| 7 | 17 Jul 1995 | ||
| 8 | I have been changing things quite a bit and have not fully updated | ||
| 9 | this file, so take what you read with a grain of salt | ||
| 10 | eric | ||
| 11 | === | ||
| 12 | The s_client and s_server programs can be used to test SSL capable | ||
| 13 | IP/port addresses and the verification of the X509 certificates in use | ||
| 14 | by these services. I strongly advise having a look at the code to get | ||
| 15 | an idea of how to use the authentication under SSLeay. Any feedback | ||
| 16 | on changes and improvements would be greatly accepted. | ||
| 17 | |||
| 18 | This file will probably be gibberish unless you have read | ||
| 19 | rfc1421, rfc1422, rfc1423 and rfc1424 which describe PEM | ||
| 20 | authentication. | ||
| 21 | |||
| 22 | A Brief outline (and examples) how to use them to do so. | ||
| 23 | |||
| 24 | NOTE: | ||
| 25 | The environment variable SSL_CIPER is used to specify the prefered | ||
| 26 | cipher to use, play around with setting it's value to combinations of | ||
| 27 | RC4-MD5, EXP-RC4-MD5, CBC-DES-MD5, CBC3-DES-MD5, CFB-DES-NULL | ||
| 28 | in a : separated list. | ||
| 29 | |||
| 30 | This directory contains 3 X509 certificates which can be used by these programs. | ||
| 31 | client.pem: a file containing a certificate and private key to be used | ||
| 32 | by s_client. | ||
| 33 | server.pem :a file containing a certificate and private key to be used | ||
| 34 | by s_server. | ||
| 35 | eay1024.pem:the certificate used to sign client.pem and server.pem. | ||
| 36 | This would be your CA's certificate. There is also a link | ||
| 37 | from the file a8556381.0 to eay1024.PEM. The value a8556381 | ||
| 38 | is returned by 'x509 -hash -noout <eay1024.pem' and is the | ||
| 39 | value used by X509 verification routines to 'find' this | ||
| 40 | certificte when search a directory for it. | ||
| 41 | [the above is not true any more, the CA cert is | ||
| 42 | ../certs/testca.pem which is signed by ../certs/mincomca.pem] | ||
| 43 | |||
| 44 | When testing the s_server, you may get | ||
| 45 | bind: Address already in use | ||
| 46 | errors. These indicate the port is still being held by the unix | ||
| 47 | kernel and you are going to have to wait for it to let go of it. If | ||
| 48 | this is the case, remember to use the port commands on the s_server and | ||
| 49 | s_client to talk on an alternative port. | ||
| 50 | |||
| 51 | ===== | ||
| 52 | s_client. | ||
| 53 | This program can be used to connect to any IP/hostname:port that is | ||
| 54 | talking SSL. Once connected, it will attempt to authenticate the | ||
| 55 | certificate it was passed and if everything works as expected, a 2 | ||
| 56 | directional channel will be open. Any text typed will be sent to the | ||
| 57 | other end. type Q<cr> to exit. Flags are as follows. | ||
| 58 | -host arg : Arg is the host or IP address to connect to. | ||
| 59 | -port arg : Arg is the port to connect to (https is 443). | ||
| 60 | -verify arg : Turn on authentication of the server certificate. | ||
| 61 | : Arg specifies the 'depth', this will covered below. | ||
| 62 | -cert arg : The optional certificate to use. This certificate | ||
| 63 | : will be returned to the server if the server | ||
| 64 | : requests it for client authentication. | ||
| 65 | -key arg : The private key that matches the certificate | ||
| 66 | : specified by the -cert option. If this is not | ||
| 67 | : specified (but -cert is), the -cert file will be | ||
| 68 | : searched for the Private key. Both files are | ||
| 69 | : assumed to be in PEM format. | ||
| 70 | -CApath arg : When to look for certificates when 'verifying' the | ||
| 71 | : certificate from the server. | ||
| 72 | -CAfile arg : A file containing certificates to be used for | ||
| 73 | : 'verifying' the server certificate. | ||
| 74 | -reconnect : Once a connection has been made, drop it and | ||
| 75 | : reconnect with same session-id. This is for testing :-). | ||
| 76 | |||
| 77 | The '-verify n' parameter specifies not only to verify the servers | ||
| 78 | certificate but to also only take notice of 'n' levels. The best way | ||
| 79 | to explain is to show via examples. | ||
| 80 | Given | ||
| 81 | s_server -cert server.PEM is running. | ||
| 82 | |||
| 83 | s_client | ||
| 84 | CONNECTED | ||
| 85 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server | ||
| 86 | issuer= /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 87 | verify error:num=1:unable to get issuer certificate | ||
| 88 | verify return:1 | ||
| 89 | CIPHER is CBC-DES-MD5 | ||
| 90 | What has happened is that the 'SSLeay demo server' certificate's | ||
| 91 | issuer ('CA') could not be found but because verify is not on, we | ||
| 92 | don't care and the connection has been made anyway. It is now 'up' | ||
| 93 | using CBC-DES-MD5 mode. This is an unauthenticate secure channel. | ||
| 94 | You may not be talking to the right person but the data going to them | ||
| 95 | is encrypted. | ||
| 96 | |||
| 97 | s_client -verify 0 | ||
| 98 | CONNECTED | ||
| 99 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server | ||
| 100 | issuer= /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 101 | verify error:num=1:unable to get issuer certificate | ||
| 102 | verify return:1 | ||
| 103 | CIPHER is CBC-DES-MD5 | ||
| 104 | We are 'verifying' but only to depth 0, so since the 'SSLeay demo server' | ||
| 105 | certificate passed the date and checksum, we are happy to proceed. | ||
| 106 | |||
| 107 | s_client -verify 1 | ||
| 108 | CONNECTED | ||
| 109 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server | ||
| 110 | issuer= /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 111 | verify error:num=1:unable to get issuer certificate | ||
| 112 | verify return:0 | ||
| 113 | ERROR | ||
| 114 | verify error:unable to get issuer certificate | ||
| 115 | In this case we failed to make the connection because we could not | ||
| 116 | authenticate the certificate because we could not find the | ||
| 117 | 'CA' certificate. | ||
| 118 | |||
| 119 | s_client -verify 1 -CAfile eay1024.PEM | ||
| 120 | CONNECTED | ||
| 121 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server | ||
| 122 | verify return:1 | ||
| 123 | depth=1 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 124 | verify return:1 | ||
| 125 | CIPHER is CBC-DES-MD5 | ||
| 126 | We loaded the certificates from the file eay1024.PEM. Everything | ||
| 127 | checked out and so we made the connection. | ||
| 128 | |||
| 129 | s_client -verify 1 -CApath . | ||
| 130 | CONNECTED | ||
| 131 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server | ||
| 132 | verify return:1 | ||
| 133 | depth=1 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 134 | verify return:1 | ||
| 135 | CIPHER is CBC-DES-MD5 | ||
| 136 | We looked in out local directory for issuer certificates and 'found' | ||
| 137 | a8556381.0 and so everything is ok. | ||
| 138 | |||
| 139 | It is worth noting that 'CA' is a self certified certificate. If you | ||
| 140 | are passed one of these, it will fail to 'verify' at depth 0 because | ||
| 141 | we need to lookup the certifier of a certificate from some information | ||
| 142 | that we trust and keep locally. | ||
| 143 | |||
| 144 | SSL_CIPHER=CBC3-DES-MD5:RC4-MD5 | ||
| 145 | export SSL_CIPHER | ||
| 146 | s_client -verify 10 -CApath . -reconnect | ||
| 147 | CONNECTED | ||
| 148 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server | ||
| 149 | verify return:1 | ||
| 150 | depth=1 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 151 | verify return:1 | ||
| 152 | drop the connection and reconnect with the same session id | ||
| 153 | CIPHER is CBC3-DES-MD5 | ||
| 154 | This has done a full connection and then re-estabished it with the | ||
| 155 | same session id but a new socket. No RSA stuff occures on the second | ||
| 156 | connection. Note that we said we would prefer to use CBC3-DES-MD5 | ||
| 157 | encryption and so, since the server supports it, we are. | ||
| 158 | |||
| 159 | ===== | ||
| 160 | s_server | ||
| 161 | This program accepts SSL connections on a specified port | ||
| 162 | Once connected, it will estabish an SSL connection and optionaly | ||
| 163 | attempt to authenticate the client. A 2 directional channel will be | ||
| 164 | open. Any text typed will be sent to the other end. Type Q<cr> to exit. | ||
| 165 | Flags are as follows. | ||
| 166 | -port arg : Arg is the port to listen on. | ||
| 167 | -verify arg : Turn on authentication of the client if they have a | ||
| 168 | : certificate. Arg specifies the 'depth'. | ||
| 169 | -Verify arg : Turn on authentication of the client. If they don't | ||
| 170 | : have a valid certificate, drop the connection. | ||
| 171 | -cert arg : The certificate to use. This certificate | ||
| 172 | : will be passed to the client. If it is not | ||
| 173 | : specified, it will default to server.PEM | ||
| 174 | -key arg : The private key that matches the certificate | ||
| 175 | : specified by the -cert option. If this is not | ||
| 176 | : specified (but -cert is), the -cert file will be | ||
| 177 | : searched for the Private key. Both files are | ||
| 178 | : assumed to be in PEM format. Default is server.PEM | ||
| 179 | -CApath arg : When to look for certificates when 'verifying' the | ||
| 180 | : certificate from the client. | ||
| 181 | -CAfile arg : A file containing certificates to be used for | ||
| 182 | : 'verifying' the client certificate. | ||
| 183 | |||
| 184 | For the following 'demo' I will specify the s_server command and | ||
| 185 | the s_client command and then list the output from the s_server. | ||
| 186 | s_server | ||
| 187 | s_client | ||
| 188 | CONNECTED | ||
| 189 | CIPHER is CBC-DES-MD5 | ||
| 190 | Everything up and running | ||
| 191 | |||
| 192 | s_server -verify 0 | ||
| 193 | s_client | ||
| 194 | CONNECTED | ||
| 195 | CIPHER is CBC-DES-MD5 | ||
| 196 | Ok since no certificate was returned and we don't care. | ||
| 197 | |||
| 198 | s_server -verify 0 | ||
| 199 | ./s_client -cert client.PEM | ||
| 200 | CONNECTED | ||
| 201 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo client | ||
| 202 | issuer= /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 203 | verify error:num=1:unable to get issuer certificate | ||
| 204 | verify return:1 | ||
| 205 | CIPHER is CBC-DES-MD5 | ||
| 206 | Ok since we were only verifying to level 0 | ||
| 207 | |||
| 208 | s_server -verify 4 | ||
| 209 | s_client -cert client.PEM | ||
| 210 | CONNECTED | ||
| 211 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo client | ||
| 212 | issuer= /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 213 | verify error:num=1:unable to get issuer certificate | ||
| 214 | verify return:0 | ||
| 215 | ERROR | ||
| 216 | verify error:unable to get issuer certificate | ||
| 217 | Bad because we could not authenticate the returned certificate. | ||
| 218 | |||
| 219 | s_server -verify 4 -CApath . | ||
| 220 | s_client -cert client.PEM | ||
| 221 | CONNECTED | ||
| 222 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo client | ||
| 223 | verify return:1 | ||
| 224 | depth=1 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 225 | verify return:1 | ||
| 226 | CIPHER is CBC-DES-MD5 | ||
| 227 | Ok because we could authenticate the returned certificate :-). | ||
| 228 | |||
| 229 | s_server -Verify 0 -CApath . | ||
| 230 | s_client | ||
| 231 | CONNECTED | ||
| 232 | ERROR | ||
| 233 | SSL error:function is:REQUEST_CERTIFICATE | ||
| 234 | :error is :client end did not return a certificate | ||
| 235 | Error because no certificate returned. | ||
| 236 | |||
| 237 | s_server -Verify 4 -CApath . | ||
| 238 | s_client -cert client.PEM | ||
| 239 | CONNECTED | ||
| 240 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo client | ||
| 241 | verify return:1 | ||
| 242 | depth=1 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 243 | verify return:1 | ||
| 244 | CIPHER is CBC-DES-MD5 | ||
| 245 | Full authentication of the client. | ||
| 246 | |||
| 247 | So in summary to do full authentication of both ends | ||
| 248 | s_server -Verify 9 -CApath . | ||
| 249 | s_client -cert client.PEM -CApath . -verify 9 | ||
| 250 | From the server side | ||
| 251 | CONNECTED | ||
| 252 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo client | ||
| 253 | verify return:1 | ||
| 254 | depth=1 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 255 | verify return:1 | ||
| 256 | CIPHER is CBC-DES-MD5 | ||
| 257 | From the client side | ||
| 258 | CONNECTED | ||
| 259 | depth=0 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=SSLeay demo server | ||
| 260 | verify return:1 | ||
| 261 | depth=1 /C=AU/SOP=QLD/O=Mincom Pty. Ltd./OU=CS/CN=CA | ||
| 262 | verify return:1 | ||
| 263 | CIPHER is CBC-DES-MD5 | ||
| 264 | |||
| 265 | For general probing of the 'internet https' servers for the | ||
| 266 | distribution area, run | ||
| 267 | s_client -host www.netscape.com -port 443 -verify 4 -CApath ../rsa/hash | ||
| 268 | Then enter | ||
| 269 | GET / | ||
| 270 | and you should be talking to the https server on that host. | ||
| 271 | |||
| 272 | www.rsa.com was refusing to respond to connections on 443 when I was | ||
| 273 | testing. | ||
| 274 | |||
| 275 | have fun :-). | ||
| 276 | |||
| 277 | eric | ||
diff --git a/src/lib/libssl/src/ssl/ssl.c b/src/lib/libssl/src/ssl/ssl.c new file mode 100644 index 0000000000..7f506ce48f --- /dev/null +++ b/src/lib/libssl/src/ssl/ssl.c | |||
| @@ -0,0 +1,172 @@ | |||
| 1 | /* ssl/ssl.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 <stdlib.h> | ||
| 61 | #include <string.h> | ||
| 62 | |||
| 63 | #define USE_SOCKETS | ||
| 64 | #include "../e_os.h" | ||
| 65 | |||
| 66 | #include "buffer.h" | ||
| 67 | #include "stack.h" | ||
| 68 | #include "lhash.h" | ||
| 69 | |||
| 70 | #include "bio.h" | ||
| 71 | #include "err.h" | ||
| 72 | |||
| 73 | #include "bn.h" | ||
| 74 | |||
| 75 | #include "rand.h" | ||
| 76 | #include "conf.h" | ||
| 77 | #include "txt_db.h" | ||
| 78 | |||
| 79 | #include "err.h" | ||
| 80 | #include "evp.h" | ||
| 81 | |||
| 82 | #include "x509.h" | ||
| 83 | #include "pkcs7.h" | ||
| 84 | #include "pem.h" | ||
| 85 | #include "asn1.h" | ||
| 86 | #include "objects.h" | ||
| 87 | |||
| 88 | #include "ssl_locl.h" | ||
| 89 | |||
| 90 | #if !(BUILD_SSLV23) && !defined(BUILD_SSLV2) && !defined(BUILD_SSLV3) && !defined(BUILD_SSL_COMMON) && !defined(BUILD_SSL_BIO) && !defined(BUILD_SSL_OPTIONAL) | ||
| 91 | #define BUILD_SSLV23 | ||
| 92 | #define BUILD_SSLV2 | ||
| 93 | #define BUILD_SSLV3 | ||
| 94 | #define BUILD_TLS1 | ||
| 95 | #define BUILD_SSL_COMMON | ||
| 96 | #define BUILD_SSL_BIO | ||
| 97 | #define BUILD_SSL_OPTIONAL | ||
| 98 | #endif | ||
| 99 | |||
| 100 | #ifdef NO_RSA | ||
| 101 | #undef BUILD_SSLV2 | ||
| 102 | #undef BUILD_SSLV23 | ||
| 103 | #endif | ||
| 104 | |||
| 105 | #ifdef NO_SSL2 | ||
| 106 | #undef BUILD_SSLV2 | ||
| 107 | #undef BUILD_SSLV23 | ||
| 108 | #endif | ||
| 109 | |||
| 110 | #ifdef NO_SSL3 | ||
| 111 | #undef BUILD_SSL3 | ||
| 112 | #undef BUILD_SSLV23 | ||
| 113 | #endif | ||
| 114 | |||
| 115 | #ifdef BUILD_SSLV23 | ||
| 116 | #include "s23_clnt.c" | ||
| 117 | #include "s23_srvr.c" | ||
| 118 | #include "s23_pkt.c" | ||
| 119 | #include "s23_lib.c" | ||
| 120 | #include "s23_meth.c" | ||
| 121 | #endif | ||
| 122 | |||
| 123 | #ifdef BUILD_SSLV2 | ||
| 124 | #include "s2_clnt.c" | ||
| 125 | #include "s2_srvr.c" | ||
| 126 | #include "s2_pkt.c" | ||
| 127 | #include "s2_enc.c" | ||
| 128 | #include "s2_lib.c" | ||
| 129 | #include "s2_meth.c" | ||
| 130 | #endif | ||
| 131 | |||
| 132 | #ifdef BUILD_SSLV3 | ||
| 133 | #include "s3_clnt.c" | ||
| 134 | #include "s3_both.c" | ||
| 135 | #include "s3_srvr.c" | ||
| 136 | #include "s3_pkt.c" | ||
| 137 | #include "s3_enc.c" | ||
| 138 | #include "s3_lib.c" | ||
| 139 | #include "s3_meth.c" | ||
| 140 | #endif | ||
| 141 | |||
| 142 | #ifdef BUILD_TLS1 | ||
| 143 | #include "t1_clnt.c" | ||
| 144 | #include "t1_enc.c" | ||
| 145 | #include "t1_lib.c" | ||
| 146 | #include "t1_meth.c" | ||
| 147 | #include "t1_srvr.c" | ||
| 148 | #endif | ||
| 149 | |||
| 150 | |||
| 151 | #ifdef BUILD_SSL_COMMON | ||
| 152 | #include "ssl_lib.c" | ||
| 153 | #include "ssl_algs.c" | ||
| 154 | #include "ssl_cert.c" | ||
| 155 | #include "ssl_ciph.c" | ||
| 156 | #include "ssl_sess.c" | ||
| 157 | #include "ssl_rsa.c" | ||
| 158 | #endif | ||
| 159 | |||
| 160 | /* Extra things */ | ||
| 161 | #ifdef BUILD_SSL_BIO | ||
| 162 | #include "bio_ssl.c" | ||
| 163 | #endif | ||
| 164 | |||
| 165 | #ifdef BUILD_SSL_OPTIONAL | ||
| 166 | #include "ssl_asn1.c" | ||
| 167 | #include "ssl_txt.c" | ||
| 168 | #include "ssl_stat.c" | ||
| 169 | #include "ssl_err.c" | ||
| 170 | #include "ssl_err2.c" | ||
| 171 | #endif | ||
| 172 | |||
diff --git a/src/lib/libssl/src/ssl/ssl.err b/src/lib/libssl/src/ssl/ssl.err new file mode 100644 index 0000000000..c54326c624 --- /dev/null +++ b/src/lib/libssl/src/ssl/ssl.err | |||
| @@ -0,0 +1,290 @@ | |||
| 1 | /* Error codes for the SSL functions. */ | ||
| 2 | |||
| 3 | /* Function codes. */ | ||
| 4 | #define SSL_F_CLIENT_CERTIFICATE 100 | ||
| 5 | #define SSL_F_CLIENT_HELLO 101 | ||
| 6 | #define SSL_F_CLIENT_MASTER_KEY 102 | ||
| 7 | #define SSL_F_D2I_SSL_SESSION 103 | ||
| 8 | #define SSL_F_DO_SSL3_WRITE 104 | ||
| 9 | #define SSL_F_GET_CLIENT_FINISHED 105 | ||
| 10 | #define SSL_F_GET_CLIENT_HELLO 106 | ||
| 11 | #define SSL_F_GET_CLIENT_MASTER_KEY 107 | ||
| 12 | #define SSL_F_GET_SERVER_FINISHED 108 | ||
| 13 | #define SSL_F_GET_SERVER_HELLO 109 | ||
| 14 | #define SSL_F_GET_SERVER_VERIFY 110 | ||
| 15 | #define SSL_F_I2D_SSL_SESSION 111 | ||
| 16 | #define SSL_F_READ_N 112 | ||
| 17 | #define SSL_F_REQUEST_CERTIFICATE 113 | ||
| 18 | #define SSL_F_SERVER_HELLO 114 | ||
| 19 | #define SSL_F_SSL23_ACCEPT 115 | ||
| 20 | #define SSL_F_SSL23_CLIENT_HELLO 116 | ||
| 21 | #define SSL_F_SSL23_CONNECT 117 | ||
| 22 | #define SSL_F_SSL23_GET_CLIENT_HELLO 118 | ||
| 23 | #define SSL_F_SSL23_GET_SERVER_HELLO 119 | ||
| 24 | #define SSL_F_SSL23_READ 120 | ||
| 25 | #define SSL_F_SSL23_WRITE 121 | ||
| 26 | #define SSL_F_SSL2_ACCEPT 122 | ||
| 27 | #define SSL_F_SSL2_CONNECT 123 | ||
| 28 | #define SSL_F_SSL2_ENC_INIT 124 | ||
| 29 | #define SSL_F_SSL2_READ 125 | ||
| 30 | #define SSL_F_SSL2_SET_CERTIFICATE 126 | ||
| 31 | #define SSL_F_SSL2_WRITE 127 | ||
| 32 | #define SSL_F_SSL3_ACCEPT 128 | ||
| 33 | #define SSL_F_SSL3_CHANGE_CIPHER_STATE 129 | ||
| 34 | #define SSL_F_SSL3_CHECK_CERT_AND_ALGORITHM 130 | ||
| 35 | #define SSL_F_SSL3_CLIENT_HELLO 131 | ||
| 36 | #define SSL_F_SSL3_CONNECT 132 | ||
| 37 | #define SSL_F_SSL3_CTX_CTRL 133 | ||
| 38 | #define SSL_F_SSL3_ENC 134 | ||
| 39 | #define SSL_F_SSL3_GET_CERTIFICATE_REQUEST 135 | ||
| 40 | #define SSL_F_SSL3_GET_CERT_VERIFY 136 | ||
| 41 | #define SSL_F_SSL3_GET_CLIENT_CERTIFICATE 137 | ||
| 42 | #define SSL_F_SSL3_GET_CLIENT_HELLO 138 | ||
| 43 | #define SSL_F_SSL3_GET_CLIENT_KEY_EXCHANGE 139 | ||
| 44 | #define SSL_F_SSL3_GET_FINISHED 140 | ||
| 45 | #define SSL_F_SSL3_GET_KEY_EXCHANGE 141 | ||
| 46 | #define SSL_F_SSL3_GET_MESSAGE 142 | ||
| 47 | #define SSL_F_SSL3_GET_RECORD 143 | ||
| 48 | #define SSL_F_SSL3_GET_SERVER_CERTIFICATE 144 | ||
| 49 | #define SSL_F_SSL3_GET_SERVER_DONE 145 | ||
| 50 | #define SSL_F_SSL3_GET_SERVER_HELLO 146 | ||
| 51 | #define SSL_F_SSL3_OUTPUT_CERT_CHAIN 147 | ||
| 52 | #define SSL_F_SSL3_READ_BYTES 148 | ||
| 53 | #define SSL_F_SSL3_READ_N 149 | ||
| 54 | #define SSL_F_SSL3_SEND_CERTIFICATE_REQUEST 150 | ||
| 55 | #define SSL_F_SSL3_SEND_CLIENT_CERTIFICATE 151 | ||
| 56 | #define SSL_F_SSL3_SEND_CLIENT_KEY_EXCHANGE 152 | ||
| 57 | #define SSL_F_SSL3_SEND_CLIENT_VERIFY 153 | ||
| 58 | #define SSL_F_SSL3_SEND_SERVER_CERTIFICATE 154 | ||
| 59 | #define SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE 155 | ||
| 60 | #define SSL_F_SSL3_SETUP_BUFFERS 156 | ||
| 61 | #define SSL_F_SSL3_SETUP_KEY_BLOCK 157 | ||
| 62 | #define SSL_F_SSL3_WRITE_BYTES 158 | ||
| 63 | #define SSL_F_SSL3_WRITE_PENDING 159 | ||
| 64 | #define SSL_F_SSL_BAD_METHOD 160 | ||
| 65 | #define SSL_F_SSL_BYTES_TO_CIPHER_LIST 161 | ||
| 66 | #define SSL_F_SSL_CERT_NEW 162 | ||
| 67 | #define SSL_F_SSL_CHECK_PRIVATE_KEY 163 | ||
| 68 | #define SSL_F_SSL_CREATE_CIPHER_LIST 164 | ||
| 69 | #define SSL_F_SSL_CTX_CHECK_PRIVATE_KEY 165 | ||
| 70 | #define SSL_F_SSL_CTX_NEW 166 | ||
| 71 | #define SSL_F_SSL_CTX_SET_SSL_VERSION 167 | ||
| 72 | #define SSL_F_SSL_CTX_USE_CERTIFICATE 168 | ||
| 73 | #define SSL_F_SSL_CTX_USE_CERTIFICATE_ASN1 169 | ||
| 74 | #define SSL_F_SSL_CTX_USE_CERTIFICATE_FILE 170 | ||
| 75 | #define SSL_F_SSL_CTX_USE_PRIVATEKEY 171 | ||
| 76 | #define SSL_F_SSL_CTX_USE_PRIVATEKEY_ASN1 172 | ||
| 77 | #define SSL_F_SSL_CTX_USE_PRIVATEKEY_FILE 173 | ||
| 78 | #define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY 174 | ||
| 79 | #define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_ASN1 175 | ||
| 80 | #define SSL_F_SSL_CTX_USE_RSAPRIVATEKEY_FILE 176 | ||
| 81 | #define SSL_F_SSL_DO_HANDSHAKE 177 | ||
| 82 | #define SSL_F_SSL_GET_NEW_SESSION 178 | ||
| 83 | #define SSL_F_SSL_GET_SERVER_SEND_CERT 179 | ||
| 84 | #define SSL_F_SSL_GET_SIGN_PKEY 180 | ||
| 85 | #define SSL_F_SSL_INIT_WBIO_BUFFER 181 | ||
| 86 | #define SSL_F_SSL_LOAD_CLIENT_CA_FILE 182 | ||
| 87 | #define SSL_F_SSL_NEW 183 | ||
| 88 | #define SSL_F_SSL_RSA_PRIVATE_DECRYPT 184 | ||
| 89 | #define SSL_F_SSL_RSA_PUBLIC_ENCRYPT 185 | ||
| 90 | #define SSL_F_SSL_SESSION_NEW 186 | ||
| 91 | #define SSL_F_SSL_SESSION_PRINT_FP 187 | ||
| 92 | #define SSL_F_SSL_SET_CERT 188 | ||
| 93 | #define SSL_F_SSL_SET_FD 189 | ||
| 94 | #define SSL_F_SSL_SET_PKEY 190 | ||
| 95 | #define SSL_F_SSL_SET_RFD 191 | ||
| 96 | #define SSL_F_SSL_SET_SESSION 192 | ||
| 97 | #define SSL_F_SSL_SET_WFD 193 | ||
| 98 | #define SSL_F_SSL_UNDEFINED_FUNCTION 194 | ||
| 99 | #define SSL_F_SSL_USE_CERTIFICATE 195 | ||
| 100 | #define SSL_F_SSL_USE_CERTIFICATE_ASN1 196 | ||
| 101 | #define SSL_F_SSL_USE_CERTIFICATE_FILE 197 | ||
| 102 | #define SSL_F_SSL_USE_PRIVATEKEY 198 | ||
| 103 | #define SSL_F_SSL_USE_PRIVATEKEY_ASN1 199 | ||
| 104 | #define SSL_F_SSL_USE_PRIVATEKEY_FILE 200 | ||
| 105 | #define SSL_F_SSL_USE_RSAPRIVATEKEY 201 | ||
| 106 | #define SSL_F_SSL_USE_RSAPRIVATEKEY_ASN1 202 | ||
| 107 | #define SSL_F_SSL_USE_RSAPRIVATEKEY_FILE 203 | ||
| 108 | #define SSL_F_SSL_WRITE 204 | ||
| 109 | #define SSL_F_TLS1_CHANGE_CIPHER_STATE 205 | ||
| 110 | #define SSL_F_TLS1_ENC 206 | ||
| 111 | #define SSL_F_TLS1_SETUP_KEY_BLOCK 207 | ||
| 112 | #define SSL_F_WRITE_PENDING 208 | ||
| 113 | |||
| 114 | /* Reason codes. */ | ||
| 115 | #define SSL_R_APP_DATA_IN_HANDSHAKE 100 | ||
| 116 | #define SSL_R_BAD_ALERT_RECORD 101 | ||
| 117 | #define SSL_R_BAD_AUTHENTICATION_TYPE 102 | ||
| 118 | #define SSL_R_BAD_CHANGE_CIPHER_SPEC 103 | ||
| 119 | #define SSL_R_BAD_CHECKSUM 104 | ||
| 120 | #define SSL_R_BAD_CLIENT_REQUEST 105 | ||
| 121 | #define SSL_R_BAD_DATA_RETURNED_BY_CALLBACK 106 | ||
| 122 | #define SSL_R_BAD_DECOMPRESSION 107 | ||
| 123 | #define SSL_R_BAD_DH_G_LENGTH 108 | ||
| 124 | #define SSL_R_BAD_DH_PUB_KEY_LENGTH 109 | ||
| 125 | #define SSL_R_BAD_DH_P_LENGTH 110 | ||
| 126 | #define SSL_R_BAD_DIGEST_LENGTH 111 | ||
| 127 | #define SSL_R_BAD_DSA_SIGNATURE 112 | ||
| 128 | #define SSL_R_BAD_MAC_DECODE 113 | ||
| 129 | #define SSL_R_BAD_MESSAGE_TYPE 114 | ||
| 130 | #define SSL_R_BAD_PACKET_LENGTH 115 | ||
| 131 | #define SSL_R_BAD_PROTOCOL_VERSION_NUMBER 116 | ||
| 132 | #define SSL_R_BAD_RESPONSE_ARGUMENT 117 | ||
| 133 | #define SSL_R_BAD_RSA_DECRYPT 118 | ||
| 134 | #define SSL_R_BAD_RSA_ENCRYPT 119 | ||
| 135 | #define SSL_R_BAD_RSA_E_LENGTH 120 | ||
| 136 | #define SSL_R_BAD_RSA_MODULUS_LENGTH 121 | ||
| 137 | #define SSL_R_BAD_RSA_SIGNATURE 122 | ||
| 138 | #define SSL_R_BAD_SIGNATURE 123 | ||
| 139 | #define SSL_R_BAD_SSL_FILETYPE 124 | ||
| 140 | #define SSL_R_BAD_SSL_SESSION_ID_LENGTH 125 | ||
| 141 | #define SSL_R_BAD_STATE 126 | ||
| 142 | #define SSL_R_BAD_WRITE_RETRY 127 | ||
| 143 | #define SSL_R_BIO_NOT_SET 128 | ||
| 144 | #define SSL_R_BLOCK_CIPHER_PAD_IS_WRONG 129 | ||
| 145 | #define SSL_R_BN_LIB 130 | ||
| 146 | #define SSL_R_CA_DN_LENGTH_MISMATCH 131 | ||
| 147 | #define SSL_R_CA_DN_TOO_LONG 132 | ||
| 148 | #define SSL_R_CCS_RECEIVED_EARLY 133 | ||
| 149 | #define SSL_R_CERTIFICATE_VERIFY_FAILED 134 | ||
| 150 | #define SSL_R_CERT_LENGTH_MISMATCH 135 | ||
| 151 | #define SSL_R_CHALLENGE_IS_DIFFERENT 136 | ||
| 152 | #define SSL_R_CIPHER_CODE_WRONG_LENGTH 137 | ||
| 153 | #define SSL_R_CIPHER_OR_HASH_UNAVAILABLE 138 | ||
| 154 | #define SSL_R_CIPHER_TABLE_SRC_ERROR 139 | ||
| 155 | #define SSL_R_COMPRESSED_LENGTH_TOO_LONG 140 | ||
| 156 | #define SSL_R_COMPRESSION_FAILURE 141 | ||
| 157 | #define SSL_R_CONNECTION_ID_IS_DIFFERENT 142 | ||
| 158 | #define SSL_R_CONNECTION_TYPE_NOT_SET 143 | ||
| 159 | #define SSL_R_DATA_BETWEEN_CCS_AND_FINISHED 144 | ||
| 160 | #define SSL_R_DATA_LENGTH_TOO_LONG 145 | ||
| 161 | #define SSL_R_DECRYPTION_FAILED 146 | ||
| 162 | #define SSL_R_DH_PUBLIC_VALUE_LENGTH_IS_WRONG 147 | ||
| 163 | #define SSL_R_DIGEST_CHECK_FAILED 148 | ||
| 164 | #define SSL_R_ENCRYPTED_LENGTH_TOO_LONG 149 | ||
| 165 | #define SSL_R_ERROR_IN_RECEIVED_CIPHER_LIST 150 | ||
| 166 | #define SSL_R_EXCESSIVE_MESSAGE_SIZE 151 | ||
| 167 | #define SSL_R_EXTRA_DATA_IN_MESSAGE 152 | ||
| 168 | #define SSL_R_GOT_A_FIN_BEFORE_A_CCS 153 | ||
| 169 | #define SSL_R_HTTPS_PROXY_REQUEST 154 | ||
| 170 | #define SSL_R_HTTP_REQUEST 155 | ||
| 171 | #define SSL_R_INTERNAL_ERROR 156 | ||
| 172 | #define SSL_R_INVALID_CHALLENGE_LENGTH 157 | ||
| 173 | #define SSL_R_LENGTH_MISMATCH 158 | ||
| 174 | #define SSL_R_LENGTH_TOO_SHORT 159 | ||
| 175 | #define SSL_R_LIBRARY_HAS_NO_CIPHERS 160 | ||
| 176 | #define SSL_R_MISSING_DH_DSA_CERT 161 | ||
| 177 | #define SSL_R_MISSING_DH_KEY 162 | ||
| 178 | #define SSL_R_MISSING_DH_RSA_CERT 163 | ||
| 179 | #define SSL_R_MISSING_DSA_SIGNING_CERT 164 | ||
| 180 | #define SSL_R_MISSING_EXPORT_TMP_DH_KEY 165 | ||
| 181 | #define SSL_R_MISSING_EXPORT_TMP_RSA_KEY 166 | ||
| 182 | #define SSL_R_MISSING_RSA_CERTIFICATE 167 | ||
| 183 | #define SSL_R_MISSING_RSA_ENCRYPTING_CERT 168 | ||
| 184 | #define SSL_R_MISSING_RSA_SIGNING_CERT 169 | ||
| 185 | #define SSL_R_MISSING_TMP_DH_KEY 170 | ||
| 186 | #define SSL_R_MISSING_TMP_RSA_KEY 171 | ||
| 187 | #define SSL_R_MISSING_TMP_RSA_PKEY 172 | ||
| 188 | #define SSL_R_MISSING_VERIFY_MESSAGE 173 | ||
| 189 | #define SSL_R_NON_SSLV2_INITIAL_PACKET 174 | ||
| 190 | #define SSL_R_NO_CERTIFICATES_RETURNED 175 | ||
| 191 | #define SSL_R_NO_CERTIFICATE_ASSIGNED 176 | ||
| 192 | #define SSL_R_NO_CERTIFICATE_RETURNED 177 | ||
| 193 | #define SSL_R_NO_CERTIFICATE_SET 178 | ||
| 194 | #define SSL_R_NO_CERTIFICATE_SPECIFIED 179 | ||
| 195 | #define SSL_R_NO_CIPHERS_AVAILABLE 180 | ||
| 196 | #define SSL_R_NO_CIPHERS_PASSED 181 | ||
| 197 | #define SSL_R_NO_CIPHERS_SPECIFIED 182 | ||
| 198 | #define SSL_R_NO_CIPHER_LIST 183 | ||
| 199 | #define SSL_R_NO_CIPHER_MATCH 184 | ||
| 200 | #define SSL_R_NO_CLIENT_CERT_RECEIVED 185 | ||
| 201 | #define SSL_R_NO_COMPRESSION_SPECIFIED 186 | ||
| 202 | #define SSL_R_NO_PRIVATEKEY 187 | ||
| 203 | #define SSL_R_NO_PRIVATE_KEY_ASSIGNED 188 | ||
| 204 | #define SSL_R_NO_PROTOCOLS_AVAILABLE 189 | ||
| 205 | #define SSL_R_NO_PUBLICKEY 190 | ||
| 206 | #define SSL_R_NO_SHARED_CIPHER 191 | ||
| 207 | #define SSL_R_NULL_SSL_CTX 192 | ||
| 208 | #define SSL_R_NULL_SSL_METHOD_PASSED 193 | ||
| 209 | #define SSL_R_OLD_SESSION_CIPHER_NOT_RETURNED 194 | ||
| 210 | #define SSL_R_PACKET_LENGTH_TOO_LONG 195 | ||
| 211 | #define SSL_R_PEER_DID_NOT_RETURN_A_CERTIFICATE 196 | ||
| 212 | #define SSL_R_PEER_ERROR 197 | ||
| 213 | #define SSL_R_PEER_ERROR_CERTIFICATE 198 | ||
| 214 | #define SSL_R_PEER_ERROR_NO_CERTIFICATE 199 | ||
| 215 | #define SSL_R_PEER_ERROR_NO_CIPHER 200 | ||
| 216 | #define SSL_R_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 201 | ||
| 217 | #define SSL_R_PRE_MAC_LENGTH_TOO_LONG 202 | ||
| 218 | #define SSL_R_PROBLEMS_MAPPING_CIPHER_FUNCTIONS 203 | ||
| 219 | #define SSL_R_PROTOCOL_IS_SHUTDOWN 204 | ||
| 220 | #define SSL_R_PUBLIC_KEY_ENCRYPT_ERROR 205 | ||
| 221 | #define SSL_R_PUBLIC_KEY_IS_NOT_RSA 206 | ||
| 222 | #define SSL_R_PUBLIC_KEY_NOT_RSA 207 | ||
| 223 | #define SSL_R_READ_BIO_NOT_SET 208 | ||
| 224 | #define SSL_R_READ_WRONG_PACKET_TYPE 209 | ||
| 225 | #define SSL_R_RECORD_LENGTH_MISMATCH 210 | ||
| 226 | #define SSL_R_RECORD_TOO_LARGE 211 | ||
| 227 | #define SSL_R_REQUIRED_CIPHER_MISSING 212 | ||
| 228 | #define SSL_R_REUSE_CERT_LENGTH_NOT_ZERO 213 | ||
| 229 | #define SSL_R_REUSE_CERT_TYPE_NOT_ZERO 214 | ||
| 230 | #define SSL_R_REUSE_CIPHER_LIST_NOT_ZERO 215 | ||
| 231 | #define SSL_R_SHORT_READ 216 | ||
| 232 | #define SSL_R_SIGNATURE_FOR_NON_SIGNING_CERTIFICATE 217 | ||
| 233 | #define SSL_R_SSL3_SESSION_ID_TOO_SHORT 218 | ||
| 234 | #define SSL_R_SSLV3_ALERT_BAD_CERTIFICATE 1042 | ||
| 235 | #define SSL_R_SSLV3_ALERT_BAD_RECORD_MAC 1020 | ||
| 236 | #define SSL_R_SSLV3_ALERT_CERTIFICATE_EXPIRED 1045 | ||
| 237 | #define SSL_R_SSLV3_ALERT_CERTIFICATE_REVOKED 1044 | ||
| 238 | #define SSL_R_SSLV3_ALERT_CERTIFICATE_UNKNOWN 1046 | ||
| 239 | #define SSL_R_SSLV3_ALERT_DECOMPRESSION_FAILURE 1030 | ||
| 240 | #define SSL_R_SSLV3_ALERT_HANDSHAKE_FAILURE 1040 | ||
| 241 | #define SSL_R_SSLV3_ALERT_ILLEGAL_PARAMETER 1047 | ||
| 242 | #define SSL_R_SSLV3_ALERT_NO_CERTIFICATE 1041 | ||
| 243 | #define SSL_R_SSLV3_ALERT_PEER_ERROR_CERTIFICATE 219 | ||
| 244 | #define SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CERTIFICATE 220 | ||
| 245 | #define SSL_R_SSLV3_ALERT_PEER_ERROR_NO_CIPHER 221 | ||
| 246 | #define SSL_R_SSLV3_ALERT_PEER_ERROR_UNSUPPORTED_CERTIFICATE_TYPE 222 | ||
| 247 | #define SSL_R_SSLV3_ALERT_UNEXPECTED_MESSAGE 1010 | ||
| 248 | #define SSL_R_SSLV3_ALERT_UNKNOWN_REMOTE_ERROR_TYPE 223 | ||
| 249 | #define SSL_R_SSLV3_ALERT_UNSUPPORTED_CERTIFICATE 1043 | ||
| 250 | #define SSL_R_SSL_CTX_HAS_NO_DEFAULT_SSL_VERSION 224 | ||
| 251 | #define SSL_R_SSL_HANDSHAKE_FAILURE 225 | ||
| 252 | #define SSL_R_SSL_LIBRARY_HAS_NO_CIPHERS 226 | ||
| 253 | #define SSL_R_SSL_SESSION_ID_IS_DIFFERENT 227 | ||
| 254 | #define SSL_R_TLS_CLIENT_CERT_REQ_WITH_ANON_CIPHER 228 | ||
| 255 | #define SSL_R_TLS_PEER_DID_NOT_RESPOND_WITH_CERTIFICATE_LIST 229 | ||
| 256 | #define SSL_R_TLS_RSA_ENCRYPTED_VALUE_LENGTH_IS_WRONG 230 | ||
| 257 | #define SSL_R_TRIED_TO_USE_UNSUPPORTED_CIPHER 231 | ||
| 258 | #define SSL_R_UNABLE_TO_DECODE_DH_CERTS 232 | ||
| 259 | #define SSL_R_UNABLE_TO_EXTRACT_PUBLIC_KEY 233 | ||
| 260 | #define SSL_R_UNABLE_TO_FIND_DH_PARAMETERS 234 | ||
| 261 | #define SSL_R_UNABLE_TO_FIND_PUBLIC_KEY_PARAMETERS 235 | ||
| 262 | #define SSL_R_UNABLE_TO_FIND_SSL_METHOD 236 | ||
| 263 | #define SSL_R_UNABLE_TO_LOAD_SSL2_MD5_ROUTINES 237 | ||
| 264 | #define SSL_R_UNABLE_TO_LOAD_SSL3_MD5_ROUTINES 238 | ||
| 265 | #define SSL_R_UNABLE_TO_LOAD_SSL3_SHA1_ROUTINES 239 | ||
| 266 | #define SSL_R_UNEXPECTED_MESSAGE 240 | ||
| 267 | #define SSL_R_UNEXPECTED_RECORD 241 | ||
| 268 | #define SSL_R_UNKNOWN_ALERT_TYPE 242 | ||
| 269 | #define SSL_R_UNKNOWN_CERTIFICATE_TYPE 243 | ||
| 270 | #define SSL_R_UNKNOWN_CIPHER_RETURNED 244 | ||
| 271 | #define SSL_R_UNKNOWN_CIPHER_TYPE 245 | ||
| 272 | #define SSL_R_UNKNOWN_KEY_EXCHANGE_TYPE 246 | ||
| 273 | #define SSL_R_UNKNOWN_PKEY_TYPE 247 | ||
| 274 | #define SSL_R_UNKNOWN_PROTOCOL 248 | ||
| 275 | #define SSL_R_UNKNOWN_REMOTE_ERROR_TYPE 249 | ||
| 276 | #define SSL_R_UNKNOWN_SSL_VERSION 250 | ||
| 277 | #define SSL_R_UNKNOWN_STATE 251 | ||
| 278 | #define SSL_R_UNSUPPORTED_CIPHER 252 | ||
| 279 | #define SSL_R_UNSUPPORTED_COMPRESSION_ALGORITHM 253 | ||
| 280 | #define SSL_R_UNSUPPORTED_PROTOCOL 254 | ||
| 281 | #define SSL_R_UNSUPPORTED_SSL_VERSION 255 | ||
| 282 | #define SSL_R_WRITE_BIO_NOT_SET 256 | ||
| 283 | #define SSL_R_WRONG_CIPHER_RETURNED 257 | ||
| 284 | #define SSL_R_WRONG_MESSAGE_TYPE 258 | ||
| 285 | #define SSL_R_WRONG_NUMBER_OF_KEY_BITS 259 | ||
| 286 | #define SSL_R_WRONG_SIGNATURE_LENGTH 260 | ||
| 287 | #define SSL_R_WRONG_SIGNATURE_SIZE 261 | ||
| 288 | #define SSL_R_WRONG_SSL_VERSION 262 | ||
| 289 | #define SSL_R_WRONG_VERSION_NUMBER 263 | ||
| 290 | #define SSL_R_X509_LIB 264 | ||
diff --git a/src/lib/libssl/src/test/.rnd b/src/lib/libssl/src/test/.rnd new file mode 100644 index 0000000000..234970e241 --- /dev/null +++ b/src/lib/libssl/src/test/.rnd | |||
| Binary files differ | |||
diff --git a/src/lib/libssl/src/test/Makefile.ssl b/src/lib/libssl/src/test/Makefile.ssl new file mode 100644 index 0000000000..b3de76751e --- /dev/null +++ b/src/lib/libssl/src/test/Makefile.ssl | |||
| @@ -0,0 +1,294 @@ | |||
| 1 | # | ||
| 2 | # test/Makefile.ssl | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= test | ||
| 6 | TOP= .. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I../include | ||
| 9 | CFLAG= -g | ||
| 10 | INSTALLTOP= /usr/local/ssl | ||
| 11 | MAKEFILE= Makefile.ssl | ||
| 12 | MAKE= make -f $(MAKEFILE) | ||
| 13 | MAKEDEPEND= makedepend -f$(MAKEFILE) | ||
| 14 | |||
| 15 | PEX_LIBS= | ||
| 16 | EX_LIBS= #-lnsl -lsocket | ||
| 17 | |||
| 18 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 19 | |||
| 20 | GENERAL=Makefile.ssl | ||
| 21 | |||
| 22 | DLIBCRYPTO= ../libcrypto.a | ||
| 23 | DLIBSSL= ../libssl.a | ||
| 24 | LIBCRYPTO= -L.. -lcrypto | ||
| 25 | LIBSSL= -L.. -lssl | ||
| 26 | |||
| 27 | BNTEST= bntest | ||
| 28 | EXPTEST= exptest | ||
| 29 | IDEATEST= ideatest | ||
| 30 | SHATEST= shatest | ||
| 31 | SHA1TEST= sha1test | ||
| 32 | MDC2TEST= mdc2test | ||
| 33 | RMDTEST= rmdtest | ||
| 34 | MD2TEST= md2test | ||
| 35 | MD5TEST= md5test | ||
| 36 | HMACTEST= hmactest | ||
| 37 | RC2TEST= rc2test | ||
| 38 | RC4TEST= rc4test | ||
| 39 | RC5TEST= rc5test | ||
| 40 | BFTEST= bftest | ||
| 41 | CASTTEST= casttest | ||
| 42 | DESTEST= destest | ||
| 43 | RANDTEST= randtest | ||
| 44 | DHTEST= dhtest | ||
| 45 | DSATEST= dsatest | ||
| 46 | METHTEST= methtest | ||
| 47 | SSLTEST= ssltest | ||
| 48 | |||
| 49 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ | ||
| 50 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | ||
| 51 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | ||
| 52 | $(RANDTEST) $(DHTEST) \ | ||
| 53 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) | ||
| 54 | |||
| 55 | # $(METHTEST) | ||
| 56 | |||
| 57 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD5TEST).o $(HMACTEST).o \ | ||
| 58 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | ||
| 59 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | ||
| 60 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ | ||
| 61 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o | ||
| 62 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ | ||
| 63 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | ||
| 64 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | ||
| 65 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ | ||
| 66 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c | ||
| 67 | |||
| 68 | EXHEADER= | ||
| 69 | HEADER= $(EXHEADER) | ||
| 70 | |||
| 71 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 72 | |||
| 73 | top: | ||
| 74 | (cd ..; $(MAKE) DIRS=$(DIR) all) | ||
| 75 | |||
| 76 | all: exe | ||
| 77 | |||
| 78 | exe: $(EXE) | ||
| 79 | |||
| 80 | files: | ||
| 81 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 82 | |||
| 83 | links: | ||
| 84 | /bin/rm -f Makefile | ||
| 85 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 86 | |||
| 87 | errors: | ||
| 88 | |||
| 89 | install: | ||
| 90 | |||
| 91 | tags: | ||
| 92 | ctags $(SRC) | ||
| 93 | |||
| 94 | tests: exe apps \ | ||
| 95 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ | ||
| 96 | test_rc2 test_rc4 test_rc5 test_bf test_cast \ | ||
| 97 | test_rand test_enc test_x509 test_rsa test_crl test_sid test_req \ | ||
| 98 | test_pkcs7 test_bn test_verify test_dh test_dsa test_reqgen \ | ||
| 99 | test_ss test_ssl test_ca | ||
| 100 | |||
| 101 | apps: | ||
| 102 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) | ||
| 103 | |||
| 104 | test_des: | ||
| 105 | #./$(DESTEST) | ||
| 106 | |||
| 107 | test_idea: | ||
| 108 | ./$(IDEATEST) | ||
| 109 | |||
| 110 | test_sha: | ||
| 111 | ./$(SHATEST) | ||
| 112 | ./$(SHA1TEST) | ||
| 113 | |||
| 114 | test_mdc2: | ||
| 115 | ./$(MDC2TEST) | ||
| 116 | |||
| 117 | test_md5: | ||
| 118 | ./$(MD5TEST) | ||
| 119 | |||
| 120 | test_hmac: | ||
| 121 | ./$(HMACTEST) | ||
| 122 | |||
| 123 | test_md2: | ||
| 124 | ./$(MD2TEST) | ||
| 125 | |||
| 126 | test_rmd: | ||
| 127 | ./$(RMDTEST) | ||
| 128 | |||
| 129 | test_bf: | ||
| 130 | ./$(BFTEST) | ||
| 131 | |||
| 132 | test_cast: | ||
| 133 | ./$(CASTTEST) | ||
| 134 | |||
| 135 | test_rc2: | ||
| 136 | ./$(RC2TEST) | ||
| 137 | |||
| 138 | test_rc4: | ||
| 139 | ./$(RC4TEST) | ||
| 140 | |||
| 141 | test_rc5: | ||
| 142 | ./$(RC5TEST) | ||
| 143 | |||
| 144 | test_rand: | ||
| 145 | ./$(RANDTEST) | ||
| 146 | |||
| 147 | test_enc: | ||
| 148 | @sh ./testenc | ||
| 149 | |||
| 150 | test_x509: | ||
| 151 | echo test normal x509v1 certificate | ||
| 152 | sh ./tx509 2>/dev/null | ||
| 153 | echo test first x509v3 certificate | ||
| 154 | sh ./tx509 v3-cert1.pem 2>/dev/null | ||
| 155 | echo test second x509v3 certificate | ||
| 156 | sh ./tx509 v3-cert2.pem 2>/dev/null | ||
| 157 | |||
| 158 | test_rsa: | ||
| 159 | @sh ./trsa 2>/dev/null | ||
| 160 | |||
| 161 | test_crl: | ||
| 162 | @sh ./tcrl 2>/dev/null | ||
| 163 | |||
| 164 | test_sid: | ||
| 165 | @sh ./tsid 2>/dev/null | ||
| 166 | |||
| 167 | test_req: | ||
| 168 | @sh ./treq 2>/dev/null | ||
| 169 | @sh ./treq testreq2.pem 2>/dev/null | ||
| 170 | |||
| 171 | test_pkcs7: | ||
| 172 | @sh ./tpkcs7 2>/dev/null | ||
| 173 | @sh ./tpkcs7d 2>/dev/null | ||
| 174 | |||
| 175 | test_bn: | ||
| 176 | @echo 'test a^b%c implementations' | ||
| 177 | ./$(EXPTEST) | ||
| 178 | @echo starting big number library test, could take a while... | ||
| 179 | @(./$(BNTEST)|bc) | awk '{ \ | ||
| 180 | if ($$0 != "0") {print "error"; exit(1); } \ | ||
| 181 | if (((NR+1)%64) == 0) print NR+1," tests done"; }' | ||
| 182 | |||
| 183 | test_verify: | ||
| 184 | @echo "The following command should have some OK's and some failures" | ||
| 185 | @echo "There are definitly a few expired certificates" | ||
| 186 | ../apps/ssleay verify -CApath ../certs ../certs/*.pem | ||
| 187 | |||
| 188 | test_dh: | ||
| 189 | @echo "Generate as set of DH parameters" | ||
| 190 | ./$(DHTEST) | ||
| 191 | |||
| 192 | test_dsa: | ||
| 193 | @echo "Generate as set of DSA parameters" | ||
| 194 | ./$(DSATEST) | ||
| 195 | |||
| 196 | test_reqgen: | ||
| 197 | @echo "Generate and verify a certificate request" | ||
| 198 | @sh ./testgen | ||
| 199 | |||
| 200 | test_ss: | ||
| 201 | @echo "Generate and certify a test certificate" | ||
| 202 | @sh ./testss | ||
| 203 | |||
| 204 | test_ssl: | ||
| 205 | @echo "test SSL protocol" | ||
| 206 | @sh ./testssl | ||
| 207 | |||
| 208 | test_ca: | ||
| 209 | @echo "Generate and certify a test certificate via the 'ca' program" | ||
| 210 | @sh ./testca | ||
| 211 | |||
| 212 | lint: | ||
| 213 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 214 | |||
| 215 | depend: | ||
| 216 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC) | ||
| 217 | |||
| 218 | dclean: | ||
| 219 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 220 | mv -f Makefile.new $(MAKEFILE) | ||
| 221 | |||
| 222 | clean: | ||
| 223 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log | ||
| 224 | |||
| 225 | $(DLIBSSL): | ||
| 226 | (cd ../ssl; $(MAKE)) | ||
| 227 | |||
| 228 | $(DLIBCRYPTO): | ||
| 229 | (cd ../crypto; $(MAKE)) | ||
| 230 | |||
| 231 | $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) | ||
| 232 | $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 233 | |||
| 234 | $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) | ||
| 235 | $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 236 | |||
| 237 | $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) | ||
| 238 | $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 239 | |||
| 240 | $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) | ||
| 241 | $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 242 | |||
| 243 | $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) | ||
| 244 | $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 245 | |||
| 246 | $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) | ||
| 247 | $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 248 | |||
| 249 | $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) | ||
| 250 | $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 251 | |||
| 252 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) | ||
| 253 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 254 | |||
| 255 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) | ||
| 256 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 257 | |||
| 258 | $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) | ||
| 259 | $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 260 | |||
| 261 | $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) | ||
| 262 | $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 263 | |||
| 264 | $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) | ||
| 265 | $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 266 | |||
| 267 | $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) | ||
| 268 | $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 269 | |||
| 270 | $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) | ||
| 271 | $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 272 | |||
| 273 | $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) | ||
| 274 | $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 275 | |||
| 276 | $(DESTEST): $(DESTEST).o $(DLIBCRYPTO) | ||
| 277 | $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 278 | |||
| 279 | $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) | ||
| 280 | $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 281 | |||
| 282 | $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) | ||
| 283 | $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 284 | |||
| 285 | $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) | ||
| 286 | $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 287 | |||
| 288 | $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) | ||
| 289 | $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 290 | |||
| 291 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | ||
| 292 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | ||
| 293 | |||
| 294 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/test/certCA.srl b/src/lib/libssl/src/test/certCA.srl new file mode 100644 index 0000000000..39f5b69311 --- /dev/null +++ b/src/lib/libssl/src/test/certCA.srl | |||
| @@ -0,0 +1 @@ | |||
| 71 | |||
diff --git a/src/lib/libssl/src/test/demoCA/index.txt b/src/lib/libssl/src/test/demoCA/index.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/lib/libssl/src/test/demoCA/index.txt | |||
diff --git a/src/lib/libssl/src/test/demoCA/private/cakey.pem b/src/lib/libssl/src/test/demoCA/private/cakey.pem new file mode 100644 index 0000000000..edd5a5773f --- /dev/null +++ b/src/lib/libssl/src/test/demoCA/private/cakey.pem | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | -----BEGIN RSA PRIVATE KEY----- | ||
| 2 | -----END RSA PRIVATE KEY----- | ||
diff --git a/src/lib/libssl/src/test/demoCA/serial b/src/lib/libssl/src/test/demoCA/serial new file mode 100644 index 0000000000..8a0f05e166 --- /dev/null +++ b/src/lib/libssl/src/test/demoCA/serial | |||
| @@ -0,0 +1 @@ | |||
| 01 | |||
diff --git a/src/lib/libssl/src/test/dsa-ca.pem b/src/lib/libssl/src/test/dsa-ca.pem new file mode 100644 index 0000000000..9eb08f3ddd --- /dev/null +++ b/src/lib/libssl/src/test/dsa-ca.pem | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | -----BEGIN DSA PRIVATE KEY----- | ||
| 2 | Proc-Type: 4,ENCRYPTED | ||
| 3 | DEK-Info: DES-EDE3-CBC,C5B6C7CC9E1FE2C0 | ||
| 4 | |||
| 5 | svCXBcBRhMuU22UXOfiKZA+thmz6KYXpt1Yg5Rd+TYQcQ1MdvNy0B0tkP1SxzDq0 | ||
| 6 | Xh1eMeTML9/9/0rKakgNXXXbpi5RB8t6BmwRSyej89F7nn1mtR3qzoyPRpp15SDl | ||
| 7 | Tn67C+2v+HDF3MFk88hiNCYkNbcmi7TWvChsl8N1r7wdZwtIox56yXdgxw6ZIpa/ | ||
| 8 | par0oUCzN7fiavPgCWz1kfPNSaBQSdxwH7TZi5tMHAr0J3C7a7QRnZfE09R59Uqr | ||
| 9 | zslrq+ndIw1BZAxoY0SlBu+iFOVaBVlwToC4AsHkv7j7l8ITtr7f42YbBa44D9TO | ||
| 10 | uOhONmkk/v3Fso4RaOEzdKZC+hnmmzvHs6TiTWm6yzJgSFwyOUK0eGmKEeVxpcH5 | ||
| 11 | rUOlHOwzen+FFtocZDZAfdFnb7QY7L/boQvyA5A+ZbRG4DUpmBQeQsSaICHM5Rxx | ||
| 12 | 1QaLF413VNPXTLPbW0ilSc2H8x2iZTIVKfd33oSO6NhXPtSYQgfecEF4BvNHY5c4 | ||
| 13 | HovjT4mckbK95bcBzoCHu43vuSQkmZzdYo/ydSZt6zoPavbBLueTpgSbdXiDi827 | ||
| 14 | MVqOsYxGCb+kez0FoDSTgw== | ||
| 15 | -----END DSA PRIVATE KEY----- | ||
| 16 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 17 | MIICUjCCAhECAQAwUjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx | ||
| 18 | ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDELMAkGA1UEAxMCQ0Ew | ||
| 19 | ggG0MIIBKQYFKw4DAgwwggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaW | ||
| 20 | sxXgUy6P4FmCc5A+dTGZR3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5m | ||
| 21 | rmuINvvsKNzC16W75Sw5JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHk | ||
| 22 | cJVbUM1JAhUA9wcx7fpsBgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVo | ||
| 23 | bzDjaeHls12YuyiGSPzemQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqR | ||
| 24 | CZ228U2cVA9YBu5JdAfOVX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxB | ||
| 25 | F5WS6wG1c6Vqftgy7Q4CuAOBhAACgYAapll6iqz9XrZFlk2GCVcB+KihxWnH7IuH | ||
| 26 | vSLw9YUrJahcBHmbpvt494lF4gC5w3WPM+vXJofbusk4GoQEEsQNMDaah4m49uUq | ||
| 27 | AylOVFJJJXuirVJ+o+0TtOFDITEAl+YZZariXOD7tdOSOl9RLMPC6+daHKS9e68u | ||
| 28 | 3enxhqnDGaAAMAkGBSsOAwIbBQADMAAwLQIVAJGVuFsG/0DBuSZ0jF7ypdU0/G0v | ||
| 29 | AhQfeF5BoMMDbX/kidUVpQ6gadPlZA== | ||
| 30 | -----END CERTIFICATE REQUEST----- | ||
| 31 | -----BEGIN CERTIFICATE----- | ||
| 32 | MIIBrjCCAWwCAQswCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK | ||
| 33 | U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww | ||
| 34 | CgYDVQQDEwNQQ0EwHhcNOTcwNjE1MDIxNDI5WhcNOTcwNzE1MDIxNDI5WjBSMQsw | ||
| 35 | CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu | ||
| 36 | ZXQgV2lkZ2l0cyBQdHkgTHRkMQswCQYDVQQDEwJDQTCBkjAJBgUrDgMCDAUAA4GE | ||
| 37 | AAKBgBqmWXqKrP1etkWWTYYJVwH4qKHFacfsi4e9IvD1hSslqFwEeZum+3j3iUXi | ||
| 38 | ALnDdY8z69cmh9u6yTgahAQSxA0wNpqHibj25SoDKU5UUkkle6KtUn6j7RO04UMh | ||
| 39 | MQCX5hllquJc4Pu105I6X1Esw8Lr51ocpL17ry7d6fGGqcMZMAkGBSsOAwIbBQAD | ||
| 40 | MQAwLgIVAJ4wtQsANPxHo7Q4IQZYsL12SKdbAhUAjJ9n38zxT+iai2164xS+LIfa | ||
| 41 | C1Q= | ||
| 42 | -----END CERTIFICATE----- | ||
| 43 | |||
diff --git a/src/lib/libssl/src/test/dsa-pca.pem b/src/lib/libssl/src/test/dsa-pca.pem new file mode 100644 index 0000000000..e3641ad47e --- /dev/null +++ b/src/lib/libssl/src/test/dsa-pca.pem | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | -----BEGIN DSA PRIVATE KEY----- | ||
| 2 | Proc-Type: 4,ENCRYPTED | ||
| 3 | DEK-Info: DES-EDE3-CBC,F80EEEBEEA7386C4 | ||
| 4 | |||
| 5 | GZ9zgFcHOlnhPoiSbVi/yXc9mGoj44A6IveD4UlpSEUt6Xbse3Fr0KHIUyQ3oGnS | ||
| 6 | mClKoAp/eOTb5Frhto85SzdsxYtac+X1v5XwdzAMy2KowHVk1N8A5jmE2OlkNPNt | ||
| 7 | of132MNlo2cyIRYaa35PPYBGNCmUm7YcYS8O90YtkrQZZTf4+2C4kllhMcdkQwkr | ||
| 8 | FWSWC8YOQ7w0LHb4cX1FejHHom9Nd/0PN3vn3UyySvfOqoR7nbXkrpHXmPIr0hxX | ||
| 9 | RcF0aXcV/CzZ1/nfXWQf4o3+oD0T22SDoVcZY60IzI0oIc3pNCbDV3uKNmgekrFd | ||
| 10 | qOUJ+QW8oWp7oefRx62iBfIeC8DZunohMXaWAQCU0sLQOR4yEdeUCnzCSywe0bG1 | ||
| 11 | diD0KYaEe+Yub1BQH4aLsBgDjardgpJRTQLq0DUvw0/QGO1irKTJzegEDNVBKrVn | ||
| 12 | V4AHOKT1CUKqvGNRP1UnccUDTF6miOAtaj/qpzra7sSk7dkGBvIEeFoAg84kfh9h | ||
| 13 | hVvF1YyzC9bwZepruoqoUwke/WdNIR5ymOVZ/4Liw0JdIOcq+atbdRX08niqIRkf | ||
| 14 | dsZrUj4leo3zdefYUQ7w4N2Ns37yDFq7 | ||
| 15 | -----END DSA PRIVATE KEY----- | ||
| 16 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 17 | MIICVTCCAhMCAQAwUzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx | ||
| 18 | ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEMMAoGA1UEAxMDUENB | ||
| 19 | MIIBtTCCASkGBSsOAwIMMIIBHgKBgQCnP26Fv0FqKX3wn0cZMJCaCR3aajMexT2G | ||
| 20 | lrMV4FMuj+BZgnOQPnUxmUd6UvuF5NmmezibaIqEm4fGHrV+hktTW1nPcWUZiG7O | ||
| 21 | Zq5riDb77Cjcwtelu+UsOSZL2ppwGJU3lRBWI/YV7boEXt45T/23Qx+1pGVvzYAR | ||
| 22 | 5HCVW1DNSQIVAPcHMe36bAYD1YWKHKycZedQZmVvAoGATd9MA6aRivUZb1BGJZnl | ||
| 23 | aG8w42nh5bNdmLsohkj83pkEP1+IDJxzJA0gXbkqmj8YlifkYofBe3RiU/xhJ6h6 | ||
| 24 | kQmdtvFNnFQPWAbuSXQHzlV+I84W9srcWmEBfslxtU323DQph2j2XiCTs9v15Als | ||
| 25 | QReVkusBtXOlan7YMu0OArgDgYUAAoGBAKbtuR5AdW+ICjCFe2ixjUiJJzM2IKwe | ||
| 26 | 6NZEMXg39+HQ1UTPTmfLZLps+rZfolHDXuRKMXbGFdSF0nXYzotPCzi7GauwEJTZ | ||
| 27 | yr27ZZjA1C6apGSQ9GzuwNvZ4rCXystVEagAS8OQ4H3D4dWS17Zg31ICb5o4E5r0 | ||
| 28 | z09o/Uz46u0VoAAwCQYFKw4DAhsFAAMxADAuAhUArRubTxsbIXy3AhtjQ943AbNB | ||
| 29 | nSICFQCu+g1iW3jwF+gOcbroD4S/ZcvB3w== | ||
| 30 | -----END CERTIFICATE REQUEST----- | ||
| 31 | -----BEGIN CERTIFICATE----- | ||
| 32 | MIIC0zCCApECAQAwCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK | ||
| 33 | U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww | ||
| 34 | CgYDVQQDEwNQQ0EwHhcNOTcwNjE0MjI1NDQ1WhcNOTcwNzE0MjI1NDQ1WjBTMQsw | ||
| 35 | CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu | ||
| 36 | ZXQgV2lkZ2l0cyBQdHkgTHRkMQwwCgYDVQQDEwNQQ0EwggG1MIIBKQYFKw4DAgww | ||
| 37 | ggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaWsxXgUy6P4FmCc5A+dTGZ | ||
| 38 | R3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5mrmuINvvsKNzC16W75Sw5 | ||
| 39 | JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHkcJVbUM1JAhUA9wcx7fps | ||
| 40 | BgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVobzDjaeHls12YuyiGSPze | ||
| 41 | mQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqRCZ228U2cVA9YBu5JdAfO | ||
| 42 | VX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxBF5WS6wG1c6Vqftgy7Q4C | ||
| 43 | uAOBhQACgYEApu25HkB1b4gKMIV7aLGNSIknMzYgrB7o1kQxeDf34dDVRM9OZ8tk | ||
| 44 | umz6tl+iUcNe5EoxdsYV1IXSddjOi08LOLsZq7AQlNnKvbtlmMDULpqkZJD0bO7A | ||
| 45 | 29nisJfKy1URqABLw5DgfcPh1ZLXtmDfUgJvmjgTmvTPT2j9TPjq7RUwCQYFKw4D | ||
| 46 | AhsFAAMxADAuAhUAvtv6AkMolix1Jvy3UnVEIUqdCUICFQC+jq8P49mwrY9oJ24n | ||
| 47 | 5rKUjNBhSg== | ||
| 48 | -----END CERTIFICATE----- | ||
| 49 | |||
diff --git a/src/lib/libssl/src/test/p b/src/lib/libssl/src/test/p new file mode 100644 index 0000000000..b3de76751e --- /dev/null +++ b/src/lib/libssl/src/test/p | |||
| @@ -0,0 +1,294 @@ | |||
| 1 | # | ||
| 2 | # test/Makefile.ssl | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= test | ||
| 6 | TOP= .. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I../include | ||
| 9 | CFLAG= -g | ||
| 10 | INSTALLTOP= /usr/local/ssl | ||
| 11 | MAKEFILE= Makefile.ssl | ||
| 12 | MAKE= make -f $(MAKEFILE) | ||
| 13 | MAKEDEPEND= makedepend -f$(MAKEFILE) | ||
| 14 | |||
| 15 | PEX_LIBS= | ||
| 16 | EX_LIBS= #-lnsl -lsocket | ||
| 17 | |||
| 18 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 19 | |||
| 20 | GENERAL=Makefile.ssl | ||
| 21 | |||
| 22 | DLIBCRYPTO= ../libcrypto.a | ||
| 23 | DLIBSSL= ../libssl.a | ||
| 24 | LIBCRYPTO= -L.. -lcrypto | ||
| 25 | LIBSSL= -L.. -lssl | ||
| 26 | |||
| 27 | BNTEST= bntest | ||
| 28 | EXPTEST= exptest | ||
| 29 | IDEATEST= ideatest | ||
| 30 | SHATEST= shatest | ||
| 31 | SHA1TEST= sha1test | ||
| 32 | MDC2TEST= mdc2test | ||
| 33 | RMDTEST= rmdtest | ||
| 34 | MD2TEST= md2test | ||
| 35 | MD5TEST= md5test | ||
| 36 | HMACTEST= hmactest | ||
| 37 | RC2TEST= rc2test | ||
| 38 | RC4TEST= rc4test | ||
| 39 | RC5TEST= rc5test | ||
| 40 | BFTEST= bftest | ||
| 41 | CASTTEST= casttest | ||
| 42 | DESTEST= destest | ||
| 43 | RANDTEST= randtest | ||
| 44 | DHTEST= dhtest | ||
| 45 | DSATEST= dsatest | ||
| 46 | METHTEST= methtest | ||
| 47 | SSLTEST= ssltest | ||
| 48 | |||
| 49 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ | ||
| 50 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | ||
| 51 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | ||
| 52 | $(RANDTEST) $(DHTEST) \ | ||
| 53 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) | ||
| 54 | |||
| 55 | # $(METHTEST) | ||
| 56 | |||
| 57 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD5TEST).o $(HMACTEST).o \ | ||
| 58 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | ||
| 59 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | ||
| 60 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ | ||
| 61 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o | ||
| 62 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ | ||
| 63 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | ||
| 64 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | ||
| 65 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ | ||
| 66 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c | ||
| 67 | |||
| 68 | EXHEADER= | ||
| 69 | HEADER= $(EXHEADER) | ||
| 70 | |||
| 71 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 72 | |||
| 73 | top: | ||
| 74 | (cd ..; $(MAKE) DIRS=$(DIR) all) | ||
| 75 | |||
| 76 | all: exe | ||
| 77 | |||
| 78 | exe: $(EXE) | ||
| 79 | |||
| 80 | files: | ||
| 81 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 82 | |||
| 83 | links: | ||
| 84 | /bin/rm -f Makefile | ||
| 85 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 86 | |||
| 87 | errors: | ||
| 88 | |||
| 89 | install: | ||
| 90 | |||
| 91 | tags: | ||
| 92 | ctags $(SRC) | ||
| 93 | |||
| 94 | tests: exe apps \ | ||
| 95 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ | ||
| 96 | test_rc2 test_rc4 test_rc5 test_bf test_cast \ | ||
| 97 | test_rand test_enc test_x509 test_rsa test_crl test_sid test_req \ | ||
| 98 | test_pkcs7 test_bn test_verify test_dh test_dsa test_reqgen \ | ||
| 99 | test_ss test_ssl test_ca | ||
| 100 | |||
| 101 | apps: | ||
| 102 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) | ||
| 103 | |||
| 104 | test_des: | ||
| 105 | #./$(DESTEST) | ||
| 106 | |||
| 107 | test_idea: | ||
| 108 | ./$(IDEATEST) | ||
| 109 | |||
| 110 | test_sha: | ||
| 111 | ./$(SHATEST) | ||
| 112 | ./$(SHA1TEST) | ||
| 113 | |||
| 114 | test_mdc2: | ||
| 115 | ./$(MDC2TEST) | ||
| 116 | |||
| 117 | test_md5: | ||
| 118 | ./$(MD5TEST) | ||
| 119 | |||
| 120 | test_hmac: | ||
| 121 | ./$(HMACTEST) | ||
| 122 | |||
| 123 | test_md2: | ||
| 124 | ./$(MD2TEST) | ||
| 125 | |||
| 126 | test_rmd: | ||
| 127 | ./$(RMDTEST) | ||
| 128 | |||
| 129 | test_bf: | ||
| 130 | ./$(BFTEST) | ||
| 131 | |||
| 132 | test_cast: | ||
| 133 | ./$(CASTTEST) | ||
| 134 | |||
| 135 | test_rc2: | ||
| 136 | ./$(RC2TEST) | ||
| 137 | |||
| 138 | test_rc4: | ||
| 139 | ./$(RC4TEST) | ||
| 140 | |||
| 141 | test_rc5: | ||
| 142 | ./$(RC5TEST) | ||
| 143 | |||
| 144 | test_rand: | ||
| 145 | ./$(RANDTEST) | ||
| 146 | |||
| 147 | test_enc: | ||
| 148 | @sh ./testenc | ||
| 149 | |||
| 150 | test_x509: | ||
| 151 | echo test normal x509v1 certificate | ||
| 152 | sh ./tx509 2>/dev/null | ||
| 153 | echo test first x509v3 certificate | ||
| 154 | sh ./tx509 v3-cert1.pem 2>/dev/null | ||
| 155 | echo test second x509v3 certificate | ||
| 156 | sh ./tx509 v3-cert2.pem 2>/dev/null | ||
| 157 | |||
| 158 | test_rsa: | ||
| 159 | @sh ./trsa 2>/dev/null | ||
| 160 | |||
| 161 | test_crl: | ||
| 162 | @sh ./tcrl 2>/dev/null | ||
| 163 | |||
| 164 | test_sid: | ||
| 165 | @sh ./tsid 2>/dev/null | ||
| 166 | |||
| 167 | test_req: | ||
| 168 | @sh ./treq 2>/dev/null | ||
| 169 | @sh ./treq testreq2.pem 2>/dev/null | ||
| 170 | |||
| 171 | test_pkcs7: | ||
| 172 | @sh ./tpkcs7 2>/dev/null | ||
| 173 | @sh ./tpkcs7d 2>/dev/null | ||
| 174 | |||
| 175 | test_bn: | ||
| 176 | @echo 'test a^b%c implementations' | ||
| 177 | ./$(EXPTEST) | ||
| 178 | @echo starting big number library test, could take a while... | ||
| 179 | @(./$(BNTEST)|bc) | awk '{ \ | ||
| 180 | if ($$0 != "0") {print "error"; exit(1); } \ | ||
| 181 | if (((NR+1)%64) == 0) print NR+1," tests done"; }' | ||
| 182 | |||
| 183 | test_verify: | ||
| 184 | @echo "The following command should have some OK's and some failures" | ||
| 185 | @echo "There are definitly a few expired certificates" | ||
| 186 | ../apps/ssleay verify -CApath ../certs ../certs/*.pem | ||
| 187 | |||
| 188 | test_dh: | ||
| 189 | @echo "Generate as set of DH parameters" | ||
| 190 | ./$(DHTEST) | ||
| 191 | |||
| 192 | test_dsa: | ||
| 193 | @echo "Generate as set of DSA parameters" | ||
| 194 | ./$(DSATEST) | ||
| 195 | |||
| 196 | test_reqgen: | ||
| 197 | @echo "Generate and verify a certificate request" | ||
| 198 | @sh ./testgen | ||
| 199 | |||
| 200 | test_ss: | ||
| 201 | @echo "Generate and certify a test certificate" | ||
| 202 | @sh ./testss | ||
| 203 | |||
| 204 | test_ssl: | ||
| 205 | @echo "test SSL protocol" | ||
| 206 | @sh ./testssl | ||
| 207 | |||
| 208 | test_ca: | ||
| 209 | @echo "Generate and certify a test certificate via the 'ca' program" | ||
| 210 | @sh ./testca | ||
| 211 | |||
| 212 | lint: | ||
| 213 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 214 | |||
| 215 | depend: | ||
| 216 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC) | ||
| 217 | |||
| 218 | dclean: | ||
| 219 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 220 | mv -f Makefile.new $(MAKEFILE) | ||
| 221 | |||
| 222 | clean: | ||
| 223 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log | ||
| 224 | |||
| 225 | $(DLIBSSL): | ||
| 226 | (cd ../ssl; $(MAKE)) | ||
| 227 | |||
| 228 | $(DLIBCRYPTO): | ||
| 229 | (cd ../crypto; $(MAKE)) | ||
| 230 | |||
| 231 | $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) | ||
| 232 | $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 233 | |||
| 234 | $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) | ||
| 235 | $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 236 | |||
| 237 | $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) | ||
| 238 | $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 239 | |||
| 240 | $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) | ||
| 241 | $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 242 | |||
| 243 | $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) | ||
| 244 | $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 245 | |||
| 246 | $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) | ||
| 247 | $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 248 | |||
| 249 | $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) | ||
| 250 | $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 251 | |||
| 252 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) | ||
| 253 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 254 | |||
| 255 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) | ||
| 256 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 257 | |||
| 258 | $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) | ||
| 259 | $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 260 | |||
| 261 | $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) | ||
| 262 | $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 263 | |||
| 264 | $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) | ||
| 265 | $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 266 | |||
| 267 | $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) | ||
| 268 | $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 269 | |||
| 270 | $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) | ||
| 271 | $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 272 | |||
| 273 | $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) | ||
| 274 | $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 275 | |||
| 276 | $(DESTEST): $(DESTEST).o $(DLIBCRYPTO) | ||
| 277 | $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 278 | |||
| 279 | $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) | ||
| 280 | $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 281 | |||
| 282 | $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) | ||
| 283 | $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 284 | |||
| 285 | $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) | ||
| 286 | $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 287 | |||
| 288 | $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) | ||
| 289 | $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 290 | |||
| 291 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | ||
| 292 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | ||
| 293 | |||
| 294 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/test/riptest b/src/lib/libssl/src/test/riptest new file mode 100644 index 0000000000..8685d0ce53 --- /dev/null +++ b/src/lib/libssl/src/test/riptest | |||
| Binary files differ | |||
diff --git a/src/lib/libssl/src/test/test.txt b/src/lib/libssl/src/test/test.txt new file mode 100644 index 0000000000..c6d8d50ba9 --- /dev/null +++ b/src/lib/libssl/src/test/test.txt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | test=./test.txt | ||
| 4 | |||
| 5 | cat $0 >$test; | ||
| 6 | |||
| 7 | for i in rc4 des-cfb des-ofb des-ecb des-cbc des-ede des-ede3 \ | ||
| 8 | des-cbc-ede des-cbc-ede3 idea-ecb idea-cfb idea-ofb idea-cbc | ||
| 9 | do | ||
| 10 | echo $i | ||
| 11 | ../apps/ssleay $i -e -k test < $test > $test.$i.cipher | ||
| 12 | ../apps/ssleay $i -d -k test < $test.$i.cipher >$test.$i.clear | ||
| 13 | cmp $test $test.$i.clear | ||
| 14 | if [ $? != 0 ] | ||
| 15 | then | ||
| 16 | exit 1 | ||
| 17 | else | ||
| 18 | /bin/rm $test.$i.cipher $test.$i.clear | ||
| 19 | fi | ||
| 20 | |||
| 21 | echo $i base64 | ||
| 22 | ../apps/ssleay $i -a -e -k test < $test > $test.$i.cipher | ||
| 23 | ../apps/ssleay $i -a -d -k test < $test.$i.cipher >$test.$i.clear | ||
| 24 | cmp $test $test.$i.clear | ||
| 25 | if [ $? != 0 ] | ||
| 26 | then | ||
| 27 | exit 1 | ||
| 28 | else | ||
| 29 | /bin/rm $test.$i.cipher $test.$i.clear | ||
| 30 | fi | ||
| 31 | done | ||
diff --git a/src/lib/libssl/src/test/testkey.pem b/src/lib/libssl/src/test/testkey.pem new file mode 100644 index 0000000000..edd5a5773f --- /dev/null +++ b/src/lib/libssl/src/test/testkey.pem | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | -----BEGIN RSA PRIVATE KEY----- | ||
| 2 | -----END RSA PRIVATE KEY----- | ||
diff --git a/src/lib/libssl/src/test/testreq.pem b/src/lib/libssl/src/test/testreq.pem new file mode 100644 index 0000000000..1311fa7785 --- /dev/null +++ b/src/lib/libssl/src/test/testreq.pem | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 2 | MIIBQjCB7QIBADCBhzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQx | ||
| 3 | ETAPBgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdFNvZnQgUHR5IEx0ZDET | ||
| 4 | MBEGA1UEAxMKRXJpYyBZb3VuZzEfMB0GCSqGSIb3DQEJARYQZWF5QG1pbmNvbS5v | ||
| 5 | ei5hdTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDVKdT5QB2ZojtNQGjA/9J7s2o4 | ||
| 6 | RNkuSq8l377uWLAyMljtdkcoRsvUy5lZ997UDHFTbVFA038ZBrmw7l5EyHeXAgMB | ||
| 7 | AAGgADANBgkqhkiG9w0BAQQFAANBAKnaFr4u7PTdfmpjiX/H8Ho4UWGVRWUlvD2R | ||
| 8 | /D9yoTj7TN3uODx2BD0drErVBe/Zjv81vhH6Yo3cJO/hRS3A7jw= | ||
| 9 | -----END CERTIFICATE REQUEST----- | ||
diff --git a/src/lib/libssl/src/tools/Makefile.ssl b/src/lib/libssl/src/tools/Makefile.ssl new file mode 100644 index 0000000000..537e97d268 --- /dev/null +++ b/src/lib/libssl/src/tools/Makefile.ssl | |||
| @@ -0,0 +1,54 @@ | |||
| 1 | # | ||
| 2 | # SSLeay/tools/Makefile | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= tools | ||
| 6 | TOP= .. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I.. -I../../include | ||
| 9 | CFLAG=-g | ||
| 10 | INSTALLTOP=/usr/local/ssl | ||
| 11 | MAKE= make -f Makefile.ssl | ||
| 12 | MAKEDEPEND= makedepend -f Makefile.ssl | ||
| 13 | MAKEFILE= Makefile.ssl | ||
| 14 | |||
| 15 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 16 | |||
| 17 | GENERAL=Makefile.ssl | ||
| 18 | TEST= | ||
| 19 | APPS= c_hash c_info c_issuer c_name c_rehash | ||
| 20 | |||
| 21 | all: | ||
| 22 | |||
| 23 | install: | ||
| 24 | @for i in $(APPS) ; \ | ||
| 25 | do \ | ||
| 26 | (cp $$i $(INSTALLTOP)/bin/$$i; \ | ||
| 27 | chmod 755 $(INSTALLTOP)/bin/$$i ); \ | ||
| 28 | done; | ||
| 29 | |||
| 30 | files: | ||
| 31 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 32 | |||
| 33 | links: | ||
| 34 | /bin/rm -f Makefile | ||
| 35 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 36 | |||
| 37 | lint: | ||
| 38 | |||
| 39 | tags: | ||
| 40 | |||
| 41 | errors: | ||
| 42 | |||
| 43 | depend: | ||
| 44 | |||
| 45 | dclean: | ||
| 46 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 47 | mv -f Makefile.new $(MAKEFILE) | ||
| 48 | |||
| 49 | clean: | ||
| 50 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff | ||
| 51 | |||
| 52 | errors: | ||
| 53 | |||
| 54 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/src/util/mklink.sh b/src/lib/libssl/src/util/mklink.sh new file mode 100644 index 0000000000..1e052ed6ee --- /dev/null +++ b/src/lib/libssl/src/util/mklink.sh | |||
| @@ -0,0 +1,35 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | # | ||
| 3 | # A bit of an ugly shell script used to actually 'link' files. | ||
| 4 | # Used by 'make links' | ||
| 5 | # | ||
| 6 | |||
| 7 | PATH=$PATH:.:util:../util:../../util | ||
| 8 | export PATH | ||
| 9 | |||
| 10 | from=$1 | ||
| 11 | shift | ||
| 12 | |||
| 13 | here=`pwd` | ||
| 14 | tmp=`dirname $from` | ||
| 15 | while [ "$tmp"x != "x" -a "$tmp"x != ".x" ] | ||
| 16 | do | ||
| 17 | t=`basename $here` | ||
| 18 | here=`dirname $here` | ||
| 19 | to="/$t$to" | ||
| 20 | tmp=`dirname $tmp` | ||
| 21 | done | ||
| 22 | to=..$to | ||
| 23 | |||
| 24 | #echo from=$from | ||
| 25 | #echo to =$to | ||
| 26 | #exit 1 | ||
| 27 | |||
| 28 | if [ "$*"x != "x" ]; then | ||
| 29 | for i in $* | ||
| 30 | do | ||
| 31 | /bin/rm -f $from/$i | ||
| 32 | point.sh $to/$i $from/$i | ||
| 33 | done | ||
| 34 | fi | ||
| 35 | exit 0; | ||
diff --git a/src/lib/libssl/src/util/ranlib.sh b/src/lib/libssl/src/util/ranlib.sh new file mode 100644 index 0000000000..543f712c6b --- /dev/null +++ b/src/lib/libssl/src/util/ranlib.sh | |||
| @@ -0,0 +1,23 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | cwd=`pwd` | ||
| 4 | cd /tmp | ||
| 5 | |||
| 6 | if [ -s /bin/ranlib ] ; then | ||
| 7 | RL=/bin/ranlib | ||
| 8 | else if [ -s /usr/bin/ranlib ] ; then | ||
| 9 | RL=/usr/bin/ranlib | ||
| 10 | fi | ||
| 11 | fi | ||
| 12 | |||
| 13 | if [ "x$RL" != "x" ] | ||
| 14 | then | ||
| 15 | case "$1" in | ||
| 16 | /*) | ||
| 17 | $RL "$1" | ||
| 18 | ;; | ||
| 19 | *) | ||
| 20 | $RL "$cwd/$1" | ||
| 21 | ;; | ||
| 22 | esac | ||
| 23 | fi | ||
diff --git a/src/lib/libssl/src/util/sep_lib.sh b/src/lib/libssl/src/util/sep_lib.sh new file mode 100644 index 0000000000..2348db874e --- /dev/null +++ b/src/lib/libssl/src/util/sep_lib.sh | |||
| @@ -0,0 +1,37 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | cwd=`pwd` | ||
| 4 | /bin/rm -fr tmp/* | ||
| 5 | |||
| 6 | cd crypto/des | ||
| 7 | make -f Makefile.uni tar | ||
| 8 | make -f Makefile.uni tar_lit | ||
| 9 | /bin/mv libdes.tgz $cwd/tmp | ||
| 10 | /bin/mv libdes-l.tgz $cwd/tmp | ||
| 11 | cd $cwd | ||
| 12 | |||
| 13 | for name in md5 sha cast bf idea rc4 rc2 | ||
| 14 | do | ||
| 15 | echo doing $name | ||
| 16 | (cd crypto; tar cfh - $name)|(cd tmp; tar xf -) | ||
| 17 | cd tmp/$name | ||
| 18 | /bin/rm -f Makefile | ||
| 19 | /bin/rm -f Makefile.ssl | ||
| 20 | /bin/rm -f Makefile.ssl.orig | ||
| 21 | /bin/rm -f *.old | ||
| 22 | /bin/mv Makefile.uni Makefile | ||
| 23 | |||
| 24 | cp $cwd/util/ranlib.sh . | ||
| 25 | chmod +x ranlib.sh | ||
| 26 | |||
| 27 | if [ -d asm ]; then | ||
| 28 | mkdir asm/perlasm | ||
| 29 | cp $cwd/crypto/perlasm/*.pl asm/perlasm | ||
| 30 | fi | ||
| 31 | cd .. | ||
| 32 | tar cf - $name|gzip >$name.tgz | ||
| 33 | # /bin/rm -fr $name | ||
| 34 | cd $cwd | ||
| 35 | done | ||
| 36 | |||
| 37 | |||
diff --git a/src/lib/libssl/src/util/ssldir.pl b/src/lib/libssl/src/util/ssldir.pl new file mode 100644 index 0000000000..10584686da --- /dev/null +++ b/src/lib/libssl/src/util/ssldir.pl | |||
| @@ -0,0 +1,52 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | |||
| 3 | $#ARGV == 0 || die "usage: ssldir.pl /new/path\n"; | ||
| 4 | @files=('crypto/cryptlib.h', | ||
| 5 | 'Makefile.ssl', | ||
| 6 | 'tools/c_rehash', | ||
| 7 | 'util/mk1mf.pl', | ||
| 8 | ); | ||
| 9 | |||
| 10 | %cryptlib=( | ||
| 11 | '\sX509_CERT_AREA\s',"#define X509_CERT_AREA\t\t".'"%s"', | ||
| 12 | '\sX509_CERT_DIR\s', "#define X509_CERT_DIR\t\t".'"%s/certs"', | ||
| 13 | '\sX509_CERT_FILE\s', "#define X509_CERT_FILE\t\t".'"%s/cert.pem"', | ||
| 14 | '\sX509_PRIVATE_DIR\s',"#define X509_PRIVATE_DIR\t".'"%s/private"', | ||
| 15 | ); | ||
| 16 | |||
| 17 | %Makefile_ssl=( | ||
| 18 | '^INSTALLTOP=','INSTALLTOP=%s', | ||
| 19 | ); | ||
| 20 | |||
| 21 | %c_rehash=( | ||
| 22 | '^DIR=', 'DIR=%s', | ||
| 23 | ); | ||
| 24 | |||
| 25 | %mk1mf=( | ||
| 26 | '^$INSTALLTOP=','$INSTALLTOP="%s";', | ||
| 27 | ); | ||
| 28 | |||
| 29 | &dofile("crypto/cryptlib.h",$ARGV[0],%cryptlib); | ||
| 30 | &dofile("Makefile.ssl",$ARGV[0],%Makefile_ssl); | ||
| 31 | &dofile("tools/c_rehash",$ARGV[0],%c_rehash); | ||
| 32 | &dofile("util/mk1mf.pl",$ARGV[0],%mk1mf); | ||
| 33 | |||
| 34 | sub dofile | ||
| 35 | { | ||
| 36 | ($f,$p,%m)=@_; | ||
| 37 | |||
| 38 | open(IN,"<$f") || die "unable to open $f:$!\n"; | ||
| 39 | @a=<IN>; | ||
| 40 | close(IN); | ||
| 41 | foreach $k (keys %m) | ||
| 42 | { | ||
| 43 | grep(/$k/ && ($_=sprintf($m{$k}."\n",$p)),@a); | ||
| 44 | } | ||
| 45 | ($ff=$f) =~ s/\..*$//; | ||
| 46 | open(OUT,">$ff.new") || die "unable to open $f:$!\n"; | ||
| 47 | print OUT @a; | ||
| 48 | close(OUT); | ||
| 49 | rename($f,"$ff.old") || die "unable to rename $f\n"; | ||
| 50 | rename("$ff.new",$f) || die "unable to rename $ff.new\n"; | ||
| 51 | } | ||
| 52 | |||
diff --git a/src/lib/libssl/src/util/up_ver.pl b/src/lib/libssl/src/util/up_ver.pl new file mode 100644 index 0000000000..32c086b2aa --- /dev/null +++ b/src/lib/libssl/src/util/up_ver.pl | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | #!/usr/bin/perl | ||
| 2 | # | ||
| 3 | # Up the version numbers in the files. | ||
| 4 | # | ||
| 5 | |||
| 6 | @files=( | ||
| 7 | "crypto/crypto.h", | ||
| 8 | "crypto/des/ecb_enc.c", | ||
| 9 | "crypto/idea/i_ecb.c", | ||
| 10 | "crypto/lhash/lhash.c", | ||
| 11 | "crypto/conf/conf.c", | ||
| 12 | "crypto/md2/md2_dgst.c", | ||
| 13 | "crypto/md5/md5_dgst.c", | ||
| 14 | "crypto/ripemd/rmd_dgst.c", | ||
| 15 | "crypto/pem/pem_lib.c", | ||
| 16 | "crypto/bn/bn_lib.c", | ||
| 17 | "crypto/dh/dh_lib.c", | ||
| 18 | "crypto/rc2/rc2_ecb.c", | ||
| 19 | "crypto/rc4/rc4_skey.c", | ||
| 20 | "crypto/rc5/rc5_ecb.c", | ||
| 21 | "crypto/bf/bf_ecb.c", | ||
| 22 | "crypto/cast/c_ecb.c", | ||
| 23 | "crypto/rsa/rsa_lib.c", | ||
| 24 | "crypto/dsa/dsa_lib.c", | ||
| 25 | "crypto/sha/sha1dgst.c", | ||
| 26 | "crypto/sha/sha_dgst.c", | ||
| 27 | "crypto/asn1/asn1_lib.c", | ||
| 28 | "crypto/x509/x509_vfy.c", | ||
| 29 | "crypto/evp/evp_enc.c", | ||
| 30 | "crypto/rand/md_rand.c", | ||
| 31 | "crypto/stack/stack.c", | ||
| 32 | "crypto/txt_db/txt_db.c", | ||
| 33 | "crypto/cversion.c", | ||
| 34 | "ssl/ssl_lib.c", | ||
| 35 | "ssl/s2_lib.c", | ||
| 36 | "ssl/s3_lib.c", | ||
| 37 | "ssl/t1_lib.c", | ||
| 38 | "README", | ||
| 39 | ); | ||
| 40 | |||
| 41 | @month=('Jan','Feb','Mar','Apr','May','Jun', | ||
| 42 | 'Jul','Aug','Sep','Oct','Nov','Dec'); | ||
| 43 | @a=localtime(time()); | ||
| 44 | $time=sprintf("%02d-%s-%04d",$a[3],$month[$a[4]],$a[5]+1900); | ||
| 45 | |||
| 46 | $ver=$ARGV[0]; | ||
| 47 | ($ver ne "") || die "no version number specified\n"; | ||
| 48 | ($a,$b,$c,$d)=unpack('axaxac',$ver); | ||
| 49 | $d=defined($d)?$d-96:0; | ||
| 50 | $xver=sprintf("%x%x%x%x",$a,$b,$c,$d); | ||
| 51 | |||
| 52 | foreach $file (@files) | ||
| 53 | { | ||
| 54 | open(IN,"<$file") || die "unable to open $file:$!\n"; | ||
| 55 | open(OUT,">$file.new") || die "unable to open $file.new:$!\n"; | ||
| 56 | $found=0; | ||
| 57 | |||
| 58 | print STDERR "$file:"; | ||
| 59 | |||
| 60 | while (<IN>) | ||
| 61 | { | ||
| 62 | if ((s/SSLeay \d\.\d.\d[^"]*(\"|\s)/SSLeay $ver $time\1/) || | ||
| 63 | s/^(\#define\s+SSLEAY_VERSION_NUMBER\s+0x)[0-9a-zA-Z]+(.*)$/$1$xver$2/) | ||
| 64 | { | ||
| 65 | print STDERR " Done"; | ||
| 66 | $found++; | ||
| 67 | print OUT; | ||
| 68 | while (<IN>) { print OUT; } | ||
| 69 | last; | ||
| 70 | } | ||
| 71 | print OUT; | ||
| 72 | } | ||
| 73 | print STDERR "\n"; | ||
| 74 | close(IN); | ||
| 75 | close(OUT); | ||
| 76 | (!$found) && die "unable to update the version number in $file\n"; | ||
| 77 | rename($file,"$file.old") || die "unable to rename $file:$!\n"; | ||
| 78 | rename("$file.new",$file) || die "unable to rename $file.new:$!\n"; | ||
| 79 | } | ||
diff --git a/src/lib/libssl/ssl-patent/Makefile b/src/lib/libssl/ssl-patent/Makefile new file mode 100644 index 0000000000..3816de81ea --- /dev/null +++ b/src/lib/libssl/ssl-patent/Makefile | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | |||
| 2 | LIB= ssl | ||
| 3 | |||
| 4 | SSLEAYDIST= src-patent | ||
| 5 | |||
| 6 | LSSL_SRC= ${.CURDIR}/../${SSLEAYDIST}/ssl | ||
| 7 | LCRYPTO_SRC= ${.CURDIR}/../${SSLEAYDIST}/crypto | ||
| 8 | |||
| 9 | .if ${MACHINE_ARCH} == "i386" | ||
| 10 | CFLAGS+= -DL_ENDIAN -DBN_ASM | ||
| 11 | .else | ||
| 12 | .if ${MACHINE} == "arc" | ||
| 13 | CFLAGS+= -DL_ENDIAN | ||
| 14 | .else | ||
| 15 | .if ${MACHINE} == "galileo" | ||
| 16 | CFLAGS+= -DL_ENDIAN | ||
| 17 | .else | ||
| 18 | .if ${MACHINE} == "pmax" | ||
| 19 | CFLAGS+= -DL_ENDIAN | ||
| 20 | .else | ||
| 21 | .if ${MACHINE_ARCH} == "alpha" | ||
| 22 | # no ENDIAN stuff defined for alpha | ||
| 23 | .else | ||
| 24 | CFLAGS+= -DB_ENDIAN | ||
| 25 | .endif | ||
| 26 | .endif | ||
| 27 | .endif | ||
| 28 | .endif | ||
| 29 | .endif | ||
| 30 | |||
| 31 | CFLAGS+= -DNO_IDEA -DTERMIOS -DANSI_SOURCE | ||
| 32 | CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST} | ||
| 33 | CFLAGS+= -I${LSSL_SRC} -I${LCRYPTO_SRC} | ||
| 34 | CFLAGS+= -I${LCRYPTO_SRC}/md2 | ||
| 35 | CFLAGS+= -I${LCRYPTO_SRC}/md5 | ||
| 36 | CFLAGS+= -I${LCRYPTO_SRC}/sha | ||
| 37 | CFLAGS+= -I${LCRYPTO_SRC}/mdc2 | ||
| 38 | CFLAGS+= -I${LCRYPTO_SRC}/hmac | ||
| 39 | CFLAGS+= -I${LCRYPTO_SRC}/ripemd | ||
| 40 | CFLAGS+= -I${LCRYPTO_SRC}/des | ||
| 41 | CFLAGS+= -I${LCRYPTO_SRC}/rc2 | ||
| 42 | CFLAGS+= -I${LCRYPTO_SRC}/rc4 | ||
| 43 | CFLAGS+= -I${LCRYPTO_SRC}/rc5 | ||
| 44 | CFLAGS+= -I${LCRYPTO_SRC}/idea | ||
| 45 | CFLAGS+= -I${LCRYPTO_SRC}/bf | ||
| 46 | CFLAGS+= -I${LCRYPTO_SRC}/cast | ||
| 47 | CFLAGS+= -I${LCRYPTO_SRC}/bn | ||
| 48 | CFLAGS+= -I${LCRYPTO_SRC}/rsa | ||
| 49 | CFLAGS+= -I${LCRYPTO_SRC}/dsa | ||
| 50 | CFLAGS+= -I${LCRYPTO_SRC}/dh | ||
| 51 | CFLAGS+= -I${LCRYPTO_SRC}/buffer | ||
| 52 | CFLAGS+= -I${LCRYPTO_SRC}/bio | ||
| 53 | CFLAGS+= -I${LCRYPTO_SRC}/stack | ||
| 54 | CFLAGS+= -I${LCRYPTO_SRC}/lhash | ||
| 55 | CFLAGS+= -I${LCRYPTO_SRC}/rand | ||
| 56 | CFLAGS+= -I${LCRYPTO_SRC}/err | ||
| 57 | CFLAGS+= -I${LCRYPTO_SRC}/objects | ||
| 58 | CFLAGS+= -I${LCRYPTO_SRC}/evp | ||
| 59 | CFLAGS+= -I${LCRYPTO_SRC}/pem | ||
| 60 | CFLAGS+= -I${LCRYPTO_SRC}/asn1 | ||
| 61 | CFLAGS+= -I${LCRYPTO_SRC}/x509 | ||
| 62 | CFLAGS+= -I${LCRYPTO_SRC}/conf | ||
| 63 | CFLAGS+= -I${LCRYPTO_SRC}/txt_db | ||
| 64 | CFLAGS+= -I${LCRYPTO_SRC}/pkcs7 | ||
| 65 | |||
| 66 | SRCS= s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c \ | ||
| 67 | s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c \ | ||
| 68 | s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c \ | ||
| 69 | t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c \ | ||
| 70 | ssl_lib.c ssl_err2.c ssl_cert.c ssl_sess.c \ | ||
| 71 | ssl_ciph.c ssl_stat.c ssl_rsa.c \ | ||
| 72 | ssl_asn1.c ssl_txt.c ssl_algs.c \ | ||
| 73 | bio_ssl.c ssl_err.c | ||
| 74 | |||
| 75 | HDRS= ssl.h ssl2.h ssl3.h ssl23.h tls1.h | ||
| 76 | |||
| 77 | .PATH: ${LSSL_SRC} | ||
| 78 | |||
| 79 | includes: | ||
| 80 | @test -d ${DESTDIR}/usr/include/ssl || mkdir ${DESTDIR}/usr/include/ssl | ||
| 81 | @cd ${LSSL_SRC}; for i in $(HDRS); do \ | ||
| 82 | j="cmp -s $$i ${DESTDIR}/usr/include/ssl/`basename $$i` || \ | ||
| 83 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ | ||
| 84 | $$i ${DESTDIR}/usr/include/ssl"; \ | ||
| 85 | echo $$j; \ | ||
| 86 | eval "$$j"; \ | ||
| 87 | done | ||
| 88 | |||
| 89 | |||
| 90 | .include <bsd.lib.mk> | ||
diff --git a/src/lib/libssl/ssl-patent/shlib_version b/src/lib/libssl/ssl-patent/shlib_version new file mode 100644 index 0000000000..893819d18f --- /dev/null +++ b/src/lib/libssl/ssl-patent/shlib_version | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | major=1 | ||
| 2 | minor=1 | ||
diff --git a/src/lib/libssl/ssl/Makefile b/src/lib/libssl/ssl/Makefile new file mode 100644 index 0000000000..7a2b6da6e0 --- /dev/null +++ b/src/lib/libssl/ssl/Makefile | |||
| @@ -0,0 +1,90 @@ | |||
| 1 | |||
| 2 | LIB= ssl | ||
| 3 | |||
| 4 | SSLEAYDIST= src | ||
| 5 | |||
| 6 | LSSL_SRC= ${.CURDIR}/../${SSLEAYDIST}/ssl | ||
| 7 | LCRYPTO_SRC= ${.CURDIR}/../${SSLEAYDIST}/crypto | ||
| 8 | |||
| 9 | .if ${MACHINE_ARCH} == "i386" | ||
| 10 | CFLAGS+= -DL_ENDIAN -DBN_ASM | ||
| 11 | .else | ||
| 12 | .if ${MACHINE_ARCH} == "arc" | ||
| 13 | CFLAGS+= -DL_ENDIAN | ||
| 14 | .else | ||
| 15 | .if ${MACHINE_ARCH} == "pmax" | ||
| 16 | CFLAGS+= -DL_ENDIAN | ||
| 17 | .else | ||
| 18 | .if ${MACHINE_ARCH} == "alpha" | ||
| 19 | # no ENDIAN stuff defined for alpha | ||
| 20 | .else | ||
| 21 | CFLAGS+= -DB_ENDIAN | ||
| 22 | .endif | ||
| 23 | .endif | ||
| 24 | .endif | ||
| 25 | .endif | ||
| 26 | |||
| 27 | CFLAGS+= -DNO_IDEA -DTERMIOS -DANSI_SOURCE | ||
| 28 | CFLAGS+= -I${.CURDIR}/../${SSLEAYDIST} | ||
| 29 | CFLAGS+= -I${LSSL_SRC} -I${LCRYPTO_SRC} | ||
| 30 | CFLAGS+= -I${LCRYPTO_SRC}/md2 | ||
| 31 | CFLAGS+= -I${LCRYPTO_SRC}/md5 | ||
| 32 | CFLAGS+= -I${LCRYPTO_SRC}/sha | ||
| 33 | CFLAGS+= -I${LCRYPTO_SRC}/mdc2 | ||
| 34 | CFLAGS+= -I${LCRYPTO_SRC}/hmac | ||
| 35 | CFLAGS+= -I${LCRYPTO_SRC}/ripemd | ||
| 36 | CFLAGS+= -I${LCRYPTO_SRC}/des | ||
| 37 | CFLAGS+= -I${LCRYPTO_SRC}/rc2 | ||
| 38 | CFLAGS+= -I${LCRYPTO_SRC}/rc4 | ||
| 39 | CFLAGS+= -I${LCRYPTO_SRC}/rc5 | ||
| 40 | CFLAGS+= -I${LCRYPTO_SRC}/idea | ||
| 41 | CFLAGS+= -I${LCRYPTO_SRC}/bf | ||
| 42 | CFLAGS+= -I${LCRYPTO_SRC}/cast | ||
| 43 | CFLAGS+= -I${LCRYPTO_SRC}/bn | ||
| 44 | CFLAGS+= -I${LCRYPTO_SRC}/rsa | ||
| 45 | CFLAGS+= -I${LCRYPTO_SRC}/dsa | ||
| 46 | CFLAGS+= -I${LCRYPTO_SRC}/dh | ||
| 47 | CFLAGS+= -I${LCRYPTO_SRC}/buffer | ||
| 48 | CFLAGS+= -I${LCRYPTO_SRC}/bio | ||
| 49 | CFLAGS+= -I${LCRYPTO_SRC}/stack | ||
| 50 | CFLAGS+= -I${LCRYPTO_SRC}/lhash | ||
| 51 | CFLAGS+= -I${LCRYPTO_SRC}/rand | ||
| 52 | CFLAGS+= -I${LCRYPTO_SRC}/err | ||
| 53 | CFLAGS+= -I${LCRYPTO_SRC}/objects | ||
| 54 | CFLAGS+= -I${LCRYPTO_SRC}/evp | ||
| 55 | CFLAGS+= -I${LCRYPTO_SRC}/pem | ||
| 56 | CFLAGS+= -I${LCRYPTO_SRC}/asn1 | ||
| 57 | CFLAGS+= -I${LCRYPTO_SRC}/x509 | ||
| 58 | CFLAGS+= -I${LCRYPTO_SRC}/conf | ||
| 59 | CFLAGS+= -I${LCRYPTO_SRC}/txt_db | ||
| 60 | CFLAGS+= -I${LCRYPTO_SRC}/pkcs7 | ||
| 61 | |||
| 62 | SRCS= s2_meth.c s2_srvr.c s2_clnt.c s2_lib.c s2_enc.c s2_pkt.c \ | ||
| 63 | s3_meth.c s3_srvr.c s3_clnt.c s3_lib.c s3_enc.c s3_pkt.c s3_both.c \ | ||
| 64 | s23_meth.c s23_srvr.c s23_clnt.c s23_lib.c s23_pkt.c \ | ||
| 65 | t1_meth.c t1_srvr.c t1_clnt.c t1_lib.c t1_enc.c \ | ||
| 66 | ssl_lib.c ssl_err2.c ssl_cert.c ssl_sess.c \ | ||
| 67 | ssl_ciph.c ssl_stat.c ssl_rsa.c \ | ||
| 68 | ssl_asn1.c ssl_txt.c ssl_algs.c \ | ||
| 69 | bio_ssl.c ssl_err.c | ||
| 70 | |||
| 71 | HDRS= ssl.h ssl2.h ssl3.h ssl23.h tls1.h | ||
| 72 | |||
| 73 | .PATH: ${LSSL_SRC} | ||
| 74 | |||
| 75 | includes: | ||
| 76 | @test -d ${DESTDIR}/usr/include/ssl || mkdir ${DESTDIR}/usr/include/ssl | ||
| 77 | @d=`mktemp -d /tmp/libsslXXXXXXXXXX`; \ | ||
| 78 | cd ${LSSL_SRC}; for i in $(HDRS); do \ | ||
| 79 | f=`basename $$i`; \ | ||
| 80 | j="sed 's/#include \"\\([^\"]*\\)\"/#include <ssl\\/\\1>/' \ | ||
| 81 | $$i >$$d/$$f && \ | ||
| 82 | (cmp -s $$d/$$f ${DESTDIR}/usr/include/ssl/$$f || \ | ||
| 83 | ${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 \ | ||
| 84 | $$d/$$f ${DESTDIR}/usr/include/ssl)"; \ | ||
| 85 | echo $$j; \ | ||
| 86 | eval "$$j"; \ | ||
| 87 | done; \ | ||
| 88 | rm -rf $$d | ||
| 89 | |||
| 90 | .include <bsd.lib.mk> | ||
diff --git a/src/lib/libssl/ssl/shlib_version b/src/lib/libssl/ssl/shlib_version new file mode 100644 index 0000000000..1edea46de9 --- /dev/null +++ b/src/lib/libssl/ssl/shlib_version | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | major=1 | ||
| 2 | minor=0 | ||
diff --git a/src/lib/libssl/ssleay.cnf b/src/lib/libssl/ssleay.cnf new file mode 100644 index 0000000000..c6480ee465 --- /dev/null +++ b/src/lib/libssl/ssleay.cnf | |||
| @@ -0,0 +1,65 @@ | |||
| 1 | # | ||
| 2 | # SSLeay example configuration file. | ||
| 3 | # This is mostly being used for generation of certificate requests. | ||
| 4 | # | ||
| 5 | |||
| 6 | RANDFILE = /dev/arandom | ||
| 7 | |||
| 8 | #################################################################### | ||
| 9 | [ req ] | ||
| 10 | default_bits = 1024 | ||
| 11 | default_keyfile = privkey.pem | ||
| 12 | distinguished_name = req_distinguished_name | ||
| 13 | attributes = req_attributes | ||
| 14 | |||
| 15 | [ req_distinguished_name ] | ||
| 16 | countryName = Country Name (2 letter code) | ||
| 17 | #countryName_default = AU | ||
| 18 | countryName_min = 2 | ||
| 19 | countryName_max = 2 | ||
| 20 | |||
| 21 | stateOrProvinceName = State or Province Name (full name) | ||
| 22 | #stateOrProvinceName_default = Some-State | ||
| 23 | |||
| 24 | localityName = Locality Name (eg, city) | ||
| 25 | |||
| 26 | 0.organizationName = Organization Name (eg, company) | ||
| 27 | #0.organizationName_default = Internet Widgits Pty Ltd | ||
| 28 | |||
| 29 | # we can do this but it is not needed normally :-) | ||
| 30 | #1.organizationName = Second Organization Name (eg, company) | ||
| 31 | #1.organizationName_default = CryptSoft Pty Ltd | ||
| 32 | |||
| 33 | organizationalUnitName = Organizational Unit Name (eg, section) | ||
| 34 | #organizationalUnitName_default = | ||
| 35 | |||
| 36 | commonName = Common Name (eg, fully qualified host name) | ||
| 37 | commonName_max = 64 | ||
| 38 | |||
| 39 | emailAddress = Email Address | ||
| 40 | emailAddress_max = 64 | ||
| 41 | |||
| 42 | [ req_attributes ] | ||
| 43 | challengePassword = A challenge password | ||
| 44 | challengePassword_min = 4 | ||
| 45 | challengePassword_max = 20 | ||
| 46 | |||
| 47 | unstructuredName = An optional company name | ||
| 48 | |||
| 49 | [ x509v3_extensions ] | ||
| 50 | |||
| 51 | nsCaRevocationUrl = http://www.cryptsoft.com/ca-crl.pem | ||
| 52 | nsComment = "This is a comment" | ||
| 53 | |||
| 54 | # under ASN.1, the 0 bit would be encoded as 80 | ||
| 55 | nsCertType = 0x40 | ||
| 56 | |||
| 57 | #nsBaseUrl | ||
| 58 | #nsRevocationUrl | ||
| 59 | #nsRenewalUrl | ||
| 60 | #nsCaPolicyUrl | ||
| 61 | #nsSslServerName | ||
| 62 | #nsCertSequence | ||
| 63 | #nsCertExt | ||
| 64 | #nsDataType | ||
| 65 | |||
diff --git a/src/lib/libssl/test/.rnd b/src/lib/libssl/test/.rnd new file mode 100644 index 0000000000..234970e241 --- /dev/null +++ b/src/lib/libssl/test/.rnd | |||
| Binary files differ | |||
diff --git a/src/lib/libssl/test/Makefile.ssl b/src/lib/libssl/test/Makefile.ssl new file mode 100644 index 0000000000..b3de76751e --- /dev/null +++ b/src/lib/libssl/test/Makefile.ssl | |||
| @@ -0,0 +1,294 @@ | |||
| 1 | # | ||
| 2 | # test/Makefile.ssl | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= test | ||
| 6 | TOP= .. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I../include | ||
| 9 | CFLAG= -g | ||
| 10 | INSTALLTOP= /usr/local/ssl | ||
| 11 | MAKEFILE= Makefile.ssl | ||
| 12 | MAKE= make -f $(MAKEFILE) | ||
| 13 | MAKEDEPEND= makedepend -f$(MAKEFILE) | ||
| 14 | |||
| 15 | PEX_LIBS= | ||
| 16 | EX_LIBS= #-lnsl -lsocket | ||
| 17 | |||
| 18 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 19 | |||
| 20 | GENERAL=Makefile.ssl | ||
| 21 | |||
| 22 | DLIBCRYPTO= ../libcrypto.a | ||
| 23 | DLIBSSL= ../libssl.a | ||
| 24 | LIBCRYPTO= -L.. -lcrypto | ||
| 25 | LIBSSL= -L.. -lssl | ||
| 26 | |||
| 27 | BNTEST= bntest | ||
| 28 | EXPTEST= exptest | ||
| 29 | IDEATEST= ideatest | ||
| 30 | SHATEST= shatest | ||
| 31 | SHA1TEST= sha1test | ||
| 32 | MDC2TEST= mdc2test | ||
| 33 | RMDTEST= rmdtest | ||
| 34 | MD2TEST= md2test | ||
| 35 | MD5TEST= md5test | ||
| 36 | HMACTEST= hmactest | ||
| 37 | RC2TEST= rc2test | ||
| 38 | RC4TEST= rc4test | ||
| 39 | RC5TEST= rc5test | ||
| 40 | BFTEST= bftest | ||
| 41 | CASTTEST= casttest | ||
| 42 | DESTEST= destest | ||
| 43 | RANDTEST= randtest | ||
| 44 | DHTEST= dhtest | ||
| 45 | DSATEST= dsatest | ||
| 46 | METHTEST= methtest | ||
| 47 | SSLTEST= ssltest | ||
| 48 | |||
| 49 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ | ||
| 50 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | ||
| 51 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | ||
| 52 | $(RANDTEST) $(DHTEST) \ | ||
| 53 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) | ||
| 54 | |||
| 55 | # $(METHTEST) | ||
| 56 | |||
| 57 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD5TEST).o $(HMACTEST).o \ | ||
| 58 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | ||
| 59 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | ||
| 60 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ | ||
| 61 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o | ||
| 62 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ | ||
| 63 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | ||
| 64 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | ||
| 65 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ | ||
| 66 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c | ||
| 67 | |||
| 68 | EXHEADER= | ||
| 69 | HEADER= $(EXHEADER) | ||
| 70 | |||
| 71 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 72 | |||
| 73 | top: | ||
| 74 | (cd ..; $(MAKE) DIRS=$(DIR) all) | ||
| 75 | |||
| 76 | all: exe | ||
| 77 | |||
| 78 | exe: $(EXE) | ||
| 79 | |||
| 80 | files: | ||
| 81 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 82 | |||
| 83 | links: | ||
| 84 | /bin/rm -f Makefile | ||
| 85 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 86 | |||
| 87 | errors: | ||
| 88 | |||
| 89 | install: | ||
| 90 | |||
| 91 | tags: | ||
| 92 | ctags $(SRC) | ||
| 93 | |||
| 94 | tests: exe apps \ | ||
| 95 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ | ||
| 96 | test_rc2 test_rc4 test_rc5 test_bf test_cast \ | ||
| 97 | test_rand test_enc test_x509 test_rsa test_crl test_sid test_req \ | ||
| 98 | test_pkcs7 test_bn test_verify test_dh test_dsa test_reqgen \ | ||
| 99 | test_ss test_ssl test_ca | ||
| 100 | |||
| 101 | apps: | ||
| 102 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) | ||
| 103 | |||
| 104 | test_des: | ||
| 105 | #./$(DESTEST) | ||
| 106 | |||
| 107 | test_idea: | ||
| 108 | ./$(IDEATEST) | ||
| 109 | |||
| 110 | test_sha: | ||
| 111 | ./$(SHATEST) | ||
| 112 | ./$(SHA1TEST) | ||
| 113 | |||
| 114 | test_mdc2: | ||
| 115 | ./$(MDC2TEST) | ||
| 116 | |||
| 117 | test_md5: | ||
| 118 | ./$(MD5TEST) | ||
| 119 | |||
| 120 | test_hmac: | ||
| 121 | ./$(HMACTEST) | ||
| 122 | |||
| 123 | test_md2: | ||
| 124 | ./$(MD2TEST) | ||
| 125 | |||
| 126 | test_rmd: | ||
| 127 | ./$(RMDTEST) | ||
| 128 | |||
| 129 | test_bf: | ||
| 130 | ./$(BFTEST) | ||
| 131 | |||
| 132 | test_cast: | ||
| 133 | ./$(CASTTEST) | ||
| 134 | |||
| 135 | test_rc2: | ||
| 136 | ./$(RC2TEST) | ||
| 137 | |||
| 138 | test_rc4: | ||
| 139 | ./$(RC4TEST) | ||
| 140 | |||
| 141 | test_rc5: | ||
| 142 | ./$(RC5TEST) | ||
| 143 | |||
| 144 | test_rand: | ||
| 145 | ./$(RANDTEST) | ||
| 146 | |||
| 147 | test_enc: | ||
| 148 | @sh ./testenc | ||
| 149 | |||
| 150 | test_x509: | ||
| 151 | echo test normal x509v1 certificate | ||
| 152 | sh ./tx509 2>/dev/null | ||
| 153 | echo test first x509v3 certificate | ||
| 154 | sh ./tx509 v3-cert1.pem 2>/dev/null | ||
| 155 | echo test second x509v3 certificate | ||
| 156 | sh ./tx509 v3-cert2.pem 2>/dev/null | ||
| 157 | |||
| 158 | test_rsa: | ||
| 159 | @sh ./trsa 2>/dev/null | ||
| 160 | |||
| 161 | test_crl: | ||
| 162 | @sh ./tcrl 2>/dev/null | ||
| 163 | |||
| 164 | test_sid: | ||
| 165 | @sh ./tsid 2>/dev/null | ||
| 166 | |||
| 167 | test_req: | ||
| 168 | @sh ./treq 2>/dev/null | ||
| 169 | @sh ./treq testreq2.pem 2>/dev/null | ||
| 170 | |||
| 171 | test_pkcs7: | ||
| 172 | @sh ./tpkcs7 2>/dev/null | ||
| 173 | @sh ./tpkcs7d 2>/dev/null | ||
| 174 | |||
| 175 | test_bn: | ||
| 176 | @echo 'test a^b%c implementations' | ||
| 177 | ./$(EXPTEST) | ||
| 178 | @echo starting big number library test, could take a while... | ||
| 179 | @(./$(BNTEST)|bc) | awk '{ \ | ||
| 180 | if ($$0 != "0") {print "error"; exit(1); } \ | ||
| 181 | if (((NR+1)%64) == 0) print NR+1," tests done"; }' | ||
| 182 | |||
| 183 | test_verify: | ||
| 184 | @echo "The following command should have some OK's and some failures" | ||
| 185 | @echo "There are definitly a few expired certificates" | ||
| 186 | ../apps/ssleay verify -CApath ../certs ../certs/*.pem | ||
| 187 | |||
| 188 | test_dh: | ||
| 189 | @echo "Generate as set of DH parameters" | ||
| 190 | ./$(DHTEST) | ||
| 191 | |||
| 192 | test_dsa: | ||
| 193 | @echo "Generate as set of DSA parameters" | ||
| 194 | ./$(DSATEST) | ||
| 195 | |||
| 196 | test_reqgen: | ||
| 197 | @echo "Generate and verify a certificate request" | ||
| 198 | @sh ./testgen | ||
| 199 | |||
| 200 | test_ss: | ||
| 201 | @echo "Generate and certify a test certificate" | ||
| 202 | @sh ./testss | ||
| 203 | |||
| 204 | test_ssl: | ||
| 205 | @echo "test SSL protocol" | ||
| 206 | @sh ./testssl | ||
| 207 | |||
| 208 | test_ca: | ||
| 209 | @echo "Generate and certify a test certificate via the 'ca' program" | ||
| 210 | @sh ./testca | ||
| 211 | |||
| 212 | lint: | ||
| 213 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 214 | |||
| 215 | depend: | ||
| 216 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC) | ||
| 217 | |||
| 218 | dclean: | ||
| 219 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 220 | mv -f Makefile.new $(MAKEFILE) | ||
| 221 | |||
| 222 | clean: | ||
| 223 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log | ||
| 224 | |||
| 225 | $(DLIBSSL): | ||
| 226 | (cd ../ssl; $(MAKE)) | ||
| 227 | |||
| 228 | $(DLIBCRYPTO): | ||
| 229 | (cd ../crypto; $(MAKE)) | ||
| 230 | |||
| 231 | $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) | ||
| 232 | $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 233 | |||
| 234 | $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) | ||
| 235 | $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 236 | |||
| 237 | $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) | ||
| 238 | $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 239 | |||
| 240 | $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) | ||
| 241 | $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 242 | |||
| 243 | $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) | ||
| 244 | $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 245 | |||
| 246 | $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) | ||
| 247 | $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 248 | |||
| 249 | $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) | ||
| 250 | $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 251 | |||
| 252 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) | ||
| 253 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 254 | |||
| 255 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) | ||
| 256 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 257 | |||
| 258 | $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) | ||
| 259 | $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 260 | |||
| 261 | $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) | ||
| 262 | $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 263 | |||
| 264 | $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) | ||
| 265 | $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 266 | |||
| 267 | $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) | ||
| 268 | $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 269 | |||
| 270 | $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) | ||
| 271 | $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 272 | |||
| 273 | $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) | ||
| 274 | $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 275 | |||
| 276 | $(DESTEST): $(DESTEST).o $(DLIBCRYPTO) | ||
| 277 | $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 278 | |||
| 279 | $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) | ||
| 280 | $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 281 | |||
| 282 | $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) | ||
| 283 | $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 284 | |||
| 285 | $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) | ||
| 286 | $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 287 | |||
| 288 | $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) | ||
| 289 | $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 290 | |||
| 291 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | ||
| 292 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | ||
| 293 | |||
| 294 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/test/certCA.srl b/src/lib/libssl/test/certCA.srl new file mode 100644 index 0000000000..39f5b69311 --- /dev/null +++ b/src/lib/libssl/test/certCA.srl | |||
| @@ -0,0 +1 @@ | |||
| 71 | |||
diff --git a/src/lib/libssl/test/demoCA/index.txt b/src/lib/libssl/test/demoCA/index.txt new file mode 100644 index 0000000000..e69de29bb2 --- /dev/null +++ b/src/lib/libssl/test/demoCA/index.txt | |||
diff --git a/src/lib/libssl/test/demoCA/private/cakey.pem b/src/lib/libssl/test/demoCA/private/cakey.pem new file mode 100644 index 0000000000..edd5a5773f --- /dev/null +++ b/src/lib/libssl/test/demoCA/private/cakey.pem | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | -----BEGIN RSA PRIVATE KEY----- | ||
| 2 | -----END RSA PRIVATE KEY----- | ||
diff --git a/src/lib/libssl/test/demoCA/serial b/src/lib/libssl/test/demoCA/serial new file mode 100644 index 0000000000..8a0f05e166 --- /dev/null +++ b/src/lib/libssl/test/demoCA/serial | |||
| @@ -0,0 +1 @@ | |||
| 01 | |||
diff --git a/src/lib/libssl/test/dsa-ca.pem b/src/lib/libssl/test/dsa-ca.pem new file mode 100644 index 0000000000..9eb08f3ddd --- /dev/null +++ b/src/lib/libssl/test/dsa-ca.pem | |||
| @@ -0,0 +1,43 @@ | |||
| 1 | -----BEGIN DSA PRIVATE KEY----- | ||
| 2 | Proc-Type: 4,ENCRYPTED | ||
| 3 | DEK-Info: DES-EDE3-CBC,C5B6C7CC9E1FE2C0 | ||
| 4 | |||
| 5 | svCXBcBRhMuU22UXOfiKZA+thmz6KYXpt1Yg5Rd+TYQcQ1MdvNy0B0tkP1SxzDq0 | ||
| 6 | Xh1eMeTML9/9/0rKakgNXXXbpi5RB8t6BmwRSyej89F7nn1mtR3qzoyPRpp15SDl | ||
| 7 | Tn67C+2v+HDF3MFk88hiNCYkNbcmi7TWvChsl8N1r7wdZwtIox56yXdgxw6ZIpa/ | ||
| 8 | par0oUCzN7fiavPgCWz1kfPNSaBQSdxwH7TZi5tMHAr0J3C7a7QRnZfE09R59Uqr | ||
| 9 | zslrq+ndIw1BZAxoY0SlBu+iFOVaBVlwToC4AsHkv7j7l8ITtr7f42YbBa44D9TO | ||
| 10 | uOhONmkk/v3Fso4RaOEzdKZC+hnmmzvHs6TiTWm6yzJgSFwyOUK0eGmKEeVxpcH5 | ||
| 11 | rUOlHOwzen+FFtocZDZAfdFnb7QY7L/boQvyA5A+ZbRG4DUpmBQeQsSaICHM5Rxx | ||
| 12 | 1QaLF413VNPXTLPbW0ilSc2H8x2iZTIVKfd33oSO6NhXPtSYQgfecEF4BvNHY5c4 | ||
| 13 | HovjT4mckbK95bcBzoCHu43vuSQkmZzdYo/ydSZt6zoPavbBLueTpgSbdXiDi827 | ||
| 14 | MVqOsYxGCb+kez0FoDSTgw== | ||
| 15 | -----END DSA PRIVATE KEY----- | ||
| 16 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 17 | MIICUjCCAhECAQAwUjELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx | ||
| 18 | ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDELMAkGA1UEAxMCQ0Ew | ||
| 19 | ggG0MIIBKQYFKw4DAgwwggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaW | ||
| 20 | sxXgUy6P4FmCc5A+dTGZR3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5m | ||
| 21 | rmuINvvsKNzC16W75Sw5JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHk | ||
| 22 | cJVbUM1JAhUA9wcx7fpsBgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVo | ||
| 23 | bzDjaeHls12YuyiGSPzemQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqR | ||
| 24 | CZ228U2cVA9YBu5JdAfOVX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxB | ||
| 25 | F5WS6wG1c6Vqftgy7Q4CuAOBhAACgYAapll6iqz9XrZFlk2GCVcB+KihxWnH7IuH | ||
| 26 | vSLw9YUrJahcBHmbpvt494lF4gC5w3WPM+vXJofbusk4GoQEEsQNMDaah4m49uUq | ||
| 27 | AylOVFJJJXuirVJ+o+0TtOFDITEAl+YZZariXOD7tdOSOl9RLMPC6+daHKS9e68u | ||
| 28 | 3enxhqnDGaAAMAkGBSsOAwIbBQADMAAwLQIVAJGVuFsG/0DBuSZ0jF7ypdU0/G0v | ||
| 29 | AhQfeF5BoMMDbX/kidUVpQ6gadPlZA== | ||
| 30 | -----END CERTIFICATE REQUEST----- | ||
| 31 | -----BEGIN CERTIFICATE----- | ||
| 32 | MIIBrjCCAWwCAQswCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK | ||
| 33 | U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww | ||
| 34 | CgYDVQQDEwNQQ0EwHhcNOTcwNjE1MDIxNDI5WhcNOTcwNzE1MDIxNDI5WjBSMQsw | ||
| 35 | CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu | ||
| 36 | ZXQgV2lkZ2l0cyBQdHkgTHRkMQswCQYDVQQDEwJDQTCBkjAJBgUrDgMCDAUAA4GE | ||
| 37 | AAKBgBqmWXqKrP1etkWWTYYJVwH4qKHFacfsi4e9IvD1hSslqFwEeZum+3j3iUXi | ||
| 38 | ALnDdY8z69cmh9u6yTgahAQSxA0wNpqHibj25SoDKU5UUkkle6KtUn6j7RO04UMh | ||
| 39 | MQCX5hllquJc4Pu105I6X1Esw8Lr51ocpL17ry7d6fGGqcMZMAkGBSsOAwIbBQAD | ||
| 40 | MQAwLgIVAJ4wtQsANPxHo7Q4IQZYsL12SKdbAhUAjJ9n38zxT+iai2164xS+LIfa | ||
| 41 | C1Q= | ||
| 42 | -----END CERTIFICATE----- | ||
| 43 | |||
diff --git a/src/lib/libssl/test/dsa-pca.pem b/src/lib/libssl/test/dsa-pca.pem new file mode 100644 index 0000000000..e3641ad47e --- /dev/null +++ b/src/lib/libssl/test/dsa-pca.pem | |||
| @@ -0,0 +1,49 @@ | |||
| 1 | -----BEGIN DSA PRIVATE KEY----- | ||
| 2 | Proc-Type: 4,ENCRYPTED | ||
| 3 | DEK-Info: DES-EDE3-CBC,F80EEEBEEA7386C4 | ||
| 4 | |||
| 5 | GZ9zgFcHOlnhPoiSbVi/yXc9mGoj44A6IveD4UlpSEUt6Xbse3Fr0KHIUyQ3oGnS | ||
| 6 | mClKoAp/eOTb5Frhto85SzdsxYtac+X1v5XwdzAMy2KowHVk1N8A5jmE2OlkNPNt | ||
| 7 | of132MNlo2cyIRYaa35PPYBGNCmUm7YcYS8O90YtkrQZZTf4+2C4kllhMcdkQwkr | ||
| 8 | FWSWC8YOQ7w0LHb4cX1FejHHom9Nd/0PN3vn3UyySvfOqoR7nbXkrpHXmPIr0hxX | ||
| 9 | RcF0aXcV/CzZ1/nfXWQf4o3+oD0T22SDoVcZY60IzI0oIc3pNCbDV3uKNmgekrFd | ||
| 10 | qOUJ+QW8oWp7oefRx62iBfIeC8DZunohMXaWAQCU0sLQOR4yEdeUCnzCSywe0bG1 | ||
| 11 | diD0KYaEe+Yub1BQH4aLsBgDjardgpJRTQLq0DUvw0/QGO1irKTJzegEDNVBKrVn | ||
| 12 | V4AHOKT1CUKqvGNRP1UnccUDTF6miOAtaj/qpzra7sSk7dkGBvIEeFoAg84kfh9h | ||
| 13 | hVvF1YyzC9bwZepruoqoUwke/WdNIR5ymOVZ/4Liw0JdIOcq+atbdRX08niqIRkf | ||
| 14 | dsZrUj4leo3zdefYUQ7w4N2Ns37yDFq7 | ||
| 15 | -----END DSA PRIVATE KEY----- | ||
| 16 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 17 | MIICVTCCAhMCAQAwUzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClNvbWUtU3RhdGUx | ||
| 18 | ITAfBgNVBAoTGEludGVybmV0IFdpZGdpdHMgUHR5IEx0ZDEMMAoGA1UEAxMDUENB | ||
| 19 | MIIBtTCCASkGBSsOAwIMMIIBHgKBgQCnP26Fv0FqKX3wn0cZMJCaCR3aajMexT2G | ||
| 20 | lrMV4FMuj+BZgnOQPnUxmUd6UvuF5NmmezibaIqEm4fGHrV+hktTW1nPcWUZiG7O | ||
| 21 | Zq5riDb77Cjcwtelu+UsOSZL2ppwGJU3lRBWI/YV7boEXt45T/23Qx+1pGVvzYAR | ||
| 22 | 5HCVW1DNSQIVAPcHMe36bAYD1YWKHKycZedQZmVvAoGATd9MA6aRivUZb1BGJZnl | ||
| 23 | aG8w42nh5bNdmLsohkj83pkEP1+IDJxzJA0gXbkqmj8YlifkYofBe3RiU/xhJ6h6 | ||
| 24 | kQmdtvFNnFQPWAbuSXQHzlV+I84W9srcWmEBfslxtU323DQph2j2XiCTs9v15Als | ||
| 25 | QReVkusBtXOlan7YMu0OArgDgYUAAoGBAKbtuR5AdW+ICjCFe2ixjUiJJzM2IKwe | ||
| 26 | 6NZEMXg39+HQ1UTPTmfLZLps+rZfolHDXuRKMXbGFdSF0nXYzotPCzi7GauwEJTZ | ||
| 27 | yr27ZZjA1C6apGSQ9GzuwNvZ4rCXystVEagAS8OQ4H3D4dWS17Zg31ICb5o4E5r0 | ||
| 28 | z09o/Uz46u0VoAAwCQYFKw4DAhsFAAMxADAuAhUArRubTxsbIXy3AhtjQ943AbNB | ||
| 29 | nSICFQCu+g1iW3jwF+gOcbroD4S/ZcvB3w== | ||
| 30 | -----END CERTIFICATE REQUEST----- | ||
| 31 | -----BEGIN CERTIFICATE----- | ||
| 32 | MIIC0zCCApECAQAwCQYFKw4DAhsFADBTMQswCQYDVQQGEwJBVTETMBEGA1UECBMK | ||
| 33 | U29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJuZXQgV2lkZ2l0cyBQdHkgTHRkMQww | ||
| 34 | CgYDVQQDEwNQQ0EwHhcNOTcwNjE0MjI1NDQ1WhcNOTcwNzE0MjI1NDQ1WjBTMQsw | ||
| 35 | CQYDVQQGEwJBVTETMBEGA1UECBMKU29tZS1TdGF0ZTEhMB8GA1UEChMYSW50ZXJu | ||
| 36 | ZXQgV2lkZ2l0cyBQdHkgTHRkMQwwCgYDVQQDEwNQQ0EwggG1MIIBKQYFKw4DAgww | ||
| 37 | ggEeAoGBAKc/boW/QWopffCfRxkwkJoJHdpqMx7FPYaWsxXgUy6P4FmCc5A+dTGZ | ||
| 38 | R3pS+4Xk2aZ7OJtoioSbh8YetX6GS1NbWc9xZRmIbs5mrmuINvvsKNzC16W75Sw5 | ||
| 39 | JkvamnAYlTeVEFYj9hXtugRe3jlP/bdDH7WkZW/NgBHkcJVbUM1JAhUA9wcx7fps | ||
| 40 | BgPVhYocrJxl51BmZW8CgYBN30wDppGK9RlvUEYlmeVobzDjaeHls12YuyiGSPze | ||
| 41 | mQQ/X4gMnHMkDSBduSqaPxiWJ+Rih8F7dGJT/GEnqHqRCZ228U2cVA9YBu5JdAfO | ||
| 42 | VX4jzhb2ytxaYQF+yXG1TfbcNCmHaPZeIJOz2/XkCWxBF5WS6wG1c6Vqftgy7Q4C | ||
| 43 | uAOBhQACgYEApu25HkB1b4gKMIV7aLGNSIknMzYgrB7o1kQxeDf34dDVRM9OZ8tk | ||
| 44 | umz6tl+iUcNe5EoxdsYV1IXSddjOi08LOLsZq7AQlNnKvbtlmMDULpqkZJD0bO7A | ||
| 45 | 29nisJfKy1URqABLw5DgfcPh1ZLXtmDfUgJvmjgTmvTPT2j9TPjq7RUwCQYFKw4D | ||
| 46 | AhsFAAMxADAuAhUAvtv6AkMolix1Jvy3UnVEIUqdCUICFQC+jq8P49mwrY9oJ24n | ||
| 47 | 5rKUjNBhSg== | ||
| 48 | -----END CERTIFICATE----- | ||
| 49 | |||
diff --git a/src/lib/libssl/test/p b/src/lib/libssl/test/p new file mode 100644 index 0000000000..b3de76751e --- /dev/null +++ b/src/lib/libssl/test/p | |||
| @@ -0,0 +1,294 @@ | |||
| 1 | # | ||
| 2 | # test/Makefile.ssl | ||
| 3 | # | ||
| 4 | |||
| 5 | DIR= test | ||
| 6 | TOP= .. | ||
| 7 | CC= cc | ||
| 8 | INCLUDES= -I../include | ||
| 9 | CFLAG= -g | ||
| 10 | INSTALLTOP= /usr/local/ssl | ||
| 11 | MAKEFILE= Makefile.ssl | ||
| 12 | MAKE= make -f $(MAKEFILE) | ||
| 13 | MAKEDEPEND= makedepend -f$(MAKEFILE) | ||
| 14 | |||
| 15 | PEX_LIBS= | ||
| 16 | EX_LIBS= #-lnsl -lsocket | ||
| 17 | |||
| 18 | CFLAGS= $(INCLUDES) $(CFLAG) | ||
| 19 | |||
| 20 | GENERAL=Makefile.ssl | ||
| 21 | |||
| 22 | DLIBCRYPTO= ../libcrypto.a | ||
| 23 | DLIBSSL= ../libssl.a | ||
| 24 | LIBCRYPTO= -L.. -lcrypto | ||
| 25 | LIBSSL= -L.. -lssl | ||
| 26 | |||
| 27 | BNTEST= bntest | ||
| 28 | EXPTEST= exptest | ||
| 29 | IDEATEST= ideatest | ||
| 30 | SHATEST= shatest | ||
| 31 | SHA1TEST= sha1test | ||
| 32 | MDC2TEST= mdc2test | ||
| 33 | RMDTEST= rmdtest | ||
| 34 | MD2TEST= md2test | ||
| 35 | MD5TEST= md5test | ||
| 36 | HMACTEST= hmactest | ||
| 37 | RC2TEST= rc2test | ||
| 38 | RC4TEST= rc4test | ||
| 39 | RC5TEST= rc5test | ||
| 40 | BFTEST= bftest | ||
| 41 | CASTTEST= casttest | ||
| 42 | DESTEST= destest | ||
| 43 | RANDTEST= randtest | ||
| 44 | DHTEST= dhtest | ||
| 45 | DSATEST= dsatest | ||
| 46 | METHTEST= methtest | ||
| 47 | SSLTEST= ssltest | ||
| 48 | |||
| 49 | EXE= $(BNTEST) $(IDEATEST) $(MD2TEST) $(MD5TEST) $(HMACTEST) \ | ||
| 50 | $(RC2TEST) $(RC4TEST) $(RC5TEST) \ | ||
| 51 | $(DESTEST) $(SHATEST) $(SHA1TEST) $(MDC2TEST) $(RMDTEST) \ | ||
| 52 | $(RANDTEST) $(DHTEST) \ | ||
| 53 | $(BFTEST) $(CASTTEST) $(SSLTEST) $(EXPTEST) $(DSATEST) | ||
| 54 | |||
| 55 | # $(METHTEST) | ||
| 56 | |||
| 57 | OBJ= $(BNTEST).o $(IDEATEST).o $(MD2TEST).o $(MD5TEST).o $(HMACTEST).o \ | ||
| 58 | $(RC2TEST).o $(RC4TEST).o $(RC5TEST).o \ | ||
| 59 | $(DESTEST).o $(SHATEST).o $(SHA1TEST).o $(MDC2TEST).o $(RMDTEST).o \ | ||
| 60 | $(RANDTEST).o $(DHTEST).o $(CASTTEST).o \ | ||
| 61 | $(BFTEST).o $(SSLTEST).o $(DSATEST).o $(EXPTEST).o | ||
| 62 | SRC= $(BNTEST).c $(IDEATEST).c $(MD2TEST).c $(MD5TEST).c $(HMACTEST).c \ | ||
| 63 | $(RC2TEST).c $(RC4TEST).c $(RC5TEST).c \ | ||
| 64 | $(DESTEST).c $(SHATEST).c $(SHA1TEST).c $(MDC2TEST).c $(RMDTEST).c \ | ||
| 65 | $(RANDTEST).c $(DHTEST).c $(CASTTEST).c \ | ||
| 66 | $(BFTEST).c $(SSLTEST).c $(DSATEST).c $(EXPTEST).c | ||
| 67 | |||
| 68 | EXHEADER= | ||
| 69 | HEADER= $(EXHEADER) | ||
| 70 | |||
| 71 | ALL= $(GENERAL) $(SRC) $(HEADER) | ||
| 72 | |||
| 73 | top: | ||
| 74 | (cd ..; $(MAKE) DIRS=$(DIR) all) | ||
| 75 | |||
| 76 | all: exe | ||
| 77 | |||
| 78 | exe: $(EXE) | ||
| 79 | |||
| 80 | files: | ||
| 81 | perl $(TOP)/util/files.pl Makefile.ssl >> $(TOP)/MINFO | ||
| 82 | |||
| 83 | links: | ||
| 84 | /bin/rm -f Makefile | ||
| 85 | $(TOP)/util/point.sh Makefile.ssl Makefile ; | ||
| 86 | |||
| 87 | errors: | ||
| 88 | |||
| 89 | install: | ||
| 90 | |||
| 91 | tags: | ||
| 92 | ctags $(SRC) | ||
| 93 | |||
| 94 | tests: exe apps \ | ||
| 95 | test_des test_idea test_sha test_md5 test_hmac test_md2 test_mdc2 \ | ||
| 96 | test_rc2 test_rc4 test_rc5 test_bf test_cast \ | ||
| 97 | test_rand test_enc test_x509 test_rsa test_crl test_sid test_req \ | ||
| 98 | test_pkcs7 test_bn test_verify test_dh test_dsa test_reqgen \ | ||
| 99 | test_ss test_ssl test_ca | ||
| 100 | |||
| 101 | apps: | ||
| 102 | @(cd ../apps; $(MAKE) CC='${CC}' CFLAG='${CFLAG}' INSTALLTOP='${INSTALLTOP}' PEX_LIBS='${PEX_LIBS}' EX_LIBS='${EX_LIBS}' all) | ||
| 103 | |||
| 104 | test_des: | ||
| 105 | #./$(DESTEST) | ||
| 106 | |||
| 107 | test_idea: | ||
| 108 | ./$(IDEATEST) | ||
| 109 | |||
| 110 | test_sha: | ||
| 111 | ./$(SHATEST) | ||
| 112 | ./$(SHA1TEST) | ||
| 113 | |||
| 114 | test_mdc2: | ||
| 115 | ./$(MDC2TEST) | ||
| 116 | |||
| 117 | test_md5: | ||
| 118 | ./$(MD5TEST) | ||
| 119 | |||
| 120 | test_hmac: | ||
| 121 | ./$(HMACTEST) | ||
| 122 | |||
| 123 | test_md2: | ||
| 124 | ./$(MD2TEST) | ||
| 125 | |||
| 126 | test_rmd: | ||
| 127 | ./$(RMDTEST) | ||
| 128 | |||
| 129 | test_bf: | ||
| 130 | ./$(BFTEST) | ||
| 131 | |||
| 132 | test_cast: | ||
| 133 | ./$(CASTTEST) | ||
| 134 | |||
| 135 | test_rc2: | ||
| 136 | ./$(RC2TEST) | ||
| 137 | |||
| 138 | test_rc4: | ||
| 139 | ./$(RC4TEST) | ||
| 140 | |||
| 141 | test_rc5: | ||
| 142 | ./$(RC5TEST) | ||
| 143 | |||
| 144 | test_rand: | ||
| 145 | ./$(RANDTEST) | ||
| 146 | |||
| 147 | test_enc: | ||
| 148 | @sh ./testenc | ||
| 149 | |||
| 150 | test_x509: | ||
| 151 | echo test normal x509v1 certificate | ||
| 152 | sh ./tx509 2>/dev/null | ||
| 153 | echo test first x509v3 certificate | ||
| 154 | sh ./tx509 v3-cert1.pem 2>/dev/null | ||
| 155 | echo test second x509v3 certificate | ||
| 156 | sh ./tx509 v3-cert2.pem 2>/dev/null | ||
| 157 | |||
| 158 | test_rsa: | ||
| 159 | @sh ./trsa 2>/dev/null | ||
| 160 | |||
| 161 | test_crl: | ||
| 162 | @sh ./tcrl 2>/dev/null | ||
| 163 | |||
| 164 | test_sid: | ||
| 165 | @sh ./tsid 2>/dev/null | ||
| 166 | |||
| 167 | test_req: | ||
| 168 | @sh ./treq 2>/dev/null | ||
| 169 | @sh ./treq testreq2.pem 2>/dev/null | ||
| 170 | |||
| 171 | test_pkcs7: | ||
| 172 | @sh ./tpkcs7 2>/dev/null | ||
| 173 | @sh ./tpkcs7d 2>/dev/null | ||
| 174 | |||
| 175 | test_bn: | ||
| 176 | @echo 'test a^b%c implementations' | ||
| 177 | ./$(EXPTEST) | ||
| 178 | @echo starting big number library test, could take a while... | ||
| 179 | @(./$(BNTEST)|bc) | awk '{ \ | ||
| 180 | if ($$0 != "0") {print "error"; exit(1); } \ | ||
| 181 | if (((NR+1)%64) == 0) print NR+1," tests done"; }' | ||
| 182 | |||
| 183 | test_verify: | ||
| 184 | @echo "The following command should have some OK's and some failures" | ||
| 185 | @echo "There are definitly a few expired certificates" | ||
| 186 | ../apps/ssleay verify -CApath ../certs ../certs/*.pem | ||
| 187 | |||
| 188 | test_dh: | ||
| 189 | @echo "Generate as set of DH parameters" | ||
| 190 | ./$(DHTEST) | ||
| 191 | |||
| 192 | test_dsa: | ||
| 193 | @echo "Generate as set of DSA parameters" | ||
| 194 | ./$(DSATEST) | ||
| 195 | |||
| 196 | test_reqgen: | ||
| 197 | @echo "Generate and verify a certificate request" | ||
| 198 | @sh ./testgen | ||
| 199 | |||
| 200 | test_ss: | ||
| 201 | @echo "Generate and certify a test certificate" | ||
| 202 | @sh ./testss | ||
| 203 | |||
| 204 | test_ssl: | ||
| 205 | @echo "test SSL protocol" | ||
| 206 | @sh ./testssl | ||
| 207 | |||
| 208 | test_ca: | ||
| 209 | @echo "Generate and certify a test certificate via the 'ca' program" | ||
| 210 | @sh ./testca | ||
| 211 | |||
| 212 | lint: | ||
| 213 | lint -DLINT $(INCLUDES) $(SRC)>fluff | ||
| 214 | |||
| 215 | depend: | ||
| 216 | $(MAKEDEPEND) $(INCLUDES) $(PROGS) $(SRC) | ||
| 217 | |||
| 218 | dclean: | ||
| 219 | perl -pe 'if (/^# DO NOT DELETE THIS LINE/) {print; exit(0);}' $(MAKEFILE) >Makefile.new | ||
| 220 | mv -f Makefile.new $(MAKEFILE) | ||
| 221 | |||
| 222 | clean: | ||
| 223 | /bin/rm -f *.o *.obj lib tags core .pure .nfs* *.old *.bak fluff $(EXE) *.ss log | ||
| 224 | |||
| 225 | $(DLIBSSL): | ||
| 226 | (cd ../ssl; $(MAKE)) | ||
| 227 | |||
| 228 | $(DLIBCRYPTO): | ||
| 229 | (cd ../crypto; $(MAKE)) | ||
| 230 | |||
| 231 | $(BNTEST): $(BNTEST).o $(DLIBCRYPTO) | ||
| 232 | $(CC) -o $(BNTEST) $(CFLAGS) $(BNTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 233 | |||
| 234 | $(EXPTEST): $(EXPTEST).o $(DLIBCRYPTO) | ||
| 235 | $(CC) -o $(EXPTEST) $(CFLAGS) $(EXPTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 236 | |||
| 237 | $(IDEATEST): $(IDEATEST).o $(DLIBCRYPTO) | ||
| 238 | $(CC) -o $(IDEATEST) $(CFLAGS) $(IDEATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 239 | |||
| 240 | $(MD2TEST): $(MD2TEST).o $(DLIBCRYPTO) | ||
| 241 | $(CC) -o $(MD2TEST) $(CFLAGS) $(MD2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 242 | |||
| 243 | $(SHATEST): $(SHATEST).o $(DLIBCRYPTO) | ||
| 244 | $(CC) -o $(SHATEST) $(CFLAGS) $(SHATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 245 | |||
| 246 | $(SHA1TEST): $(SHA1TEST).o $(DLIBCRYPTO) | ||
| 247 | $(CC) -o $(SHA1TEST) $(CFLAGS) $(SHA1TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 248 | |||
| 249 | $(RMDTEST): $(RMDTEST).o $(DLIBCRYPTO) | ||
| 250 | $(CC) -o $(RMDTEST) $(CFLAGS) $(RMDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 251 | |||
| 252 | $(MDC2TEST): $(MDC2TEST).o $(DLIBCRYPTO) | ||
| 253 | $(CC) -o $(MDC2TEST) $(CFLAGS) $(MDC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 254 | |||
| 255 | $(MD5TEST): $(MD5TEST).o $(DLIBCRYPTO) | ||
| 256 | $(CC) -o $(MD5TEST) $(CFLAGS) $(MD5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 257 | |||
| 258 | $(HMACTEST): $(HMACTEST).o $(DLIBCRYPTO) | ||
| 259 | $(CC) -o $(HMACTEST) $(CFLAGS) $(HMACTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 260 | |||
| 261 | $(RC2TEST): $(RC2TEST).o $(DLIBCRYPTO) | ||
| 262 | $(CC) -o $(RC2TEST) $(CFLAGS) $(RC2TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 263 | |||
| 264 | $(BFTEST): $(BFTEST).o $(DLIBCRYPTO) | ||
| 265 | $(CC) -o $(BFTEST) $(CFLAGS) $(BFTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 266 | |||
| 267 | $(CASTTEST): $(CASTTEST).o $(DLIBCRYPTO) | ||
| 268 | $(CC) -o $(CASTTEST) $(CFLAGS) $(CASTTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 269 | |||
| 270 | $(RC4TEST): $(RC4TEST).o $(DLIBCRYPTO) | ||
| 271 | $(CC) -o $(RC4TEST) $(CFLAGS) $(RC4TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 272 | |||
| 273 | $(RC5TEST): $(RC5TEST).o $(DLIBCRYPTO) | ||
| 274 | $(CC) -o $(RC5TEST) $(CFLAGS) $(RC5TEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 275 | |||
| 276 | $(DESTEST): $(DESTEST).o $(DLIBCRYPTO) | ||
| 277 | $(CC) -o $(DESTEST) $(CFLAGS) $(DESTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 278 | |||
| 279 | $(RANDTEST): $(RANDTEST).o $(DLIBCRYPTO) | ||
| 280 | $(CC) -o $(RANDTEST) $(CFLAGS) $(RANDTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 281 | |||
| 282 | $(DHTEST): $(DHTEST).o $(DLIBCRYPTO) | ||
| 283 | $(CC) -o $(DHTEST) $(CFLAGS) $(DHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 284 | |||
| 285 | $(DSATEST): $(DSATEST).o $(DLIBCRYPTO) | ||
| 286 | $(CC) -o $(DSATEST) $(CFLAGS) $(DSATEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 287 | |||
| 288 | $(METHTEST): $(METHTEST).o $(DLIBCRYPTO) | ||
| 289 | $(CC) -o $(METHTEST) $(CFLAGS) $(METHTEST).o $(PEX_LIBS) $(LIBCRYPTO) $(EX_LIBS) | ||
| 290 | |||
| 291 | $(SSLTEST): $(SSLTEST).o $(DLIBSSL) $(DLIBCRYPTO) | ||
| 292 | $(CC) -o $(SSLTEST) $(CFLAGS) $(SSLTEST).o $(PEX_LIBS) $(LIBSSL) $(LIBCRYPTO) $(EX_LIBS) | ||
| 293 | |||
| 294 | # DO NOT DELETE THIS LINE -- make depend depends on it. | ||
diff --git a/src/lib/libssl/test/riptest b/src/lib/libssl/test/riptest new file mode 100644 index 0000000000..8685d0ce53 --- /dev/null +++ b/src/lib/libssl/test/riptest | |||
| Binary files differ | |||
diff --git a/src/lib/libssl/test/test.txt b/src/lib/libssl/test/test.txt new file mode 100644 index 0000000000..c6d8d50ba9 --- /dev/null +++ b/src/lib/libssl/test/test.txt | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #!/bin/sh | ||
| 2 | |||
| 3 | test=./test.txt | ||
| 4 | |||
| 5 | cat $0 >$test; | ||
| 6 | |||
| 7 | for i in rc4 des-cfb des-ofb des-ecb des-cbc des-ede des-ede3 \ | ||
| 8 | des-cbc-ede des-cbc-ede3 idea-ecb idea-cfb idea-ofb idea-cbc | ||
| 9 | do | ||
| 10 | echo $i | ||
| 11 | ../apps/ssleay $i -e -k test < $test > $test.$i.cipher | ||
| 12 | ../apps/ssleay $i -d -k test < $test.$i.cipher >$test.$i.clear | ||
| 13 | cmp $test $test.$i.clear | ||
| 14 | if [ $? != 0 ] | ||
| 15 | then | ||
| 16 | exit 1 | ||
| 17 | else | ||
| 18 | /bin/rm $test.$i.cipher $test.$i.clear | ||
| 19 | fi | ||
| 20 | |||
| 21 | echo $i base64 | ||
| 22 | ../apps/ssleay $i -a -e -k test < $test > $test.$i.cipher | ||
| 23 | ../apps/ssleay $i -a -d -k test < $test.$i.cipher >$test.$i.clear | ||
| 24 | cmp $test $test.$i.clear | ||
| 25 | if [ $? != 0 ] | ||
| 26 | then | ||
| 27 | exit 1 | ||
| 28 | else | ||
| 29 | /bin/rm $test.$i.cipher $test.$i.clear | ||
| 30 | fi | ||
| 31 | done | ||
diff --git a/src/lib/libssl/test/testkey.pem b/src/lib/libssl/test/testkey.pem new file mode 100644 index 0000000000..edd5a5773f --- /dev/null +++ b/src/lib/libssl/test/testkey.pem | |||
| @@ -0,0 +1,2 @@ | |||
| 1 | -----BEGIN RSA PRIVATE KEY----- | ||
| 2 | -----END RSA PRIVATE KEY----- | ||
diff --git a/src/lib/libssl/test/testreq.pem b/src/lib/libssl/test/testreq.pem new file mode 100644 index 0000000000..1311fa7785 --- /dev/null +++ b/src/lib/libssl/test/testreq.pem | |||
| @@ -0,0 +1,9 @@ | |||
| 1 | -----BEGIN CERTIFICATE REQUEST----- | ||
| 2 | MIIBQjCB7QIBADCBhzELMAkGA1UEBhMCQVUxEzARBgNVBAgTClF1ZWVuc2xhbmQx | ||
| 3 | ETAPBgNVBAcTCEJyaXNiYW5lMRowGAYDVQQKExFDcnlwdFNvZnQgUHR5IEx0ZDET | ||
| 4 | MBEGA1UEAxMKRXJpYyBZb3VuZzEfMB0GCSqGSIb3DQEJARYQZWF5QG1pbmNvbS5v | ||
| 5 | ei5hdTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDVKdT5QB2ZojtNQGjA/9J7s2o4 | ||
| 6 | RNkuSq8l377uWLAyMljtdkcoRsvUy5lZ997UDHFTbVFA038ZBrmw7l5EyHeXAgMB | ||
| 7 | AAGgADANBgkqhkiG9w0BAQQFAANBAKnaFr4u7PTdfmpjiX/H8Ho4UWGVRWUlvD2R | ||
| 8 | /D9yoTj7TN3uODx2BD0drErVBe/Zjv81vhH6Yo3cJO/hRS3A7jw= | ||
| 9 | -----END CERTIFICATE REQUEST----- | ||
